Revert incorrect RCL_3 drop: RCL_3 PDK_3.0.2
authorPat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:31:01 +0100
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
Revert incorrect RCL_3 drop: Revision: 201032 Kit: 201035
group/bld.inf
inc/musavasettings.h
inc/musavasettings.inl
inc/muscallmonitorobserver.h
inc/muscommon.h
inc/musfactorysettings.h
inc/musfactorysettings.inl
inc/musindicatorapi.h
inc/musresourcefinderutil.inl
inc/mussesseioninformationapi.h
inc/mussessionproperties.h
inc/mussettings.h
inc/mussettings.inl
inc/musuid.hrh
layers.sysdef.xml
mmsharing/Conf/multimediasharing.confml
mmsharing/Conf/multimediasharing_1028238B.crml
mmsharing/cenrep/1028238b.txt
mmsharing/cenrep/keys_multimediasharing.xls
mmsharing/group/bld.inf
mmsharing/group/group.pro
mmsharing/inc/musavainterface.h
mmsharing/inc/musavaobserver.h
mmsharing/inc/musavasettingsobserver.h
mmsharing/livecommsui/bwins/livecommsuiu.def
mmsharing/livecommsui/eabi/livecommsuiu.def
mmsharing/livecommsui/lcui/inc/lceffecthandler.h
mmsharing/livecommsui/lcui/inc/lcexport.h
mmsharing/livecommsui/lcui/inc/lclogger.h
mmsharing/livecommsui/lcui/inc/lcuicomponentrepository.h
mmsharing/livecommsui/lcui/inc/lcuidefs.h
mmsharing/livecommsui/lcui/inc/lcvideowidget.h
mmsharing/livecommsui/lcui/inc/lcview.h
mmsharing/livecommsui/lcui/inc/lcviewmanager.h
mmsharing/livecommsui/lcui/inc/lcviewmanager_p.h
mmsharing/livecommsui/lcui/livecommsui.qrc
mmsharing/livecommsui/lcui/resources/hbpushbutton_color.css
mmsharing/livecommsui/lcui/resources/lcviews.uip
mmsharing/livecommsui/lcui/resources/lcviews/lcidleview.docml
mmsharing/livecommsui/lcui/resources/lcviews/lcreceiveView.docml
mmsharing/livecommsui/lcui/resources/lcviews/lcreceiveonlyView.docml
mmsharing/livecommsui/lcui/resources/lcviews/lcsendview.docml
mmsharing/livecommsui/lcui/resources/lcviews/lctwowayview.docml
mmsharing/livecommsui/lcui/resources/lcviews/lcvtview.docml
mmsharing/livecommsui/lcui/resources/win_appear.fxml
mmsharing/livecommsui/lcui/resources/win_disappear.fxml
mmsharing/livecommsui/lcui/resources/win_flip.fxml
mmsharing/livecommsui/lcui/resources/win_swap_down.fxml
mmsharing/livecommsui/lcui/resources/win_swap_up.fxml
mmsharing/livecommsui/lcui/src/lceffecthandler.cpp
mmsharing/livecommsui/lcui/src/lcuicomponentrepository.cpp
mmsharing/livecommsui/lcui/src/lcvideowidget.cpp
mmsharing/livecommsui/lcui/src/lcview.cpp
mmsharing/livecommsui/lcui/src/lcviewmanager.cpp
mmsharing/livecommsui/lcui/src/lcviewmanager_p.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/data/20021341.rss
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/group/bld.inf
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/group/dummymusengineplugin.mmp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/mccdatareceiver.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/mccdatareceiverobserver.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/mccdatasender.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/mccdatastructures.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengcamerahandler.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengdisplayhandler.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musenglivesession.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musenglivevideoplayer.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musenglocalvideoplayer.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musenglogger.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengmcesession.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengremotevideoplayer.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengsessionmanager.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengtwowayrecvsession.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengtwowaysession.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengvideoplayerbase.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/svptimer.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/svptimerobserver.h
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/install/lcui_update_udeb.pkg
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/install/lcui_update_urel.pkg
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/install/sis_update_udeb.bat
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/install/sis_update_urel.bat
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/mccdatareceiver.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/mccdatasender.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengcamerahandler.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengclipvideoplayer.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musenginepluginentry.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musenglivesession.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musenglivevideoplayer.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musenglocalvideoplayer.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengmcesession.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengmceutils.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengremotevideoplayer.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengsessionmanager.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengtwowayrecvsession.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengtwowaysession.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengvideoplayerbase.cpp
mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/svptimer.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/data/20029876.rss
mmsharing/livecommsui/lcui/tsrc/ipvtengine/group/bld.inf
mmsharing/livecommsui/lcui/tsrc/ipvtengine/group/ipvtengineplugin.mmp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/lcvtindicatorcontroller.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccdatareceiver.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccdatareceiverobserver.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccdatasender.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccdatastructures.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccscreen.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengcamerahandler.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengdisplayhandler.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musenglivevideoplayer.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musenglocalvideoplayer.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musenglogger.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengmcesession.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengremotevideoplayer.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengsessionmanager.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengtwowayrecvsession.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengtwowaysession.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengvideoplayerbase.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/svptimer.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/svptimerobserver.h
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/mccdatareceiver.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/mccdatasender.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/mccscreen.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengcamerahandler.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengclipvideoplayer.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musenginepluginentry.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musenglivevideoplayer.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musenglocalvideoplayer.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengmcesession.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengmceutils.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengremotevideoplayer.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengsessionmanager.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengtwowayrecvsession.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengtwowaysession.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengvideoplayerbase.cpp
mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/svptimer.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/bwins/mceclientstubu.def
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/group/mceclient.mmp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mccscreen.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceamrcodec.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceaudiocodec.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceaudiostream.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceavccodec.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcecamerasource.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcecodec.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcedefs.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcedisplaysink.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcefilesink.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcefilesource.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceh263codec.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceinsession.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceinsessionobserver.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcemanager.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcemediasink.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcemediasource.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcemediastream.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceoutsession.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcertpobserver.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcertpsink.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcertpsource.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcesession.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcesessionobserver.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcespeakersink.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcestreambundle.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcestreamobserver.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcetransactiondatacontainer.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcevideocodec.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcevideostream.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mussessionsimulator.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mustestdrawer.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mccscreen.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceamrcodec.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceaudiocodec.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceaudiostream.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceavccodec.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcecamerasource.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcecodec.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcedisplaysink.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcefilesink.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcefilesource.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceh263codec.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceinsession.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcemanager.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcemediasink.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcemediasource.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcemediastream.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceoutsession.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcertpsink.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcertpsource.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcesession.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcespeakersink.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcestreambundle.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcetransactiondatacontainer.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcevideocodec.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcevideostream.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mussessionsimulator.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/staticdllentry.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/group/sipclient.mmp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/CSipSseTestTls.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/sipconnection.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/sipmessageelements.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/siprequestelements.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/sipresponseelements.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/sipservertransaction.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/siptransactionbase.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/CSIPMessageElements.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/CSIPRequestElements.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/CSIPResponseElements.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/CSipSseTestTls.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csipconnection.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csipservertransaction.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csiptransactionbase.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/group/sipprofile.mmp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/inc/sipprofile.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/inc/sipprofileregistry.h
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipmanagedprofileregistrystub.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipmanagedprofilestub.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipprofilealrcontroller.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipprofileregistrybasestub.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipprofileregistrystub.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipprofilestub.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipstub.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/app/lcapplication.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/app/lcapplication.h
mmsharing/livecommsui/lcui/tsrc/mustester/app/main.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/app/moc_lcapplication.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/app/must.loc
mmsharing/livecommsui/lcui/tsrc/mustester/app/must.pro
mmsharing/livecommsui/lcui/tsrc/mustester/app/must.rss
mmsharing/livecommsui/lcui/tsrc/mustester/app/must_reg.rss
mmsharing/livecommsui/lcui/tsrc/mustester/app/mustestdirector.cpp
mmsharing/livecommsui/lcui/tsrc/mustester/app/mustestdirector.h
mmsharing/livecommsui/lcui/tsrc/mustester/group/bld.inf
mmsharing/livecommsui/lcui/tsrc/mustester/group/install.bat
mmsharing/livecommsui/lcui/tsrc/mustester/group/install_armv5.bat
mmsharing/livecommsui/lcui/tsrc/mustester/group/uninstall.bat
mmsharing/livecommsui/lcui/tsrc/mustester/group/uninstall_armv5.bat
mmsharing/livecommsui/lcui/tsrc/mustester/install/must_armv5_udeb.pkg
mmsharing/livecommsui/lcui/tsrc/mustester/install/must_armv5_urel.pkg
mmsharing/livecommsui/lcui/tsrc/mustester/install/sis_udeb.bat
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpad.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpad_stub.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpadvtkeyhandler.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpadvtkeyhandler_stub.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbabstractbutton.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbaction.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbdialog.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbdocumentloader.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbeffect.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbframedrawer.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbgesture.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbgesturefilter.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbicon.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbinstance.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hblabel.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hblineedit.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbmainwindow.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbmenu.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbmessagebox.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbprogressdialog.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbpushbutton.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbstub_helper.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbstubs.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbtapgesture.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbtoolbar.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbtransparentwindow.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbview.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbwidget.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lceffecthandler.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcuicomponentrepository.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcuidefs.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcvideowidget.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcview.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcviewmanager.h
mmsharing/livecommsui/lcui/tsrc/ut_lcui/lcuiengine_stub/symbian/stub_lcuiengine_p.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/lcuiengine_stub/win32/stub_lcuiengine_p.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/runtest.cmd
mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/main.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lceffecthandler.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcuicomponentrepository.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcvideowidget.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcview.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcviewmanager.cpp
mmsharing/livecommsui/lcui/tsrc/ut_lcui/ut_lcui.pro
mmsharing/livecommsui/lcuiengine/inc/lcactivitymanager.h
mmsharing/livecommsui/lcuiengine/inc/lcuiengine.h
mmsharing/livecommsui/lcuiengine/inc/lcuiengine_p.h
mmsharing/livecommsui/lcuiengine/src/lcactivitymanager.cpp
mmsharing/livecommsui/lcuiengine/src/lcuiengine.cpp
mmsharing/livecommsui/lcuiengine/src/lcuiengine_p.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbaction.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbdialog.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbinstance.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hblabel.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hblineedit.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbmainwindow.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbmessagebox.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbnote.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbprogressdialog.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbstubs.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbview.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbwidget.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/qthighway_stub.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/qthighway_stub_helper.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/inc/ut_lcactivitymanager.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/inc/ut_lcuiengine.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/data/10203399.rss
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/group/bld.inf
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/group/lcenginepluginstub.mmp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/centralrepository_stub_helper.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/lcenginestub.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/lcsessionstub.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/lcvideoplayerstub.h
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/DllEntry.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/centralrepository_stub.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/lcenginestub.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/lcsessionstub.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/lcvideoplayerstub.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/runtest.cmd
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/src/main.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/src/ut_lcactivitymanager.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/src/ut_lcuiengine.cpp
mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/ut_lcuieng.pro
mmsharing/livecommsui/lcuiengine/tsrc/win32/launch.bat
mmsharing/livecommsui/lcuiengine/tsrc/win32/lcconfig.xml
mmsharing/livecommsui/lcuiengine/tsrc/win32/lcconfiguration.cpp
mmsharing/livecommsui/lcuiengine/tsrc/win32/lcconfiguration.h
mmsharing/livecommsui/lcuiengine/tsrc/win32/lcuiengine_p.cpp
mmsharing/livecommsui/lcuiengine/tsrc/win32/lcuiengine_p.h
mmsharing/livecommsui/lcuiengine/tsrc/win32/lcuienginesimulator.cpp
mmsharing/livecommsui/lcuiengine/tsrc/win32/lcuienginesimulator.h
mmsharing/livecommsui/lcuiengine/tsrc/win32/lcvideowidget.cpp
mmsharing/livecommsui/lcuiengine/tsrc/win32/package.bat
mmsharing/livecommsui/livecommsui.pro
mmsharing/livecommsui/tsrc/win32/livecommsui.pro
mmsharing/mmshapp/help/data/xhtml.zip
mmsharing/mmshapp/help/group/bld.inf
mmsharing/mmshapp/help/inc/msh.hlp.hrh
mmsharing/mmshapp/help/rom/mmshuihelps_variant.iby
mmsharing/mmshapp/inc/lcapplication.h
mmsharing/mmshapp/mmshapp.pro
mmsharing/mmshapp/src/lcapplication.cpp
mmsharing/mmshapp/src/main.cpp
mmsharing/mmshapp/tsrc/ut_mmshapp/inc/ut_lcapplication.h
mmsharing/mmshapp/tsrc/ut_mmshapp/src/main.cpp
mmsharing/mmshapp/tsrc/ut_mmshapp/src/ut_lcapplication.cpp
mmsharing/mmshapp/tsrc/ut_mmshapp/stubs/hbapplication.h
mmsharing/mmshapp/tsrc/ut_mmshapp/ut_mmshapp.pro
mmsharing/mmshavailability/group/musavailabilityplugin.mmp
mmsharing/mmshavailability/inc/mmusavacapabilityqueryobserver.h
mmsharing/mmshavailability/inc/musavaavailability.h
mmsharing/mmshavailability/inc/musavaavailabilityobserver.h
mmsharing/mmshavailability/inc/musavacalleventmonitor.h
mmsharing/mmshavailability/inc/musavacapability.h
mmsharing/mmshavailability/inc/musavacapabilityquerybase.h
mmsharing/mmshavailability/inc/musavacapabilitytimer.h
mmsharing/mmshavailability/inc/musavaconnectionavailability.h
mmsharing/mmshavailability/inc/musavacontactavailability.h
mmsharing/mmshavailability/inc/musavadefaultimp.h
mmsharing/mmshavailability/inc/musavanetworkavailability.h
mmsharing/mmshavailability/inc/musavaoptionhandler.h
mmsharing/mmshavailability/inc/musavaregisteravailability.h
mmsharing/mmshavailability/inc/musavasettingsimp.h
mmsharing/mmshavailability/inc/musavasip.h
mmsharing/mmshavailability/inc/musavasipheaderutil.h
mmsharing/mmshavailability/src/musavacalleventmonitor.cpp
mmsharing/mmshavailability/src/musavacapability.cpp
mmsharing/mmshavailability/src/musavacapabilityquery.cpp
mmsharing/mmshavailability/src/musavacapabilityquerybase.cpp
mmsharing/mmshavailability/src/musavacapabilitysipagent.cpp
mmsharing/mmshavailability/src/musavacapabilitytimer.cpp
mmsharing/mmshavailability/src/musavaconnectionavailability.cpp
mmsharing/mmshavailability/src/musavacontactavailability.cpp
mmsharing/mmshavailability/src/musavadefaultimp.cpp
mmsharing/mmshavailability/src/musavadefaultoptionhandler.cpp
mmsharing/mmshavailability/src/musavanetworkavailability.cpp
mmsharing/mmshavailability/src/musavanetworkmodestatus.cpp
mmsharing/mmshavailability/src/musavanetworkregistrationstatus.cpp
mmsharing/mmshavailability/src/musavaoptionhandler.cpp
mmsharing/mmshavailability/src/musavaregisteravailability.cpp
mmsharing/mmshavailability/src/musavasettingavailability.cpp
mmsharing/mmshavailability/src/musavasettingsimp.cpp
mmsharing/mmshavailability/src/musavasip.cpp
mmsharing/mmshavailability/src/musavasipheaderutil.cpp
mmsharing/mmshavailability/src/musavaterminal.cpp
mmsharing/mmshavailability/tsrc/ut_availability/Group/bld.inf
mmsharing/mmshavailability/tsrc/ut_availability/Group/ut_availability.mmp
mmsharing/mmshavailability/tsrc/ut_availability/Group/ut_availability.pkg
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavaavailabilityobserverimp.h
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavacallmonitorobserver.h
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavacapabilityqueryobserverimp.h
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavaobserverimp.h
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavasettingsobserverimp.h
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/CMusAvaAvailabilityObserverImp.cpp
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/CSipSseTestTls.cpp
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavacallmonitorobserver.cpp
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavacapabilityqueryobserverimp.cpp
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavaobserverimp.cpp
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavasettingsobserverimp.cpp
mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/muscallmonitorstub.cpp
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaCallEventMonitor.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaCapability.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaCapabilityQuery.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaConnectionAvailability.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaContactAvailability.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaNetworkAvailability.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaOptionHandler.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaRegisterAvailability.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaSettingsImp.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaTerminal.h
mmsharing/mmshavailability/tsrc/ut_availability/inc/musavacapabilitytesthelper.h
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCallEventMonitor.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapability.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilityExchange.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilityQuery.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilitySipAgent.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaConnectionAvailability.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaContactAvailability.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaDefaultImp.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaDefaultOptionHandler.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaNetworkAvailability.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaOptionHandler.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaRegisterAvailability.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaSettingAvailability.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaSettingsImp.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaTerminal.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/UT_availabilityDllMain.cpp
mmsharing/mmshavailability/tsrc/ut_availability/src/musavacapabilitytesthelper.cpp
mmsharing/mmshengine/bwins/musengineu.def
mmsharing/mmshengine/data/20021341.rss
mmsharing/mmshengine/eabi/musengineu.def
mmsharing/mmshengine/group/bld.inf
mmsharing/mmshengine/group/musengine.mmp
mmsharing/mmshengine/group/musengineplugin.mmp
mmsharing/mmshengine/inc/musengaudioroutingobserver.h
mmsharing/mmshengine/inc/musengcamerahandler.h
mmsharing/mmshengine/inc/musengclipsession.h
mmsharing/mmshengine/inc/musengclipsessionobserver.h
mmsharing/mmshengine/inc/musengclipvideoplayer.h
mmsharing/mmshengine/inc/musengdisplayhandler.h
mmsharing/mmshengine/inc/musenglivesession.h
mmsharing/mmshengine/inc/musenglivesessionobserver.h
mmsharing/mmshengine/inc/musenglivevideoplayer.h
mmsharing/mmshengine/inc/musenglocalvideoplayer.h
mmsharing/mmshengine/inc/musengmceoutsession.h
mmsharing/mmshengine/inc/musengmcesession.h
mmsharing/mmshengine/inc/musengmceutils.h
mmsharing/mmshengine/inc/musengorientationhandler.h
mmsharing/mmshengine/inc/musengoutsessionobserver.h
mmsharing/mmshengine/inc/musengreceivesession.h
mmsharing/mmshengine/inc/musengreceivesessionobserver.h
mmsharing/mmshengine/inc/musengremotevideoplayer.h
mmsharing/mmshengine/inc/musengsession.h
mmsharing/mmshengine/inc/musengsessiondurationtimer.h
mmsharing/mmshengine/inc/musengsessionmanager.h
mmsharing/mmshengine/inc/musengsessionobserver.h
mmsharing/mmshengine/inc/musengtelephoneutils.h
mmsharing/mmshengine/inc/musengtwowayrecvsession.h
mmsharing/mmshengine/inc/musengtwowaysession.h
mmsharing/mmshengine/inc/musenguriparser.h
mmsharing/mmshengine/inc/musengvideoplayerbase.h
mmsharing/mmshengine/inc/musengvolumechangeobserver.h
mmsharing/mmshengine/inc/mussipprofilehandler.h
mmsharing/mmshengine/inc/mussipprofileuser.h
mmsharing/mmshengine/src/musengcamerahandler.cpp
mmsharing/mmshengine/src/musengclipsession.cpp
mmsharing/mmshengine/src/musengclipvideoplayer.cpp
mmsharing/mmshengine/src/musenginepluginentry.cpp
mmsharing/mmshengine/src/musenglivesession.cpp
mmsharing/mmshengine/src/musenglivevideoplayer.cpp
mmsharing/mmshengine/src/musenglocalvideoplayer.cpp
mmsharing/mmshengine/src/musengmceoutsession.cpp
mmsharing/mmshengine/src/musengmcesession.cpp
mmsharing/mmshengine/src/musengmceutils.cpp
mmsharing/mmshengine/src/musengorientationhandler.cpp
mmsharing/mmshengine/src/musengreceivesession.cpp
mmsharing/mmshengine/src/musengremotevideoplayer.cpp
mmsharing/mmshengine/src/musengsession.cpp
mmsharing/mmshengine/src/musengsessiondurationtimer.cpp
mmsharing/mmshengine/src/musengsessionmanager.cpp
mmsharing/mmshengine/src/musengtelephoneutils.cpp
mmsharing/mmshengine/src/musengtwowayrecvsession.cpp
mmsharing/mmshengine/src/musengtwowaysession.cpp
mmsharing/mmshengine/src/musenguriparser.cpp
mmsharing/mmshengine/src/musengvideoplayerbase.cpp
mmsharing/mmshengine/src/mussipprofilehandler.cpp
mmsharing/mmshengine/tsrc/ut_engine/BWINS/ut_musengineU.DEF
mmsharing/mmshengine/tsrc/ut_engine/eabi/ut_musengineu.def
mmsharing/mmshengine/tsrc/ut_engine/group/bld.inf
mmsharing/mmshengine/tsrc/ut_engine/group/ut_musengine.mmp
mmsharing/mmshengine/tsrc/ut_engine/group/ut_musengine.pkg
mmsharing/mmshengine/tsrc/ut_engine/inc/musengstubs.h
mmsharing/mmshengine/tsrc/ut_engine/inc/musengtestdefs.h
mmsharing/mmshengine/tsrc/ut_engine/inc/sipprofilealrcontroller.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengcamerahandler.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengclipsession.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengclipvideoplayer.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musenglivesession.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musenglivevideoplayer.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengmcesession.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengmceutils.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengorientationhandler.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengoutsession.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengreceivesession.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengremotevideoplayer.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengsession.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengsessionmanager.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengsipprofilehandler.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengtelephoneutils.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengtwowayrecvsession.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengtwowaysession.h
mmsharing/mmshengine/tsrc/ut_engine/inc/ut_muspropertywatch.h
mmsharing/mmshengine/tsrc/ut_engine/src/musengstubs.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengcamerahandler.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengclipsession.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengclipvideoplayer.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenginedllmain.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenglivesession.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenglivevideoplayer.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengmcesession.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengmceutils.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengorientationhandler.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengoutsession.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengreceivesession.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengremotevideoplayer.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengsession.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengsessionmanager.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengsipprofilehandler.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtelephoneutils.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtwowayrecvsession.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtwowaysession.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenguriparser.cpp
mmsharing/mmshengine/tsrc/ut_engine/src/ut_muspropertywatch.cpp
mmsharing/mmshindicator/bwins/musindicatoru.def
mmsharing/mmshindicator/eabi/musindicatoru.def
mmsharing/mmshindicator/group/musindicator.mmp
mmsharing/mmshindicator/inc/musindicatordsa.h
mmsharing/mmshindicator/src/musindicatorapi.cpp
mmsharing/mmshindicator/src/musindicatordsa.cpp
mmsharing/mmshindicator/tsrc/IndicatorTestApp/group/IndicatorTestApp.rss
mmsharing/mmshindicator/tsrc/IndicatorTestApp/inc/IndicatorTestApp.hrh
mmsharing/mmshindicator/tsrc/IndicatorTestApp/src/IndicatorTestAppAppui.cpp
mmsharing/mmshindicator/tsrc/ut_indicator/BWINS/ut_musindicatoru.def
mmsharing/mmshindicator/tsrc/ut_indicator/group/bld.inf
mmsharing/mmshindicator/tsrc/ut_indicator/group/ut_musindicator.mmp
mmsharing/mmshindicator/tsrc/ut_indicator/group/ut_musindicator.pkg
mmsharing/mmshindicator/tsrc/ut_indicator/inc/ut_cmusindicatorapi.h
mmsharing/mmshindicator/tsrc/ut_indicator/inc/ut_cmusindicatordsa.h
mmsharing/mmshindicator/tsrc/ut_indicator/src/dllmain.cpp
mmsharing/mmshindicator/tsrc/ut_indicator/src/ut_cmusindicatorapi.cpp
mmsharing/mmshindicator/tsrc/ut_indicator/src/ut_cmusindicatordsa.cpp
mmsharing/mmshmanagercli/src/musmanagerimpl.cpp
mmsharing/mmshmanagercli/tsrc/ut_managercli/group/bld.inf
mmsharing/mmshmanagercli/tsrc/ut_managercli/group/ut_musmanagerclient.pkg
mmsharing/mmshmanagersrv/group/musmanagerserver.mmp
mmsharing/mmshmanagersrv/inc/musapplicationmanager.h
mmsharing/mmshmanagersrv/inc/musavailabilitypluginmanager.h
mmsharing/mmshmanagersrv/inc/musavailabilitypluginmanagerobserver.h
mmsharing/mmshmanagersrv/inc/musmanagerserverclosetimer.h
mmsharing/mmshmanagersrv/inc/musmanagerservercommon.h
mmsharing/mmshmanagersrv/inc/musmanagerservercore.h
mmsharing/mmshmanagersrv/src/musapplicationmanager.cpp
mmsharing/mmshmanagersrv/src/musavailabilitypluginmanager.cpp
mmsharing/mmshmanagersrv/src/musmanagerserverclosetimer.cpp
mmsharing/mmshmanagersrv/src/musmanagerservercore.cpp
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/BWINS/ut_musmanagerserveru.def
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/EABI/ut_musmanagerserveru.def
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group/bld.inf
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group/ut_musmanagerserver.mmp
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group/ut_musmanagerserver.pkg
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusapplicationmanager.h
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusavailabilitypluginmanager.h
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusmanagerservercore.h
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusApplicationManager.cpp
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusManagerServerCore.cpp
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusavailabilityPluginManager.cpp
mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/stubs.cpp
mmsharing/mmshshared/inc/muspropertyobserver.h
mmsharing/mmshshared/inc/muspropertywatch.h
mmsharing/mmshshared/loc/mus.loc
mmsharing/mmshshared/src/muspropertywatch.cpp
mmsharing/mmshui/data/musui.rss
mmsharing/mmshui/data/musui_reg.rss
mmsharing/mmshui/graphics/Thumbs.db
mmsharing/mmshui/graphics/qgn_graf_rop_black.bmp
mmsharing/mmshui/graphics/qgn_indi_mus_end_rec.bmp
mmsharing/mmshui/graphics/qgn_indi_mus_end_rec_mask.bmp
mmsharing/mmshui/graphics/qgn_indi_mus_paused.bmp
mmsharing/mmshui/graphics/qgn_indi_mus_paused_mask.bmp
mmsharing/mmshui/graphics/qgn_indi_mus_speaker_muted.bmp
mmsharing/mmshui/graphics/qgn_indi_mus_speaker_muted_mask.bmp
mmsharing/mmshui/graphics/qgn_indi_tb_gallery.svg
mmsharing/mmshui/graphics/qgn_indi_tb_microphone_mute.svg
mmsharing/mmshui/graphics/qgn_indi_tb_microphone_unmute.svg
mmsharing/mmshui/graphics/qgn_indi_tb_zoom.svg
mmsharing/mmshui/graphics/qgn_indi_video_forw.svg
mmsharing/mmshui/graphics/qgn_indi_video_pause.svg
mmsharing/mmshui/graphics/qgn_indi_video_play.svg
mmsharing/mmshui/graphics/qgn_indi_video_record.svg
mmsharing/mmshui/graphics/qgn_indi_video_record_not.svg
mmsharing/mmshui/graphics/qgn_indi_video_rew.svg
mmsharing/mmshui/graphics/qgn_indi_video_stop.svg
mmsharing/mmshui/graphics/qgn_indi_video_wait1.svg
mmsharing/mmshui/graphics/qgn_indi_video_wait2.svg
mmsharing/mmshui/graphics/qgn_indi_video_wait3.svg
mmsharing/mmshui/graphics/qgn_indi_video_wait4.svg
mmsharing/mmshui/graphics/qgn_indi_video_wait5.svg
mmsharing/mmshui/graphics/qgn_indi_video_wait6.svg
mmsharing/mmshui/graphics/qgn_indi_video_wait7.svg
mmsharing/mmshui/graphics/qgn_indi_video_wait8.svg
mmsharing/mmshui/graphics/qgn_menu_mus_app_cxt.bmp
mmsharing/mmshui/graphics/qgn_menu_mus_app_cxt_mask.bmp
mmsharing/mmshui/graphics/qgn_menu_mus_app_cxt_mask_soft.bmp
mmsharing/mmshui/graphics/qgn_menu_mus_app_lst.bmp
mmsharing/mmshui/graphics/qgn_menu_mus_app_lst_mask.bmp
mmsharing/mmshui/graphics/qgn_menu_mus_app_lst_mask_soft.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_clip_rec_sub.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_clip_rec_sub_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_file_video.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_file_video_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_folder_sub_large.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_folder_sub_large_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_memc_mmc_tab.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_memc_mmc_tab2.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_memc_mmc_tab2_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_memc_mmc_tab_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_memc_phone_tab.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_memc_phone_tab2.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_memc_phone_tab2_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_memc_phone_tab_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_sip_url.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_sip_url_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_view_clip_sub.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_view_clip_sub_mask.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_view_live_sub.bmp
mmsharing/mmshui/graphics/qgn_prop_mus_view_live_sub_mask.bmp
mmsharing/mmshui/graphics/temp_icons/Thumbs.db
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_ff.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_ff_mask.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_norec.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_norec_mask.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_pause.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_pause_mask.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_play.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_play_mask.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_rec.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_rec_mask.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_rew.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_rew_mask.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_stop.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_stop_mask.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_wait.bmp
mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_wait_mask.bmp
mmsharing/mmshui/group/bld.inf
mmsharing/mmshui/group/musui.mmp
mmsharing/mmshui/group/musuiiconlist.txt
mmsharing/mmshui/group/toolbariconslist.txt
mmsharing/mmshui/help/data/xhtml.zip
mmsharing/mmshui/help/group/bld.inf
mmsharing/mmshui/help/inc/msh.hlp.hrh
mmsharing/mmshui/help/rom/mmshuihelps_variant.iby
mmsharing/mmshui/inc/musui.hrh
mmsharing/mmshui/inc/musuiactivequerydialog.h
mmsharing/mmshui/inc/musuiactivetimer.h
mmsharing/mmshui/inc/musuiactivetimerobserver.h
mmsharing/mmshui/inc/musuiactivitymanger.h
mmsharing/mmshui/inc/musuiapp.h
mmsharing/mmshui/inc/musuiappui.h
mmsharing/mmshui/inc/musuibackgroundviewcontainer.h
mmsharing/mmshui/inc/musuibitmapdecoder.h
mmsharing/mmshui/inc/musuibitmapdecoderobserver.h
mmsharing/mmshui/inc/musuicallbackobserver.h
mmsharing/mmshui/inc/musuicallbackservice.h
mmsharing/mmshui/inc/musuiclipsharingcontroller.h
mmsharing/mmshui/inc/musuiclipsharingobserver.h
mmsharing/mmshui/inc/musuiclipsharingview.h
mmsharing/mmshui/inc/musuiclipsharingviewcontainer.h
mmsharing/mmshui/inc/musuicontactutil.h
mmsharing/mmshui/inc/musuidefinitions.h
mmsharing/mmshui/inc/musuidialogutil.h
mmsharing/mmshui/inc/musuidocument.h
mmsharing/mmshui/inc/musuieventcontroller.h
mmsharing/mmshui/inc/musuieventobserver.h
mmsharing/mmshui/inc/musuifileutil.h
mmsharing/mmshui/inc/musuigeneralview.h
mmsharing/mmshui/inc/musuiinvitationquery.h
mmsharing/mmshui/inc/musuiinvitationqueryobserver.h
mmsharing/mmshui/inc/musuilevelindicator.h
mmsharing/mmshui/inc/musuilevelindicatorobserver.h
mmsharing/mmshui/inc/musuilivesharingcontroller.h
mmsharing/mmshui/inc/musuilivesharingobserver.h
mmsharing/mmshui/inc/musuilivesharingview.h
mmsharing/mmshui/inc/musuilivesharingviewcontainer.h
mmsharing/mmshui/inc/musuimmcmonitor.h
mmsharing/mmshui/inc/musuimmcobserver.h
mmsharing/mmshui/inc/musuinavimediaanimator.h
mmsharing/mmshui/inc/musuinavimediaanimatorobserver.h
mmsharing/mmshui/inc/musuinavimediadecorator.h
mmsharing/mmshui/inc/musuipropertyobserver.h
mmsharing/mmshui/inc/musuipropertywatch.h
mmsharing/mmshui/inc/musuiqueryobserver.h
mmsharing/mmshui/inc/musuireceivecontainer.h
mmsharing/mmshui/inc/musuireceivecontroller.h
mmsharing/mmshui/inc/musuireceiveobserver.h
mmsharing/mmshui/inc/musuireceiveview.h
mmsharing/mmshui/inc/musuiresourcehandler.h
mmsharing/mmshui/inc/musuisendcontroller.h
mmsharing/mmshui/inc/musuisendobserver.h
mmsharing/mmshui/inc/musuisendview.h
mmsharing/mmshui/inc/musuisendviewcontainer.h
mmsharing/mmshui/inc/musuisharingobserver.h
mmsharing/mmshui/inc/musuistartcontroller.h
mmsharing/mmshui/inc/musuistatuspanehandler.h
mmsharing/mmshui/inc/musuiviewcontainer.h
mmsharing/mmshui/inc/musuizoomindicator.h
mmsharing/mmshui/inc/musuizoomindicatorobserver.h
mmsharing/mmshui/src/musuiactivequerydialog.cpp
mmsharing/mmshui/src/musuiactivetimer.cpp
mmsharing/mmshui/src/musuiactivitymanger.cpp
mmsharing/mmshui/src/musuiapp.cpp
mmsharing/mmshui/src/musuiappui.cpp
mmsharing/mmshui/src/musuibackgroundviewcontainer.cpp
mmsharing/mmshui/src/musuibitmapdecoder.cpp
mmsharing/mmshui/src/musuicallbackservice.cpp
mmsharing/mmshui/src/musuiclipsharingcontroller.cpp
mmsharing/mmshui/src/musuiclipsharingview.cpp
mmsharing/mmshui/src/musuiclipsharingviewcontainer.cpp
mmsharing/mmshui/src/musuicontactutil.cpp
mmsharing/mmshui/src/musuidialogutil.cpp
mmsharing/mmshui/src/musuidocument.cpp
mmsharing/mmshui/src/musuieventcontroller.cpp
mmsharing/mmshui/src/musuifileutil.cpp
mmsharing/mmshui/src/musuigeneralview.cpp
mmsharing/mmshui/src/musuiinvitationquery.cpp
mmsharing/mmshui/src/musuilevelindicator.cpp
mmsharing/mmshui/src/musuilivesharingcontroller.cpp
mmsharing/mmshui/src/musuilivesharingview.cpp
mmsharing/mmshui/src/musuilivesharingviewcontainer.cpp
mmsharing/mmshui/src/musuimmcmonitor.cpp
mmsharing/mmshui/src/musuinavimediaanimator.cpp
mmsharing/mmshui/src/musuinavimediadecorator.cpp
mmsharing/mmshui/src/musuipropertywatch.cpp
mmsharing/mmshui/src/musuireceivecontainer.cpp
mmsharing/mmshui/src/musuireceivecontroller.cpp
mmsharing/mmshui/src/musuireceiveview.cpp
mmsharing/mmshui/src/musuiresourcehandler.cpp
mmsharing/mmshui/src/musuisendcontroller.cpp
mmsharing/mmshui/src/musuisendview.cpp
mmsharing/mmshui/src/musuisendviewcontainer.cpp
mmsharing/mmshui/src/musuistartcontroller.cpp
mmsharing/mmshui/src/musuistatuspanehandler.cpp
mmsharing/mmshui/src/musuiviewcontainer.cpp
mmsharing/mmshui/src/musuizoomindicator.cpp
mmsharing/mmshui/tsrc/ut_ui/BWINS/ut_uiU.DEF
mmsharing/mmshui/tsrc/ut_ui/group/bld.inf
mmsharing/mmshui/tsrc/ut_ui/group/ut_ui.mmp
mmsharing/mmshui/tsrc/ut_ui/inc/musengtestdefs.h
mmsharing/mmshui/tsrc/ut_ui/inc/musuicallbackobserveradapter.h
mmsharing/mmshui/tsrc/ut_ui/inc/musuiclipsharingobserveradapter.h
mmsharing/mmshui/tsrc/ut_ui/inc/musuieventobserveradapter.h
mmsharing/mmshui/tsrc/ut_ui/inc/musuilivesharingobserveradapter.h
mmsharing/mmshui/tsrc/ut_ui/inc/musuipropertyobserveradapter.h
mmsharing/mmshui/tsrc/ut_ui/inc/musuireceiveobserveradapter.h
mmsharing/mmshui/tsrc/ut_ui/inc/musuitestdefines.h
mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuiclipsharingcontroller.h
mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuieventcontroller.h
mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuilivesharingcontroller.h
mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuipropertywatch.h
mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuireceivecontroller.h
mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuistartcontroller.h
mmsharing/mmshui/tsrc/ut_ui/src/musuicallbackobserveradapter.cpp
mmsharing/mmshui/tsrc/ut_ui/src/musuiclipsharingobserveradapter.cpp
mmsharing/mmshui/tsrc/ut_ui/src/musuieventobserveradapter.cpp
mmsharing/mmshui/tsrc/ut_ui/src/musuilivesharingobserveradapter.cpp
mmsharing/mmshui/tsrc/ut_ui/src/musuipropertyobserveradapter.cpp
mmsharing/mmshui/tsrc/ut_ui/src/musuireceiveobserveradapter.cpp
mmsharing/mmshui/tsrc/ut_ui/src/ut_musuiclipsharingcontroller.cpp
mmsharing/mmshui/tsrc/ut_ui/src/ut_musuidllmain.cpp
mmsharing/mmshui/tsrc/ut_ui/src/ut_musuieventcontroller.cpp
mmsharing/mmshui/tsrc/ut_ui/src/ut_musuilivesharingcontroller.cpp
mmsharing/mmshui/tsrc/ut_ui/src/ut_musuipropertywatch.cpp
mmsharing/mmshui/tsrc/ut_ui/src/ut_musuireceivecontroller.cpp
mmsharing/mmshui/tsrc/ut_ui/src/ut_musuistartcontroller.cpp
mmsharinguis.pro
mmsharinguis_plat/group/bld.inf
mmsharinguis_plat/live_comms_plugin_api/group/bld.inf
mmsharinguis_plat/live_comms_plugin_api/inc/lcaudiocontrol.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcbrightnesscontrol.h
mmsharinguis_plat/live_comms_plugin_api/inc/lccameracontrol.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcdestinationfilecontrol.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcengine.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcengine.inl
mmsharinguis_plat/live_comms_plugin_api/inc/lcsession.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcsessionobserver.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcsourcefilecontrol.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcuiprovider.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcvideoplayer.h
mmsharinguis_plat/live_comms_plugin_api/inc/lcwindow.h
mmsharinguis_plat/live_comms_plugin_api/inc/lczoomcontrol.h
mmsharinguis_plat/multimedia_sharing_manager_api/inc/musmanager.h
mmsharinguis_plat/multimedia_sharing_manager_api/inc/musmanagercommon.h
mmsharinguis_plat/multimedia_sharing_settings_api/inc/mussettingskeys.h
mmshplugins/group/bld.inf
mmshplugins/mmcctranscoder/tsrc/stubs/group/ABLD.BAT
mmshplugins/mmcctranscoder/tsrc/ut_transcoder/group/bld.inf
mmshplugins/mmcctranscoder/tsrc/ut_transcoder/group/ut_transcoder.pkg
mmshplugins/mmshaiwplugin/data/10282389.rss
mmshplugins/mmshaiwplugin/group/musaiwprovider.mmp
mmshplugins/mmshaiwplugin/inc/musaiwprovider.h
mmshplugins/mmshaiwplugin/src/musaiwprovider.cpp
mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group/bld.inf
mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group/ut_aiwprovider.pkg
mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group/ut_musaiwprovider.mmp
mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/inc/ut_musaiwprovider.h
mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/src/ut_musaiwprovider.cpp
mmshplugins/mmshaoplugin/group/musaoplugin.mmp
mmshplugins/mmshaoplugin/inc/mmuscallstateobserver.h
mmshplugins/mmshaoplugin/inc/musaoplugin.h
mmshplugins/mmshaoplugin/inc/muscallconferencemonitor.h
mmshplugins/mmshaoplugin/inc/muscalleventmonitor.h
mmshplugins/mmshaoplugin/inc/muscallmonitor.h
mmshplugins/mmshaoplugin/inc/muscallmonitorbase.h
mmshplugins/mmshaoplugin/inc/muscallstatusmonitor.h
mmshplugins/mmshaoplugin/inc/musclirmonitor.h
mmshplugins/mmshaoplugin/inc/muspropertymonitor.h
mmshplugins/mmshaoplugin/inc/mustsypropertymonitor.h
mmshplugins/mmshaoplugin/inc/musvoipcallmonitor.h
mmshplugins/mmshaoplugin/src/musaoplugin.cpp
mmshplugins/mmshaoplugin/src/muscallconferenceeventmonitor.cpp
mmshplugins/mmshaoplugin/src/muscallconferencemonitor.cpp
mmshplugins/mmshaoplugin/src/muscalleventmonitor.cpp
mmshplugins/mmshaoplugin/src/muscallmonitor.cpp
mmshplugins/mmshaoplugin/src/muscallmonitorbase.cpp
mmshplugins/mmshaoplugin/src/muscallstatusmonitor.cpp
mmshplugins/mmshaoplugin/src/musclirmonitor.cpp
mmshplugins/mmshaoplugin/src/muspropertymonitor.cpp
mmshplugins/mmshaoplugin/src/mustsypropertymonitor.cpp
mmshplugins/mmshaoplugin/src/musvoipcallmonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/callinformation.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/ccallinfoiter.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/ccallinformation.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/ccallinfos_stub.inl
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/cch.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/spentry.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/spsettings.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/ccallinfoiter_stub.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/ccallinformation_stub.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/spentry_stub.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/spsettings_stub.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group/bld.inf
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group/ut_aoplugin.mmp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group/ut_aoplugin.pkg
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/muscommonstubs.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musaocalleventmonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musaoplugin.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallconferencemonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscalleventmonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallmonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallmonitorbase.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallstatusmonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musfactorysettings.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muslineeventmonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muspropertymonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_mustsypropertymonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musvoipcallmonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/muscommonstubs.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_aopluginDllMain.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musaocalleventmonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musaoplugin.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallconferenceeventmonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallconferencemonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscalleventmonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallmonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallmonitorbase.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallstatusmonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musclirmonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musclirmonitor.h
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscommondllmain.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musconferencecallmonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musfactorysettings.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muspropertymonitor.cpp
mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_mustsypropertymonitor.cpp
mmshplugins/mmshsettingsuiplugin/data/mussettingsuirsc.rss
mmshplugins/mmshsettingsuiplugin/inc/mmussipprofilehandler.h
mmshplugins/mmshsettingsuiplugin/inc/mussettingscontainer.h
mmshplugins/mmshsettingsuiplugin/inc/mussettingsmodel.h
mmshplugins/mmshsettingsuiplugin/inc/mussettingsplugin.h
mmshplugins/mmshsettingsuiplugin/inc/mussipprofilemodel.h
mmshplugins/mmshsettingsuiplugin/src/mussettingscontainer.cpp
mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp
mmshplugins/mmshsettingsuiplugin/src/mussettingsplugin.cpp
mmshplugins/mmshsettingsuiplugin/src/mussettingspluginimplementationtable.cpp
mmshplugins/mmshsettingsuiplugin/src/mussipprofilemodel.cpp
mmshplugins/mmshsipcrplugin/group/mussipcrplugin.mmp
mmshplugins/mmshsipcrplugin/inc/mussipcrplugin.h
mmshplugins/mmshsipcrplugin/src/mussipcrplugin.cpp
mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group/bld.inf
mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group/ut_sipcrplugin.mmp
mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group/ut_sipcrplugin.pkg
mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/inc/mussipcrplugintest.h
mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/src/mussipcrplugintest.cpp
mmshplugins/mmshwpadapterplugin/src/muswpitem.cpp
mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/group/bld.inf
mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/group/ut_muswpadapter.pkg
mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/src/ut_muswpitem.cpp
rom/multimediasharing.iby
rom/multimediasharing_stub.SIS
rom/multimediasharingresources.iby
sysdef_1_5_1.dtd
tsrc/CenrepEditor/Src/cenrepeditorappui.cpp
tsrc/CenrepEditor/Src/cenrepeditorlistbox2.cpp
tsrc/CenrepEditor/Src/cenrepeditormodel.cpp
tsrc/CenrepEditor/data/cenrepeditor.rss
tsrc/CenrepEditor/group/CenrepEditor.mmp
tsrc/CenrepEditor/inc/cenrepeditor.hrh
tsrc/CenrepEditor/inc/cenrepeditorlistbox2.h
tsrc/CenrepEditor/inc/cenrepeditormodel.h
tsrc/CenrepEditor/install/cenrepeditor.sis
tsrc/CenrepEditor/install/cenrepeditor.sisx
tsrc/CenrepEditor/install/cenrepeditor_.sis
tsrc/CenrepEditor/install/sis_update_udeb.bat
tsrc/centralrepositorystub/inc/cenrepnotifyhandler.h
tsrc/centralrepositorystub/inc/centralrepository.h
tsrc/centralrepositorystub/src/cenrepnotifyhandlerstub.cpp
tsrc/centralrepositorystub/src/centralrepositorystub.cpp
tsrc/cmusavainterfacestub/inc/cmusavainterfacestub.h
tsrc/cmusavainterfacestub/src/cmusavainterfacestub.cpp
tsrc/contactenginestub/inc/contactenginestub.h
tsrc/contactenginestub/src/contactenginestub.cpp
tsrc/etelstub/inc/etelmm.h
tsrc/etelstub/src/etelstub.cpp
tsrc/fbsbitmapstub/inc/fbs.h
tsrc/fbsbitmapstub/src/fbs.cpp
tsrc/install/multimediasharing_udeb.pkg
tsrc/install/multimediasharing_update_udeb.pkg
tsrc/install/multimediasharing_update_urel.pkg
tsrc/install/multimediasharing_urel.pkg
tsrc/mceclientstub/group/mceclientstub.mmp
tsrc/mceclientstub/inc/mcecamerasource.h
tsrc/mceclientstub/inc/mcedisplaysink.h
tsrc/mceclientstub/inc/mceinsession.h
tsrc/mceclientstub/inc/mceoutsession.h
tsrc/mceclientstub/inc/mcesession.h
tsrc/mceclientstub/src/mcecamerasource.cpp
tsrc/mceclientstub/src/mcedisplaysink.cpp
tsrc/mceclientstub/src/mcefilesource.cpp
tsrc/mceclientstub/src/mceinsession.cpp
tsrc/mceclientstub/src/mceoutsession.cpp
tsrc/mmusavasettingsstub/inc/mmusavasettingsstub.h
tsrc/mmusavasettingsstub/src/mmusavasettingsstub.cpp
tsrc/multimediasharingsettingsstub/inc/mussettings.h
tsrc/multimediasharingsettingsstub/src/mussettings.cpp
tsrc/musavaailabilitystub/inc/musavaavailabilitystub.h
tsrc/musavaailabilitystub/src/musavaailabilitystub.cpp
tsrc/musenginestub/group/ABLD.BAT
tsrc/musenginestub/group/bld.inf
tsrc/musenginestub/group/musenginepluginstub.mmp
tsrc/musenginestub/group/musenginestub.mmp
tsrc/musenginestub/inc/musengaudioroutingobserver.h
tsrc/musenginestub/inc/musengcamerahandler.h
tsrc/musenginestub/inc/musengclipsession.h
tsrc/musenginestub/inc/musengclipsessionobserver.h
tsrc/musenginestub/inc/musenglivesession.h
tsrc/musenginestub/inc/musenglivesessionobserver.h
tsrc/musenginestub/inc/musenglogger.h
tsrc/musenginestub/inc/musengmceoutsession.h
tsrc/musenginestub/inc/musengmcesession.h
tsrc/musenginestub/inc/musengmceutils.h
tsrc/musenginestub/inc/musengoutsessionobserver.h
tsrc/musenginestub/inc/musengreceivesession.h
tsrc/musenginestub/inc/musengreceivesessionobserver.h
tsrc/musenginestub/inc/musengsession.h
tsrc/musenginestub/inc/musengsessiondurationtimer.h
tsrc/musenginestub/inc/musengsessionmanager.h
tsrc/musenginestub/inc/musengsessionobserver.h
tsrc/musenginestub/inc/musengtelephoneutils.h
tsrc/musenginestub/inc/musengtwowayrecvsession.h
tsrc/musenginestub/inc/musengtwowaysession.h
tsrc/musenginestub/inc/musengtwowaysessionobserver.h
tsrc/musenginestub/inc/musenguriparser.h
tsrc/musenginestub/inc/mussipprofilehandler.h
tsrc/musenginestub/inc/mussipprofileuser.h
tsrc/musenginestub/src/musengcamerahandler.cpp
tsrc/musenginestub/src/musengclipsession.cpp
tsrc/musenginestub/src/musenginepluginentry.cpp
tsrc/musenginestub/src/musenglivesession.cpp
tsrc/musenginestub/src/musengmceoutsession.cpp
tsrc/musenginestub/src/musengmcesession.cpp
tsrc/musenginestub/src/musengmceutils.cpp
tsrc/musenginestub/src/musengreceivesession.cpp
tsrc/musenginestub/src/musengsession.cpp
tsrc/musenginestub/src/musengsessiondurationtimer.cpp
tsrc/musenginestub/src/musengsessionmanager.cpp
tsrc/musenginestub/src/musengtelephoneutils.cpp
tsrc/musenginestub/src/musengtwowayrecvsession.cpp
tsrc/musenginestub/src/musengtwowaysession.cpp
tsrc/musenginestub/src/musenguriparser.cpp
tsrc/musenginestub/src/mussipprofilehandler.cpp
tsrc/musmanagerstub/inc/musmanagerstub.h
tsrc/mustestapp/data/mustestapp.rss
tsrc/mustestapp/data/mustestapp_reg.rss
tsrc/mustestapp/group/AiwTestApp.mmp
tsrc/mustestapp/group/bld.inf
tsrc/mustestapp/group/mce.pkg
tsrc/mustestapp/inc/AiwTestApp.hrh
tsrc/mustestapp/inc/AiwTestApp.loc
tsrc/mustestapp/inc/AiwTestAppApp.h
tsrc/mustestapp/inc/AiwTestAppAppUi.h
tsrc/mustestapp/inc/AiwTestAppContainer.h
tsrc/mustestapp/inc/AiwTestAppDocument.h
tsrc/mustestapp/install/AIWTestApp_3x.pkg
tsrc/mustestapp/install/mustestapp.pkg
tsrc/mustestapp/src/AiwTestAppApp.cpp
tsrc/mustestapp/src/AiwTestAppAppUi.cpp
tsrc/mustestapp/src/AiwTestAppContainer.cpp
tsrc/mustestapp/src/AiwTestAppDocument.cpp
tsrc/propertystub/src/e32property.cpp
tsrc/qtestutils/inc/testresultxmlparser.h
tsrc/qtestutils/src/testresultxmlparser.cpp
tsrc/telephonyaudioroutingstub/inc/telephonyaudiorouting.h
tsrc/telephonyaudioroutingstub/src/telephonyaudioroutingstub.cpp
tsrc/unittestrunner/eunitdlls_ctc.txt
tsrc/unittestrunner/eunittest_ctc.pl
tsrc/unittestrunner/qt_runall.cmd
tsrc/unittestrunner/qt_runtest.cmd
tsrc/unittestrunner/qt_runtests.cmd
tsrc/unittestrunner/tsrc.pro
tsrc/unittestrunner/unittest_ctc.pl
tsrc/unittestrunner/unittest_qt.pl
tsrc/unittestrunner/unittest_qt_config.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This file provides the information required for building the
+*                ipappservices
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../rom/multimediasharing.iby CORE_APP_LAYER_IBY_EXPORT_PATH(multimediasharing.iby)
+../rom/multimediasharingresources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(multimediasharingresources.iby)
+
+//  Export stub sis file making possible eclipsing files in the rom image
+../rom/multimediasharing_stub.SIS    /epoc32/data/z/system/install/multimediasharing_stub.sis
+
+PRJ_MMPFILES
+#include "../mmsharinguis_plat/group/bld.inf"
+#include "../mmsharing/group/bld.inf"
+#include "../mmshplugins/group/bld.inf"
+#include "../mmsharing/mmshui/help/group/bld.inf"
\ No newline at end of file
--- a/inc/musavasettings.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/musavasettings.h	Wed Sep 01 12:31:01 2010 +0100
@@ -24,7 +24,6 @@
 #include <badesca.h>
 #include <e32base.h>
 #include <e32std.h>
-#include <mussettingskeys.h>
 
 class MMusAvaSettingsObserver;
 
@@ -50,18 +49,10 @@
         };
 public:
     
-    /**
-    * Returns the fast mode value
-    *
-    * @return The fast mode value.
-    */         
-    virtual MusSettingsKeys::TFastMode FastMode() const;
-    
-    
-    /**
-    * Returns the manual activation
-    *
-    */   		
+     /**
+     * Returns the manual activation
+     *
+     */   		
     virtual TManualActivation ManualActivation();
     	
     /**
@@ -126,17 +117,20 @@
      */   		
     virtual void SetObserver( MMusAvaSettingsObserver& aObserver );
     
-    /*
-    * Gets the settings observer pointer 
-    * 
-    */
-    MMusAvaSettingsObserver* Observer();
-    
      /**
      * Sets the for the manual activation
      *
      */   		
     virtual void SetManualActivation( TManualActivation aManualActivation );
+    
+    /**
+    * Returns the direction of the mobile call.
+    *
+    * @return 0, if the direction of the call is unknown.
+    *         1, call is from public number.
+    *         2, call is from private number   
+    */    		
+    virtual TInt CallPrivacy();
 
 	};
 
--- a/inc/musavasettings.inl	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/musavasettings.inl	Wed Sep 01 12:31:01 2010 +0100
@@ -11,11 +11,12 @@
 *
 * Contributors:
 *
-* Description:  ECOM interface default implementation. 
+* Description:   ECOM interface default implementation. 
 *
 */
 
 
+
 #ifndef MUSAVASETTING_INL
 #define MUSAVASETTING_INL
 
@@ -25,16 +26,6 @@
 // 
 // -----------------------------------------------------------------------------
 //
-inline MusSettingsKeys::TFastMode MMusAvaSettings::FastMode() const
-    {
-    User::Leave( KErrNotSupported );
-    return MusSettingsKeys::EFastModeOff; 
-    }
- 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
 inline MMusAvaSettings::TManualActivation MMusAvaSettings::ManualActivation()
 	{
 	User::Leave( KErrNotSupported );
@@ -152,19 +143,19 @@
 // 
 // -----------------------------------------------------------------------------
 //
-inline MMusAvaSettingsObserver* MMusAvaSettings::Observer()
+inline void MMusAvaSettings::SetManualActivation( TManualActivation /*aManualActivation*/ )
     {
-    return NULL;
+    User::Leave( KErrNotSupported );
     }
 
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
 //
-inline void MMusAvaSettings::SetManualActivation( TManualActivation /*aManualActivation*/ )
-    {
+inline TInt MMusAvaSettings::CallPrivacy()
+	{
     User::Leave( KErrNotSupported );
+    return 0; // To avoid "return value expected" warning
     }
 
-
 #endif // MUSAVASETTING_INL
--- a/inc/muscallmonitorobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/muscallmonitorobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,11 +16,12 @@
 */
 
 
+
 #ifndef MUSCALLMONITOROBSERVER_H
 #define MUSCALLMONITOROBSERVER_H
 
 #include <e32cmn.h>
-#include <badesca.h>
+#include <CPbkContactItem.h>
 
 /**
  * Observer for the monitor
@@ -32,19 +33,22 @@
 
 public: // type definitions
 
-    virtual void CallConnectedL( const TDesC& aTelNumber, TBool aIsSipUri ) = 0;
+    virtual void CallConnectedL( const TDesC& aTelNumber ) = 0;
     
-    virtual void CallHoldL( const TDesC& aTelNumber, TBool aIsSipUri ) = 0;
+    virtual void CallHoldL( const TDesC& aTelNumber ) = 0;
     
     virtual void ConferenceCallL() = 0;
     
     virtual void NoActiveCallL() = 0;
+    
+    virtual void ConferenceCallLTerminated() = 0;
    
     /**
     *
     */
-    virtual TBool ResolveAddressesL( const TDesC& /*aContactId*/,
-                            CDesCArrayFlat*& /*aContactsArray*/)
+    virtual TBool ResolveAddressesL( CPbkContactItem& /*aPbkItem*/,
+                            CDesCArrayFlat*& /*aContactsArray*/,
+                            TPbkFieldId /*aTPbkFieldId*/  )
         {
         return EFalse;
         }
--- a/inc/muscommon.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/muscommon.h	Wed Sep 01 12:31:01 2010 +0100
@@ -53,12 +53,6 @@
         ESipOptionsFailed       // sip options revealed that the remote host is 
                                 // not capable of video sharing -> error
         };
-    
-    // values for application startup behavior (have same effect as command
-    // enumerations of CApaCommandLine)
-    const TUint KMusCommandLetterRun = 'R';
-    const TUint KMusCommandLetterBackground = 'B';
-    
     }
 
 #endif // MUSMANAGERCOMMON_H
--- a/inc/musfactorysettings.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This interface is used by
-*               clients to get and availability setting for Video Charging
-*
-*/
-
-
-#ifndef __MUSFACTORYSETTINGS_H__
-#define __MUSFACTORYSETTINGS_H__
-
-//  INCLUDES
-#include <badesca.h>
-#include <e32base.h>
-#include <etelmm.h>
-#include <ctsydomainpskeys.h>
-
-class MMusAvaSettingsObserver;
-
-/**
- *  Utility function to check the factory configurations.
- *  @lib musaoplugin.lib
- */
-
-class MusFactorySettings
-    {   
-public:    
-     /**
-     * Checks from the factory settings whether call type is supported.
-     * @aCallType : Type of the call retrived from Tsy apis.
-     * 
-     * @return ETrue if supported else EFalse.
-     * Leaves when cenrep key is not found or cenrep related error happens.
-     */         
-    static TBool IsSupportedL(const TPSCTsyCallType& aCallType);
-        
-    /**
-     * Checks from the factory settings whether network type is supported.
-     * @aNetworkType : Type of the network
-     * 
-     * @return ETrue if supported else EFalse.
-     * Leaves when cenrep key is not found or cenrep related error happens.
-     */         
-    static TBool IsSupportedL(const RMobilePhone::TMobilePhoneNetworkMode& aNetworkType);  
-
-    };
-
-#include "musfactorysettings.inl"
-
-#endif
-
--- a/inc/musfactorysettings.inl	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MUSFACTROYSETTINGS_INL
-#define MUSFACTORYSETTINGS_INL
-
-
-#include "musfactorysettings.h"
-#include "mussettingskeys.h"
-#include "mussettings.h"
-#include "muslogger.h"
-
-// -----------------------------------------------------------------------------
-// Checks from the factory settings ( central repository )
-// whether call type is supported.
-// -----------------------------------------------------------------------------
-//
-inline TBool MusFactorySettings::IsSupportedL(
-                                        const TPSCTsyCallType& aCallType)
-    {    
-    MusSettingsKeys::TAllowedCSOnly allowedCallType = 
-                           MultimediaSharingSettings::AllowedCSOnlySettingL();
-    if( allowedCallType == MusSettingsKeys::EAllowedCSOnly && 
-                                           aCallType != EPSCTsyCallTypeCSVoice )
-        {
-        MUS_LOG( "mus: [MUSAO]  <-> MusFactorySettings::IsSupportedL Call : EFalse" )
-        return EFalse;
-        }
-    MUS_LOG( "mus: [MUSAO]  <-> MusFactorySettings::IsSupportedL Call : ETrue" )
-    return ETrue;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Checks from the factory settings ( central repository )
-// whether network type is supported.
-// -----------------------------------------------------------------------------
-//
-inline TBool MusFactorySettings::IsSupportedL( 
-            const RMobilePhone::TMobilePhoneNetworkMode& aNetworkType)
-    {
-    MUS_LOG1( "mus: [MUSAO] -> MusFactorySettings::IsSupportedL Network :%d", aNetworkType )
-
-   	TBool networkSupported = EFalse;
-	TInt onlyIn3GNetwork = MusSettingsKeys::EAllowedAllBearers;	
-	 // Check from Central Repository that do we Only support in 3G or All Networks. 
-	 // if key is not found then behave like default ie AllowedAllBearers.    
-    TRAP_IGNORE( onlyIn3GNetwork = MultimediaSharingSettings::Allowed3GOnlySettingL() ); 
-	if( onlyIn3GNetwork == MusSettingsKeys::EAllowedAllBearers )
-		{
-		networkSupported = ETrue;	
-		}		
-	else
-		{
-		switch( aNetworkType )
-			{
-			case RMobilePhone::ENetworkModeWcdma:
-			case RMobilePhone::ENetworkModeTdcdma:
-			case RMobilePhone::ENetworkModeCdma95:
-			case RMobilePhone::ENetworkModeCdma2000:
-				{
-				networkSupported = ETrue;
-				break;
-				}
-
-			case RMobilePhone::ENetworkModeGsm:
-				{
-			     TInt edgeDtmSupport = KErrNone;
-			     
-			     // We Will throw an Activation Error for the Mandatory Settings if 
-			     // they are not found. 
-
-				edgeDtmSupport = MultimediaSharingSettings::EdgeDtmSupportSettingL();
-                
-        		if( edgeDtmSupport == MusSettingsKeys::EDtmModeAllowed )
-        			{
-        			networkSupported = ETrue;
-        			}
-        		else
-        			{
-        			networkSupported = EFalse;
-        			}
-        		break;	
-				}
-			}
-		}
-    MUS_LOG1( "mus: [MUSAO]  <- MusFactorySettings::IsSupportedL (%d)", networkSupported )
-	
-    return networkSupported;		
-    }
-    
-    
-#endif // MUSFACTROYSETTINGS_INL
--- a/inc/musindicatorapi.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/musindicatorapi.h	Wed Sep 01 12:31:01 2010 +0100
@@ -29,28 +29,14 @@
 #include <e32property.h>
 
 
-class CMusIndicatorDsa;
+
 class CAknGlobalMsgQuery;
 class CMusSoundPlayer;
 
 
 /**
- *  MusIndicatorApi provides means to show notes and indicate availability
+ *  MusIndicatorApi provides means to indicate availability
  *  of videosharing to user.
- *
- *  @code
- *   // Shows roaming activation query
- *  if ( MusIndicatorApi::ConfirmationQueryL(
- *          MusIndicatorApi::EVsRoamingActivationQuery ) )
- *      {
- *      // respond to user response "yes"
- *      }
- *  else
- *      {
- *      // respond to user response "no"
- *      }
- *  @endcode
- *
  *  @lib musindicator.lib
  */
 class CMusIndicatorApi : public CActive, MMusSoundPlayerObserver
@@ -99,14 +85,6 @@
     ~CMusIndicatorApi();
 
     /**
-     * Shows a global query to user.
-     *
-     * @param aQuery Identifies displayed query.
-     * @return Boolean value indicating if user accepted the query.
-     */
-    IMPORT_C static TBool ConfirmationQueryL( TVsPopupQuery aQuery );
-
-    /**
      * Indicates availability of video sharing.
      */
     IMPORT_C void IndicateAvailabilityL();
@@ -163,39 +141,11 @@
      */
     void PlayToneL();
 
-    /**
-     * Returns text from a resource file for a specified note/query.
-     *
-     * @param aQuery Identifies displayed query.
-     * @return Text associated with specified query. Ownership is transferred.
-     */
-    static HBufC* NoteTextLC( TVsPopupQuery aQuery );
-
-    /**
-     * Asynchronous query. Result returned via observer interface.
-     */
-    void ShowLiveSharingQueryL( TBool aPlayTone );
-
-    static TInt LiveSharingQueryTimeout( TAny* aThis );
-
     void StartLiveSharingL();
-    void ToggleIndicatorL();
-    TBool IsSubscriber() const;
     
         
 private: // data
 
-    /**
-     * Pointer to indicator window
-     * Own.
-     */
-    CMusIndicatorDsa* iIndicatorWindow;
-
-    /**
-     * Pointer to global msg query.
-     * Own.
-     */
-    CAknGlobalMsgQuery* iQuery;
 
     /**
      * Sound player.
@@ -208,8 +158,6 @@
      * Own.
      */
     MMusIndicatorObserver* iObserver;
-
-    CPeriodic* iLiveSharingQueryTimeout;
     
     RProperty iProperty;
             
--- a/inc/musresourcefinderutil.inl	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/musresourcefinderutil.inl	Wed Sep 01 12:31:01 2010 +0100
@@ -59,6 +59,7 @@
          BaflUtils::NearestLanguageFile(fs ,fName );
          CleanupStack::PopAndDestroy( fileName ); // fileName
          fileName = fName.AllocLC();
+		 fileNamePtr.Set(fileName->Des());
          }
         if ( BaflUtils::FileExists( fs, *fileName ) )
             {
--- a/inc/mussesseioninformationapi.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/mussesseioninformationapi.h	Wed Sep 01 12:31:01 2010 +0100
@@ -51,7 +51,8 @@
         ENoCall,
         ECallConnected,
         ECallHold,       
-        EConferenceCall
+        EConferenceCall,
+        EConferenceTerminated
         };
 
     /**  Contains the call direction */
@@ -73,11 +74,25 @@
         EMUSAllowed = 1,
         EMUSForbidden
         };
-    /**  Contains the call provider information. ( For example Skype )      
-      *  This string will be used to parse the corresponding ecom plugin
-      *  which implements the livecomms engine api
-      */
-    const TInt KMUSCallProvider( 0x102823A4 );
+    
+    /**  Contains the call privacy */
+    const TInt KMUSPrivacy( 0x102823A4 );
+    /**  Contains the possible values for call privacy*/
+    enum TMusCallPrivacy
+        {
+        EPrivacyOn = 1,
+        EPrivacyOff
+        };
+    
+    /**  Phone's CLIR setting. This is used in MO case to determine if the
+     *   caller's phone number/id is sent to remote party */
+    const TInt KMusClirSetting( 0x102823A5 );
+    /**  Possible values for KMusClirSetting */
+    enum TMusClirSetting
+        {
+        ESendOwnNumber,
+        EDoNotSendOwnNumber
+        };
     }
 
 #endif // MUSRESOURCEPROPERTIES_H
--- a/inc/mussessionproperties.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/mussessionproperties.h	Wed Sep 01 12:31:01 2010 +0100
@@ -60,8 +60,8 @@
     
     const TInt KSipProfileId( 0x1A );
     const TInt KContactName( 0x1B );
+    const TInt KPrivacyStatus( 0x1C );
     const TInt KMusIndicatorStatus( KMusIndicator );
-    const TInt KFastMode( 0x1D );
     }
 
 #endif // MUSPSKEYS_H
--- a/inc/mussettings.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/mussettings.h	Wed Sep 01 12:31:01 2010 +0100
@@ -14,7 +14,7 @@
 * Description:  ?Description
 *  Name        : mussettingskeys.h
 
-*  Version     : %version: 10 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: 9 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -30,51 +30,6 @@
 class MultimediaSharingSettings
     {
 public:
-    
-    /**
-     * Returns the cenrep configured value for KFastStartupMode key.
-     *
-     * @return Current KVideoDirection Key value from cenrep.
-     */
-    static MusSettingsKeys::TFastMode FastStartupModeL();
-    
-    
-    /**
-     * Returns the cenrep configured value for KVideoBandwidth key.
-     *
-     * @return Current KVideoBandwidth Key value from cenrep.
-     */
-    static TInt VideoBandwidthSettingL();
-
-    /**
-     * Returns the cenrep configured value for KVideoDirection key.
-     *
-     * @return Current KVideoDirection Key value from cenrep.
-     */
-    static MusSettingsKeys::TVideoDirection VideoDirectionL();
-    
-
-    /**
-     * Returns the cenrep configured value for KCameraUsage key.
-     *
-     * @return Current KCameraUsage Key value from cenrep.
-     */
-    static MusSettingsKeys::TUseCamera CameraUsageL();
-    
-    /**
-     * Returns the cenrep configured value for AllowedCSOnly key.
-     *
-     * @return Current AllowedCSOnly Key value from cenrep.
-     */
-    static MusSettingsKeys::TAllowedCSOnly AllowedCSOnlySettingL();
-
-    /**
-     * Returns the cenrep configured value for Allowed3GOnly key.
-     *
-     * @return Current Allowed3GOnly Key value from cenrep.
-     */
-    static MusSettingsKeys::TAllowed3GOnly Allowed3GOnlySettingL();
-
     /**
      * Returns current MS activation setting.
      *
@@ -125,36 +80,6 @@
      *
      * @return
      */
-    static MusSettingsKeys::TPopupNotification PopupNotificationSettingL();
-
-    /**
-     * Sets 
-     *
-     * @param
-     */
-    static void SetPopupNotificationSettingL( 
-                MusSettingsKeys::TPopupNotification aNotificationSetting );
-          
-    /**
-     * Returns 
-     *
-     * @return
-     */
-    static MusSettingsKeys::TPopupNotificationType PopupNotificationTypeSettingL();
-					
-    /**
-     * Sets 
-     *
-     * @param
-     */
-    static void SetPopupNotificationTypeSettingL( 
-                MusSettingsKeys::TPopupNotificationType aNotificationSetting );
-
-    /**
-     * Returns 
-     *
-     * @return
-     */
     static MusSettingsKeys::TEdgeDtmSupport EdgeDtmSupportSettingL();
     
     /**
@@ -310,7 +235,9 @@
      * @param
      * @param
      */
-    static void SetPropertyValueL( TUint32 aKey, const TDesC& aValue );
+    static void MultimediaSharingSettings::SetPropertyValueL( 
+                                            TUint32 aKey,
+                                            const TDesC& aValue );
                                             
      /**
      * For internal usage only. Use direct getters/setters for each setting. 
@@ -319,15 +246,22 @@
      * @param
      */
     static void SetPropertyValueL( TUint32 aKey, TInt aValue );
-   
+    
     /**
      * If Encoding device set to KMusDisableAVC (0x0fffffff) returns ETrue 
      * else otherwise.  
      * Means AVC will be disabled when encoding device cenrep configuration 
      * set to 0x0fffffff.
      */
-    static TBool IsAvcDisabled();
-	
+    static TBool MultimediaSharingSettings::IsAvcDisabled();
+    
+
+     /**
+     * @return ETrue if privacy is requested
+     *         EFalse otherwise, or if an error occurred reading cenrep
+     */
+    static TBool PrivacySetting();
+    
     };
     
 #include "mussettings.inl"
--- a/inc/mussettings.inl	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/mussettings.inl	Wed Sep 01 12:31:01 2010 +0100
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  ?Description
-*  Version     : %version: 20 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: 19 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -191,66 +191,6 @@
 //
 // -----------------------------------------------------------------------------
 //
-inline MusSettingsKeys::TPopupNotification
-    MultimediaSharingSettings::PopupNotificationSettingL()
-    {
-    MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::PopupNotificationSettingL()" )
-    TInt value = GetPropertyValueL( MusSettingsKeys::KPopupNotification );
-    MUS_LOG1( "mus: [MUSSET]     <- MultimediaSharingSettings::PopupNotificationSettingL( %d )",
-              value )
-    return ( MusSettingsKeys::TPopupNotification ) value;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-inline void MultimediaSharingSettings::SetPopupNotificationSettingL(
-                MusSettingsKeys::TPopupNotification aNotificationSetting )
-    {
-    MUS_LOG1( "mus: [MUSSET]     -> MultimediaSharingSettings::SetPopupNotificationSettingL( %d )",
-              ( TInt ) aNotificationSetting )
-    SetPropertyValueL( MusSettingsKeys::KPopupNotification,
-                       ( TInt ) aNotificationSetting );
-    MUS_LOG( "mus: [MUSSET]  <- MultimediaSharingSettings::SetPopupNotificationSettingL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-inline MusSettingsKeys::TPopupNotificationType
-    MultimediaSharingSettings::PopupNotificationTypeSettingL()
-    {
-    MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::PopupNotificationTypeSettingL()" )
-    TInt value = GetPropertyValueL( MusSettingsKeys::KPopupNotificationType );
-    MUS_LOG1( "mus: [MUSSET]     <- MultimediaSharingSettings::PopupNotificationTypeSettingL( %d )",
-              value )
-    return ( MusSettingsKeys::TPopupNotificationType ) value;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-inline void MultimediaSharingSettings::SetPopupNotificationTypeSettingL(
-            MusSettingsKeys::TPopupNotificationType aNotificationSetting )
-    {
-    MUS_LOG1( "mus: [MUSSET]     -> MultimediaSharingSettings::SetActivationSettingL( %d )",
-              ( TInt ) aNotificationSetting )
-    SetPropertyValueL( MusSettingsKeys::KPopupNotificationType, ( TInt ) aNotificationSetting );
-    MUS_LOG( "mus: [MUSSET]  <- MultimediaSharingSettings::SetActivationSettingL()" )
-
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
 inline MusSettingsKeys::TEdgeDtmSupport
     MultimediaSharingSettings::EdgeDtmSupportSettingL()
     {
@@ -584,88 +524,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// Returns the cenrep configured value for KAllowOnlyWithActiveCSCall key.
-// -----------------------------------------------------------------------------
-//
-inline MusSettingsKeys::TAllowedCSOnly
-    MultimediaSharingSettings::AllowedCSOnlySettingL()
-    {
-    MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::AllowedCSOnlySettingL()" )
-    TInt value = GetPropertyValueL( MusSettingsKeys::KAllowOnlyWithActiveCSCall );
-    MUS_LOG1( "mus: [MUSSET]  <- MultimediaSharingSettings::AllowedCSOnlySettingL( %d )",
-              value )
-    return ( MusSettingsKeys::TAllowedCSOnly ) value;
-    }
-    
-// -----------------------------------------------------------------------------
-// Returns the cenrep configured value for KAllowOnlyIn3GNetwork key.
-// -----------------------------------------------------------------------------
-//
-inline MusSettingsKeys::TAllowed3GOnly
-    MultimediaSharingSettings::Allowed3GOnlySettingL()
-    {
-    MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::Allowed3GOnlySettingL()" )
-    TInt value = GetPropertyValueL( MusSettingsKeys::KAllowOnlyIn3GNetwork );
-    MUS_LOG1( "mus: [MUSSET]  <- MultimediaSharingSettings::Allowed3GOnlySettingL( %d )",
-              value )
-    return ( MusSettingsKeys::TAllowed3GOnly ) value;
-    }    
-
-
-// -----------------------------------------------------------------------------
-// Returns the cenrep configured value for KCameraUsage key.
-// -----------------------------------------------------------------------------
-//
-inline MusSettingsKeys::TUseCamera 
-              MultimediaSharingSettings::CameraUsageL()
-    {
-    MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::CameraUsageL()" )
-    TInt value = GetPropertyValueL( MusSettingsKeys::KCameraUsage );
-    MUS_LOG1( "mus: [MUSSET]  <- MultimediaSharingSettings::CameraUsageL( %d )",
-              value )
-    return ( MusSettingsKeys::TUseCamera ) value;
-    }    
-
-
-// -----------------------------------------------------------------------------
-// Returns the cenrep configured value for KVideoDirection key.
-// -----------------------------------------------------------------------------
-inline MusSettingsKeys::TVideoDirection 
-              MultimediaSharingSettings::VideoDirectionL()
-    {
-    MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::VideoDirectionL()" )
-    TInt value = GetPropertyValueL( MusSettingsKeys::KVideoDirection );
-    MUS_LOG1( "mus: [MUSSET]  <- MultimediaSharingSettings::VideoDirectionL( %d )",
-              value )
-    return ( MusSettingsKeys::TVideoDirection ) value;
-    }
-    
-// -----------------------------------------------------------------------------
-// Returns the cenrep configured value for KVideoBandwidth key.
-// -----------------------------------------------------------------------------
-inline TInt MultimediaSharingSettings::VideoBandwidthSettingL()
-    {
-    MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::VideoBandwidthSettingL()" )
-    TInt value = GetPropertyValueL( MusSettingsKeys::KVideoBandwidth );
-    MUS_LOG1( "mus: [MUSSET]  <- MultimediaSharingSettings::VideoBandwidthSettingL( %d )",
-              value )
-    return value;
-    }
-
-// -----------------------------------------------------------------------------
-// Returns the cenrep configured value for KFastStartupMode key.
-// -----------------------------------------------------------------------------
-inline MusSettingsKeys::TFastMode 
-              MultimediaSharingSettings::FastStartupModeL()
-    {
-    MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::FastStartupModeL()" )
-    TInt value = GetPropertyValueL( MusSettingsKeys::KFastStartupMode );
-    MUS_LOG1( "mus: [MUSSET]  <- MultimediaSharingSettings::FastStartupModeL( %d )",
-              value )
-    return ( MusSettingsKeys::TFastMode ) value;
-    }
-    
-// -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
@@ -683,4 +541,18 @@
     return EFalse;
     }
     
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//    
+inline TBool MultimediaSharingSettings::PrivacySetting()
+	{
+	MUS_LOG( "mus: [MUSSET]  -> MultimediaSharingSettings::PrivacySetting()" )
+
+	TInt value(0);
+    TRAPD( err, value = GetPropertyValueL( MusSettingsKeys::KPrivacyExchange ) );
+    MUS_LOG2( "mus: [MUSSET]  <- MultimediaSharingSettings::PrivacySetting() err=%d value=%d",
+              err, value )
+	return ( err == KErrNone && value == MusSettingsKeys::EPrivacy );
+	}
 #endif // MUSSETTINGS_INL
--- a/inc/musuid.hrh	Tue Aug 31 15:12:07 2010 +0300
+++ b/inc/musuid.hrh	Wed Sep 01 12:31:01 2010 +0100
@@ -38,5 +38,3 @@
 #define KMusAvaPluginInterfaceUid    0x10282393
 
 #endif
-
-//end of file
--- a/layers.sysdef.xml	Tue Aug 31 15:12:07 2010 +0300
+++ b/layers.sysdef.xml	Wed Sep 01 12:31:01 2010 +0100
@@ -1,19 +1,20 @@
 <?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
   <!ENTITY layer_real_source_path "sf/app/mmsharinguis" >
 ]>
 
-<SystemDefinition name="mmsharinguis" schema="1.5.1">
+<SystemDefinition name="mmsharinguis" schema="1.4.0">
   <systemModel>
     <layer name="app_layer">
       <module name="mmsharinguis">
-        <unit name="mmsharinguis" unitID="msdo.mmsharinguis" bldFile="&layer_real_source_path;" mrp="" proFile="mmsharinguis.pro" />
+  		<unit unitID="msdo.mmsharinguis"  name="mmsharinguis" bldFile="&layer_real_source_path;/group" mrp=""/> 
       </module>
     </layer>
+
     <layer name="api_test_layer">
       <module name="mmsharinguis_api_test">
-        <unit unitID="msdo.mmsharinguis_api_test" mrp="" bldFile="\sf\app\mmsharinguis\mmsharinguis_plat\multimedia_sharing_manager_api\tsrc\group" name="mmsharinguis_api_test" />
+        <unit unitID="msdo.mmsharinguis_api_test" mrp="" bldFile="&layer_real_source_path;/mmsharinguis_plat/multimedia_sharing_manager_api/tsrc/group" name="mmsharinguis_api_test" />
       </module>
     </layer>
   </systemModel>
-</SystemDefinition>
\ No newline at end of file
+</SystemDefinition>
Binary file mmsharing/Conf/multimediasharing.confml has changed
Binary file mmsharing/Conf/multimediasharing_1028238B.crml has changed
Binary file mmsharing/cenrep/1028238b.txt has changed
Binary file mmsharing/cenrep/keys_multimediasharing.xls has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  project specification
+*
+*/
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../mmshshared/loc/mus.loc APP_LAYER_LOC_EXPORT_PATH(mus.loc)
+../mmshshared/loc/musoperator.loc APP_LAYER_LOC_EXPORT_PATH(musoperator.loc)
+
+// Generic configuration interface for multimediasharing cenrep settings  
+// component_1028238b implementation specifics for cenrep data
+// component_1028238b implementation specifics for genconf ml data
+../Conf/multimediasharing.confml APP_LAYER_CONFML(multimediasharing.confml)
+../Conf/multimediasharing_1028238B.crml APP_LAYER_CRML(multimediasharing_1028238B.crml)
+
+// Export backup registration xml file to register multimediasharing settings
+// to be securely backed up as part of symbian secure backup restore operation.
+// Here data owner will be musmanager server process but the real data stored
+// in central repository. Hence central repository uid should be specified as proxy data owner.
+../cenrep/backup_registration.xml  /epoc32/data/z/private/1028238d/backup_registration.xml
+
+PRJ_MMPFILES
+#include "../mmshavailability/group/bld.inf"
+#include "../mmshindicator/group/bld.inf"
+#include "../mmshmanagercli/group/bld.inf"
+#include "../mmshmanagersrv/group/bld.inf"
+#include "../mmshengine/group/bld.inf"
+#include "../mmshui/group/bld.inf"
--- a/mmsharing/group/group.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#                                                                    
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-# All rights reserved.                                                
-# This component and the accompanying materials are made available    
-# under the terms of "Eclipse Public License v1.0"    
-# which accompanies this distribution, and is available               
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".   
-#                                                                     
-# Initial Contributors:                                               
-# Nokia Corporation - initial contribution.                           
-#                                                                     
-# Contributors:                                                       
-#                                                                     
-# Description:                                                        
-#                                                                     
-#
-
-TEMPLATE = subdirs
-CONFIG += ordered
-
-symbian: {
-    :BLD_INF_RULES.prj_exports += "../mmshshared/loc/mus.loc APP_LAYER_LOC_EXPORT_PATH(mus.loc)"
-    :BLD_INF_RULES.prj_exports += "../mmshshared/loc/musoperator.loc APP_LAYER_LOC_EXPORT_PATH(musoperator.loc)"
-    :BLD_INF_RULES.prj_exports += "../Conf/multimediasharing.confml APP_LAYER_CONFML(multimediasharing.confml)"
-    :BLD_INF_RULES.prj_exports += "../Conf/multimediasharing_1028238B.crml APP_LAYER_CRML(multimediasharing_1028238B.crml)"
-    :BLD_INF_RULES.prj_exports += "../cenrep/backup_registration.xml  /epoc32/data/z/private/1028238D/backup_registration.xml"
-
-    :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshavailability/group/bld.inf\""
-    :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshindicator/group/bld.inf\""
-    :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshmanagercli/group/bld.inf\""
-    :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshmanagersrv/group/bld.inf\""
-    :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshengine/group/bld.inf\""
-}
-
-SUBDIRS += ../livecommsui
-SUBDIRS += ../mmshapp
--- a/mmsharing/inc/musavainterface.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/inc/musavainterface.h	Wed Sep 01 12:31:01 2010 +0100
@@ -126,7 +126,6 @@
     virtual TBool ExtensionAvailability() = 0;
     virtual TBool Available( MMusAvaObserver::TAvailabilityName aAvailability ) = 0;
     virtual MMusAvaObserver::TAvailabilityStatus AvailabilityState( MMusAvaObserver::TAvailabilityName aAvailability ) = 0;
-    virtual void PrepareForReceivedInviteL() = 0;
     
 private: //Data
 
--- a/mmsharing/inc/musavaobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/inc/musavaobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -159,6 +159,8 @@
     virtual void AvailabilityError(
         TAvailabilityName aName,
         TAvailabilityStatus aStatus ) = 0;
+    
+    virtual void AvailabilitiesAbleToShowIndicator() = 0;
         
     };
 
--- a/mmsharing/inc/musavasettingsobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/inc/musavasettingsobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -24,8 +24,6 @@
 #include <badesca.h>
 #include <e32base.h>
 
-#include "musmanagercommon.h"
-
 /**
  *  Defines setting interface for the MusAvailability Plug-in
  *
@@ -50,8 +48,6 @@
     virtual TApplicationState ApplicationState() = 0;
     
     virtual TBool OptionAllowed() = 0;
-    
-    virtual void StartApplicationL( MultimediaSharing::TMusUseCase aUseCase ) = 0;
 
     };
 
--- a/mmsharing/livecommsui/bwins/livecommsuiu.def	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
-	?terminateSession@LcViewManager@@QAEXXZ @ 1 NONAME ; void LcViewManager::terminateSession(void)
-	??1LcViewManager@@UAE@XZ @ 2 NONAME ; LcViewManager::~LcViewManager(void)
-	??0LcViewManager@@QAE@ABVQString@@0@Z @ 3 NONAME ; LcViewManager::LcViewManager(class QString const &, class QString const &)
-
--- a/mmsharing/livecommsui/eabi/livecommsuiu.def	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-EXPORTS
-	_ZN13LcViewManager16terminateSessionEv @ 1 NONAME
-	_ZN13LcViewManagerC1ERK7QStringS2_ @ 2 NONAME
-	_ZN13LcViewManagerC2ERK7QStringS2_ @ 3 NONAME
-	_ZN13LcViewManagerD0Ev @ 4 NONAME
-	_ZN13LcViewManagerD1Ev @ 5 NONAME
-	_ZN13LcViewManagerD2Ev @ 6 NONAME
-
--- a/mmsharing/livecommsui/lcui/inc/lceffecthandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCEFFECTHANDLER_H
-#define LCEFFECTHANDLER_H
-
-#include <QObject>
-#include <hbeffect.h>
-
-class HbWidget;
-class LcUiEngine;
-
-/**
- * 
- */
-class LcEffectHandler : public QObject
-{
-    Q_OBJECT
-    friend class UT_LcEffectHandler;
-    friend class UT_LcView;
-    
-public:
-    
-    enum DissapperEffect{
-        NormalDissappear,
-        DissappearToFlip
-    };
-
-    explicit LcEffectHandler(LcUiEngine& engine,
-                             HbWidget* sharedVideo, 
-                             HbWidget* sharedVideoOverlay,
-                             HbWidget* receivedVideo,
-                             HbWidget* receivedVideoOverlay);
-    ~LcEffectHandler();
-
-    void setVisibility(HbWidget* widget, bool visible);
-    
-    void setDissappearEffect( LcEffectHandler::DissapperEffect aEffectType );
-
-    bool isSwapInProgress();
-    
-    void startEffects();
-
-signals:
-    void swapCompleted();
-    void loadSwapLayout();
-       
-public slots:
-
-    void showSendWindow();
-    void showReceiveWindow();
-    void hideSendWindow();
-    void hideReceiveWindow();
-    void windowAppearComplete( HbEffect::EffectStatus status );
-    void windowDisappearComplete( HbEffect::EffectStatus status );
-    void windowDisappearToFlipComplete( HbEffect::EffectStatus status );
-    void windowFlipComplete( HbEffect::EffectStatus status );
-    void windowSwapSharedComplete( HbEffect::EffectStatus status );
-    void windowSwapReceivedComplete( HbEffect::EffectStatus status );
-    void swap();
-    
-private:
-    void startEffect( HbWidget* widget, const char *effectId, const char *callBack = "" );
-    bool isSharedVideoAtTop() const;
-    bool videosSideBySide() const;
-    void handleSwapCompletion();
-    void initializeSwap();
-    
-private: //data 
-    
-    LcUiEngine& mEngine;
-    HbWidget* mSharedVideo;
-    HbWidget* mSharedVideoOverlay;
-    HbWidget* mReceivedVideo;
-    HbWidget* mReceivedVideoOverlay;
-    
-    QString mEffectCallBack;
-    bool mSwapSharedCompleted;
-    bool mSwapReceivedCompleted;
-    bool mSwapInProgress;
-};
-                  
-#endif // LCEFFECTHANDLER_H
--- a/mmsharing/livecommsui/lcui/inc/lcexport.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCEXPORT_H
-#define LCEXPORT_H
-
-#include <qglobal.h>
-
-#if !defined(UNIT_TESTING)
-#if !defined(LIVECOMMS_EXPORT)
-#if defined(LIVECOMMSUI_LIB)
-#define LIVECOMMS_EXPORT Q_DECL_EXPORT
-#else
-#define LIVECOMMS_EXPORT Q_DECL_IMPORT
-#endif
-#endif
-#else
-#define LIVECOMMS_EXPORT
-#endif
-#endif // LCEXPORT_H
--- a/mmsharing/livecommsui/lcui/inc/lclogger.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-#ifndef LCLOGGER_H
-#define LCLOGGER_H
-
-#include <QDebug>
-
-
-// Disabled PC_lint warning for "Undefined preprocessor variable 'UNIT_TESTING'"
-//lint -e553 
-#if ( !defined(_DEBUG) || defined(QT_NO_DEBUG_OUTPUT) ) // release or unit test build; no logs
-
-#define LC_QDEBUG( a )
-#define LC_QDEBUG_2( a, b)
-#define LC_QDEBUG_3( a, b, c)
-#define LC_QDEBUG_4( a, b, c, d)
-#define LC_QWARNING( a )
-#define LC_QWARNING_2( a, b )
-#define LC_QCRITICAL( a )
-#define LC_QCRITICAL_2( a, b )
-#define LC_QCRITICAL_3( a, b, c)
-
-#else // debug build; logs
-
-
-const char lcDebugPrefix[]    = "Debug: ";
-const char lcWarningPrefix[]  = "Warning: ";
-const char lcCriticalPrefix[] = "Critical: ";
-const char lcFatalPrefix[]    = "Fatal: ";
-
-#include <e32debug.h>    // RDebug
-#include <QFile>
-#include <QTextStream>
-#include <qapplication.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-const char lcLogFile[] = "C:/logs/mus/musdebug.txt";// MultimediaSharing logging file.
-
-
-#define LC_QDEBUG( a )\
-    qDebug() << a;
-
-#define LC_QDEBUG_2( a, b)\
-    qDebug() << a << b;
-
-#define LC_QDEBUG_3( a, b, c)\
-    qDebug() << a << b << c;
-
-#define LC_QDEBUG_4( a, b, c, d)\
-    qDebug() << a << b << c << d;
-
-#define LC_QWARNING( a )\
-    qWarning() << a;
-
-#define LC_QWARNING_2( a, b )\
-    qWarning() << a << b;      
-
-#define LC_QCRITICAL( a )\
-    qCritical() << a;  
-
-#define LC_QCRITICAL_2( a, b )\
-    qCritical() << a << b;  
-    
-#define LC_QCRITICAL_3( a, b, c)\
-    qCritical() << a << b << c;
-
-
-// File logging can be disabled by commenting above definition. 
-#define LCUI_FILE_LOGGING_ENABLED
-
-#if ( defined __WINSCW__ ) || ( defined __WINS__ )
-// No sense to have file logging enabled in wins
-#undef LCUI_FILE_LOGGING_ENABLED
-#endif
-
-#ifdef LCUI_FILE_LOGGING_ENABLED
-const bool lcFileLoggingEnabled = ETrue;
-#else
-const bool lcFileLoggingEnabled = EFalse;
-#endif
-
-
-#endif
-
-#endif // LCLOGGER_H
-
-// End of File
--- a/mmsharing/livecommsui/lcui/inc/lcuicomponentrepository.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCUICOMPONENTREPOSITORY_H
-#define LCUICOMPONENTREPOSITORY_H
-
-#include <hbdocumentloader.h>
-#include <QString>
-#include <QHash>
-#include <hbtransparentwindow.h>
-
-class LcView;
-class QAction;
-class HbProgressDialog;
-class HbDialog;
-class LcUiEngine;
-class HbMenu;
-class HbMessageBox;
-
-class LcUiComponentRepository : public HbDocumentLoader   
-{   
-    friend class UT_LcUiComponentRepository;
-    
-public:    
-
-    explicit LcUiComponentRepository(LcUiEngine& engine);
-    ~LcUiComponentRepository();
-
-public:
-    
-    LcView* idleView();
-    LcView* receiveView();
-    LcView* receiveOnlyView();
-    LcView* twowayView();
-    LcView* sendView();
-    LcView* allInOneView();
-    
-    HbDialog* acceptQuery();
-    HbProgressDialog* invitingNote();
-    HbProgressDialog* waitingNote();
-    HbDialog* recipientQuery();
-    HbDialog* shareOwnVideoQuery();
-    void sharedVideoContextMenuActions( HbMenu* menu, LcView& view );
-    bool loadLayout( const QString& layoutName );
-    // returns the currently loaded layout name
-    QString layout()const;
-    // returns the previously loaded layout name
-    QString previousLayout()const;
-    
-private: //from HbDocumentLoader
-
-    QObject *createObject(const QString& type, const QString &name);
-
-private:
-
-    LcView* loadView( QObjectList& components, 
-                      const QString& viewId, 
-                      const QString& xmlFile );
-    void connectActions( LcView& view ) const;
-    bool connect( QAction& hbAction, LcView& view ) const;
-
-private:
-    
-    QString mLastLoadedView;
-    
-    LcUiEngine& mEngine;
-    
-    QObjectList mIdleViewComponents;
-    QObjectList mReceiveViewComponents;
-    QObjectList mSendViewComponents;
-    QObjectList mTwowayViewComponents;
-    QObjectList mAllInOneViewComponents;
-    QObjectList mReceiveOnlyViewComponents;
-    
-    QHash<QString,const char*>* mSlots;
-    
-    LcView* mIdleView;
-    LcView* mReceiveView;
-    LcView* mSendView;
-    LcView* mTwowayView;
-    LcView* mAllInOneView;
-    LcView* mReceiveOnlyView;
-    
-    HbDialog* mAcceptQuery;
-    HbProgressDialog* mInvitingNote;
-    HbProgressDialog* mWaitingNote;
-    HbDialog* mRecipientQuery;
-    HbMessageBox* mShareOwnVideoQuery;
-    
-    QString mLayout;
-    QString mPreviousLayout;
-};
-
-#endif // LCUICOMPONENTREPOSITORY_H
--- a/mmsharing/livecommsui/lcui/inc/lcuidefs.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCUIDEFS_H_
-#define LCUIDEFS_H_
-
-#include <QObject>
-
-class LcUtil {
-
-public:
-    
-    inline static void asyncSlotCall( QObject* instance, const char* slot )
-        {
-        QMetaObject::invokeMethod(instance, slot, Qt::QueuedConnection );
-        }
-    
-    inline static void asyncSlotCall( QObject* instance, const char* slot, QGenericArgument arg )
-        {
-        QMetaObject::invokeMethod(instance, slot, Qt::QueuedConnection, arg );
-        }
-};
-
-// Panic the current thread
-#if ( defined __WINSCW__ ) || ( defined __WINS__ ) || ( defined __ARMV5__ )
-#include <e32std.h>
-#define LC_PANIC() User::Invariant()
-#else
-#define LC_PANIC()
-#endif
-
-#define LC_MCC_WINDOW_FACTOR 50
-
-#define LC_NOTE_ON_TOP 20
-
-#define LC_NOTE_TIMEOUT 3000
-
-#define DESC_TO_QSTRING( desc )\
-    QString::fromRawData( reinterpret_cast<const QChar*>(desc.Ptr()), desc.Length());
-
-#define LC_INVITING "Inviting..."
-#define LC_WAITING_VIDEO "Waiting for shared video..."
-#define LC_OK "OK"
-#define LC_CANCEL "Cancel"
-#define LC_ACCEPT_SESSION "Accept incoming session from"
-#define LC_RECIPIENT_QUERY "Enter recipient address:"
-
-#ifndef QT_TESTLIB_LIB    
-const char lcIdleViewFile[] = ":/xml/lcidleview.docml";
-const char lcReceiveViewFile[] = ":/xml/lcreceiveview.docml";
-const char lcReceiveOnlyViewFile[] = ":/xml/lcreceiveonlyview.docml";
-const char lcSendViewFile[] = ":/xml/lcsendview.docml";
-const char lcTwowayViewFile[] = ":/xml/lctwowayview.docml";
-const char lcAllInOneViewFile[] = ":/xml/lcvtview.docml";
-#else
-const char lcIdleViewFile[] = "c:/lcidleview.docml";
-const char lcReceiveViewFile[] = "C:/lcreceiveview.docml";
-const char lcReceiveOnlyViewFile[] = "C:/lcreceiveonlyview.docml";
-const char lcSendViewFile[] = "C:/lcsendview.docml";
-const char lcTwowayViewFile[] = "C:/lctwowayview.docml";
-const char lcAllInOneViewFile[] = "C:/lcvtview.docml";
-
-#endif
-
-const char lcLcViewTypeName[] = "LcView";
-
-//view ids
-const char lcViewIdleId[] = "lc_view_idle";
-const char lcViewReceiveId[] = "lc_view_recv";
-const char lcViewReceiveOnlyId[] = "lc_view_recvonly";
-const char lcViewSendId[] = "lc_view_send";
-const char lcViewTwowayId[] = "lc_view_twoway";
-const char lcViewAllInOneId[] = "lc_view_allinone";
-
-//widget ids
-const char lcIconContactId[] = "lc_icon_contact";
-const char lcLabelRecipientId[] = "lc_label_recipient";
-const char lcLabelDurationId[] = "lc_label_duration";
-const char lcWidgetRecvVideoId[] = "lc_widget_recvvideo";
-const char lcWidgetSendVideoId[] = "lc_widget_sendvideo";
-const char lcWidgetRecvVideoId2[] = "lc_widget_recvvideo2";
-const char lcWidgetSendVideoId2[] = "lc_widget_sendvideo2";
-const char lcButtonEndCall[] = "lc_button_endCall";
-const char lcWidgetDialpad[] = "lc_label_dialpad";
-
-//action ids
-const char lcActFullscreenId[] = "lc_act_fullscreen";
-const char lcActVideopreferenceId[] = "lc_act_videopreference";
-const char lcActDialerId[] = "lc_act_dialer";
-const char lcActEndactivecallId[] = "lc_act_endactivecall";
-const char lcActStopSharingId[] = "lc_act_stopsharing";
-const char lcActEnableCameraId[] = "lc_act_enablecamera";
-const char lcActMuteId[] = "lc_act_mute";
-const char lcActGalleryId[] = "lc_act_gallery";
-const char lcActChangeCameraId[] = "lc_act_changecamera";
-const char lcActMenuChangeCameraId[] = "lc_act_menu_changecamera";
-const char lcActAdjustVideoId[] = "lc_act_adjustvideo";
-const char lcActShareImageId[] = "lc_act_shareimage";
-const char lcActSwapViewsId[] = "lc_act_swapviews";
-const char lcActSwitchToVoiceCallId[] = "lc_act_switchtovoicecall";
-const char lcActDisableCameraId[] = "lc_act_disablecamera";
-const char lcActMenuDisableCameraId[] = "lc_act_menu_disablecamera";
-const char lcActSpeakerId[] = "lc_act_speaker";
-const char lcActOpenKeypadId[] = "lc_act_openkeypad";
-
-
-//layouts ids
-const char lcLayoutLandscapeDefaultId[] = "landscape"; //Main window - received content
-const char lcLayoutFullscreenId[] = "fullscreen";
-const char lcLayoutLandscapeSwappedId[] = "lc_layout_landscape_swapped";//Main window - sent content
-const char lcLayoutLandscapeDialpadId[] = "lc_layout_landscape_dialpad"; // Dialpad layout
-
-
-//translations Id
-const char lcTranslationsDirectory[] = ":/translations";
-const char lcTranslationsFileNameDefault[] = "livecommsui_en_GB";
-const char lcTranslationsFileName[] = "livecommsui_";
-
-//icon names
-const char lcIconNameUnmuteMic[] = "qtg_mono_mic_unmute";
-const char lcIconNameMuteMic[] = "qtg_mono_mic_mute";
-const char lcIconNameHandset[] = "qtg_mono_mobile";
-const char lcIconNameLoudspeaker[] = "qtg_mono_speaker";
-const char lcIconNameMainCamera[] = "qtg_mono_change_cam_mode";
-const char lcIconNameSecondaryCamera[] = "qtg_mono_change_cam_mode";
-const char lcIconNameEnableCamera[] = "qtg_mono_camcorder";
-const char lcIconNameDisableCamera[] = "qtg_mono_camcorder_off";
-
-const char lcIconNameBlackWin[] = ":/black_win.bmp";
-
-
-//effects
-const char lcEffectWinAppear[] = ":/win_appear.fxml";
-const char lcEffectWinDisappear[] = ":/win_disappear.fxml";
-const char lcEffectWinFlip[] = ":/win_flip.fxml";
-const char lcEffectWinSwapDown[] = ":/win_swap_down.fxml";
-const char lcEffectWinSwapUp[] = ":/win_swap_up.fxml";
-
-const char lcEffectWinId[] = "vidwindow";
-const char lcEffectWinAppearId[] = "appear";
-const char lcEffectWinDisappearId[] = "disappear";
-const char lcEffectWinFlipId[] = "flip";
-const char lcEffectWinSwapDownId[] = "swapDown";
-const char lcEffectWinSwapUpId[] = "swapUp";
-
-const char lcEffectWinDefaultCallback[] = "windowDisappearComplete";
-
-#endif /* LCUIDEFS_H_ */
--- a/mmsharing/livecommsui/lcui/inc/lcvideowidget.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCVIDEOWIDGET_H
-#define LCVIDEOWIDGET_H
-
-#include <hbtransparentwindow.h>
-
-
-class LcVideoWidget : public HbTransparentWindow
-{
-    Q_OBJECT
-
-public:
-
-    explicit LcVideoWidget(QGraphicsItem *parent = 0, bool showVideo = true);
-    ~LcVideoWidget();
-    void setShowVideo(bool showVideo);
-    bool isShowingVideo();
-    void setLocalPlayer(bool local){mLocalPlayer = local ;};
-
-public: // From HbTransparentWindow
-    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, 
-               QWidget *widget = 0);
-private:
-    bool mShowVideo;
-    bool mLocalPlayer;
-};
-
-#endif // LCVIDEOWIDGET_H
--- a/mmsharing/livecommsui/lcui/inc/lcview.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCVIEW_H
-#define LCVIEW_H
-
-#include <hbview.h>
-
-//temp
-#define LC_UNMUTE_TEXT "Unmute"
-#define LC_MUTE_TEXT "Mute"
-#define LC_HANDSET_TEXT "Handset"
-#define LC_SPEAKER_TEXT "Speaker"
-
-class LcUiEngine;
-class LcUiComponentRepository;
-class HbLabel;
-class HbMessageBox;
-class HbAction;
-class HbPushButton;
-class HbTransparentWindow;
-class HbMenu;
-class LcVideoWidget;
-class LcEffectHandler;
-class Dialpad;
-class DialpadVtKeyHandler;
-
-class LcView : public HbView    
-{
-    Q_OBJECT
-    friend class UT_LcView;
-    friend class UT_LcUiComponentRepository;    
-    
-public:    
-
-    explicit LcView(LcUiEngine& engine, LcUiComponentRepository& repository);
-    ~LcView();
-
-public:
-    
-    void init();
-    void activated();
-    void deactivated();
-    QString currentLayout();
-    
-public slots:
-
-    void endVideoSession();    
-    void disableCamera();
-    void mute();
-    void changeCamera();    
-    void switchToVoiceCall();    
-    void speaker();
-    void updateVideoRects();
-    void swap();
-    void shareImage();
-    void updateSwapLayout();
-    void menuAboutToShow();    
-    void back();
-//temp
-    void notSupported();
-
-private slots:
-
-    void setMuteActionToUnmute();
-    void setMuteActionToMute();
-    void setCameraActionToMain();
-    void setCameraActionToSecondary();
-    void setSpeakerActionToHandset();
-    void setSpeakerActionToSpeaker();
-    void setCameraActionToDisable();
-    void setCameraActionToEnable();
-    void disableControls();
-    void enableControls();    
-    void watchInactivity();
-    void updateVolumeSlider(int aVolumeLevel);
-
-protected: // From HbView
-    
-    void gestureEvent(QGestureEvent *event);
- 
-protected slots:
-    void openDialpad();    
-    virtual void dialpadOpened();
-    virtual void dialpadClosed();
-    virtual void dialpadEditorTextChanged();
-    
-protected:
-    void setDialpadPosition();
-    
-private: // fullscreen
-    void timerEvent( QTimerEvent * event );
-    void toFullScreen( bool fullscreen );
-    
-private:
-    void createNotSupportedNote();
-    void createContextMenu();
-    QRectF translateRectForOrientation(const QRectF& origRect);
-    QPointF translatePointForOrientation(const QPointF& origPoint);
-    void setVisibility( QGraphicsItem* item, bool visible );    
-    void addOptionsMenuActions();
-    void gestureLongPress( QPointF coords );
-    void gestureShortPress();
-    bool isVideoPositionedCorrectly( LcVideoWidget* mVideoWidget );
-    bool isPositioned();
-
-private://not owned
-    
-    LcUiEngine& mEngine;
-    LcUiComponentRepository& mRepository;
-    HbLabel* mRecipient;
-    HbLabel* mDuration;
-    HbLabel* mContactIcon;    
-    LcVideoWidget* mSharedVideoWidget;
-    LcVideoWidget* mReceivedVideoWidget;
-    HbAction* mChangeCameraAction;
-    HbAction* mMuteAction;
-    HbAction* mSpeakerAction;
-    HbAction* mDisableCameraAction;
-    HbAction* mDisableCameraMenuAction;
-    HbMessageBox* mNotSupportedNote;
-    HbPushButton* mEndCallButton; 
-
-    LcVideoWidget* mReceivedVideoEffectOverlay;
-    LcVideoWidget* mSharedVideoEffectOverlay;
-    LcEffectHandler* mEffectHandler;
-
-private:
-
-    HbMenu* mItemContextMenu;    
-    bool mIsOptionMenuOpen;
-    Dialpad* mDialpad; // Not owned
-    DialpadVtKeyHandler* mDialpadVtKeyHandler; 
-    int timerId;
-    bool isViewReady;
-};
-
-
-#endif // LCVIEW_H
--- a/mmsharing/livecommsui/lcui/inc/lcviewmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCVIEWMANAGER_H
-#define LCVIEWMANAGER_H
-
-#include <QObject>
-#include <lcexport.h>
-
-class LcViewManagerPrivate;
-class HbMainWindow;
-
-/**
- * 
- */
-class LcViewManager : public QObject
-{
-    Q_OBJECT
-    friend class UT_LcUiViewManager;
-    
-public: // The exported API
-
-    LIVECOMMS_EXPORT LcViewManager(
-        const QString &engineName,
-        const QString &applicationDisplayName);
-        
-    LIVECOMMS_EXPORT ~LcViewManager();
-        
-public slots:
-
-    //terminateSession will close engine session asynchronously
-    //when session is closed application will be also closed
-    LIVECOMMS_EXPORT void terminateSession();
-    
-private: //data 
-    
-    LcViewManagerPrivate* d_ptr;
-};
-                  
-#endif // LCVIEWMANAGER_H
--- a/mmsharing/livecommsui/lcui/inc/lcviewmanager_p.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCVIEWMANAGER_P_H
-#define LCVIEWMANAGER_P_H
-
-#include <QObject>
-
-class HbMainWindow;
-class LcUiEngine;
-class LcUiComponentRepository;
-class LcView;
-class HbAction;
-
-#include <hbmainwindow.h>
-
-class LcMainWindow : public HbMainWindow
-    {
-    Q_OBJECT
-    
-public:
-    
-    LcMainWindow();
-    virtual ~LcMainWindow();
-    
-protected: // From QObject
-
-    bool eventFilter ( QObject * watched, QEvent * event ); 
-    
-signals:
-        
-    void appFocusGained();
-    void appFocusLost();
-    
-private:
-    friend class UT_LcUiViewManager;    
-    };
-
-class LcViewManagerPrivate : public QObject
-{
-    Q_OBJECT
-    friend class UT_LcUiViewManager;
-
-public:
-  
-    explicit LcViewManagerPrivate(const QString &engineName,
-                                  const QString &applicationDisplayName);
-    ~LcViewManagerPrivate();
-
-    //this will close engine session asynchronously
-    //when session is closed application will be also closed
-    void terminateSession();
-        
-public slots:
-    void changeView();
-    //for layout switch
-    void prepareOrientationChange();
-    
-private slots:
-    void closeApp();
-    void activateCurrentView(bool startup);
-    
-private:  
-
-    void startEngine();
-    void setCurrentView(bool startup=false);
-    LcView* currentView();
-    
-private: //data 
-    
-    LcMainWindow mMainWindow;  
-    LcUiEngine* mEngine;
-    LcUiComponentRepository* mRepository;
-    
-private:
-    friend class UT_LcUiViewManager;
-};
-                              
-#endif // LCVIEWMANAGER_P_H
--- a/mmsharing/livecommsui/lcui/livecommsui.qrc	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<!DOCTYPE RCC>
-<RCC version="1.0">
-    <qresource prefix="/">
-        <file alias="hbpushbutton_color.css">resources/hbpushbutton_color.css</file>
-    </qresource>
-    <qresource prefix="/xml" >
-        <file alias="lcidleview.docml">resources/lcviews/lcidleview.docml.bin</file>
-        <file alias="lcreceiveview.docml">resources/lcviews/lcreceiveview.docml.bin</file>
-        <file alias="lcreceiveonlyview.docml">resources/lcviews/lcreceiveonlyview.docml.bin</file>
-        <file alias="lcsendview.docml">resources/lcviews/lcsendview.docml.bin</file>
-        <file alias="lctwowayview.docml">resources/lcviews/lctwowayview.docml.bin</file>
-        <file alias="lcvtview.docml">resources/lcviews/lcvtview.docml.bin</file>
-    </qresource>
-    <qresource prefix="/" >
-        <file alias="win_appear.fxml" >resources/win_appear.fxml</file>
-        <file alias="win_disappear.fxml" >resources/win_disappear.fxml</file>
-        <file alias="win_flip.fxml" >resources/win_flip.fxml</file>
-        <file alias="win_swap_down.fxml" >resources/win_swap_down.fxml</file>       
-        <file alias="win_swap_up.fxml" >resources/win_swap_up.fxml</file>       
-    </qresource>
-</RCC>
--- a/mmsharing/livecommsui/lcui/resources/hbpushbutton_color.css	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-/* For End Call button */
-HbPushButton[state = "normal"]::icon
-{
-    color: var(qtc_callhandling_reject_normal);
-}
-
-HbPushButton[state = "pressed"]::icon
-{
-    color: var(qtc_callhandling_reject_pressed);
-}
Binary file mmsharing/livecommsui/lcui/resources/lcviews.uip has changed
--- a/mmsharing/livecommsui/lcui/resources/lcviews/lcidleview.docml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="LcView" version="0.9">
-    <widget name="lc_view_idle" type="HbView">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_label_duration" type="HbLabel">
-                <real name="z" value="10.0006"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="2.08955un"/>
-            </widget>
-            <widget name="lc_label_phonenumber" type="HbLabel">
-                <real name="z" value="10.0005"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_phone_number" name="plainText"/>
-            </widget>
-            <widget name="lc_label_recipient" type="HbLabel">
-                <real name="z" value="10.0004"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.76119un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_contact" name="plainText"/>
-            </widget>
-            <widget name="lc_icon_brand" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0003"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_icon_contact" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0002"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-        </widget>
-        <string locid="txt_lcomms_title_idle_view" name="title"/>
-    </widget>
-    <section name="portrait">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="3.58209un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="3.73134un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="41.9403un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.32836un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="4.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="7.31343un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="9.85075un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-    </section>
-    <section name="landscape">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="52.53731un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="1.19403un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="74.32836un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="2.38806un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="5.22388un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="7.76119un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-    </section>
-    <metadata activeUIState="landscape" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <uistate name="portrait" sections="#common portrait"/>
-        <uistate name="landscape" sections="#common landscape"/>
-    </metadata>
-</hbdocument>
--- a/mmsharing/livecommsui/lcui/resources/lcviews/lcreceiveView.docml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="LcView" version="0.9">
-    <object name="lc_act_fullscreen" type="HbAction">
-        <string locid="txt_lcomms_opt_full_screen" name="text"/>
-    </object>
-    <object name="lc_act_videopreference" type="HbAction">
-        <string locid="txt_lcomms_opt_video_preference" name="text"/>
-    </object>
-    <object name="lc_act_dialer" type="HbAction">
-        <string locid="txt_lcomms_opt_dialer" name="text"/>
-    </object>
-    <object name="lc_act_endactivecall" type="HbAction">
-        <string locid="txt_lcomms_opt_end_active_call" name="text"/>
-    </object>
-    <object name="lc_act_stopsharing" type="HbAction">
-        <icon iconName=":/stop_sharing.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_stop_sharing" name="toolTip"/>
-        <bool name="visible" value="TRUE"/>
-    </object>
-    <object name="lc_act_enablecamera" type="HbAction">
-        <icon iconName=":/enable_camera.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_enable_camera" name="toolTip"/>
-    </object>
-    <object name="lc_act_mute" type="HbAction">
-        <icon iconName=":/mute_mic.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_mute" name="toolTip"/>
-    </object>
-    <object name="lc_act_gallery" type="HbAction">
-        <icon iconName=":/gallery.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_gallery" name="toolTip"/>
-    </object>
-    <widget name="lc_view_recv" type="HbView">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_widget_recvvideo" type="HbLabel">
-                <real name="z" value="10.009"/>
-                <sizehint height="43.28358un" type="PREFERRED" width="53.13433un"/>
-            </widget>
-            <widget name="lc_icon_contact" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0002"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_icon_brand" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0003"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_label_recipient" type="HbLabel">
-                <real name="z" value="10.0004"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.76119un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_contact" name="plainText"/>
-            </widget>
-            <widget name="lc_label_phonenumber" type="HbLabel">
-                <real name="z" value="10.0005"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_phone_number" name="plainText"/>
-            </widget>
-            <widget name="lc_label_duration" type="HbLabel">
-                <real name="z" value="10.0006"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="2.08955un"/>
-            </widget>
-        </widget>
-        <widget name="lc_menu" role="HbView:menu" type="HbMenu">
-            <ref object="lc_act_fullscreen" role="HbMenu:addAction"/>
-            <ref object="lc_act_videopreference" role="HbMenu:addAction"/>
-            <ref object="lc_act_dialer" role="HbMenu:addAction"/>
-            <ref object="lc_act_endactivecall" role="HbMenu:addAction"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <real name="z" value="3"/>
-            <enums name="orientation" value="Horizontal"/>
-            <ref object="lc_act_stopsharing" role="HbToolBar:addAction"/>
-            <ref object="lc_act_enablecamera" role="HbToolBar:addAction"/>
-            <ref object="lc_act_mute" role="HbToolBar:addAction"/>
-            <ref object="lc_act_gallery" role="HbToolBar:addAction"/>
-        </widget>
-        <string locid="txt_lcomms_title_receive_view" name="title"/>
-    </widget>
-    <section name="portrait">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="32.38806un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-0.44776un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="3.58209un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="3.73134un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="41.9403un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.32836un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="4.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="7.31343un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="9.85075un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="landscape">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="0.44776un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-48.35821un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="BOTTOM" spacing="-0.44776un" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="52.53731un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="1.19403un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="74.32836un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="2.38806un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="5.22388un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="7.76119un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="fullscreen">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="70" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="-66" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-70" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-    </section>
-    <metadata activeUIState="landscape" display="NHD landscape" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <uistate name="portrait" sections="#common portrait"/>
-        <uistate name="landscape" sections="#common landscape"/>
-    </metadata>
-</hbdocument>
--- a/mmsharing/livecommsui/lcui/resources/lcviews/lcreceiveonlyView.docml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="LcView" version="0.9">
-    <object name="lc_act_fullscreen" type="HbAction">
-        <string locid="txt_lcomms_opt_full_screen" name="text"/>
-    </object>
-    <object name="lc_act_videopreference" type="HbAction">
-        <string locid="txt_lcomms_opt_video_preference" name="text"/>
-    </object>
-    <object name="lc_act_dialer" type="HbAction">
-        <string locid="txt_lcomms_opt_dialer" name="text"/>
-    </object>
-    <object name="lc_act_endactivecall" type="HbAction">
-        <string locid="txt_lcomms_opt_end_active_call" name="text"/>
-    </object>
-    <object name="lc_act_stopsharing" type="HbAction">
-        <icon iconName=":/stop_sharing.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_stop_sharing" name="toolTip"/>
-        <bool name="visible" value="TRUE"/>
-    </object>
-    <object name="lc_act_mute" type="HbAction">
-        <icon iconName=":/mute_mic.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_mute" name="toolTip"/>
-    </object>
-    <object name="lc_act_gallery" type="HbAction">
-        <icon iconName=":/gallery.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_gallery" name="toolTip"/>
-    </object>
-    <widget name="lc_view_recvonly" type="HbView">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_widget_recvvideo" type="HbLabel">
-                <real name="z" value="10.009"/>
-                <sizehint height="43.28358un" type="PREFERRED" width="53.13433un"/>
-            </widget>
-            <widget name="lc_icon_contact" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0002"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_icon_brand" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0003"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_label_recipient" type="HbLabel">
-                <real name="z" value="10.0004"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.76119un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_contact" name="plainText"/>
-            </widget>
-            <widget name="lc_label_phonenumber" type="HbLabel">
-                <real name="z" value="10.0005"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_phone_number" name="plainText"/>
-            </widget>
-            <widget name="lc_label_duration" type="HbLabel">
-                <real name="z" value="10.0006"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="2.08955un"/>
-            </widget>
-        </widget>
-        <widget name="lc_menu" role="HbView:menu" type="HbMenu">
-            <ref object="lc_act_fullscreen" role="HbMenu:addAction"/>
-            <ref object="lc_act_videopreference" role="HbMenu:addAction"/>
-            <ref object="lc_act_dialer" role="HbMenu:addAction"/>
-            <ref object="lc_act_endactivecall" role="HbMenu:addAction"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <real name="z" value="3"/>
-            <enums name="orientation" value="Horizontal"/>
-            <ref object="lc_act_stopsharing" role="HbToolBar:addAction"/>
-            <ref object="lc_act_mute" role="HbToolBar:addAction"/>
-            <ref object="lc_act_gallery" role="HbToolBar:addAction"/>
-        </widget>
-        <string locid="txt_lcomms_title_receive_only_view" name="title"/>
-    </widget>
-    <section name="portrait">
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="32.38806un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-0.44776un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="3.58209un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="3.73134un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="41.9403un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.32836un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="4.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="7.31343un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="9.85075un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="landscape">
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="0.44776un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-48.35821un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="BOTTOM" spacing="-0.44776un" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="52.53731un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="1.19403un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="74.32836un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="2.38806un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="5.22388un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="7.76119un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="fullscreen">
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="70" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="-66" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-70" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-    </section>
-    <metadata activeUIState="landscape" display="NHD landscape" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <uistate name="portrait" sections="#common portrait"/>
-        <uistate name="landscape" sections="#common landscape"/>
-    </metadata>
-</hbdocument>
--- a/mmsharing/livecommsui/lcui/resources/lcviews/lcsendview.docml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="LcView" version="0.9">
-    <object name="lc_act_fullscreen" type="HbAction">
-        <string locid="txt_lcomms_opt_full_screen" name="text"/>
-    </object>
-    <object name="lc_act_videopreference" type="HbAction">
-        <string locid="txt_lcomms_opt_video_preference" name="text"/>
-    </object>
-    <object name="lc_act_swapviews" type="HbAction">
-        <string locid="txt_lcomms_opt_swap_views" name="text"/>
-    </object>
-    <object name="lc_act_endactivecall" type="HbAction">
-        <string locid="txt_lcomms_opt_end_active_call" name="text"/>
-    </object>
-    <object name="lc_act_changecamera" type="HbAction">
-        <icon iconName=":/secondary_camera.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_change_camera" name="toolTip"/>
-    </object>
-    <object name="lc_act_gallery" type="HbAction">
-        <icon iconName=":/gallery.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_gallery" name="toolTip"/>
-    </object>
-    <object name="lc_act_mute" type="HbAction">
-        <icon iconName=":/mute_mic.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_mute" name="toolTip"/>
-    </object>
-    <object name="lc_act_adjustvideo" type="HbAction">
-        <string locid="txt_lcomms_opt_adjust_video" name="text"/>
-    </object>
-    <object name="lc_act_disablecamera" type="HbAction">
-        <string locid="txt_lcomms_opt_disable_camera" name="text"/>
-        <string locid="txt_lcomms_tooltip_disable_camera" name="toolTip"/>
-    </object>
-    <object name="lc_act_dialer" type="HbAction">
-        <string locid="txt_lcomms_opt_dialer" name="text"/>
-    </object>
-    <object name="lc_act_stopsharing" type="HbAction">
-        <icon iconName=":/stop_sharing.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_stop_sharing" name="toolTip"/>
-        <bool name="visible" value="TRUE"/>
-    </object>
-    <widget name="lc_view_send" type="HbView">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_widget_sendvideo" type="HbLabel">
-                <real name="z" value="10.009"/>
-                <sizehint height="43.28358un" type="PREFERRED" width="53.13433un"/>
-            </widget>
-            <widget name="lc_icon_contact" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0002"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_icon_brand" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0003"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_label_recipient" type="HbLabel">
-                <real name="z" value="10.0004"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.76119un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_contact" name="plainText"/>
-            </widget>
-            <widget name="lc_label_phonenumber" type="HbLabel">
-                <real name="z" value="10.0005"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_phone_number" name="plainText"/>
-            </widget>
-            <widget name="lc_label_duration" type="HbLabel">
-                <real name="z" value="10.0006"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="2.08955un"/>
-            </widget>
-        </widget>
-        <widget name="lc_menu" role="HbView:menu" type="HbMenu">
-            <ref object="lc_act_fullscreen" role="HbMenu:addAction"/>
-            <ref object="lc_act_adjustvideo" role="HbMenu:addAction"/>
-            <ref object="lc_act_dialer" role="HbMenu:addAction"/>
-            <ref object="lc_act_endactivecall" role="HbMenu:addAction"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <real name="z" value="3"/>
-            <enums name="orientation" value="Horizontal"/>
-            <ref object="lc_act_stopsharing" role="HbToolBar:addAction"/>
-            <ref object="lc_act_changecamera" role="HbToolBar:addAction"/>
-            <ref object="lc_act_mute" role="HbToolBar:addAction"/>
-            <ref object="lc_act_gallery" role="HbToolBar:addAction"/>
-        </widget>
-        <string locid="txt_lcomms_title_send_view" name="title"/>
-    </widget>
-    <section name="portrait">
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="32.38806un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="RIGHT" spacing="-0.44776un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="3.58209un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="3.73134un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="41.9403un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.32836un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="4.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="7.31343un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="9.85075un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-    </section>
-    <section name="landscape">
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="0.44776un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="RIGHT" spacing="-48.35821un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="BOTTOM" spacing="-0.44776un" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="52.53731un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="1.19403un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="74.32836un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="2.38806un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="5.22388un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="7.76119un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-    </section>
-    <section name="fullscreen">
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="LEFT" spacing="70" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="-66" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="RIGHT" spacing="-70" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-    </section>
-    <metadata activeUIState="portrait" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <uistate name="portrait" sections="#common portrait"/>
-        <uistate name="landscape" sections="#common landscape"/>
-    </metadata>
-</hbdocument>
--- a/mmsharing/livecommsui/lcui/resources/lcviews/lctwowayview.docml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="LcView" version="0.9">
-    <object name="lc_act_fullscreen" type="HbAction">
-        <string locid="txt_lcomms_opt_full_screen" name="text"/>
-    </object>
-    <object name="lc_act_videopreference" type="HbAction">
-        <string locid="txt_lcomms_opt_video_preference" name="text"/>
-    </object>
-    <object name="lc_act_swapviews" type="HbAction">
-        <string locid="txt_lcomms_opt_swap_views" name="text"/>
-    </object>
-    <object name="lc_act_endactivecall" type="HbAction">
-        <string locid="txt_lcomms_opt_end_active_call" name="text"/>
-    </object>
-    <object name="lc_act_changecamera" type="HbAction">
-        <icon iconName=":/secondary_camera.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_change_camera" name="toolTip"/>
-    </object>
-    <object name="lc_act_gallery" type="HbAction">
-        <icon iconName=":/gallery.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_gallery" name="toolTip"/>
-    </object>
-    <object name="lc_act_mute" type="HbAction">
-        <icon iconName=":/mute_mic.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_mute" name="toolTip"/>
-    </object>
-    <object name="lc_act_adjustvideo" type="HbAction">
-        <string locid="txt_lcomms_opt_adjust_video" name="text"/>
-    </object>
-    <object name="lc_act_disablecamera" type="HbAction">
-        <string locid="txt_lcomms_opt_disable_camera" name="text"/>
-    </object>
-    <object name="lc_act_dialer" type="HbAction">
-        <string locid="txt_lcomms_opt_dialer" name="text"/>
-    </object>
-    <object name="lc_act_stopsharing" type="HbAction">
-        <icon iconName=":/stop_sharing.svg" name="icon"/>
-        <string locid="txt_lcomms_tooltip_stop_sharing" name="toolTip"/>
-        <bool name="visible" value="TRUE"/>
-    </object>
-    <widget name="lc_view_twoway" type="HbView">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_widget_recvvideo" type="HbLabel">
-                <real name="z" value="10.009"/>
-                <sizehint height="33.58209un" type="PREFERRED" width="53.13433un"/>
-            </widget>
-            <widget name="lc_icon_contact" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0002"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_icon_brand" type="HbLabel">
-                <icon iconName=":/resources/themes/icons/hbdefault/scalable/note_warning.svg" name="icon"/>
-                <real name="z" value="10.0003"/>
-                <sizehint height="11.9403un" type="PREFERRED" width="8.95522un"/>
-            </widget>
-            <widget name="lc_label_recipient" type="HbLabel">
-                <real name="z" value="10.0004"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.76119un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_contact" name="plainText"/>
-            </widget>
-            <widget name="lc_label_phonenumber" type="HbLabel">
-                <real name="z" value="10.0005"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="1.9403un"/>
-                <string locid="txt_lcomms_info_phone_number" name="plainText"/>
-            </widget>
-            <widget name="lc_label_duration" type="HbLabel">
-                <real name="z" value="10.0006"/>
-                <sizehint height="1.64179un" type="PREFERRED" width="27.46269un"/>
-                <sizehint height="1.64179un" type="MINIMUM" width="2.08955un"/>
-            </widget>
-            <widget name="lc_widget_sendvideo" type="HbLabel">
-                <real name="z" value="10.0008"/>
-                <sizehint height="23.43284un" type="PREFERRED" width="24.17911un"/>
-            </widget>
-        </widget>
-        <widget name="lc_menu" role="HbView:menu" type="HbMenu">
-            <ref object="lc_act_disablecamera" role="HbMenu:addAction"/>
-            <ref object="lc_act_fullscreen" role="HbMenu:addAction"/>
-            <ref object="lc_act_adjustvideo" role="HbMenu:addAction"/>
-            <ref object="lc_act_videopreference" role="HbMenu:addAction"/>
-            <ref object="lc_act_swapviews" role="HbMenu:addAction"/>
-            <ref object="lc_act_dialer" role="HbMenu:addAction"/>
-            <ref object="lc_act_endactivecall" role="HbMenu:addAction"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <real name="z" value="3"/>
-            <enums name="orientation" value="Horizontal"/>
-            <ref object="lc_act_stopsharing" role="HbToolBar:addAction"/>
-            <ref object="lc_act_changecamera" role="HbToolBar:addAction"/>
-            <ref object="lc_act_mute" role="HbToolBar:addAction"/>
-            <ref object="lc_act_gallery" role="HbToolBar:addAction"/>
-        </widget>
-        <string locid="txt_lcomms_title_twoway_view" name="title"/>
-    </widget>
-    <section name="portrait">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="42.08955un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-0.44776un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="3.58209un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="3.73134un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="41.9403un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.32836un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="4.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="7.31343un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="16.41791un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="9.85075un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="17.31343un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="BOTTOM" spacing="40.74627un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="landscape">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="0.44776un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="0.44776un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-48.35821un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="BOTTOM" spacing="-0.44776un" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="LEFT" spacing="52.53731un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_contact" dstEdge="TOP" spacing="1.19403un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="LEFT" spacing="74.32836un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_icon_brand" dstEdge="TOP" spacing="14.47761un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="TOP" spacing="2.38806un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_phonenumber" dstEdge="TOP" spacing="5.22388un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="64.62687un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="TOP" spacing="7.76119un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="LEFT" spacing="48.0597un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="15.67164un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="BOTTOM" spacing="-0.44776un" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="fullscreen">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="70" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="-66" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-70" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="10" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="LEFT" spacing="20" src="" srcEdge="LEFT"/>
-            </layout>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_recipient" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_phonenumber" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_icon_brand" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_icon_contact" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_label_duration" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-    </section>
-    <metadata activeUIState="landscape" display="NHD landscape" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <uistate name="portrait" sections="#common portrait"/>
-        <uistate name="landscape" sections="#common landscape"/>
-    </metadata>
-</hbdocument>
--- a/mmsharing/livecommsui/lcui/resources/lcviews/lcvtview.docml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="LcView" version="1.1">
-    <object name="lc_act_swapviews" type="HbAction">
-        <string locid="txt_vt_opt_swap_views" name="text"/>
-    </object>
-    <object name="lc_act_menu_disablecamera" type="HbAction">
-        <string locid="txt_vt_menu_disable_camera" name="text"/>
-    </object>
-    <object name="lc_act_enablecamera" type="HbAction">
-        <string locid="txt_vt_menu_enable_camera" name="text"/>
-    </object>
-    <object name="lc_act_menu_changecamera" type="HbAction">
-        <string locid="txt_vt_menu_change_camera" name="text"/>
-    </object>
-    <object name="lc_act_disablecamera" type="HbAction">
-        <icon iconName="qtg_mono_camcorder_off" name="icon"/>
-        <bool name="visible" value="TRUE"/>
-    </object>
-    <object name="lc_act_changecamera" type="HbAction">
-        <icon iconName="qtg_mono_change_cam_mode" name="icon"/>
-    </object>
-    <object name="lc_act_mute" type="HbAction">
-        <icon iconName="qtg_mono_mute" name="icon"/>
-    </object>
-    <object name="lc_act_speaker" type="HbAction">
-        <icon iconName="qtg_mono_speaker" name="icon"/>
-    </object>
-    <object name="lc_act_openkeypad" type="HbAction">
-        <string locid="txt_vt_opt_open_keypad" name="text"/>
-    </object>
-    <widget name="lc_view_allinone" type="HbView">
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_widget_recvvideo" type="HbTransparentWindow">
-                <real name="z" value="10"/>
-            </widget>
-            <widget name="lc_widget_recvvideo2" type="HbTransparentWindow">
-                <real name="z" value="11"/>
-            </widget>
-            <widget name="lc_widget_sendvideo" type="HbTransparentWindow">
-                <real name="z" value="12"/>
-            </widget>
-            <widget name="lc_label_recipient" type="HbLabel">
-                <real name="z" value="10.0004"/>
-                <fontspec name="fontSpec" role="Primary" textheight="4un"/>
-            </widget>
-            <widget name="lc_button_endCall" type="HbPushButton">
-                <icon iconName="qtg_mono_end_call" name="icon"/>
-                <real name="z" value="17"/>
-                <sizehint height="9un" type="PREFERRED" width="18.5un"/>
-            </widget>
-            <widget name="lc_label_duration" type="HbLabel">
-                <real name="z" value="10.0006"/>
-                <fontspec name="fontSpec" role="Secondary" textheight="4un"/>
-            </widget>
-            <widget name="lc_widget_sendvideo2" type="HbTransparentWindow">
-                <real name="z" value="13"/>
-            </widget>
-            <widget name="lc_label_dialpad" type="HbWidget">
-                <real name="z" value="18"/>
-                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-                <sizehint height="44un" type="FIXED" width="44un"/>
-                <bool name="visible" value="FALSE"/>
-            </widget>
-        </widget>
-        <widget name="lc_menu" role="HbView:menu" type="HbMenu">
-            <ref object="lc_act_swapviews" role="HbMenu:addAction"/>
-            <ref object="lc_act_openkeypad" role="HbMenu:addAction"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <real name="z" value="3"/>
-            <enums name="orientation" value="Horizontal"/>
-            <ref object="lc_act_disablecamera" role="HbToolBar:addAction"/>
-            <ref object="lc_act_changecamera" role="HbToolBar:addAction"/>
-            <ref object="lc_act_mute" role="HbToolBar:addAction"/>
-            <ref object="lc_act_speaker" role="HbToolBar:addAction"/>
-        </widget>
-        <string locid="txt_vt_title_video_call" name="title"/>
-    </widget>
-    <section name="landscape">
-        <widget name="lc_view_allinone" type="HbView">
-            <bool name="contentFullScreen" value="TRUE"/>
-            <enums name="HbViewFlags" value="ViewTitleBarTransparent"/>
-            <string locid="txt_vt_title_video_call" name="title"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_label_recipient" type="HbLabel">
-                <bool name="visible" value="TRUE"/>
-            </widget>
-            <widget name="lc_label_duration" type="HbLabel">
-                <bool name="visible" value="TRUE"/>
-            </widget>
-            <widget name="lc_button_endCall" type="HbPushButton">
-                <sizehint height="0un" type="MINIMUM" width="0un"/>
-                <sizehint height="9un" type="MAXIMUM" width="18.5un"/>
-                <bool name="visible" value="TRUE"/>
-            </widget>
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="5.25un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo2" dstEdge="LEFT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo2" dstEdge="TOP" spacing="5.25un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="LEFT" spacing="7.5un" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="RIGHT" spacing="-7.5un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="20.75un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo2" dstEdge="LEFT" spacing="7.5un" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_sendvideo2" dstEdge="RIGHT" spacing="-7.5un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_sendvideo2" dstEdge="TOP" spacing="20.75un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="BOTTOM" spacing="0un" src="lc_label_duration" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="BOTTOM" spacing="-1.5un" src="lc_widget_sendvideo" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_button_endCall" dstEdge="LEFT" spacing="4un" src="lc_widget_sendvideo" srcEdge="LEFT"/>
-                <anchoritem dst="lc_button_endCall" dstEdge="RIGHT" spacing="-4un" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_button_endCall" dstEdge="BOTTOM" spacing="-1.5un" src="lc_widget_sendvideo" srcEdge="BOTTOM"/>
-                <anchoritem dst="lc_label_dialpad" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_dialpad" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-        <widget name="lc_widget_sendvideo2" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="21.49254un" type="FIXED" width="26.26866un"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_widget_recvvideo" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="42.98508un" type="FIXED" width="52.53731un"/>
-        </widget>
-        <widget name="lc_widget_recvvideo2" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="42.98508un" type="FIXED" width="52.53731un"/>
-        </widget>
-        <widget name="lc_widget_sendvideo" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="21.49254un" type="FIXED" width="26.26866un"/>
-        </widget>
-    </section>
-    <section name="lc_layout_landscape_swapped">
-        <widget name="lc_view_allinone" type="HbView">
-            <bool name="contentFullScreen" value="TRUE"/>
-            <enums name="HbViewFlags" value="ViewTitleBarTransparent"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_label_recipient" type="HbLabel">
-                <bool name="visible" value="TRUE"/>
-            </widget>
-            <widget name="lc_label_duration" type="HbLabel">
-                <bool name="visible" value="TRUE"/>
-            </widget>
-            <widget name="lc_button_endCall" type="HbPushButton">
-                <sizehint height="0un" type="MINIMUM" width="0un"/>
-                <sizehint height="9un" type="MAXIMUM" width="18.5un"/>
-                <bool name="visible" value="TRUE"/>
-            </widget>
-            <layout type="anchor">
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="LEFT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="5.25un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo2" dstEdge="LEFT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_sendvideo2" dstEdge="TOP" spacing="5.25un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="7.5un" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="RIGHT" spacing="-7.5un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="20.75un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo2" dstEdge="LEFT" spacing="7.5un" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo2" dstEdge="RIGHT" spacing="-7.5un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_recvvideo2" dstEdge="TOP" spacing="20.75un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="BOTTOM" spacing="0un" src="lc_label_duration" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="BOTTOM" spacing="-1.5un" src="lc_widget_recvvideo" srcEdge="TOP"/>
-                <anchoritem dst="lc_label_duration" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_button_endCall" dstEdge="LEFT" spacing="4un" src="lc_widget_recvvideo" srcEdge="LEFT"/>
-                <anchoritem dst="lc_button_endCall" dstEdge="RIGHT" spacing="-4un" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_button_endCall" dstEdge="BOTTOM" spacing="-1.5un" src="lc_widget_recvvideo" srcEdge="BOTTOM"/>
-                <anchoritem dst="lc_label_dialpad" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_dialpad" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-        <widget name="lc_widget_sendvideo2" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="42.98508un" type="FIXED" width="52.53731un"/>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_widget_recvvideo" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="21.49254un" type="FIXED" width="26.26866un"/>
-        </widget>
-        <widget name="lc_widget_recvvideo2" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="21.49254un" type="FIXED" width="26.26866un"/>
-        </widget>
-        <widget name="lc_widget_sendvideo" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="42.98508un" type="FIXED" width="52.53731un"/>
-        </widget>
-    </section>
-    <section name="lc_layout_landscape_dialpad">
-        <widget name="lc_view_allinone" type="HbView">
-            <bool name="contentFullScreen" value="FALSE"/>
-        </widget>
-        <widget name="lc_content" role="HbView:widget" type="HbWidget">
-            <widget name="lc_label_recipient" type="HbLabel">
-                <bool name="visible" value="FALSE"/>
-            </widget>
-            <widget name="lc_label_duration" type="HbLabel">
-                <bool name="visible" value="FALSE"/>
-            </widget>
-            <widget name="lc_button_endCall" type="HbPushButton">
-                <bool name="visible" value="FALSE"/>
-            </widget>
-            <layout type="anchor">
-                <anchoritem dst="lc_label_dialpad" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_label_dialpad" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="LEFT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo" dstEdge="TOP" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_recvvideo2" dstEdge="LEFT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="lc_widget_recvvideo2" dstEdge="TOP" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo" dstEdge="TOP" spacing="1un" src="" srcEdge="TOP"/>
-                <anchoritem dst="lc_widget_sendvideo2" dstEdge="LEFT" spacing="1un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_sendvideo2" dstEdge="RIGHT" spacing="1un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="lc_widget_sendvideo2" dstEdge="TOP" spacing="1un" src="" srcEdge="TOP"/>
-            </layout>
-        </widget>
-        <widget name="lc_toolbar" role="HbView:toolBar" type="HbToolBar">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_widget_sendvideo" type="HbTransparentWindow">						
-            <sizehint height="0un" type="FIXED" width="0un"/>
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="lc_widget_recvvideo" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="39un" type="FIXED" width="47.58un"/>
-        </widget>
-        <widget name="lc_widget_recvvideo2" type="HbTransparentWindow">
-            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-            <sizehint height="39un" type="FIXED" width="47.58un"/>
-        </widget>
-        <widget name="lc_widget_sendvideo2" type="HbTransparentWindow">            
-            <sizehint height="0" type="FIXED" width="0"/> 
-            <bool name="visible" value="FALSE"/>           
-        </widget>  
-        <widget name="lc_label_dialpad" type="HbWidget">                
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <metadata activeUIState="landscape" display="NHD-3.2-inch_landscape" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <uistate name="landscape" sections="#common landscape"/>
-    </metadata>
-</hbdocument>
--- a/mmsharing/livecommsui/lcui/resources/win_appear.fxml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<!-- This effect file was generated by effectDialog -->
-
-<layers>
-<visual>
-
-<param name="opacity" type="anim">
-<duration>0.6</duration>
-<style>linear</style>
-<keyframe at="0.0">1.0</keyframe>
-<keyframe at="1.0">0.0</keyframe>
-</param>
-
-</visual>
-</layers>
--- a/mmsharing/livecommsui/lcui/resources/win_disappear.fxml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<!-- This effect file was generated by effectDialog -->
-
-<layers>
-<visual>
-
-<param name="opacity" type="anim">
-<duration>0.6</duration>
-<style>linear</style>
-<keyframe at="0.0">0.2</keyframe>
-<keyframe at="1.0">1.0</keyframe>
-</param>
-
-</visual>
-</layers>
-
--- a/mmsharing/livecommsui/lcui/resources/win_flip.fxml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-<!-- This effect file was generated by effectDialog -->
-
-<layers>
-<visual>
-
-<param name="rotation_angle" type="anim">
-<duration>3.0</duration>
-<style>linear</style>
-<keyframe at="0.0">0</keyframe>
-<keyframe at="0.49">-90</keyframe>
-<keyframe at="0.50">90</keyframe>
-<keyframe at="1.0">0</keyframe>
-
-</param>
-<param name="rotation_origin_x" ref="visual.width">
-0.5
-</param>
-<param name="rotation_origin_y" ref="visual.height">
-0.5
-</param>
-<param name="rotation_axis_x" type="anim">
-0
-</param>
-<param name="rotation_axis_y" type="anim">
-1
-</param>
-<param name="rotation_axis_z" type="anim">
-0
-</param>
-<param name="opacity" type="anim">
-<duration>3.0</duration>
-<style>linear</style>
-<keyframe at="0.0">1.0</keyframe>
-<keyframe at="0.49">0.0</keyframe>
-<keyframe at="0.50">0.0</keyframe>
-<keyframe at="1.0">1.0</keyframe>
-</param>
-
-</visual>
-</layers>
-
--- a/mmsharing/livecommsui/lcui/resources/win_swap_down.fxml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-<layers>
-<visual>
-
-    <param name="translation_y" type="anim">
-      <duration>5.0</duration>
-      <style>linear</style>
-      </param>
-      <param name="translation_origin_x" ref="visual.left">
-      </param>
-      <param name="translation_origin_y" ref="visual.top">
-      </param>
-      <param name="translation_endpoint_x" ref="visual.left">
-      </param>
-      <param name="translation_endpoint_y" ref="">
-      245
-    </param>
-
-    <param name="scale_x" type="anim">
-      <duration>5.0</duration>      
-      <keyframe at="0.0">1.0</keyframe>
-      <keyframe at="0.2">0.2</keyframe>
-      <keyframe at="0.8">0.2</keyframe>
-      <keyframe at="1.0">2.0</keyframe>
-    </param>
-
-    <param name="scale_y" type="anim">
-      <duration>5.0</duration>      
-      <keyframe at="0.0">1.0</keyframe>
-      <keyframe at="0.2">0.2</keyframe>
-      <keyframe at="0.8">0.2</keyframe>
-      <keyframe at="1.0">2.0</keyframe>
-    </param> 
-
-</visual>
-</layers>
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/resources/win_swap_up.fxml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-<layers>
-<visual>
-
-    <param name="translation_y" type="anim">
-      <duration>5.0</duration>
-      <style>linear</style>
-      </param>
-      <param name="translation_origin_x" ref="visual.left">
-      </param>
-      <param name="translation_origin_y" ref="visual.top">
-      </param>
-      <param name="translation_endpoint_x" ref="visual.left">
-      </param>
-      <param name="translation_endpoint_y" ref="">
-      94
-    </param>
-
-    <param name="scale_x" type="anim">
-      <duration>5.0</duration>      
-      <keyframe at="0.0">1.0</keyframe>
-      <keyframe at="0.2">0.2</keyframe>
-      <keyframe at="0.8">0.2</keyframe>
-      <keyframe at="1.0">0.5</keyframe>
-    </param>
-
-    <param name="scale_y" type="anim">
-      <duration>5.0</duration>      
-      <keyframe at="0.0">1.0</keyframe>
-      <keyframe at="0.2">0.2</keyframe>
-      <keyframe at="0.8">0.2</keyframe>
-      <keyframe at="1.0">0.5</keyframe>
-    </param> 
-
-</visual>
-</layers>
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/src/lceffecthandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,379 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lceffecthandler.h"
-#include "lclogger.h"
-#include "lcuidefs.h"
-#include "lcuiengine.h"
-
-//SYSTEM
-#include <hbinstance.h>
-#include <hbwidget.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LcEffectHandler::LcEffectHandler(LcUiEngine& engine,
-                                 HbWidget* sharedVideo, 
-                                 HbWidget* sharedVideoOverlay,
-                                 HbWidget* receivedVideo,
-                                 HbWidget* receivedVideoOverlay) :
-    mEngine(engine),
-    mSharedVideo(sharedVideo),
-    mSharedVideoOverlay(sharedVideoOverlay),
-    mReceivedVideo(receivedVideo),
-    mReceivedVideoOverlay(receivedVideoOverlay),
-    mSwapSharedCompleted(false),
-    mSwapReceivedCompleted(false),
-    mSwapInProgress(false)
-{
-    HbEffect::add(lcEffectWinId, lcEffectWinDisappear, lcEffectWinDisappearId );
-    HbEffect::add(lcEffectWinId, lcEffectWinAppear, lcEffectWinAppearId );
-    HbEffect::add(lcEffectWinId, lcEffectWinFlip, lcEffectWinFlipId );
-    HbEffect::add(lcEffectWinId, lcEffectWinSwapDown, lcEffectWinSwapDownId );
-    HbEffect::add(lcEffectWinId, lcEffectWinSwapUp, lcEffectWinSwapUpId );
-    
-    mEffectCallBack = lcEffectWinDefaultCallback;
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LcEffectHandler::~LcEffectHandler()
-{
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::setVisibility(HbWidget* widget, bool visible)
-{
-    if ( !HbEffect::effectRunning( widget )) {
-        widget->setVisible( visible );
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::setDissappearEffect( 
-        LcEffectHandler::DissapperEffect aEffectType )
-{
-    if ( aEffectType == LcEffectHandler::DissappearToFlip ) {
-        mEffectCallBack = "windowDisappearToFlipComplete";
-    } else if ( aEffectType == LcEffectHandler::NormalDissappear ) {
-        mEffectCallBack = "windowDisappearComplete"; 
-    } else {
-        mEffectCallBack = lcEffectWinDefaultCallback;
-    }
-}
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::showSendWindow()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::showSendWindow()" )
-    if ( mSharedVideo ) {
-        if ( mSwapSharedCompleted || !HbEffect::effectRunning( mSharedVideoOverlay )) {
-            startEffect( mSharedVideoOverlay, 
-                         lcEffectWinAppearId, "windowAppearComplete" );
-                         
-            mSharedVideo->show();
-        } else {
-            LC_QDEBUG( "livecomms [UI] LcEffectHandler: postponed due ongoing animation" )        
-        }
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::showSendWindow()" )
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::showReceiveWindow()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::showReceiveWindow()" )
-    if ( mReceivedVideo ) {
-        if ( mSwapReceivedCompleted || !HbEffect::effectRunning( mReceivedVideoOverlay )) {
-            startEffect( mReceivedVideoOverlay, 
-                         lcEffectWinAppearId, "windowAppearComplete" );
-            mReceivedVideo->show();
-        } else {
-            LC_QDEBUG( "livecomms [UI] LcEffectHandler: postponed due ongoing animation" )        
-        }
-    }
-   LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::showReceiveWindow()" )
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::hideSendWindow()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::hideSendWindow()" )
-    if ( mSharedVideo && mSharedVideo->isVisible() ) {
-        startEffect( mSharedVideoOverlay, 
-                     lcEffectWinDisappearId, mEffectCallBack.toAscii().data() );
-        mSharedVideo->hide();
-    }
-
-    mEffectCallBack = lcEffectWinDefaultCallback;
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandlerLcEffectHandler::hideSendWindow()" )
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::hideReceiveWindow()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::hideReceiveWindow()" )
-    if ( mReceivedVideo && mReceivedVideo->isVisible() ) {
-        startEffect( mReceivedVideoOverlay, 
-                     lcEffectWinDisappearId, "windowDisappearComplete" );
-        mReceivedVideo->hide();
-    }
-
-   LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::hideReceiveWindow()" )
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::swap()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::swap()" )
-
-    // Emit the signal which triggers to loading of new swapped section
-    mSwapInProgress = true;
-    emit loadSwapLayout();
-
-    startEffects();
-    
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::swap()" )
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::startEffects()
-{
-    if( mSharedVideo && mReceivedVideo ) {
-     
-         mSwapSharedCompleted = false;
-         mSwapReceivedCompleted = false;
-     
-         startEffect( mSharedVideoOverlay, lcEffectWinDisappearId, "windowSwapSharedComplete" );
-         startEffect( mReceivedVideoOverlay, lcEffectWinDisappearId, "windowSwapReceivedComplete" );
-             
-         mSharedVideo->hide();
-         mReceivedVideo->hide();
-     }
-    
-}    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::startEffect( 
-    HbWidget* widget, const char *effectId, const char *callBack )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::startEffect()" )
-    if( widget ) {
-        widget->setOpacity(1.0); // Previous effect might have set opacity to zero
-        widget->show();
-        LC_QDEBUG_2( "livecomms [UI] window: ",  widget->geometry() )
-        LC_QDEBUG_2( "livecomms [UI] effect name: ",  QString(effectId) )
-        HbEffect::start( widget, lcEffectWinId, effectId, this, callBack );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::startEffect()" )
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::windowAppearComplete(HbEffect::EffectStatus status)
-{
-    Q_UNUSED(status);
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::windowAppearComplete()" )
-    
-    if ( status.item && status.item == mSharedVideoOverlay  && 
-         !HbEffect::effectRunning( mSharedVideoOverlay ) ) {
-        mSharedVideoOverlay->hide();
-                
-    }
-    if ( status.item && status.item == mReceivedVideoOverlay  && 
-         !HbEffect::effectRunning( mReceivedVideoOverlay ) ) {
-        mReceivedVideoOverlay->hide();
-                
-    }
-
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::windowAppearComplete()" )
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::windowDisappearComplete(HbEffect::EffectStatus status)
-{
-    Q_UNUSED(status);
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::windowDisappearComplete()" )
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::windowDisappearComplete()" )
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::windowDisappearToFlipComplete(HbEffect::EffectStatus status)
-{
-    Q_UNUSED(status);
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::windowDisappearToFlipComplete()" )
-    if( mSharedVideo ) {
-        mSharedVideo->hide();       
-        startEffect( mSharedVideoOverlay, lcEffectWinFlipId, "windowFlipComplete" );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::windowDisappearToFlipComplete()" )
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::windowFlipComplete(HbEffect::EffectStatus status)
-{
-    Q_UNUSED(status);
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::flipHideComplete()" )
-    if( mEngine.isLocalPlayerPlaying() ) {
-        showSendWindow();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::flipHideComplete()" )
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::windowSwapSharedComplete(HbEffect::EffectStatus status)
-{
-    Q_UNUSED(status);
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::windowSwapSharedComplete()" )
-    if( mSharedVideo ) {    
-        LC_QDEBUG_2( "livecomms [UI] window: ",  mSharedVideo->geometry() )
-        LC_QDEBUG_2( "livecomms [UI] effect window: ",  mSharedVideoOverlay->geometry() )
-        
-        mSwapSharedCompleted = true;
-        
-        handleSwapCompletion();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::windowSwapSharedComplete()" )
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::windowSwapReceivedComplete(HbEffect::EffectStatus status)
-{
-    Q_UNUSED(status);
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::windowSwapReceivedComplete()" )
-    if( mReceivedVideo ) {    
-        LC_QDEBUG_2( "livecomms [UI] window: ",  mReceivedVideo->geometry() )
-        LC_QDEBUG_2( "livecomms [UI] effect window: ",  mReceivedVideoOverlay->geometry() )
-        
-        mSwapReceivedCompleted = true;
-        
-        handleSwapCompletion();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::windowSwapReceivedComplete()" )
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-bool LcEffectHandler::isSharedVideoAtTop() const
-{
-    return ( mSharedVideo && mReceivedVideo &&
-             mSharedVideo->geometry().top() < mReceivedVideo->geometry().top());
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-bool LcEffectHandler::videosSideBySide() const
-{
-     return ( mSharedVideo && mReceivedVideo &&
-              mSharedVideo->geometry().top() == mReceivedVideo->geometry().top() );
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcEffectHandler::handleSwapCompletion()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::handleSwapCompletion()" )
-    if ( mSwapSharedCompleted && mSwapReceivedCompleted ){
-        LC_QDEBUG( "livecomms [UI]  Both swaps done, complete" )
-        
-        emit swapCompleted();
-        
-        if( mEngine.isLocalPlayerPlaying() ) {
-            showSendWindow();
-        }
-        if( mEngine.isRemotePlayerPlaying() ) {
-            showReceiveWindow();
-        }
-
-    mSwapInProgress = false;
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::handleSwapCompletion()" )
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-bool LcEffectHandler::isSwapInProgress()
-{
-    return mSwapInProgress;
-}
-
-
-// End of file
-
--- a/mmsharing/livecommsui/lcui/src/lcuicomponentrepository.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,589 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcuicomponentrepository.h"
-#include "lcview.h"
-#include "lcuidefs.h"
-#include "lclogger.h"
-#include "lcuiengine.h"
-#include "lcvideowidget.h"
-
-//SYSTEM
-#include <hbaction.h>
-#include <hbmenu.h>
-#include <hbtoolbar.h>
-#include <hbmessagebox.h>
-#include <hbdialog.h>
-#include <hbprogressdialog.h>
-#include <hblabel.h>
-#include <hbinstance.h>
-#include <hbdialog.h>
-#include <hbpushbutton.h>
-#include <hbframedrawer.h>
-#include <hbstyleloader.h>
-#include <dialpad.h>
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::LcUiComponentRepository
-// -----------------------------------------------------------------------------
-//
-LcUiComponentRepository::LcUiComponentRepository(LcUiEngine& engine)
-    : HbDocumentLoader(),
-      mEngine(engine),
-      mSlots(0),
-      mIdleView(0),
-      mReceiveView(0),
-      mSendView(0),
-      mTwowayView(0),
-      mAllInOneView(0),
-      mReceiveOnlyView(0),
-      mAcceptQuery(0),
-      mInvitingNote(0),
-      mWaitingNote(0),
-      mRecipientQuery(0),
-      mShareOwnVideoQuery(0)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::LcUiComponentRepository()" )
-    
-    mSlots = new QHash<QString,const char*>;
-    mSlots->insert( lcActFullscreenId, SLOT( notSupported() ) );
-    mSlots->insert( lcActVideopreferenceId, SLOT( notSupported() ) );
-    mSlots->insert( lcActDialerId, SLOT( notSupported() ) );
-    mSlots->insert( lcActEndactivecallId, SLOT( notSupported() ) );
-    mSlots->insert( lcActStopSharingId, SLOT( endVideoSession() ) );
-    mSlots->insert( lcActEnableCameraId, SLOT( disableCamera() ) );
-    mSlots->insert( lcActMuteId, SLOT( mute() ) );
-    mSlots->insert( lcActGalleryId, SLOT( notSupported() ) );
-    mSlots->insert( lcActChangeCameraId, SLOT( changeCamera() ) );    
-    mSlots->insert( lcActAdjustVideoId, SLOT( notSupported() ) );
-    mSlots->insert( lcActShareImageId, SLOT( notSupported() ) );
-    mSlots->insert( lcActSwapViewsId, SLOT( swap() ) );
-    mSlots->insert( lcActSwitchToVoiceCallId, SLOT( switchToVoiceCall() ) );    
-    mSlots->insert( lcActOpenKeypadId, SLOT( openDialpad() ) );
-    mSlots->insert( lcActDisableCameraId, SLOT( disableCamera() ) );
-    mSlots->insert( lcActSpeakerId, SLOT( speaker() ) );
-
-    mSlots->insert( lcActMenuDisableCameraId, SLOT( disableCamera() ) );    
-    mSlots->insert( lcActMenuChangeCameraId, SLOT( changeCamera() ) );    
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::LcUiComponentRepository()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::~LcUiComponentRepository
-// -----------------------------------------------------------------------------
-//
-LcUiComponentRepository::~LcUiComponentRepository()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::~LcUiComponentRepository()" )
-    
-    delete mSlots;
-    
-    mIdleViewComponents.clear();
-    mReceiveViewComponents.clear();
-    mSendViewComponents.clear();
-    mTwowayViewComponents.clear();
-    mAllInOneViewComponents.clear();
-    mReceiveOnlyViewComponents.clear();
-    
-    delete mAcceptQuery;
-    delete mInvitingNote;
-    delete mWaitingNote;
-    delete mRecipientQuery;
-    delete mShareOwnVideoQuery;
- 
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::~LcUiComponentRepository()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::createObject
-// -----------------------------------------------------------------------------
-//
-QObject* LcUiComponentRepository::createObject(
-        const QString& type, const QString &name)
-{
-    QObject* object = 0;
-    
-    if ( type == lcLcViewTypeName || 
-         name == lcViewIdleId ||
-         name == lcViewReceiveId || 
-         name == lcViewReceiveOnlyId || 
-         name == lcViewAllInOneId || 
-         name == lcViewSendId ||
-         name == lcViewTwowayId ) {
-        LC_QDEBUG_2( "-> LcUiComponentRepository::createObject() ",
-        "- creating LcView -" )
-        object = new LcView( mEngine, *this );           
-    } 
-    else if ( name == lcWidgetSendVideoId ) {
-        LC_QDEBUG_2( "-> LcUiComponentRepository::createObject() ",
-        "- creating shared video widget -" )
-        object = new LcVideoWidget();
-        static_cast<LcVideoWidget*>(object)->setLocalPlayer(true);
-    }
-    else if ( name == lcWidgetSendVideoId2 ) {
-        LC_QDEBUG_2( "-> LcUiComponentRepository::createObject() ",
-        "- creating shared video widget effect overlay -" )
-        object = new LcVideoWidget(0, false);
-        static_cast<LcVideoWidget*>(object)->setLocalPlayer(true);
-    }
-    else if ( name == lcWidgetRecvVideoId ) {
-        LC_QDEBUG_2( "-> LcUiComponentRepository::createObject() ",
-        "- creating received video widget -" )
-        object = new LcVideoWidget();
-        static_cast<LcVideoWidget*>(object)->setLocalPlayer(false);
-                
-    }  
-    else if ( name == lcWidgetRecvVideoId2 ) {
-        LC_QDEBUG_2( "-> LcUiComponentRepository::createObject() ",
-        "- creating received video widget effect overlay -" )
-        object = new LcVideoWidget(0, false);
-        static_cast<LcVideoWidget*>(object)->setLocalPlayer(false);
-    }
-    else if ( name == lcButtonEndCall ){
-        object = HbDocumentLoader::createObject( type, name );
-        HbFrameDrawer*frameDrawer = new HbFrameDrawer("qtg_fr_btn_red_normal",HbFrameDrawer::NinePieces);
-        static_cast<HbPushButton*>(object)->setFrameBackground(frameDrawer);
-        HbStyleLoader::registerFilePath(":/hbpushbutton_color.css");
-    }
-    else if ( name == lcWidgetDialpad ){
-      HbMainWindow* pWindow = HbInstance::instance()->allMainWindows().at(0);
-        if( pWindow ){
-            object = new Dialpad( *pWindow );
-        }
-    }
-    else {
-        object = HbDocumentLoader::createObject( type, name );
-    }
-    if (object) {
-        object->setObjectName(name);
-    }
-    
-    LC_QDEBUG_2( "livecomms [UI] <- LcUiComponentRepository::createObject(), name=", name )
-    
-    return object;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::idleView
-// -----------------------------------------------------------------------------
-//
-LcView* LcUiComponentRepository::idleView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::idleView()" );
-
-    reset();
-    setObjectTree( mIdleViewComponents );
-    
-    if ( !mIdleView ) {
-        mIdleView = loadView( 
-            mIdleViewComponents, lcViewIdleId, lcIdleViewFile );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::idleView()" );
-    return mIdleView;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::receiveView
-// -----------------------------------------------------------------------------
-//
-LcView* LcUiComponentRepository::receiveView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::receiveView()" );
-
-    reset();
-    setObjectTree( mReceiveViewComponents );
-    if ( !mReceiveView ) {
-        mReceiveView = loadView( 
-            mReceiveViewComponents, lcViewReceiveId, lcReceiveViewFile );
-    } 
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::receiveView()" );
-    return mReceiveView;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::receiveOnlyView
-// -----------------------------------------------------------------------------
-//
-LcView* LcUiComponentRepository::receiveOnlyView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::receiveOnlyView()" );
-
-    reset();
-    setObjectTree( mReceiveOnlyViewComponents );
-    if ( !mReceiveOnlyView ) {
-        mReceiveOnlyView = loadView( 
-            mReceiveOnlyViewComponents, lcViewReceiveOnlyId, lcReceiveOnlyViewFile );
-    } 
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::receiveOnlyView()" );
-    return mReceiveOnlyView;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::twowayView
-// -----------------------------------------------------------------------------
-//
-LcView* LcUiComponentRepository::twowayView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::twowayView()" );
-
-    reset();
-    setObjectTree( mTwowayViewComponents );
-    if ( !mTwowayView ) {
-        mTwowayView = loadView( 
-            mTwowayViewComponents, lcViewTwowayId, lcTwowayViewFile );
-    } 
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::twowayView()" );
-    return mTwowayView; 
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::sendView
-// -----------------------------------------------------------------------------
-//
-LcView* LcUiComponentRepository::sendView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::sendView()" );
-
-    reset();
-    setObjectTree( mSendViewComponents );
-    if ( !mSendView ) {
-        mSendView = 
-            loadView( mSendViewComponents, lcViewSendId, lcSendViewFile );
-    } 
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::sendView()" );
-    return mSendView; 
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::allInOneView
-// -----------------------------------------------------------------------------
-//
-LcView* LcUiComponentRepository::allInOneView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::allInOneView()" );
-
-    reset();
-    setObjectTree( mAllInOneViewComponents );
-    if ( !mAllInOneView ) {
-        mAllInOneView = loadView( 
-            mAllInOneViewComponents, lcViewAllInOneId, lcAllInOneViewFile );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::allInOneView()" );
-    return mAllInOneView;   
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::acceptQuery
-// -----------------------------------------------------------------------------
-//
-HbDialog* LcUiComponentRepository::acceptQuery()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::acceptQuery()" );
-
-    if ( !mAcceptQuery ) {
-        mAcceptQuery = new HbDialog();
-        HbAction* acceptAction = new HbAction( LC_OK );
-        HbAction* rejectAction = new HbAction( LC_CANCEL );
-        mAcceptQuery->addAction(acceptAction);
-        mAcceptQuery->addAction(rejectAction);
-        mAcceptQuery->setVisible(false);
-        HbLabel* label = new HbLabel( LC_ACCEPT_SESSION );
-        mAcceptQuery->setHeadingWidget(label);
-        HbLabel* label2 = new HbLabel();
-        mAcceptQuery->setContentWidget(label2);
-        mAcceptQuery->setTimeout(0);
-        mAcceptQuery->setDismissPolicy(HbDialog::NoDismiss);
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::acceptQuery()" );
-    return mAcceptQuery;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::invitingNote
-// -----------------------------------------------------------------------------
-//
-HbProgressDialog* LcUiComponentRepository::invitingNote()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::invitingNote()" );
-    
-    if ( !mInvitingNote ) {
-        mInvitingNote = new HbProgressDialog();
-        mInvitingNote->setVisible(false);
-        mInvitingNote->setText( LC_INVITING );
-        HbAction* rejectAction = new HbAction( LC_CANCEL );
-        mInvitingNote->addAction(rejectAction);
-    } 
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::invitingNote()" );
-    return mInvitingNote;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::waitingNote
-// -----------------------------------------------------------------------------
-//
-HbProgressDialog* LcUiComponentRepository::waitingNote()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::waitingNote()" );
-    
-    if ( !mWaitingNote ) {
-        mWaitingNote = new HbProgressDialog();
-        mWaitingNote->setVisible(false);
-        HbAction* rejectAction = new HbAction( LC_CANCEL );
-        mWaitingNote->addAction(rejectAction);   
-        mWaitingNote->setText( LC_WAITING_VIDEO );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::waitingNote()" );
-    return mWaitingNote;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::recipientQuery
-// -----------------------------------------------------------------------------
-//
-HbDialog* LcUiComponentRepository::recipientQuery()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::recipientQuery()" );
-
-    if ( !mRecipientQuery ) {
-        mRecipientQuery = new HbDialog();
-        HbLabel* label = new HbLabel( LC_RECIPIENT_QUERY );
-        mRecipientQuery->setHeadingWidget(label);
-        mRecipientQuery->setTimeout(HbDialog::NoTimeout);
-        mRecipientQuery->setDismissPolicy(HbDialog::TapOutside);
-        HbAction* acceptAction = new HbAction( LC_OK );
-        HbAction* rejectAction = new HbAction( LC_CANCEL );
-        mRecipientQuery->addAction(acceptAction);
-        mRecipientQuery->addAction(rejectAction);
-        mRecipientQuery->setVisible(false);
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::recipientQuery()" );
-    return mRecipientQuery;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::shareOwnVideoQuery
-// -----------------------------------------------------------------------------
-//
-HbDialog* LcUiComponentRepository::shareOwnVideoQuery()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::shareOwnVideoQuery()" );
-
-    if ( !mShareOwnVideoQuery ) {
-        mShareOwnVideoQuery = new HbMessageBox( HbMessageBox::MessageTypeQuestion );
-        mShareOwnVideoQuery->setStandardButtons( HbMessageBox::Yes | HbMessageBox::No );
-        mShareOwnVideoQuery->setText( hbTrId( "txt_vt_info_allow_own_image_to_be_sent" ));
-        mShareOwnVideoQuery->setZValue(LC_NOTE_ON_TOP);
-        mShareOwnVideoQuery->setTimeout( HbDialog::NoTimeout );
-        mShareOwnVideoQuery->setDismissPolicy( HbDialog::NoDismiss );        
-        mShareOwnVideoQuery->setVisible(false);
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::shareOwnVideoQuery()" );
-    return mShareOwnVideoQuery;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::sharedVideoContextMenuActions
-// -----------------------------------------------------------------------------
-//
-void LcUiComponentRepository::sharedVideoContextMenuActions( HbMenu* menu, LcView& view )
-{
-    Q_UNUSED(view)
-    LC_QDEBUG( 
-   "livecomms [UI] -> LcUiComponentRepository::sharedVideoContextMenuActions()" );
-    
-    menu->actions().clear();
-    //due stubs in unit tests, qobject_cast cannot be used. 
-    //Using static_cast instead
-    HbAction* swap = static_cast<HbAction*>( findObject( lcActSwapViewsId ) );
-    HbAction* changeCamera = 
-        static_cast<HbAction*>( findObject( lcActMenuChangeCameraId ) );
-    
-    HbAction* disableCamera = 
-        static_cast<HbAction*>( findObject( lcActMenuDisableCameraId ) );
-    HbAction* enableCamera = 
-            static_cast<HbAction*>( findObject( lcActEnableCameraId ) );
-              
-    if ( swap ) {
-        LC_QDEBUG_2( "Adding ", swap->text() );
-        menu->addAction( swap );
-    }
-    if ( changeCamera ) {
-        LC_QDEBUG_2( "Adding ", changeCamera->text() );
-        menu->addAction( changeCamera );
-    }
-    if ( mEngine.isLocalPlayerPlaying() ) {
-        if ( disableCamera ) {
-            LC_QDEBUG_2( "Adding ", disableCamera->text() );
-            menu->addAction( disableCamera );
-        }    
-    } else {
-        if ( enableCamera ) {
-            LC_QDEBUG_2( "Adding ", enableCamera->text() );
-            menu->addAction( enableCamera );
-        }        
-    }
-
-  
-    LC_QDEBUG( 
-   "livecomms [UI] <- LcUiComponentRepository::sharedVideoContextMenuActions()" );
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::loadView
-// -----------------------------------------------------------------------------
-//
-LcView* LcUiComponentRepository::loadView( QObjectList& components,
-                                           const QString& viewId, 
-                                           const QString& xmlFile )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::loadView()" );
-
-    LcView* view = 0;
-    bool ok( false );
-    // Load the XML file
-    components = load( xmlFile, &ok );
-
-    if ( !ok ) {
-        LC_QCRITICAL_3( "! loading of XML file ", xmlFile , " failed !" )
-        return 0;
-    }
-    
-    mLastLoadedView = xmlFile;
-
-    ok = loadLayout( lcLayoutLandscapeDefaultId );
-    if ( !ok ) {
-         LC_QCRITICAL( "! loading of layout failed !" )
-         return 0;
-     }
-
-    view = qobject_cast<LcView*>( findWidget( viewId ) );
-    if ( view ) {
-        connectActions( *view );
-        view->init();
-    }
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::loadView()" );
-    return view;
-}
-
-    
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::connectActions
-// -----------------------------------------------------------------------------
-//
-void LcUiComponentRepository::connectActions( LcView& view ) const
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::connectActions()" );
-    foreach( QAction* hbAction, view.menu()->actions() ) {
-        connect( *hbAction, view );
-    }
-    foreach( QAction* hbAction, view.toolBar()->actions() ) {
-        connect( *hbAction, view );
-    }
-
-    HbAction* changeCamera = 
-        static_cast<HbAction*>( findObject( lcActMenuChangeCameraId ) );
-    HbAction* disableCamera = 
-        static_cast<HbAction*>( findObject( lcActMenuDisableCameraId ) );
-    HbAction* enableCamera = 
-        static_cast<HbAction*>( findObject( lcActEnableCameraId ) );
-
-    QObject::connect( changeCamera, SIGNAL(triggered()), 
-      &view, SLOT(changeCamera()) );
-
-    QObject::connect( disableCamera, SIGNAL(triggered()), 
-      &view, SLOT(disableCamera()) );
-    
-    QObject::connect( enableCamera, SIGNAL(triggered()), 
-          &view, SLOT(disableCamera()) );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::connectActions()" )  
-}
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::connect
-// -----------------------------------------------------------------------------
-//
-bool LcUiComponentRepository::connect( QAction& hbAction, LcView& view ) const
-{
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiComponentRepository::connect() action=",
-                 hbAction.objectName() )
-    
-    const char* method = mSlots->value( hbAction.objectName() ); 
-    bool slotFound = ( QString( method ).length() > 0 );
-    
-    if ( slotFound ) {
-        QObject::connect( &hbAction, SIGNAL(triggered()), &view, method );  
-    }
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::connect()" )
-    
-    return slotFound;
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::loadLayout
-// -----------------------------------------------------------------------------
-//
-bool LcUiComponentRepository::loadLayout( const QString& layoutName )
-    {
-    LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::loadLayout()" )    
-    bool ok( false );
-  
-    if ( mLastLoadedView.length() > 0) {
-        LC_QDEBUG_4( "layout = ", layoutName, ", view =",  mLastLoadedView )
-
-        load( mLastLoadedView, layoutName, &ok );
-        if (!ok) {
-            LC_QCRITICAL( "! loading of XML failed !" )
-        }
-        else{
-            mPreviousLayout = mLayout; 
-            mLayout = layoutName;
-        }
-    } else {
-        LC_QCRITICAL( "! not loading layout, since view is not loaded!" )
-    }
-
-    LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::loadLayout()" )
-    return ok;
-    }
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::layout()const
-// -----------------------------------------------------------------------------
-//
-QString LcUiComponentRepository::layout()const
-    {
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiComponentRepository::layout()",mLayout )    
-    return mLayout;
-    }
-
-// -----------------------------------------------------------------------------
-// LcUiComponentRepository::previousLayout()const
-// -----------------------------------------------------------------------------
-//
-QString LcUiComponentRepository::previousLayout()const
-    {
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiComponentRepository::previousLayout()",
-                                                              mPreviousLayout )    
-    return mPreviousLayout;
-    }
-// End of file
--- a/mmsharing/livecommsui/lcui/src/lcvideowidget.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcvideowidget.h"
-
-//SYSTEM
-#include <QPainter>
-
-const qreal lcVideoWidgetCornerRounding = 10.0;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LcVideoWidget::LcVideoWidget(QGraphicsItem *parent, bool showVideo) :
-    HbTransparentWindow(parent),
-    mShowVideo(showVideo)
-{
-    setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LcVideoWidget::~LcVideoWidget()
-{
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcVideoWidget::paint(
-        QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
-{
-    Q_UNUSED(widget)
-    QPointF initialPosition(0,0);
-    
-    //Workaround: widgets positioning takes time, do not paint if they are not 
-    //positioned correctly.
-    
-    if ( this->pos() != initialPosition ) {
-    
-    painter->save();
-    if ( mShowVideo ){
-
-        QPainter::CompositionMode origCompositionMode = painter->compositionMode();
-        painter->setCompositionMode(QPainter::CompositionMode_Source);
-#if ( defined __WINSCW__ ) || ( defined __WINS__ )
-        if( mLocalPlayer ){
-            painter->setBrush(QColor(Qt::darkGreen));            
-        }else{
-            painter->setBrush(QColor(Qt::darkRed));
-        }
-#else
-        painter->setBrush(QColor(0,0,0,0));
-#endif
-        painter->drawRoundedRect( option->exposedRect, 
-            lcVideoWidgetCornerRounding, lcVideoWidgetCornerRounding);
-        
-        painter->setCompositionMode(origCompositionMode); // restore
-        } else {
-            painter->setBrush(QColor(0,0,0,255));
-            painter->drawRoundedRect( option->exposedRect, 
-                lcVideoWidgetCornerRounding, lcVideoWidgetCornerRounding);
-        }
-        painter->restore();
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcVideoWidget::setShowVideo(bool showVideo)
-{
-    mShowVideo = showVideo;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-bool LcVideoWidget::isShowingVideo()
-{
-    return mShowVideo;
-}
-
-// End of file
--- a/mmsharing/livecommsui/lcui/src/lcview.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1074 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-//USER
-#include "lcview.h"
-#include "lclogger.h"
-#include "lcuiengine.h"
-#include "lcuidefs.h"
-#include "lcuicomponentrepository.h"
-#include "lceffecthandler.h"
-#include "lcvideowidget.h"
-
-//SYSTEM
-#include <hblabel.h>
-#include <hbdialog.h>
-#include <hbtransparentwindow.h>
-#include <hbmessagebox.h>
-#include <hbaction.h>
-#include <hbmenu.h>
-#include <hbpushbutton.h>
-#include <hbtoolbar.h>
-#include <hbinstance.h>
-#include <hbeffect.h>
-#include <qgraphicssceneevent.h>
-#include <qtimer.h>
-#include <hblineedit.h>
-#include <dialpad.h>
-#include <hbtapgesture.h>
-#include <DialpadVtKeyHandler.h>
-
-
-
-#if ( defined __WINSCW__ ) || ( defined __WINS__ )
-const int inActivityTimeout = 5000; //5 secs
-#else
-const int inActivityTimeout = 2000; //2 secs
-#endif
-
-// -----------------------------------------------------------------------------
-// LcView::LcView
-// -----------------------------------------------------------------------------
-//
-LcView::LcView(LcUiEngine& engine, LcUiComponentRepository& repository)
- : HbView(0),
-   mEngine(engine),
-   mRepository(repository),
-   mRecipient(0),
-   mDuration(0),
-   mContactIcon(0),   
-   mSharedVideoWidget(0),
-   mReceivedVideoWidget(0),
-   mChangeCameraAction(0),
-   mMuteAction(0),
-   mSpeakerAction(0),
-   mDisableCameraAction(0),
-   mDisableCameraMenuAction(0),
-   mNotSupportedNote(0),
-   mEndCallButton(0),
-   mReceivedVideoEffectOverlay(0),
-   mSharedVideoEffectOverlay(0),
-   mEffectHandler(0),
-   mItemContextMenu(0),   
-   mIsOptionMenuOpen(false),
-   mDialpad(0),   
-   mDialpadVtKeyHandler(0),
-   timerId(0),
-   isViewReady(0)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::LcView()" )
-    
-    createNotSupportedNote();
-
-    // For LiveComms views Dock Wiget Item is explicitly hidden.
-    hideItems(Hb::DockWidgetItem);
-    
-    //Subscribe to the gesture events.
-    grabGesture(Qt::TapGesture,Qt::DontStartGestureOnChildren);        
-
-    LC_QDEBUG( "livecomms [UI] <- LcView::LcView()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcView::~LcView
-// -----------------------------------------------------------------------------
-//
-LcView::~LcView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::~LcView()" )
-
-    // Un-subscribe to the gesture events.
-    ungrabGesture(Qt::TapGesture);        
-
-    delete mEffectHandler;    
-    delete mNotSupportedNote;
-    delete mDialpadVtKeyHandler;
-
-    LC_QDEBUG( "livecomms [UI] <- LcView::~LcView()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::init
-// -----------------------------------------------------------------------------
-//
-void LcView::init()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::init()" )
-    //find member widgets from repository
-    //( can be also found by browsing this view itself )
-    
-    //due stubs in unit tests, qobject_cast cannot be used. Using static_cast instead
-    mRecipient = 
-        static_cast<HbLabel*>( mRepository.findWidget( lcLabelRecipientId ) );
-    mDuration = 
-        static_cast<HbLabel*>( mRepository.findWidget( lcLabelDurationId ) );
-    mContactIcon = 
-        static_cast<HbLabel*>( mRepository.findWidget( lcIconContactId ) );   
-    mSharedVideoWidget = 
-        static_cast<LcVideoWidget*>( 
-                mRepository.findWidget( lcWidgetSendVideoId ) );
-    mReceivedVideoWidget = 
-        static_cast<LcVideoWidget*>( 
-                mRepository.findWidget( lcWidgetRecvVideoId ) );
-    mChangeCameraAction = 
-        static_cast<HbAction*>( mRepository.findObject( lcActChangeCameraId ) );
-    mMuteAction = 
-        static_cast<HbAction*>( mRepository.findObject( lcActMuteId ) );
-    mSpeakerAction = 
-        static_cast<HbAction*>( mRepository.findObject( lcActSpeakerId ) );
-    mDisableCameraAction = 
-        static_cast<HbAction*>( mRepository.findObject( lcActDisableCameraId ) );
-        
-    mDisableCameraMenuAction =
-        static_cast<HbAction*>( mRepository.findObject( lcActMenuDisableCameraId ) );
-    
-    mEndCallButton =
-            static_cast<HbPushButton*>( mRepository.findObject( lcButtonEndCall ) );
-    
-    if ( mEndCallButton ) {
-        connect( mEndCallButton, SIGNAL(clicked()), this, SLOT(endVideoSession()));
-    }
-
-    if ( mSharedVideoWidget ) {
-        mSharedVideoEffectOverlay = static_cast<LcVideoWidget*>( 
-                mRepository.findWidget( lcWidgetSendVideoId2 ) );
-        if ( mSharedVideoEffectOverlay ) {
-            mSharedVideoEffectOverlay->show();
-        }
-    }
-
-    mReceivedVideoEffectOverlay = 
-        static_cast<LcVideoWidget*>( mRepository.findWidget( lcWidgetRecvVideoId2 ) );
-        
-    if ( mReceivedVideoEffectOverlay ) {
-        mReceivedVideoEffectOverlay->show();
-    }
-
-    // swap
-    mEffectHandler = new LcEffectHandler( mEngine,
-            mSharedVideoWidget, mSharedVideoEffectOverlay, 
-            mReceivedVideoWidget, mReceivedVideoEffectOverlay);
-    connect( mEffectHandler, SIGNAL(swapCompleted()), this, SLOT(updateVideoRects()) );
-    connect( mEffectHandler, SIGNAL(loadSwapLayout()), this, SLOT(updateSwapLayout()) );
-    
-    // menu
-    if ( menu()) {
-        connect( menu(), SIGNAL(aboutToShow()), this, SLOT(menuAboutToShow()) );
-        connect( menu(), SIGNAL(aboutToHide()), this, SLOT(watchInactivity()) );        
-    }     
-
-    // Set up navigation action.
-    setNavigationAction(new HbAction(Hb::BackNaviAction, this));
-    connect(navigationAction(), SIGNAL(triggered()), this, 
-            SLOT(back()));
-    
-    // dialpad
-    mDialpad = static_cast<Dialpad*> ( mRepository.findWidget("lc_label_dialpad") );
-    connect( mDialpad, SIGNAL(aboutToClose()), this, SLOT(dialpadClosed()) );
-    connect( mDialpad, SIGNAL(aboutToOpen()), this, SLOT(dialpadOpened()) );
-    connect( &mDialpad->editor(), SIGNAL( contentsChanged() ), this, SLOT( dialpadEditorTextChanged() ) );
-    HbMainWindow* pWindow = HbInstance::instance()->allMainWindows().at(0);
-    if( pWindow && mDialpad ){        
-        mDialpadVtKeyHandler = new DialpadVtKeyHandler( mDialpad,*pWindow );
-    }    
-    
-    // inactivity      
-    connect( this, SIGNAL( contentFullScreenChanged() ), this, SLOT( watchInactivity() ) ) ;
-    
-    // deactivate fullscreen and it inturn starts inactivity timeout
-    toFullScreen( false );
-
-    if ( mSharedVideoWidget ) { 
-        connect( mSharedVideoWidget, SIGNAL( xChanged() ), this, 
-                SLOT( updateVideoRects() ), Qt::QueuedConnection );
-        connect( mSharedVideoWidget, SIGNAL( yChanged() ), this, 
-                SLOT( updateVideoRects() ) , Qt::QueuedConnection);
-    }
-    if ( mReceivedVideoWidget ) {
-        connect( mReceivedVideoWidget, SIGNAL( xChanged() ), this, 
-            SLOT( updateVideoRects() ), Qt::QueuedConnection );
-        connect( mReceivedVideoWidget, SIGNAL( yChanged() ), this, 
-            SLOT( updateVideoRects() ), Qt::QueuedConnection );
-    }
-    
-    //Subscribe to the Volume Change Events.
-    connect( &mEngine, SIGNAL(volumeChanged(int)), 
-            this, SLOT(updateVolumeSlider(int)) );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::init()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcView::updateVideoRects
-// -----------------------------------------------------------------------------
-//
-void LcView::updateVideoRects()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::updateVideoRects()" )
-
-    QRectF sharedContentRect;
-    QRectF receivedContentRect;
-
-    //Workaround: widgets positioning takes time, do not inform to the 
-    //engine for rendering if co-ordinates of the videos are incorrect.
-    
-    if ( isPositioned() ) {
-    
-        if ( mSharedVideoWidget ) {
-            sharedContentRect = mSharedVideoWidget->geometry();  
-            sharedContentRect.moveTop(
-                    sharedContentRect.y() + mapToParent(scenePos()).y());
-            sharedContentRect = translateRectForOrientation(sharedContentRect);
-            mEffectHandler->setVisibility(
-                    mSharedVideoWidget, mEngine.isLocalPlayerPlaying());
-        }
-        
-        if ( mReceivedVideoWidget ) {
-            receivedContentRect = mReceivedVideoWidget->geometry();
-            receivedContentRect.moveTop(
-                    receivedContentRect.y() + mapToParent(scenePos()).y());
-            receivedContentRect = translateRectForOrientation(receivedContentRect);
-            mEffectHandler->setVisibility(
-                    mReceivedVideoWidget, mEngine.isRemotePlayerPlaying());
-        }
-        
-        mEngine.setContentAreas( sharedContentRect, receivedContentRect );
-        mEngine.setOrientation( HbInstance::instance()->allMainWindows().at(0)->orientation() );
-        mEngine.updateSession();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::updateVideoRects()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::swap
-// -----------------------------------------------------------------------------
-//
-void LcView::swap()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::swap()" )
-    if ( mEffectHandler ){
-        mEffectHandler->swap();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::swap()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcView::updateSwapLayout
-// -----------------------------------------------------------------------------
-//
-
-void LcView::updateSwapLayout()
-{
-    mRepository.loadLayout( currentLayout() );
-    toFullScreen( true );
-}
-
-// -----------------------------------------------------------------------------
-// LcView::activated
-// -----------------------------------------------------------------------------
-//
-void LcView::activated()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::activated()" )   
-
-    updateVideoRects();
-    
-    if ( mEngine.mainCamera() ) {
-        setCameraActionToSecondary();
-    } else {
-        setCameraActionToMain();
-    }
-    
-    if ( mEngine.isMuted() ) {
-        setMuteActionToUnmute();
-    } else {
-        setMuteActionToMute();
-    }
-    
-    if ( mEngine.isSpeakerOn() ) {
-        setSpeakerActionToHandset();
-    } else {
-        setSpeakerActionToSpeaker();
-    }
-
-    if( mEngine.isLocalPlayerPlaying() ){
-        setCameraActionToDisable();        
-    } else {
-        setCameraActionToEnable();
-    }
-
-    if ( mChangeCameraAction ) {
-        connect( 
-            &mEngine, SIGNAL(cameraChangedToMain()),
-            this, SLOT(setCameraActionToSecondary()) );
-        connect(
-            &mEngine, SIGNAL(cameraChangedToSecondary()),
-            this, SLOT(setCameraActionToMain()));           
-    }
-    
-    if ( mMuteAction ) {
-        connect( 
-            &mEngine, SIGNAL(muted()),
-            this, SLOT(setMuteActionToUnmute()) );
-        connect(
-            &mEngine, SIGNAL(unmuted()),
-            this, SLOT(setMuteActionToMute()));
-    }
-    
-    if ( mSpeakerAction ) {
-        connect( &mEngine, SIGNAL(speakerEnabled()), 
-            this, SLOT(setSpeakerActionToHandset()) );
-        connect( &mEngine, SIGNAL(speakerDisabled()), 
-            this, SLOT(setSpeakerActionToSpeaker()) );
-    }
-
-    if ( mDisableCameraAction ) {
-        connect( 
-            &mEngine, SIGNAL(cameraDisabled()),
-            this, SLOT(setCameraActionToEnable()) );
-        connect(
-            &mEngine, SIGNAL(cameraEnabled()),
-            this, SLOT(setCameraActionToDisable()));           
-    }
-
-    connect( &mEngine, SIGNAL(blocked()), this, SLOT(disableControls()) );
-    connect( &mEngine, SIGNAL(unblocked()), this, SLOT(enableControls()) ); 
-    
-    if ( mDuration ) {
-        // TODO: clearing is needed for label in order to
-        // get text changed. Seems like bug in orbit side.
-        // This causes that duration is not changed. Workaround
-        // would be to call clear always when duration changes.
-        mDuration->clear();
-        connect( 
-        &mEngine, SIGNAL(sessionDurationChanged(const QString &)),
-        mDuration, SLOT(setPlainText(const QString &)) );
-    }
-    
-    if ( mRecipient ){
-        mRecipient->clear();
-        mRecipient->setPlainText( mEngine.recipient() );
-        connect( 
-           &mEngine, SIGNAL(recipientChanged(const QString &)),
-           mRecipient, SLOT(setPlainText(const QString &)) );
-    }
-    
-    if ( mSharedVideoWidget ) {
-        connect( &mEngine, SIGNAL(localPlayerPlaying()), 
-                 mEffectHandler, SLOT(showSendWindow()) );
-        connect( &mEngine, SIGNAL(localPlayerPaused()), 
-                 mEffectHandler, SLOT(hideSendWindow()) );
-        connect( &mEngine, SIGNAL(localPlayerPlaying()), 
-                 this, SLOT(setCameraActionToDisable()));
-        connect( &mEngine, SIGNAL(localPlayerPaused()), 
-                 this, SLOT(setCameraActionToEnable()));
-        connect( &mEngine, SIGNAL(localPlayerUnavailable()), 
-                 this, SLOT(setCameraActionToEnable()));
-        connect( &mEngine, SIGNAL(localPlayerPlaying()), 
-                         this, SLOT(updateVideoRects()));
-    }
-
-    if ( mReceivedVideoWidget ) {
-        connect( &mEngine, SIGNAL(remotePlayerPlaying()), 
-                 mEffectHandler, SLOT(showReceiveWindow()) );
-        connect( &mEngine, SIGNAL(remotePlayerPaused()), 
-                 mEffectHandler, SLOT(hideReceiveWindow()) );
-        connect( &mEngine, SIGNAL(remotePlayerPlaying()), 
-                         this, SLOT(updateVideoRects()) );
-    }
-    
-    mEngine.setCurrentView(this);
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::activated()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::deactivated
-// -----------------------------------------------------------------------------
-//
-void LcView::deactivated()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::deactivated()" )
-    QRectF sharedContentRect;//null area
-    QRectF receivedContentRect;//null area
-
-    mEngine.setContentAreas( sharedContentRect, receivedContentRect );
-    disconnect( &mEngine, 0, this, 0 );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::deactivated()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::notSupported
-// -----------------------------------------------------------------------------
-//
-void LcView::notSupported()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::notSupported()" )
-    
-    mNotSupportedNote->show();
-    toFullScreen( false );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::notSupported()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::shareImage
-// -----------------------------------------------------------------------------
-//
-void LcView::shareImage()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::shareImage()" )
-    const char localImageName[] = "c:\\data\\local.jpg";
-    QString fileName = QString::fromAscii(localImageName);
-    mEngine.shareImage(fileName);
-    LC_QDEBUG( "livecomms [UI] <- LcView::shareImage()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::endVideoSession
-// -----------------------------------------------------------------------------
-//
-void LcView::endVideoSession()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::endVideoSession()" )
-    
-    mEngine.stop();
-
-    LC_QDEBUG( "livecomms [UI] <- LcView::endVideoSession()" )
-    
-}
-
-// -----------------------------------------------------------------------------
-// LcView::disableCamera
-// -----------------------------------------------------------------------------
-//
-void LcView::disableCamera()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::disableCamera()" )
- 
-    mEffectHandler->setDissappearEffect( LcEffectHandler::NormalDissappear );
-    mEngine.toggleDisableCamera();
-    toFullScreen( mEngine.fullScreenMode() );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::disableCamera()" ) 
-}
-
-// -----------------------------------------------------------------------------
-// LcView::mute
-// -----------------------------------------------------------------------------
-//
-void LcView::mute()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::mute()" )
-    
-    mEngine.toggleMute();
-    toFullScreen( false );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::mute()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::changeCamera
-// -----------------------------------------------------------------------------
-//
-void LcView::changeCamera()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::changeCamera()" )
-   
-    mEffectHandler->setDissappearEffect( LcEffectHandler::DissappearToFlip );
-    mEngine.toggleCamera();
-    toFullScreen( false );
-        
-    LC_QDEBUG( "livecomms [UI] <- LcView::changeCamera()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::switchToVoiceCall
-// -----------------------------------------------------------------------------
-//
-void LcView::switchToVoiceCall()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::switchToVoiceCall()" )
-    
-    mEngine.stop();
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::switchToVoiceCall()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::speaker
-// -----------------------------------------------------------------------------
-//
-void LcView::speaker()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::speaker()" )
-
-    mEngine.toggleSpeaker();
-    toFullScreen( false );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::speaker()" )    
-}
-
-// -----------------------------------------------------------------------------
-// LcView::setCameraActionToMain
-// -----------------------------------------------------------------------------
-//
-void LcView::setCameraActionToMain()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::setCameraActionToMain()" )
-    
-    if ( mChangeCameraAction ){ 
-        mChangeCameraAction->setIcon (HbIcon( lcIconNameMainCamera ));
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::setCameraActionToMain()" )   
-}
-
-// -----------------------------------------------------------------------------
-// LcView::setCameraActionToSecondary
-// -----------------------------------------------------------------------------
-//
-void LcView::setCameraActionToSecondary()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::setCameraActionToSecondary()" )
-    
-    if ( mChangeCameraAction ){ 
-        mChangeCameraAction->setIcon (HbIcon( lcIconNameSecondaryCamera ));
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::setCameraActionToSecondary()" )   
-}
-
-// -----------------------------------------------------------------------------
-// LcView::setMuteActionToUnmute
-// -----------------------------------------------------------------------------
-//
-void LcView::setMuteActionToUnmute()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::setMuteActionToUnmute()" )
-    
-    if ( mMuteAction ){ 
-        mMuteAction->setIcon (HbIcon( lcIconNameUnmuteMic ));
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::setMuteActionToUnmute()" )   
-}
-
-// -----------------------------------------------------------------------------
-// LcView::setMuteActionToMute
-// -----------------------------------------------------------------------------
-//
-void LcView::setMuteActionToMute()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::setMuteActionToMute()" )
-    if ( mMuteAction ){ 
-        mMuteAction->setIcon (HbIcon( lcIconNameMuteMic ));
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::setMuteActionToMute()" )   
-}
-
-// -----------------------------------------------------------------------------
-// LcView::setSpeakerActionToHandset
-// -----------------------------------------------------------------------------
-//
-void LcView::setSpeakerActionToHandset()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::setSpeakerActionToHandset()" )
-    if ( mSpeakerAction ){
-        mSpeakerAction->setIcon (HbIcon( lcIconNameHandset ));
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::setSpeakerActionToHandset()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::setSpeakerActionToSpeaker
-// -----------------------------------------------------------------------------
-//
-void LcView::setSpeakerActionToSpeaker()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::setSpeakerActionToSpeaker()" )
-    if ( mSpeakerAction ){
-        mSpeakerAction->setIcon( HbIcon( lcIconNameLoudspeaker ));
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::setSpeakerActionToSpeaker()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::setCameraActionToEnable
-// -----------------------------------------------------------------------------
-//
-void LcView::setCameraActionToEnable()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::setCameraActionToEnable()" )
-    
-    if ( mDisableCameraAction ){ 
-        mDisableCameraAction->setIcon( HbIcon( lcIconNameEnableCamera ));
-    }
-    if ( mDisableCameraMenuAction ){ 
-        // TODO: get text from repository as loc id is not the same for mus
-        mDisableCameraMenuAction->setText( hbTrId( "txt_vt_menu_enable_camera" ));
-    }
-
-    LC_QDEBUG( "livecomms [UI] <- LcView::setCameraActionToEnable()" )   
-}
-
-// -----------------------------------------------------------------------------
-// LcView::setCameraActionToDisable
-// -----------------------------------------------------------------------------
-//
-void LcView::setCameraActionToDisable()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::setCameraActionToDisable()" )
-    
-    if ( mDisableCameraAction ){ 
-        mDisableCameraAction->setIcon (HbIcon( lcIconNameDisableCamera ));
-    }
-    if ( mDisableCameraMenuAction ){ 
-        // TODO: get text from repository as loc id is not the same for mus
-        mDisableCameraMenuAction->setText( hbTrId( "txt_vt_menu_disable_camera" ));
-    }
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::setCameraActionToDisable()" )   
-}
-
-// -----------------------------------------------------------------------------
-// LcView::disableControls
-// -----------------------------------------------------------------------------
-//
-void LcView::disableControls()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::disableControls()" )
-    menu()->setEnabled( false );
-    toolBar()->setEnabled( false );
-    LC_QDEBUG( "livecomms [UI] <- LcView::disableControls()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::enableControls
-// -----------------------------------------------------------------------------
-//
-void LcView::enableControls()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::enableControls()" )
-    menu()->setEnabled( true );
-    toolBar()->setEnabled( true );
-    LC_QDEBUG( "livecomms [UI] <- LcView::enableControls()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::gestureEvent
-// -----------------------------------------------------------------------------
-//
-void LcView::gestureEvent(QGestureEvent *event)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::gestureEvent()" )
-    if( event ){
-        // unsafe typecast but no other way to access tapstylehint from orbit
-        HbTapGesture *tap = static_cast<HbTapGesture *>(event->gesture(Qt::TapGesture));
-        Qt::GestureState tapState = tap->state();
-        HbTapGesture::TapStyleHint hint = tap->tapStyleHint();
-        if ( tapState == Qt::GestureUpdated && hint == HbTapGesture::TapAndHold ) {            
-            gestureLongPress(translatePointForOrientation(tap->position()));
-        } else if ( tapState == Qt::GestureFinished  && hint == HbTapGesture::Tap ) {
-            gestureShortPress();
-        }        
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcView::gestureEvent()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcView::gestureLongPress
-// -----------------------------------------------------------------------------
-//
-void LcView::gestureLongPress(QPointF coords)
-{
-    LC_QDEBUG_2( "livecomms [UI] -> LcView::gestureLongPress(), coords:", coords )
-
-    bool sharedHit = false;
-    
-    if ( mSharedVideoWidget && mSharedVideoWidget->windowFrameGeometry().contains(coords) ) {
-        LC_QDEBUG( "livecomms [UI] LcView mapped to mSharedVideoWidget" )
-        sharedHit = true;
-    }
-    
-    if ( sharedHit ) {
-        LC_QDEBUG( "livecomms [UI] LcView mapped to mSharedVideoWidget" )
-
-        createContextMenu();
-        mRepository.sharedVideoContextMenuActions( mItemContextMenu, *this );
-
-        if ( mItemContextMenu->actions().count() > 0 ) {
-            mItemContextMenu->open(this);
-        }
-    }
-
-    LC_QDEBUG( "livecomms [UI] <- LcView::gestureLongPress()" )
-}
-
-
-
-// -----------------------------------------------------------------------------
-// LcView::gestureShortPress
-// -----------------------------------------------------------------------------
-//
-void LcView::gestureShortPress()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::gestureShortPress()" )
-    toFullScreen( !mEngine.fullScreenMode() );
-    LC_QDEBUG( "livecomms [UI] <- LcView::gestureShortPress()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::createNotSupportedNote
-// -----------------------------------------------------------------------------
-//
-void LcView::createNotSupportedNote()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::createNotSupportedNote()" )
-
-    if ( !mNotSupportedNote ){
-        mNotSupportedNote = new HbMessageBox(QString("Not supported"));
-        mNotSupportedNote->setTimeout(HbDialog::StandardTimeout);
-        mNotSupportedNote->setZValue(LC_NOTE_ON_TOP);
-        mNotSupportedNote->hide();
-    }
-
-    LC_QDEBUG( "livecomms [UI] <- LcView::createNotSupportedNote()" )
-}
-
-
-
-// -----------------------------------------------------------------------------
-// LcView::createContextMenu
-// -----------------------------------------------------------------------------
-//
-void LcView::createContextMenu()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::createContextMenu()" )
-
-    // mItemContextMenu is destroyed upon close 
-    mItemContextMenu = new HbMenu();
-    mItemContextMenu->setDismissPolicy(HbMenu::TapAnywhere);
-    mItemContextMenu->setTimeout(HbMenu::ContextMenuTimeout);
-    mItemContextMenu->setAttribute(Qt::WA_DeleteOnClose);
-    
-    LC_QDEBUG( "livecomms [UI] <- LcView::createContextMenu()" )
-}
-    
-// -----------------------------------------------------------------------------
-// LcView::currentLayout
-// -----------------------------------------------------------------------------
-//
-QString LcView::currentLayout()
-{
-    QString layout( lcLayoutLandscapeDefaultId );
-
-    if ( mEffectHandler->isSwapInProgress() &&
-        mSharedVideoWidget &&
-        mReceivedVideoWidget &&
-        mSharedVideoWidget->geometry().left() > mReceivedVideoWidget->geometry().left() ) {
-        
-        layout = lcLayoutLandscapeSwappedId;
-    }
-
-    LC_QDEBUG_2( "livecomms [UI] -> LcView::currentLayout()", layout )
-    return layout;
-}
-
-
-// -----------------------------------------------------------------------------
-// LcView::menuAboutToShow
-// -----------------------------------------------------------------------------
-//
-void LcView::menuAboutToShow()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcView::menuAboutToShow()" )
-    toFullScreen( false );
-    LC_QDEBUG( "livecomms [UI] <- LcView::menuAboutToShow()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcView::translateRectForOrientation
-// Video windows at engine side do not change their coordinate system
-// when orientation at orbit UI changes. Therefore we need to convert video
-// rects from landscape coordinate system to portait coordinate system.
-// NOTE: Landscape orientation has different rotation in emulator than in HW.
-// -----------------------------------------------------------------------------
-//
-QRectF LcView::translateRectForOrientation(const QRectF& origRect)
-{
-    QRectF newRect = origRect;
-    QMatrix m;
-#if ( defined __WINSCW__ ) || ( defined __WINS__ ) 
-    m.rotate(270);
-    newRect = m.mapRect(newRect);
-    newRect.translate(0,HbInstance::instance()->allMainWindows().at(0)->rect().height());
-#else
-    m.rotate(90);
-    newRect = m.mapRect(newRect);
-    newRect.translate(HbInstance::instance()->allMainWindows().at(0)->rect().width(),0);
-#endif
-    return newRect; 
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-QPointF LcView::translatePointForOrientation(const QPointF& origPoint)
-{
-    QPointF newPoint = origPoint;
-    QMatrix m;
-#if ( defined __WINSCW__ ) || ( defined __WINS__ ) 
-    m.translate(HbInstance::instance()->allMainWindows().at(0)->rect().height(),0);
-    m.rotate(90);
-    newPoint = m.map(newPoint);
-#else
-    m.translate(0,HbInstance::instance()->allMainWindows().at(0)->rect().width());
-    m.rotate(270);
-    newPoint = m.map(newPoint);
-#endif
-    return newPoint; 
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcView::setVisibility( QGraphicsItem* item, bool visible )
-{
-    if ( item ) {
-        item->setVisible(visible);
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcView::addOptionsMenuActions()
-{
-    HbAction* swapAction = static_cast<HbAction*>(
-        mRepository.findObject(lcActSwapViewsId));
-    menu()->addAction(swapAction);
-
-    HbAction* openKeypadAction = static_cast<HbAction*>(
-        mRepository.findObject(lcActOpenKeypadId));
-    menu()->addAction(openKeypadAction);
-}
-
-// -----------------------------------------------------------------------------
-// LcView::openDialpad()
-// -----------------------------------------------------------------------------
-//
-void LcView::openDialpad()
-{    
-    LC_QDEBUG("livecomms [UI] -> LcView::openDialpad()")
-    mRepository.loadLayout( lcLayoutLandscapeDialpadId ); 
-    if ( mEffectHandler )mEffectHandler->startEffects();    
-    mDialpad->openDialpad();
-    mDialpad->setCallButtonEnabled(false);
-    menu()->clearActions();    
-    LC_QDEBUG("livecomms [UI] <- LcView::openDialpad()")
-}
-
-// -----------------------------------------------------------------------------
-// LcView::dialpadOpened()
-// -----------------------------------------------------------------------------
-//
-void LcView::dialpadOpened()
-{
-    LC_QDEBUG("livecomms [UI] <-> LcView::dialpadOpened()")   
-    toolBar()->setVisible( false );
-    setTitleBarVisible( true );
-}
-
-// -----------------------------------------------------------------------------
-// LcView::dialpadClosed()
-// -----------------------------------------------------------------------------
-//
-void LcView::dialpadClosed()
-{
-    LC_QDEBUG("livecomms [UI] -> LcView::dialpadClosed()")
-    mDialpad->editor().setText(QString());
-    addOptionsMenuActions();    
-    // switch back to the previous layout
-    QString pLayout = mRepository.previousLayout();
-    QString layout;
-    bool isSwapped = (pLayout == lcLayoutLandscapeDefaultId)
-                     ? false : true;
-    layout = (isSwapped) ? 
-        lcLayoutLandscapeSwappedId : lcLayoutLandscapeDefaultId;
-
-    mRepository.loadLayout( layout );    
-    if ( mEffectHandler ){
-        mEffectHandler->startEffects();
-    }
-    toFullScreen(false);
-    LC_QDEBUG("livecomms [UI] <- LcView::dialpadClosed()")
-}
-
-// -----------------------------------------------------------------------------
-// LcView::dialpadEditorTextChanged()
-// -----------------------------------------------------------------------------
-//
-void LcView::dialpadEditorTextChanged()
-{   
-    LC_QDEBUG_2("livecomms [UI] -> Dial Pad Field ", mDialpad->editor().text());
-    
-    if ( mDialpad->editor().text().length() > 0 ) {
-        LC_QDEBUG_2("livecomms [UI] -> Last Dialled Charcter ", mDialpad->editor().text().right(1));
-        bool dialPadStatus = mEngine.SendDialTone(mDialpad->editor().text().right(1).at(0));
-        LC_QDEBUG_2("livecomms [UI] -> Dialpad Send Tone Status ",dialPadStatus)
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LcView::back
-// -----------------------------------------------------------------------------
-//
-void LcView::back()
-{
-    LC_QDEBUG("livecomms [UI] -> LcView::back()")
-    if ( mDialpad && mDialpad->isOpen()) {
-        LC_QDEBUG("livecomms [UI] - Closing dialpad")
-        mDialpad->closeDialpad();    
-    } else {
-        mEngine.minimize();
-    }
-    
-    LC_QDEBUG("livecomms [UI] <- LcView::back()")
-}
-
-// -----------------------------------------------------------------------------
-// LcView::timerEvent
-// -----------------------------------------------------------------------------
-//
-void LcView::timerEvent( QTimerEvent * event )
-{    
-    if ( event->timerId() == timerId ){
-        LC_QDEBUG("livecomms [UI] -> LcView::timerEvent() inActivity Timeout")
-        killTimer( timerId );
-        toFullScreen(true);
-    }    
-}
-
-// -----------------------------------------------------------------------------
-// LcView::watchInactivity
-// -----------------------------------------------------------------------------
-//
-void LcView::watchInactivity()
-{    
-    if( !mEngine.fullScreenMode() &&  !( mDialpad && mDialpad->isOpen() ) ){
-        LC_QDEBUG("livecomms [UI] - LcView::watchInactivity() start watching inactivity") 
-        killTimer( timerId );
-        timerId = startTimer( inActivityTimeout );
-    }    
-}
-
-// -----------------------------------------------------------------------------
-// LcView::toFullScreen utility function
-// -----------------------------------------------------------------------------
-//
-void LcView::toFullScreen( bool fullscreen )
-{
-    LC_QDEBUG_2("livecomms [UI] - LcView::toFullScreen(),",fullscreen)
-    if( menu()->isVisible() || ( mDialpad && mDialpad->isOpen() ) ) return;
-    mEngine.setFullScreenMode( fullscreen );    
-    setTitleBarVisible( !fullscreen );
-    setStatusBarVisible( !fullscreen );
-    toolBar()->setVisible( !fullscreen );
-    setVisibility( mEndCallButton, !fullscreen );    
-    setVisibility( mDuration, !fullscreen );
-    setVisibility( mRecipient, !fullscreen );
-    emit contentFullScreenChanged();
-}
-
-
-// -----------------------------------------------------------------------------
-// LcView::isVideoPositionedCorrectly utility function
-// -----------------------------------------------------------------------------
-//
-bool LcView::isVideoPositionedCorrectly( LcVideoWidget* mVideoWidget )
-{
-    LC_QDEBUG("livecomms [UI] -> LcView::isVideoPositionedCorrectly()")
-    LC_QDEBUG("livecomms [UI] <- LcView::isVideoPositionedCorrectly()")
-    QPointF initialPosition(0,0);
-    return ( !mVideoWidget || 
-            (( mVideoWidget ) && ( mVideoWidget->pos()!= initialPosition )));
-}
-
-// -----------------------------------------------------------------------------
-// LcView::isPositioned utility function
-// hack style since orbit give viewready much earlier and widgets do not have
-// proper co-ordinates.
-// -----------------------------------------------------------------------------
-//
-bool LcView::isPositioned()
-{
-    LC_QDEBUG("livecomms [UI] -> LcView::isPositioned()")   
-    // at first time check for video positions if they are not ready
-    // wait for x or y changed event and recheck position. 
-    // After firsttime it will work.
-    if( !isViewReady ){
-        isViewReady =  isVideoPositionedCorrectly( mSharedVideoWidget ) && 
-                       isVideoPositionedCorrectly( mReceivedVideoWidget );
-        if( isViewReady ){
-            if ( mSharedVideoWidget ) { 
-            disconnect( mSharedVideoWidget, SIGNAL( xChanged() ), this, 
-                   SLOT( updateVideoRects() ) );
-            disconnect( mSharedVideoWidget, SIGNAL( yChanged() ), this, 
-                   SLOT( updateVideoRects() ) );
-            }
-            if ( mReceivedVideoWidget ) {
-            disconnect( mReceivedVideoWidget, SIGNAL( xChanged() ), this, 
-                   SLOT( updateVideoRects() ) );
-            disconnect( mReceivedVideoWidget, SIGNAL( yChanged() ), this, 
-                   SLOT( updateVideoRects() ) );
-            }
-       }
-    }    
-    LC_QDEBUG_2("livecomms [UI] - LcView::isPositioned(),",isViewReady)
-    return isViewReady;    
-}
-
-
-// -----------------------------------------------------------------------------
-// LcView::updateVolumeSlider 
-// -----------------------------------------------------------------------------
-//
-void LcView::updateVolumeSlider( int aVolumeLevel )
-{
-    LC_QDEBUG("livecomms [UI] -> LcView::updateVolumeSlider()")
-    //TBD: Show volume slider, with update volume level
-    LC_QDEBUG_2("Volume Level Is,",aVolumeLevel)
-    LC_QDEBUG("livecomms [UI] <- LcView::updateVolumeSlider()")   
-}
-
-
-// End of file
--- a/mmsharing/livecommsui/lcui/src/lcviewmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcviewmanager.h"
-#include "lcviewmanager_p.h"
-#include "lclogger.h"
-
-
-
-// -----------------------------------------------------------------------------
-// LcViewManager::LcViewManager
-// -----------------------------------------------------------------------------
-//
-LcViewManager::LcViewManager( const QString &engineName,
-                              const QString &applicationDisplayName)
-{
-            
-    d_ptr = new LcViewManagerPrivate( engineName, applicationDisplayName );
-    
-}
-
-
-// -----------------------------------------------------------------------------
-// LcViewManager::~LcViewManager
-// -----------------------------------------------------------------------------
-//
-LcViewManager::~LcViewManager()
-{
-    delete d_ptr;
-}
-
-
-// -----------------------------------------------------------------------------
-// LcViewManager::terminateSession
-// -----------------------------------------------------------------------------
-//
-void LcViewManager::terminateSession()
-{
-    d_ptr->terminateSession();
-}
-
-
-// End of file
-
--- a/mmsharing/livecommsui/lcui/src/lcviewmanager_p.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-// USER INCLUDES
-#include "lcviewmanager_p.h"
-#include "lcuicomponentrepository.h"
-#include "lcuidefs.h"
-#include "lcuiengine.h"
-#include "lcview.h"
-#include "lclogger.h"
-
-// SYSTEM INCLUDES
-#include <hbmainwindow.h>
-#include <hbdialog.h>
-#include <hbaction.h>
-#include <qcoreapplication.h>
-#include <hbactivitymanager.h>
-#include <hbapplication.h>
-#include <hbapplication.h>
-
-// CONSTANTS
-#define LC_VIEWMANAGER_SLOT_ACTIVATE_CURRENT_VIEW "activateCurrentView" 
-
-
-
-// -----------------------------------------------------------------------------
-// LcMainWindow::LcMainWindow
-// -----------------------------------------------------------------------------
-//
-LcMainWindow::LcMainWindow() : 
-    HbMainWindow(0, Hb::WindowFlagFixedHorizontal | Hb::WindowFlagTransparent)
-{
-    // TODO: remove flag WindowFlagFixedHorizontal if portait layout
-    // is going to be supported.
-    qApp->installEventFilter(this);
-}
-
-// -----------------------------------------------------------------------------
-// LcMainWindow::~LcMainWindow
-// -----------------------------------------------------------------------------
-//
-LcMainWindow::~LcMainWindow()
-{
-}
-
-// -----------------------------------------------------------------------------
-// LcMainWindow::eventFilter
-// -----------------------------------------------------------------------------
-//
-bool LcMainWindow::eventFilter ( QObject * watched, QEvent * event )
-{    
-    if ( event->type() == QEvent::ApplicationActivate ){
-        LC_QDEBUG( "livecomms [UI] -> LcMainWindow::eventFilter(), ApplicationActivate" )
-        emit appFocusGained();
-    } else if (( event->type() == QEvent::ApplicationDeactivate ) && 
-            ( !this->windowSurface()) ){
-        LC_QDEBUG( "livecomms [UI] -> LcMainWindow::eventFilter(), ApplicationDeactivate" )
-        emit appFocusLost();
-    }
-    return QObject::eventFilter(watched, event);
-}
-
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::LcViewManagerPrivate
-// -----------------------------------------------------------------------------
-//
-LcViewManagerPrivate::LcViewManagerPrivate(
-    const QString& engineName,
-    const QString& applicationDisplayName) :
-    mEngine( 0 ),
-    mRepository( 0 )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::LcViewManagerPrivate()" )
-    
-    mEngine = new LcUiEngine( engineName, applicationDisplayName );
-    mRepository = new LcUiComponentRepository( *mEngine );
-    setCurrentView( true );
-        
-    connect(&mMainWindow, SIGNAL(appFocusGained()), mEngine, SLOT(maximize()));
-    connect(&mMainWindow, SIGNAL(appFocusLost()), mEngine, SLOT(minimize()));
-    
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::LcViewManagerPrivate()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::~LcViewManagerPrivate
-// -----------------------------------------------------------------------------
-//
-LcViewManagerPrivate::~LcViewManagerPrivate()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::~LcViewManagerPrivate()" )
-
-    delete mEngine;
-    QList<HbView *> views = mMainWindow.views();
-    foreach( HbView* view, views ){
-        mMainWindow.removeView(view);
-    }
-    delete mRepository;    
-
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::~LcViewManagerPrivate()" ) 
-}
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::terminateSession
-// -----------------------------------------------------------------------------
-//
-void LcViewManagerPrivate::terminateSession()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::terminateSession" )
-    mEngine->stop(); 
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::terminateSession" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::prepareOrientationChange
-// -----------------------------------------------------------------------------
-//
-void LcViewManagerPrivate::prepareOrientationChange()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::prepareOrientationChange()" )
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::prepareOrientationChange()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::activateCurrentView
-// -----------------------------------------------------------------------------
-//
-void LcViewManagerPrivate::activateCurrentView(bool startup)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::activateCurrentView()" )
-    if ( mMainWindow.currentView() ) {
-        static_cast<LcView*>( mMainWindow.currentView() )->activated();
-    }
-    
-    if ( startup ){
-        LC_QDEBUG( "livecomms [UI]  Start engine" )
-        startEngine();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::activateCurrentView()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::startEngine
-// -----------------------------------------------------------------------------
-//
-void LcViewManagerPrivate::startEngine()
-{
-    connect(mEngine, SIGNAL(layoutChanged()), this, SLOT(changeView()), 
-        Qt::QueuedConnection );
-    connect(mEngine, SIGNAL(stopped()), this, SLOT(closeApp()), 
-        Qt::QueuedConnection );
-    
-    mEngine->setUiComponents( mRepository->invitingNote(), 
-                              mRepository->waitingNote(), 
-                              mRepository->acceptQuery(), 
-                              mRepository->recipientQuery(),
-                              mRepository->shareOwnVideoQuery() );    
-    mEngine->start();
-}
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::setCurrentView
-// -----------------------------------------------------------------------------
-//
-void LcViewManagerPrivate::setCurrentView(bool startup)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::setCurrentView()" )
-
-    LcView* currView = currentView();
-    
-    bool found(false);
-    foreach ( HbView* view, mMainWindow.views() ){
-        found |= ( view == currView );
-    }
-    if ( !found ){
-        mMainWindow.addView( currView );
-    }
-    mMainWindow.setCurrentView( currView );
-    
-    LcUtil::asyncSlotCall( 
-        this, LC_VIEWMANAGER_SLOT_ACTIVATE_CURRENT_VIEW, Q_ARG( bool, startup ) );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::setCurrentView()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::currentView
-// -----------------------------------------------------------------------------
-//
-LcView* LcViewManagerPrivate::currentView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::currentView()" )
-
-    LcViewLayoutHint hint = mEngine->viewLayout();
-    LcView* nextView = 0;
-    
-    switch ( hint ) {
-        case Lc_ReceivedViewLayout:
-            LC_QDEBUG( "livecomms [UI] - switching to receive view -" )
-            nextView = mRepository->receiveView();
-            break;
-        case Lc_ReceivedOnlyViewLayout:
-            LC_QDEBUG( "livecomms [UI] - switching to receive only view -" )
-            nextView = mRepository->receiveOnlyView();
-            break;
-        case Lc_AllInOneViewLayout:
-            LC_QDEBUG( "livecomms [UI] - switching to allinone view -" )
-            nextView = mRepository->allInOneView();
-            break;
-        case Lc_TwowayViewLayout:
-            LC_QDEBUG( "livecomms [UI] - switching to twoway view -" )
-            nextView = mRepository->twowayView();
-            break;
-        case Lc_SharedViewLayout:
-            LC_QDEBUG( "livecomms [UI] - switching to send view -" )
-            nextView = mRepository->sendView();
-            break;
-        default:
-            LC_QDEBUG( "livecomms [UI] - switching to idle view -" )
-            nextView = mRepository->idleView();
-            break;
-    }
-    if ( !nextView && hint > Lc_IdleViewLayout ) {
-        LC_QDEBUG( "livecomms [UI] ! could not get view !" )
-        LC_QDEBUG( "livecomms [UI] - switching to idle view -" )
-        nextView = mRepository->idleView();
-    }
-    
-    if ( !nextView ) {
-        LC_QCRITICAL( "livecomms [UI] ! still could not get view !. ABORT" )
-        LC_PANIC();
-    }
-    
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::currentView()" )
-    return nextView;
-}
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::changeView
-// -----------------------------------------------------------------------------
-//
-void LcViewManagerPrivate::changeView()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::changeView()" )
-
-    LcView* currentView = static_cast<LcView*>( mMainWindow.currentView() );
-    currentView->deactivated();
-    setCurrentView();
-    
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::changeView()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcViewManagerPrivate::closeApp
-// -----------------------------------------------------------------------------
-//
-void LcViewManagerPrivate::closeApp()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::closeApp()" )
-    
-    qApp->exit(0);
-    
-    LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::closeApp()" )
-}
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/data/20021341.rss	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "registryinfov2.rh"
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-    dll_uid = 0x20021341;
-    interfaces = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x20021340;
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = 0x20021341;
-                    version_no = 1;
-                    default_data = "MultimediaSharing";
-                    }            
-                };
-            }
-        };
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_MMPFILES
-dummymusengineplugin.mmp
-
-
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/group/dummymusengineplugin.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-* 
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET         musengineplugin.dll
-TARGETTYPE     PLUGIN
-UID            0x10009D8D 0x20021341
-VENDORID       VID_DEFAULT
-CAPABILITY     CAP_ECOM_PLUGIN
-
-SOURCEPATH     ../data
-START RESOURCE 20021341.rss
-TARGET         musengineplugin.rsc
-END
-
-SOURCEPATH  	../src
-SOURCE      	musenginepluginentry.cpp
-SOURCE      	musengsessionmanager.cpp
-
-
-SOURCE      	musengmcesession.cpp
-SOURCE          musengtwowaysession.cpp
-SOURCE          musengcamerahandler.cpp
-SOURCE          musengvideoplayerbase.cpp
-SOURCE          musenglocalvideoplayer.cpp
-SOURCE          musenglivevideoplayer.cpp
-SOURCE          musengremotevideoplayer.cpp
-SOURCE          svptimer.cpp
-SOURCE          mccdatasender.cpp
-SOURCE          mccdatareceiver.cpp musenglivesession.cpp
-
-/*
-SOURCE      	musengmceoutsession.cpp
-SOURCE          musenglivesession.cpp
-SOURCE          musengreceivesession.cpp
-SOURCE          musengtwowayrecvsession.cpp
-
-SOURCE      	musengtelephoneutils.cpp
-SOURCE      	musengsessiondurationtimer.cpp
-SOURCE	        musengclipsession.cpp
-SOURCE          musenguriparser.cpp
-SOURCE          musengmceutils.cpp
-SOURCE          mussipprofilehandler.cpp
-SOURCE          musengclipvideoplayer.cpp
-*/
-
-USERINCLUDE     ../inc
-USERINCLUDE 	../../../../../../inc
-USERINCLUDE 	../../../../../mmshengine/inc
-
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE 	/epoc32/include/ecom
-
-LIBRARY         euser.lib
-LIBRARY         bafl.lib
-LIBRARY         inetprotutil.lib
-LIBRARY		phoneclient.lib
-LIBRARY		centralrepository.lib
-LIBRARY		sipprofilecli.lib
-LIBRARY		sipclient.lib
-LIBRARY         sipcodec.lib
-LIBRARY 	mceclient.lib  
-LIBRARY 	drmcommon.lib
-LIBRARY		charconv.lib
-LIBRARY         telephonyaudiorouting.lib
-LIBRARY         cntmodel.lib ecom.lib
-DEBUGLIBRARY    flogger.lib
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/mccdatareceiver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef MCCDATARECEIVER_H
-#define MCCDATARECEIVER_H
-#include <E32Base.h>
-#include <e32msgqueue.h>
-
-#include "mccdatareceiverobserver.h"
-#include "mccdatastructures.h"
-
-
-// CLASS DECLARATION
-
-/**
-*  CMccDataReceiver class declaration
-*/
-class CMccDataReceiver : public CActive
-	{
-    public:
-    
-	    static CMccDataReceiver* NewL( MMccDataReceiverObserver& aObserver );
-		
-	    ~CMccDataReceiver(); 
-		
-    	    TDataMessage iInitData;
-	 	
-    public: // From CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError(TInt aError);	
-
-    private:
-        CMccDataReceiver( MMccDataReceiverObserver& aObserver );
-	    void ConstructL(); // second construction phase
-
-    private:
-	    
-		RMsgQueue<TDataMessage> iMsgQueue;		
-		MMccDataReceiverObserver* iObserver;
-
-    };
-
-
-#endif
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/mccdatareceiverobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef MCCDATARECEIVEROBSERVER_H
-#define MCCDATARECEIVEROBSERVER_H
-
-#include <E32Base.h>
-#include "mccdatastructures.h"
-
-// CLASS DECLARATION
-
-/**
-*  CMccDataReceiver class declaration
-*/
-class MMccDataReceiverObserver
-	{
-    public:
-    
-		virtual void DataReceived( const TDataMessage& aData ) = 0;
-
-    };
-
-
-#endif
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/mccdatasender.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef MCCDATASENDER_H
-#define MCCDATASENDER_H
-#include <E32Base.h>
-#include <e32msgqueue.h>
-
-#include "mccdatastructures.h"
-
-
-// CLASS DECLARATION
-
-/**
-*  CMccPeriodicRunner class declaration
-*/
-class CMccDataSender : public CActive
-	{
-    public:
-    
-	    static CMccDataSender* NewL();
-		
-	    ~CMccDataSender(); 
-		
-	public:
-	 
-	 	void Send( const TDataMessage& aData );
-	 	
-    public: // From CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError(TInt aError);	
-
-    private:
-        CMccDataSender();
-	    void ConstructL(); // second construction phase
-
-    private:
-	    
-		RMsgQueue<TDataMessage> iMsgQueue;
-		TDataMessage iBuffer;
-		 
-    };
-
-
-#endif
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/mccdatastructures.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef MCCDATASTRUCTURES_H
-#define MCCDATASTRUCTURES_H
-
-#include <E32Base.h>
-
-enum TDataId 
-{
-  EUninitialized,
-  EInitComplete,
-  EEstablish,
-  EProceeding,
-  EEstablished,
-  ETerminate,
-  ETerminated
-};
-
-class TDataMessage
-{
-public:
-    TDataId iDataId;
-    TInt iDataIntValue;
-    TBuf<50> iDataBufValue;
-
-};
-
-
-
-#endif
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengcamerahandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGCAMERAHANDLER_H
-#define MUSHENGCAMERAHANDLER_H
-
-// USER
-#include "lccameracontrol.h"
-#include "lcbrightnesscontrol.h"
-#include "lczoomcontrol.h"
-
-// SYSTEM
-#include <e32base.h>
-#include <ecam.h>
-
-
-// CLASS
-
-class TMusEngCameraHandler :    
-    public MLcCameraControl,
-    public MLcBrightnessControl,
-    public MLcZoomControl
-    {
-        
-    public: // From MLcCameraControl
-        
-        TInt LcCameraCountL();
-
-        TInt CurrentLcCameraIndex();
-        
-        void ToggleLcCameraL();       
-
-    public: // From MLcBrightnessControl
-        
-        TInt MinLcBrightnessL();
-
-        TInt MaxLcBrightnessL();
-
-        TInt LcBrightnessL();
-
-        void SetLcBrightnessL( TInt aValue );
-        
-        void IncreaseLcBrightnessL();
-        
-        void DecreaseLcBrightnessL();
-        
-    public: // From MLcZoomControl
-        
-        TInt MinLcZoomL();
-
-        TInt MaxLcZoomL();
-
-        TInt LcZoomValueL();
-
-        void SetLcZoomValueL( TInt aValue );
-        
-        void LcZoomInL();
-        
-        void LcZoomOutL();     
-                       
-    public:
-        
-        TMusEngCameraHandler();
-        
-        TInt ZoomStepSize( TInt64& aTime );
-
-    private:
-    
-        enum TCurrentCamera
-            {
-            ECameraNotAvailable = KErrNotFound,
-            EBackCamera = 0, 
-            EFrontCamera = 1
-            };         
-   
-        
-    private: // Data
-        
-        
-        TCameraInfo iCameraInfo;
-
-        TInt iDefaultBrightness;
-        
-        TInt64 iZoomInTime;
-        
-        TInt64 iZoomOutTime;        
-                      
-        TInt iSmallZoomStep;
-        
-        TInt iBigZoomStep;
-        
-        TCurrentCamera iCurrentCamera;
-    };
-
-#endif
-
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengdisplayhandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGDISPLAYHANDLER_H
-#define MUSHENGDISPLAYHANDLER_H
-
-
-#include <e32std.h>
-
-// CLASS DECLARATION
-
-/**
-* An Interface for display services
-*
-* @lib museng.lib
-* @since S60 v3.2
-*/
-class MMusEngDisplayHandler
-    {
-
-    public:
-        
-        /*
-        * Defines possible rotations 
-        */
-        enum TDisplayOrientation
-            {
-            EPortrait, // Normal
-            ELandscape // 90 degree's clockwise rotation
-            };
-
-        /**
-        * Returns currently assigned drawing area
-        *
-        * @return TRect This session drawing area rectangle
-        */
-        virtual TRect Rect() const = 0;
-
-        /**
-        * Sets new drawing area
-        *
-        * @param TRect This session new drawing area rectangle
-        */
-        virtual void SetRectL( const TRect& aRect ) = 0;
-        
-        /**
-        * Sets secondary rect (e.g. viewfinder in twoway session)
-        * @param TRect This session new secondary drawing area rectangle
-        */
-        virtual void SetSecondaryRectL( const TRect& aSecondaryRect ) = 0;
-        
-        /**
-        * Gets secondary rect.
-        * @return TRect This session secondary drawing area rectangle
-        */
-        virtual TRect SecondaryRect() const = 0;
-        
-        /**
-        * Enables or disables display. Call to this function is considered
-        * as a permission or denial to draw to the display.
-        */
-        virtual void EnableDisplayL( TBool aEnable ) = 0;
-        
-        /**
-        * Check whether display is enabled 
-        */
-        virtual TBool IsDisplayEnabled() = 0;
-        
-        /**
-        * Returns current display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Current display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        virtual TDisplayOrientation OrientationL() = 0;
-        
-        /**
-        * Sets display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Sets display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        virtual void SetOrientationL( TDisplayOrientation aOrientation ) = 0;
-        
-        /**
-        * Check if display is actively displaying content
-        * @return ETrue if is displaying content, otherwise EFalse
-        */
-        virtual TBool IsDisplayActive() = 0;
-    };
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musenglivesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGLIVESESSION_H
-#define MUSHENGLIVESESSION_H
-
-// USER
-#include "musengmcesession.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class MMusEngLiveSessionObserver;
-class CMceDisplaySink;
-class MMusEngTwoWaySessionObserver;
-class CMusEngRemoteVideoPlayer;
-
-
-class CMusEngLiveSession : public CMusEngMceSession
-    {    
-    public:
-        /**
-        * Creates new MultimediaSharing Live session.
-        * @return CMusEngLiveSession* New instanse of specified class
-        */
-        static CMusEngLiveSession* NewL();
-
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngLiveSession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-
-        void SetOrientationL( MMusEngDisplayHandler::TDisplayOrientation aOrientation );
-
-        void EstablishLcSessionL();
-        
-        void TerminateLcSessionL();     
-        
-    public:
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        void SetRectsL( const TRect& aRemoteRect,
-                        const TRect& aLocalRect );
-        
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngLiveSession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-
-    };
-
-#endif
-
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musenglivevideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGLIVEVIDEOPLAYER_H
-#define MUSHENGLIVEVIDEOPLAYER_H
-
-// INCLUDES
-#include "musenglocalvideoplayer.h"
-#include "lcdestinationfilecontrol.h"
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class TMusEngCameraHandler;
-
-// CLASS DECLARATION
-class CMusEngLiveVideoPlayer : 
-    public CMusEngLocalVideoPlayer,
-    public MLcDestinationFileControl
-    {
-    public: // Constructors and destructor
-        
-        static CMusEngLiveVideoPlayer* NewL( 
-            MMusEngDisplayHandler& aDisplayHandler,
-            TMusEngCameraHandler& aCameraHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-        ~CMusEngLiveVideoPlayer();
-        
-    public: // From MLcVideoPlayer
-        
-        TBool LcIsPlayingL();
-        
-        void LcPlayL();
-        
-        void LcPauseL();
-
-        MLcCameraControl* LcCameraControl();
-        
-        MLcDestinationFileControl* LcDestinationFileControl();
-            
-        MLcZoomControl* LcZoomControl();
-    
-        MLcBrightnessControl* LcBrightnessControl(); 
-        
-    public: // From MLcDestinationFileControl
-
-        void SetLcFileNameL( const TFileName& aFileName );
-        
-        TFileName& LcFileName();
-
-        void LcRecordL( TBool aRecord );
-
-        TBool LcIsRecording();
-        
-    private: // Constructors
-        
-        CMusEngLiveVideoPlayer(
-            MMusEngDisplayHandler& aDisplayHandler,
-            TMusEngCameraHandler& aCameraHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-    private: // Data
-        
-        TFileName iFileName;
-        TMusEngCameraHandler& iCameraHandler;
-    };
-
-#endif // MUSHENGLIVEVIDEOPLAYER_H
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musenglocalvideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGLOCALVIDEOPLAYER_H
-#define MUSHENGLOCALVIDEOPLAYER_H
-
-// INCLUDES
-#include "musengvideoplayerbase.h"
-
-// CLASS DECLARATION
-class CMusEngLocalVideoPlayer : public CMusEngVideoPlayerBase
-    {
-    public: // Constructors and destructor
-        
-        ~CMusEngLocalVideoPlayer();
-        
-    public: // from CMusEngVideoPlayerBase
-        
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        void SetLcWindowRectL( TRect aRect );
-        
-        TRect LcWindowRect();
-        
-    protected: // Constructors
-        
-        CMusEngLocalVideoPlayer(
-            MMusEngDisplayHandler& aDisplayHandler,
-            MLcAudioControl& aLcAudioControl );
-    };
-
-#endif // MUSHENGLOCALVIDEOPLAYER_H
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musenglogger.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-#ifndef MUSENGLOGGER_H
-#define MUSENGLOGGER_H
-
-
-#include "muslogger.h"
-
-#if ( !_DEBUG || UNIT_TESTING ) // release or unit test build; no logs
-
-#define MUS_ENG_LOG_SESSION_STATE( aSession )
-#define MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )
-#define MUS_ENG_LOG_STREAM_STATE( aStream )
-#define MUS_ENG_LOG_SINK_STATES( aStream )
-#define MUS_ENG_LOG_SOURCE_STATE( aSource )
-#define MUS_ENG_LOG_SINK_STATE( aSink )
-#define MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )
-
-#else // debug build; logs
-
-#include <mcesession.h>
-#include <mceaudiostream.h>
-#include <mcecamerasource.h>
-#include <mcefilesource.h>
-#include <mcertpsource.h>
-#include <mcedisplaysink.h>
-#include <mcespeakersink.h>
-#include <mcefilesink.h>
-#include <mcertpsink.h>
-
-#define MUS_ENG_LOG_SESSION_STATE( aSession )\
-    {\
-    TBuf<15> state;\
-    switch ( (aSession).State() )\
-        {\
-        case CMceSession::EIdle:\
-            {\
-            state = _L("EIdle");\
-            break;\
-            }\
-        case CMceSession::EOffering :\
-            {\
-            state = _L("EOffering");\
-            break;\
-            }\
-        case CMceSession::EIncoming:\
-            {\
-            state = _L("EIncoming");\
-            break;\
-            }\
-        case CMceSession::EReserving :\
-            {\
-            state = _L("EReserving");\
-            break;\
-            }\
-        case CMceSession::EAnswering :\
-            {\
-            state = _L("EAnswering");\
-            break;\
-            }\
-        case CMceSession::EProceeding :\
-            {\
-            state = _L("EProceeding");\
-            break;\
-            }\
-        case CMceSession::EEstablished:\
-            {\
-            state = _L("EEstablished");\
-            break;\
-            }\
-        case CMceSession::ECancelling:\
-            {\
-            state = _L("ECancelling");\
-            break;\
-            }\
-        case CMceSession::ETerminating:\
-            {\
-            state = _L("ETerminating");\
-            break;\
-            }\
-        case CMceSession::ETerminated:\
-            {\
-            state = _L("ETerminated");\
-            break;\
-            }\
-        default:\
-            {\
-            state = _L("Unknown");\
-            break;\
-            }\
-        }\
-    MUS_LOG_TDESC( "mus: [ENGINE]     Session state is ", state )\
-    }
-
-
-#define MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )\
-    {\
-    MUS_ENG_LOG_SESSION_STATE( aSession )\
-    MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )\
-    }
-
-
-#define MUS_ENG_LOG_STREAM_STATE( aStream )\
-    {\
-    TBuf<20> streamState;\
-    switch ( (aStream).State() )\
-        {\
-        case CMceMediaStream::EUninitialized:\
-            {\
-            streamState = _L("EIdle");\
-            break;\
-            }\
-        case CMceMediaStream::EInitialized:\
-            {\
-            streamState = _L("EInitialized");\
-            break;\
-            }\
-        case CMceMediaStream::EBuffering:\
-            {\
-            streamState = _L("EBuffering");\
-            break;\
-            }\
-        case CMceMediaStream::EIdle:\
-            {\
-            streamState = _L("EIdle");\
-            break;\
-            }\
-        case CMceMediaStream::EStreaming:\
-            {\
-            streamState = _L("EStreaming");\
-            break;\
-            }\
-        case CMceMediaStream::EDisabled:\
-            {\
-            streamState = _L("EDisabled");\
-            break;\
-            }\
-        case CMceMediaStream::ENoResources:\
-            {\
-            streamState = _L("ENoResources");\
-            break;\
-            }\
-        case CMceMediaStream::ETranscodingRequired:\
-            {\
-            streamState = _L("ETranscodingRequired");\
-            break;\
-            }\
-        case CMceMediaStream::ETranscoding:\
-            {\
-            streamState = _L("ETranscoding");\
-            break;\
-            }\
-        default:\
-            {\
-            streamState = _L("Unknown");\
-            break;\
-            }\
-        }\
-        if ( (aStream).Type() == KMceAudio )\
-            {\
-            MUS_LOG_TDESC( "mus: [ENGINE]     AudioStream state is ", streamState )\
-            }\
-        else\
-            {\
-            MUS_LOG_TDESC( "mus: [ENGINE]     VideoStream state is ", streamState )\
-            }\
-        MUS_ENG_LOG_SOURCE_STATE( (aStream).Source() )\
-        MUS_ENG_LOG_SINK_STATES( (aStream) )\
-    }
-
-
-#define MUS_ENG_LOG_SINK_STATES( aStream )\
-    {\
-    for ( TInt sinkIndex = 0; sinkIndex < aStream.Sinks().Count(); ++sinkIndex )\
-        {\
-        MUS_ENG_LOG_SINK_STATE( aStream.Sinks()[ sinkIndex ] )\
-        }\
-    }
-    
-
-#define MUS_ENG_LOG_SOURCE_STATE( aSource )\
-    {\
-    if ( aSource )\
-        {\
-        TBuf<10> sourceState;\
-        if ( aSource->IsEnabled() )\
-            {\
-            sourceState = _L("enabled");\
-            }\
-        else\
-            {\
-            sourceState = _L("disabled");\
-            }\
-        switch ( aSource->Type() )\
-            {\
-            case KMceCameraSource:\
-                {\
-                MUS_LOG_TDESC( "                    CameraSource is ", sourceState )\
-                break;\
-                }\
-            case KMceFileSource:\
-                {\
-                MUS_LOG_TDESC( "                    FileSource is ", sourceState )\
-                break;\
-                }\
-            case KMceRTPSource:\
-                {\
-                MUS_LOG_TDESC( "                    RtpSource is ", sourceState )\
-                break;\
-                }\
-            default:\
-                {\
-                MUS_LOG_TDESC( "                    UnknownSource is ", sourceState )\
-                break;\
-                }\
-            }\
-        }\
-    else\
-        {\
-        MUS_LOG( "                    No source in stream" )\
-        }\
-    }
-
-#define MUS_ENG_LOG_SINK_STATE( aSink )\
-    {\
-    if ( aSink )\
-        {\
-        TBuf<10> sinkState;\
-        if ( aSink->IsEnabled() )\
-            {\
-            sinkState = _L("enabled");\
-            }\
-        else\
-            {\
-            sinkState = _L("disabled");\
-            }\
-        switch ( aSink->Type() )\
-            {\
-            case KMceDisplaySink:\
-                {\
-                MUS_LOG_TDESC( "                    DisplaySink is ", sinkState )\
-                break;\
-                }\
-            case KMceSpeakerSink:\
-                {\
-                MUS_LOG_TDESC( "                    SpeakerSink is ", sinkState )\
-                break;\
-                }\
-            case KMceRTPSink:\
-                {\
-                MUS_LOG_TDESC( "                    RtpSink is ", sinkState )\
-                break;\
-                }\
-            case KMceFileSink:\
-                {\
-                MUS_LOG_TDESC( "                    FileSink is ", sinkState )\
-                break;\
-                }\
-            default:\
-                {\
-                MUS_LOG_TDESC( "                    UnknownSink is ", sinkState )\
-                break;\
-                }\
-            }\
-        }\
-    }
-    
-
-#define MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )\
-    {\
-    MUS_LOG1( "                  StatusCode is %d", aStatusCode )\
-    HBufC16* reasonPhrase = HBufC16::NewLC( aReasonPhrase.Length() );\
-    reasonPhrase->Des().Copy( aReasonPhrase );\
-    MUS_LOG_TDESC( "                  ReasonPhrase is ",(*reasonPhrase) )\
-    CleanupStack::PopAndDestroy( reasonPhrase );\
-    }
-    
-    
-
-#endif // _DEBUG
-
-
-#endif // MUSENGLOGGER_H
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengmcesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSENGMCESESSION_H
-#define MUSENGMCESESSION_H
-
-// USER
-#include "musengcamerahandler.h"
-#include "musengdisplayhandler.h"
-#include "lcsession.h"
-#include "lcaudiocontrol.h"
-#include "svptimerobserver.h"
-
-#include <e32base.h>
-
-
-// FORWARD DECLARATIONS
-class CContactTextField;
-class CPbkContactItem;
-class CPbkContactEngine;
-class MLcSessionObserver;
-class CMusEngLiveVideoPlayer;
-class CMusEngRemoteVideoPlayer;
-class CSVPTimer;
-
-
-// CONSTANTS
-
-_LIT8( KMusEngAcceptContactHeader, 
-       "Accept-Contact: *;+g.3gpp.cs-voice; explicit" );
-_LIT8( KMusAcceptHeader, 
-       "Accept: application/sdp" );
-_LIT8( KMusEngSessionSdpLineXApplication, "a=X-application:com.nokia.rtvs\r\n" );
-_LIT8( KMusEngSessionSdpLineApplication , "a=application:com.gsma.rts\r\n" );
-_LIT8( KMusEngSessionSdpLineType, "a=type:videolive\r\n" );
-_LIT8( KMusEngSessionSdpLineBandwidthLine  , "b=AS:" );
-_LIT8( KMusEngSessionSdpLineBandwidthField  , "b=AS:85\r\n" );
-_LIT8( KMusEngSessionSdpLineTiasLine  , "b=TIAS:" );
-_LIT8( KMusPPreferredIdentity, "P-Preferred-Identity" );
-_LIT8( KMusEngNewLine  , "\r\n" );
-
-const TInt KMusTiasMultiplier = 1000;
-const TUint8 KMusEngRtpKeepAliveTimer = 5;
-const TUint8 KMusEngKeepAlivePayloadTypeVideoH263 = 96;
-const TUint8 KMusEngKeepAlivePayloadTypeAudio = 97;
-const TUint8 KMusEngKeepAlivePayloadTypeVideoAvc = 98;
-
-// CLASS DECLARATION
-
-/**
-* Base class for Multimedia Sharing Engine MCE sessions, inherited by
-* CMusEngLiveSession CMusEngClipSession and CMusEngReceiveSession.
-*
-* CMusEngMceSession encapsulates CMCESession and simplifies use of
-* MCE Sessions to user interface. Also splits observers messy events
-* to simplified function calls.
-*
-* @lib musengine.lib
-*/
-class CMusEngMceSession : public CBase,
-                          public MLcSession,
-                          public MLcAudioControl,
-			  public MMusEngDisplayHandler,
-			  public MSVPTimerObserver
-    {
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngMceSession();
-
-	void SetRemoteL( const TDesC& aRemote );
-
-    public: //  from MSVPTimerObserver
-
-        virtual void TimedOut( TInt aTimerId );       
-
-        
-    public: //  from MMusEngDisplayHandler
-
-        /**
-        * Returns currently assigned drawing area
-        *
-        * @return TRect This session drawing area rectangle
-        */
-        TRect Rect() const;
-        
-        /**
-        * Sets new drawing area
-        *
-        * @param TRect This session new drawing area rectangle
-        */
-        void SetRectL( const TRect& aRect );
-        
-        /**
-        * Sets secondary rect (e.g. viewfinder in twoway session)
-        * @param TRect This session new secondary drawing area rectangle
-        */
-        void SetSecondaryRectL( const TRect& aSecondaryRect );
-        
-        /**
-        * Gets secondary rect.
-        * @return TRect This session secondary drawing area rectangle
-        */
-        virtual TRect SecondaryRect() const;
-            
-        /**
-        * Returns current display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Current display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        TDisplayOrientation OrientationL();
-        
-        /**
-        * Sets display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Sets display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        void SetOrientationL( TDisplayOrientation aOrientation );
-
-        /**
-        * Permission to draw on screen device.
-        * 
-        * @pre Session is ongoing
-        */
-        void EnableDisplayL( TBool aEnable );
-        
-        /**
-        * Implements virtual from MMusEngDisplayHandler
-        *
-        * @pre Session is ongoing
-        */
-        TBool IsDisplayEnabled();
-        
-        /**
-        * Implements virtual from MMusEngDisplayHandler
-        *
-        * @pre Session is ongoing
-        */
-        TBool IsDisplayActive();
-
-        
-    public: // From MMusEngAudioRoutingObserver
-        
-        void AudioRoutingChanged();        
-        
-        
-    public: // From MLcSession
-    
-    	 virtual void UpdateLcSessionL();
-        
-        virtual TLcSessionState LcSessionState() const;
-        
-        void SetLcSessionObserver( MLcSessionObserver* aObserver );
-
-        void SetLcUiProvider( MLcUiProvider* aUiProvider );        
-        
-        virtual MLcVideoPlayer* RemoteVideoPlayer();
-    
-        virtual MLcVideoPlayer* LocalVideoPlayer();       
-       
-        virtual const TDesC& LocalDisplayName();
-    
-        virtual const TDesC& RemoteDisplayName();
-
-        TInt SetParameter( TInt aId, TInt aValue );
-
-        TInt ParameterValue( TInt aId );    
-        
-        TBool IsBackgroundStartup();
-        
-        TInt SetForegroundStatus( TBool aIsForeground );
-        
-        const TDesC& RemoteDetails();
-        
-        TBool SendDialTone( TChar aKey);        
-
-    public: // From MLcAudioControl
-        
-        TBool IsLcAudioMutedL();
-
-        void MuteLcAudioL( TBool aMute );       
-
-        TBool IsLcMicMutedL();    
-
-        void MuteLcMicL( TBool aMute );
-        
-        TBool IsEnablingLcLoudspeakerAllowed();
-
-        void EnableLcLoudspeakerL( TBool aEnabled );
-        
-        TBool IsLcLoudspeakerEnabled();
-
-        TInt LcVolumeL();
-     
-        void SetLcVolumeL( TInt aValue );    
-    
-        void IncreaseLcVolumeL();
-        
-        void DecreaseLcVolumeL();        
-
-        
-    protected: // CONSTRUCTORS
-
-        /**
-        * Constructor
-        *
-        */
-        CMusEngMceSession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-                            
-    protected: // Data
-
-        /**
-        * Drawing area rect.
-        */
-        TRect iRect;
-        
-        /**
-        * ETrue if operator specific behavior is expected
-        */
-        TBool iOperatorVariant;
-
-        /**
-        * Session state for MLcSession 
-        */
-        MLcSession::TLcSessionState iLcSessionState;       
-                                
-        TMusEngCameraHandler iCameraHandler;
-
-        CMusEngLiveVideoPlayer* iLiveVideoPlayer;
-        CMusEngRemoteVideoPlayer* iRemoteVideoPlayer;
-        TRect iSetRemoteRect;
-        TRect iSetLocalRect;
-	CSVPTimer* iTimer;
-    	TLcSessionState lLcSessionState;
-	HBufC* iRemoteAddress;
-
-    private: // Data
-
-        /**
-        * The session observer, if present.
-        */
-        MLcSessionObserver* iLcSessionObserver;
-
-        /**
-        * The UI provider, if present.
-        */        
-        MLcUiProvider* iLcUiProvider;        
-                
-        /**
-        * Value indicates whether session was started in background mode.
-        * (see IsBackgroundStartup()). Once sending of video started, 
-        * iBackground is set to EFalse
-        */
-        TBool iBackground;
-
-
-    };
-    
-#endif // MUSENGMCESESSION_H
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengremotevideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGREMOTEVIDEOPLAYER_H
-#define MUSHENGREMOTEVIDEOPLAYER_H
-
-// INCLUDES
-#include <e32base.h>
-#include "musengvideoplayerbase.h"
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class MLcWindow;
-class MLcAudioControl;
-
-// CLASS DECLARATION
-class CMusEngRemoteVideoPlayer : public CMusEngVideoPlayerBase
-    {
-    public: // Constructors and destructor
-        
-        static CMusEngRemoteVideoPlayer* NewL( MMusEngDisplayHandler& aDisplayHandler,
-                                               MLcAudioControl& aLcAudioControl );
-        
-        ~CMusEngRemoteVideoPlayer();
-     
-        
-    public: // from CMusEngVideoPlayerBase
-        
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        TBool LcIsPlayingL();
-        
-    private: // Constructors
-        
-        CMusEngRemoteVideoPlayer( MMusEngDisplayHandler& aDisplayHandler,
-                                  MLcAudioControl& aLcAudioControl );
-        void ConstructL();
-        
-    private: // Data
-  
-    };
-
-#endif // MUSHENGREMOTEVIDEOPLAYER_H
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengsessionmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef CMUSENGSESSIONMANAGER_H
-#define CMUSENGSESSIONMANAGER_H
-
-// INCLUDES
-#include "lcengine.h"
-#include "mccdatareceiverobserver.h"
-
-// FORWARD DECLARATIONS
-class MLcSession;
-class CMusEngMceSession;
-class MLcUiProvider;
-class CMccDataReceiver;
-class CMccDataSender;
-
-class CMusEngSessionManager : public CLcEngine, public MMccDataReceiverObserver
-    {
-    public:
-    
-        static CMusEngSessionManager* NewL();
-        ~CMusEngSessionManager();
-
-	void DataReceived( const TDataMessage& aData );
-    
-    public: // From CLcEngine
-    
-        MLcSession& Session();       
-        
-    private: // Constructors
-
-        CMusEngSessionManager();
-        void ConstructL();
-               
-    private: // Data
-        
-        CMusEngMceSession* iSession;
-
-        CMccDataReceiver* iMsgReceiver;
-        CMccDataSender* iMsgSender;
-
-    };  
-    
-#endif // CMUSENGSESSIONMANAGER_H
-
-// end of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengtwowayrecvsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYRECVSESSION_H
-#define MUSHENGTWOWAYRECVSESSION_H
-
-// USER
-#include "musengreceivesession.h"
-#include "musunittesting.h"
-#include "mussettings.h"
-#include "musengcamerahandler.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class CMceDisplaySink;
-class CMceStreamBundle;
-class CMusEngLiveVideoPlayer;
-
-
-class CMusEngTwoWayRecvSession : public CMusEngReceiveSession
-    {
-    MUS_UNITTEST( UT_CMusEngTwoWayRecvSession )
-
-    
-    public:
-        /**
-        * Creates new MultimediaSharing two-way receive session.
-        * @return CMusEngTwoWayRecvSession* New instanse of specified class
-        */
-        static CMusEngTwoWayRecvSession* NewL();
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngTwoWayRecvSession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-
-        CMusEngMceSession::TDisplayOrientation OrientationL();
-        
-        void SetOrientationL( TDisplayOrientation aOrientation );
-        
-    public:
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        void SetRectsL( const TRect& aRemoteRect,
-                                 const TRect& aLocalRect );
-   
-        /**
-        * Gets camera handler (can be used for zooming etc.) 
-        */
-        TMusEngCameraHandler& Camera();
- 
-    public: // from MLcSession
-    
-        MLcVideoPlayer* LocalVideoPlayer();        
-        
-    protected: // From CMusEngReceiveSession
-        
-        /**
-        * Sets local rect (viewfinder).
-        * 
-        */
-        void SetSecondaryRectL( const TRect& aSecondaryRect );
-        
-        /**
-        * Gets local rect (viewfinder).
-        * 
-        */
-        TRect SecondaryRect() const;
-        
-        void CompleteSessionStructureL();
-        
-        void RectChangedL();
-   
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngTwoWayRecvSession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-        
-    private:
-        
-        void CompleteSessionStructureAudioPartL( 
-                   const RPointerArray<CMceMediaStream>& aStreams, 
-                   CMceStreamBundle& aLocalBundle, 
-                   CMceMediaStream* aVideoInStream,
-                   CMceMediaStream* aVideoOutStream );
-          
-        void CompleteSessionStructureInStreamL( CMceMediaStream& aVideoInStream, 
-                                                CMceStreamBundle& aLocalBundle );
-          
-        void CompleteSessionStructureOutStreamL( CMceMediaStream& aVideoOutStream );
-        
-
-    private:
-        
-        TRect iLocalRect;
-        
-        TMusEngCameraHandler iCameraHandler;
-        
-        /// The live video player implementing MLcVideoPlayer
-        CMusEngLiveVideoPlayer* iLiveVideoPlayer;  
-        
-        TRect iSetRemoteRect;
-        TRect iSetLocalRect;
-       
-    };
-
-#endif
-
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengtwowaysession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYSESSION_H
-#define MUSHENGTWOWAYSESSION_H
-
-// USER
-#include "musengmcesession.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class MMusEngLiveSessionObserver;
-class CMceDisplaySink;
-class MMusEngTwoWaySessionObserver;
-class CMusEngRemoteVideoPlayer;
-
-
-class CMusEngTwoWaySession : public CMusEngMceSession
-    {    
-    public:
-        /**
-        * Creates new MultimediaSharing Live session.
-        * @return CMusEngTwoWaySession* New instanse of specified class
-        */
-        static CMusEngTwoWaySession* NewL();
-
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngTwoWaySession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-
-        void SetOrientationL( MMusEngDisplayHandler::TDisplayOrientation aOrientation );
-
-        void EstablishLcSessionL();
-        
-        void TerminateLcSessionL();        
-        
-        MLcVideoPlayer* RemoteVideoPlayer();
-    public:
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        void SetRectsL( const TRect& aRemoteRect,
-                        const TRect& aLocalRect );
-        
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngTwoWaySession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-
-    };
-
-#endif
-
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/musengvideoplayerbase.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGVIDEOPLAYERBASE_H
-#define MUSHENGVIDEOPLAYERBASE_H
-
-// INCLUDES
-#include <e32base.h>
-#include "lcvideoplayer.h"
-#include "lcwindow.h"
-
-// FORWARD DECLARATIONS
-class TMusEngCameraHandler;
-class MMusEngDisplayHandler;
-
-// CLASS DECLARATION
-class CMusEngVideoPlayerBase : 
-    public CBase, public MLcVideoPlayer, public MLcWindow
-    {
-    public: // Constructors and destructor
-        
-        ~CMusEngVideoPlayerBase();
-        
-    public: // From MLcVideoPlayer
-    
-        virtual void LcPlayL(MLcVideoPlayer::TLcVideoPlayerSource aSource);
-
-        
-        virtual void LcPauseL();        
-        
-        MLcWindow* LcWindow();
-
-        virtual MLcCameraControl* LcCameraControl();
-        
-        virtual MLcSourceFileControl* LcSourceFileControl();
-        
-        virtual MLcDestinationFileControl* LcDestinationFileControl();
-        
-        MLcAudioControl* LcAudioControl();
-    
-        virtual MLcZoomControl* LcZoomControl();
-    
-        virtual MLcBrightnessControl* LcBrightnessControl();
-    
-    public: // from MLcWindow
-        
-        void EnableLcWindowL( TBool aEnable );
-        
-        TBool IsLcWindowEnabled();        
-        
-        void SetLcWindowRectL( TRect aRect );
-        
-        TRect LcWindowRect();
-        
-        void SetLcWindowOrientationL( 
-            TLcWindowOrientation aOrientation );
-        
-        TLcWindowOrientation LcWindowOrientationL();    
-        
-    protected: // Constructors
-        
-        CMusEngVideoPlayerBase(
-            MMusEngDisplayHandler& aDisplayHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-    protected: // Data
-        
-        MMusEngDisplayHandler& iDisplayHandler;
-        MLcAudioControl& iLcAudioControl;
-    };
-
-#endif // MUSHENGVIDEOPLAYERBASE_H
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/svptimer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Timer services for SVP
-*
-*/
-
-
-
-#ifndef SVPTIMER_H
-#define SVPTIMER_H
-
-#include <e32base.h>
-
-class MSVPTimerObserver;
-
-/**
- *  SVP timer
- *
- *  Provides timer service for SVP 
- *
- *  @lib 
- *  @since S60 3.2
- */
-class CSVPTimer : public CTimer
-    {
-
-public:
-
-    /**
-    * Two-phased constructor.
-    */
-    static CSVPTimer* NewL( MSVPTimerObserver& aObserver,
-                            TInt aTimerId );
-    
-    /**
-    * Destructor.
-    */
-    virtual ~CSVPTimer();
-
-public: // new methods
-
-    /**
-    * Sets the timer to be fired after given number of milliseconds.
-    * @since Series 60 3.2
-    * @param aMilliSeconds Time in milliseconds 
-    * @return 
-    */
-    void SetTime( TInt aMilliSeconds );
-
-    /**
-    * Stops the timer.
-    * @since Series 60 3.2
-    * @return 
-    */
-    void Stop();
-
-    /**
-    * Returns the Timer ID
-    * @since Series 60 3.2
-    * @return TInt The timer ID.
-    */
-    TInt Id() const;
-    
-public: // methods from base classes
-
-    /**
-    * From CActive Called when an aychronic request is completed.
-    * @since Series 60 3.0
-    * @param None
-    * @return None
-    */
-    void RunL();
-
-private:
-
-    /**
-    * C++ default constructor.
-    */
-    CSVPTimer( MSVPTimerObserver& aObserver, TInt aTimerId );
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private: // data
-    
-    /**
-    * Reference to the observer.
-    */
-    MSVPTimerObserver& iObserver;
-  
-    /**
-    * The timer ID, given to observer when the timer fires.
-    * Timers can be identifies with this ID.
-    */
-    TInt iId;
-		
-    };
-
-#endif // SVPTIMER_H
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/svptimerobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Observer for SVP timer
-*
-*/
-
-
-#ifndef SVPTIMEROBSERVER_H
-#define SVPTIMEROBSERVER_H
-
-#include<e32base.h>
-
-/**
- *  SVP timer observer
- *
- *  Observer for SVP timer
- *
- *  @lib 
- *  @since S60 3.2
- */
-class MSVPTimerObserver
-    {
-
-public: // New functions
-        
-    /**
-    * Notifies, that the previously set timer has now expired.
-    * Implemented by the class using the timer.
-    * @since Series 60 3.2
-    * @param TInt aTimerId The ID of the timer. Observer can identify 
-    * timers from each other with this ID.
-    * @return 
-    */
-    virtual void TimedOut( TInt aTimerId ) = 0;       
-    				
-  		
-    };
-
-#endif // SVPTIMEROBSERVER_H
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/install/lcui_update_udeb.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-; A package file for creating an installation file for Multimediasharing 
-; which updates Multimediasharing binaries from ROM (eclipsing)
-
-; Supported languages
-&EN
-
-; Header
-#{"MultimediaSharing"},(0x10282491),1,0,0,TYPE=PU
-
-; Localised Vendor name
-%{"Symbian"}
-
-; Unique Vendor name
-:"Symbian"
-
-; -----------------------------------------------------------------------------------
-
-;Multimediasharing binaries
-
-; User interface DOCMLs
-"\epoc32\data\z\data\others\lcidleview.docml"-"!:\data\others\lcidleview.docml"
-"\epoc32\data\z\data\others\lcreceiveview.docml"-"!:\data\others\lcreceiveview.docml"
-"\epoc32\data\z\data\others\lcsendview.docml"-"!:\data\others\lcsendview.docml"
-"\epoc32\data\z\data\others\lctwowayview.docml"-"!:\data\others\lctwowayview.docml"
-"\epoc32\data\z\data\others\lcvtview.docml"-"!:\data\others\lcvtview.docml"
-"\epoc32\data\z\data\others\lcreceiveonlyview.docml"-"!:\data\others\lcreceiveonlyview.docml"
-
-; Engine
-;"\epoc32\release\armv5\udeb\musengineplugin.dll"-"!:\sys\bin\musengineplugin.dll"
-;"\epoc32\data\z\resource\plugins\musengineplugin.rsc"-"!:\resource\plugins\musengineplugin.rsc"
-
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/install/lcui_update_urel.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-; A package file for creating an installation file for Multimediasharing 
-; which updates Multimediasharing binaries from ROM (eclipsing)
-
-; Supported languages
-&EN
-
-; Header
-#{"MultimediaSharing"},(0x10282491),1,0,0,TYPE=PU
-
-; Localised Vendor name
-%{"Symbian"}
-
-; Unique Vendor name
-:"Symbian"
-
-; -----------------------------------------------------------------------------------
-
-;Multimediasharing binaries
-
-; User interface XMLs
-"\epoc32\data\z\data\others\lcidleview.docml"-"!:\data\others\lcidleview.docml"
-"\epoc32\data\z\data\others\lcreceiveview.docml"-"!:\data\others\lcreceiveview.docml"
-"\epoc32\data\z\data\others\lcsendview.docml"-"!:\data\others\lcsendview.docml"
-"\epoc32\data\z\data\others\lctwowayview.docml"-"!:\data\others\lctwowayview.docml"
-"\epoc32\data\z\data\others\lcvtview.docml"-"!:\data\others\lcvtview.docml"
-"\epoc32\data\z\data\others\lcreceiveonlyview.docml"-"!:\data\others\lcreceiveonlyview.docml"
-
-; Engine
-;"\epoc32\release\armv5\urel\musengineplugin.dll"-"!:\sys\bin\musengineplugin.dll"
-;"\epoc32\data\z\resource\plugins\musengineplugin.rsc"-"!:\resource\plugins\musengineplugin.rsc"
-
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/install/sis_update_udeb.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:
-rem
-
-makesis lcui_update_udeb.pkg udeb_lcui_update.sis
-
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/install/sis_update_urel.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:
-rem
-
-makesis lcui_update_urel.pkg urel_lcui_update.sis
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/mccdatareceiver.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-        
-// INCLUDE FILES
-#include "mccdatareceiver.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::CMccDataReceiver
-// -----------------------------------------------------------------------------
-//
-CMccDataReceiver::CMccDataReceiver( MMccDataReceiverObserver& aObserver )
-	: CActive( EPriorityStandard ), iObserver( &aObserver )
-	{
-	CActiveScheduler::Add(this);
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMccDataReceiver::ConstructL()
-    {
-
-    TInt err = iMsgQueue.CreateGlobal(_L("IP-VT-Queue2"), 5, EOwnerProcess );
-    if ( err )
-        {
-        User::LeaveIfError( iMsgQueue.OpenGlobal(_L("IP-VT-Queue2")));
-        }
-
-    iMsgQueue.ReceiveBlocking( iInitData );
-
-    iMsgQueue.NotifyDataAvailable( iStatus );
-    SetActive();
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::NewL
-// -----------------------------------------------------------------------------
-//
-CMccDataReceiver* CMccDataReceiver::NewL( MMccDataReceiverObserver& aObserver )
-    {
-    CMccDataReceiver* self = 
-    	new ( ELeave ) CMccDataReceiver( aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-	
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::~CMccDataReceiver
-// -----------------------------------------------------------------------------
-//
-CMccDataReceiver::~CMccDataReceiver()
-    {
-    Cancel();
-	iMsgQueue.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CMccDataReceiver::DoCancel()
-	{
-	iMsgQueue.CancelDataAvailable();	
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::RunL
-// -----------------------------------------------------------------------------
-//	
-void CMccDataReceiver::RunL()
-	{
-	TDataMessage buffer;
-	iMsgQueue.Receive( buffer );
-	iObserver->DataReceived( buffer );
-        iMsgQueue.NotifyDataAvailable( iStatus );
-        SetActive();
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::RunError
-// -----------------------------------------------------------------------------
-//	
-TInt CMccDataReceiver::RunError(TInt /*aError*/)
-	{
-	return KErrNone;
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/mccdatasender.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-        
-// INCLUDE FILES
-#include "mccdatasender.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::CMccDataSender
-// -----------------------------------------------------------------------------
-//
-CMccDataSender::CMccDataSender( )
-	: CActive( EPriorityStandard )
-	{
-	CActiveScheduler::Add(this);
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMccDataSender::ConstructL()
-    {
-    TInt err = iMsgQueue.CreateGlobal(_L("IP-VT-Queue1"), 5, EOwnerProcess );
-    if ( err )
-        {
-        User::LeaveIfError( iMsgQueue.OpenGlobal(_L("IP-VT-Queue1")));
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::NewL
-// -----------------------------------------------------------------------------
-//
-CMccDataSender* CMccDataSender::NewL( )
-    {
-    CMccDataSender* self = 
-    	new ( ELeave ) CMccDataSender();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::Send
-// -----------------------------------------------------------------------------
-//
-void CMccDataSender::Send( const TDataMessage& aData )
-{	
-    TInt err = iMsgQueue.Send( aData );
-    
-    if ( err == KErrOverflow )
-        {
-        if ( !IsActive() )
-            {
-            iBuffer = aData;            
-            iMsgQueue.NotifySpaceAvailable( iStatus );    
-    	    SetActive();
-            }
-        else
-            {
-            // TODO
-            // BUFFER OR DROP
-            }
-        }
-	}
-	
-// -----------------------------------------------------------------------------
-// CMccDataSender::~CMccDataSender
-// -----------------------------------------------------------------------------
-//
-CMccDataSender::~CMccDataSender()
-    {
-    Cancel();
-	iMsgQueue.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CMccDataSender::DoCancel()
-	{
-	iMsgQueue.CancelSpaceAvailable();	
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::RunL
-// -----------------------------------------------------------------------------
-//	
-void CMccDataSender::RunL()
-	{
-    iMsgQueue.Send( iBuffer );
-    iBuffer.iDataId = EUninitialized;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::RunError
-// -----------------------------------------------------------------------------
-//	
-TInt CMccDataSender::RunError(TInt /*aError*/)
-	{
-	return KErrNone;
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengcamerahandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,227 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengcamerahandler.h"
-#include "musenglogger.h"
-
-
-// SYSTEM
-#include <e32base.h>
-
-const TInt KMaxBrightness = 100;
-const TInt KMinBrightness = -100;
-const TInt KBrightnessStepSize = 10;
-
-
-//Number of big and small zoom steps on Zoom scale
-const TInt KZoomBigStepCount = 15;
-const TInt KZoomSmallStepCount = KZoomBigStepCount*2;
-const TInt KZoomStepMinSize = 1;
-
-const TInt64 KZoomFasterTime = 333333; // 1/3 second
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TMusEngCameraHandler::TMusEngCameraHandler() :
-    iDefaultBrightness( 0 ),
-    iZoomInTime(0),
-    iZoomOutTime(0),
-    iSmallZoomStep( KZoomStepMinSize ),
-    iBigZoomStep( KZoomStepMinSize ),
-    iCurrentCamera( TMusEngCameraHandler::ECameraNotAvailable )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcCameraCountL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcCameraCountL()" )
-    
-    return 2;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::CurrentLcCameraIndex()
-    {
-    return iCurrentCamera;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::ToggleLcCameraL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::ToggleLcCamera()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MinLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MinLcBrightnessL()" )
- 
-    // minimum brightness is not in camera info, but a constant
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MinLcBrightnessL(): %d",
-              KMinBrightness )
-
-    return KMinBrightness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MaxLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MaxLcBrightnessL()" )
-    
-    // maximum brightness is not in camera info, but a constant
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MaxLcBrightnessL(): %d",
-              KMaxBrightness )
-
-    return KMaxBrightness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcBrightnessL()" )
-    
-    return 5;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetLcBrightnessL( TInt aValue )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> TMusEngCameraHandler::SetLcBrightnessL( %d )",
-              aValue )
-
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::SetLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::IncreaseLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::IncreaseLcBrightnessL()" )
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::IncreaseLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::DecreaseLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::DecreaseLcBrightnessL()" )
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::DecreaseLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MinLcZoomL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MinLcZoomL()" )
-
-    return 1;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MaxLcZoomL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MaxLcZoomL()" )
-
-    return 10;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcZoomValueL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomValueL" )
-
-
-    return 5;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetLcZoomValueL( TInt aValue )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> TMusEngCameraHandler::SetLcZoomValueL( %d )", 
-              aValue )
-                  
-    MUS_LOG( "mus: [ENGINE]  <- MusEngCameraHandler::SetLcZoomValueL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::LcZoomInL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomInL()" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::LcZoomInL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::LcZoomOutL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomOutL()" )
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::LcZoomOutL()" )
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengclipvideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,535 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musengclipvideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengmceutils.h"
-#include "musengdisplayhandler.h"
-#include "muslogger.h"
-
-// SYSTEM
-#include <mcesession.h>
-#include <mcevideostream.h>
-#include <mcefilesource.h>
-#include <drmcommon.h>
-
-// CONSTANTS
-const TInt64 KMicroSecondsInOneSecond = 1000000;
-const TInt KFastWindingFactor = 4;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer* CMusEngClipVideoPlayer::NewL( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngClipVideoPlayer( 
-        aDisplayHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer::CMusEngClipVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngLocalVideoPlayer( aDisplayHandler, aLcAudioControl )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer::~CMusEngClipVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::HasClipEnded()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::HasClipEnded" )
-
-    TBool hasClipEnded( EFalse );
-
-    if ( iMceSession )
-        {    
-        CMceVideoStream* videoOut = NULL;
-        
-        TRAPD( err, 
-               videoOut = MusEngMceUtils::GetVideoOutStreamL( *iMceSession ) );
-        if ( err != KErrNone ) 
-            {
-            MUS_LOG1( "mus: [ENGINE]     Error in GetVideoOutStreamL %d", err )
-            return EFalse;
-            }
-
-        CMceFileSource* filesource = NULL;
-        TRAP( err, filesource = MusEngMceUtils::GetFileSourceL( *iMceSession ) )
-
-        if ( err == KErrNone )
-            {
-            TTimeIntervalMicroSeconds position;
-            TTimeIntervalMicroSeconds duration;
-            TRAP( err, position = filesource->PositionL() );
-            TRAPD( err2, duration = filesource->DurationL() );
-            if ( err != KErrNone || err2 != KErrNone )
-                {
-                return EFalse;
-                }
-                
-            MUS_LOG2( "mus: [ENGINE]    position = %Ld, duration = %Ld", 
-                      position.Int64(), duration.Int64() )
-                        
-            hasClipEnded = 
-                ( position.Int64() == 0 && 
-                  !filesource->IsEnabled() && 
-                  videoOut->State() == CMceMediaStream::EDisabled );
-            }
-        }
-
-    if ( hasClipEnded )
-        {
-        iDelayFileEndingPos = 0;
-        }
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::HasClipEnded" )
-    
-    return hasClipEnded;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetBufferingPeriod( 
-    const TTimeIntervalMicroSeconds& aPeriod )
-    {
-    iBufferingPeriod = aPeriod;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::LcIsPlayingL()
-    {
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    return ( MusEngMceUtils::GetFileSourceL( *iMceSession )->IsEnabled() );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcPlayL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::LcPlayL" )
-    
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );    
-    
-    if ( !file->IsEnabled() )
-        {
-        file->EnableL();   
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::LcPlayL" )    
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcPauseL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::LcPauseL" )
-    
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );    
-    
-    if ( file->IsEnabled() )
-        {
-        file->DisableL();
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::LcPauseL" )   
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcSourceFileControl* CMusEngClipVideoPlayer::LcSourceFileControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetLcFileNameL( const TFileName& aFileName )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::SetLcFileNameL" )
-    
-    __ASSERT_ALWAYS( !IsProtectedFileL( aFileName ),
-                     User::Leave( KErrPermissionDenied ) );    
-
-    if ( iMceSession )
-        {
-        CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-        file->UpdateL( aFileName );
-        }
-    
-    iFileName = aFileName;
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::SetLcFileNameL" )    
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TFileName& CMusEngClipVideoPlayer::LcFileName()
-    {
-    return iFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// Since MCE does not at the moment support SetFastForwardL function, this
-// functionality is implemented by taking a timestamp when forwarding is
-// started and calculating a new position when it is ended.
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcFastForwardL( TBool aUseFFWD )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::FastForward( %d )", 
-              aUseFFWD )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    if ( aUseFFWD )
-        {
-        // Ignore if we are already fastforwarding
-        if ( iFFWDStartTime.Int64() > 0 )
-            {
-            return;
-            }
-
-        // Stop rewinding if ongoing, else just pause file source
-        if ( iFRWDStartTime.Int64() > 0 )
-            {
-            LcFastRewindL( EFalse );
-            }
-        else
-            {
-            file->DisableL();
-            }
-            
-        // Get timestamp for starttime
-        iFFWDStartTime.HomeTime();
-        }
-    else
-        {
-        // Leave if we are not fastforwarding
-        if ( iFFWDStartTime.Int64() == 0 )
-            {
-            User::Leave( KErrAlreadyExists );
-            }
-
-        // Set new position
-        file->SetPositionL( PositionMicroSecondsL( ETrue ) );
-        
-        // Reset timer
-        iFFWDStartTime = TTime( 0 );
-        }
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::FastForward" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// Since MCE does not at the moment support SetFastRewindL function, this
-// functionality is implemented by taking a timestamp when rewinding is
-// started and calculating a new position when it is ended.
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcFastRewindL( TBool aUseFRWD )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::FastRewind( %d )", 
-              aUseFRWD )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    if ( aUseFRWD )
-        {
-        // Ignore if we are already fastrewinding
-        if ( iFRWDStartTime.Int64() > 0 )
-            {
-            return;
-            }
-
-        // Stop fastforwarding if ongoing, else just pause file source
-        if ( iFFWDStartTime.Int64() > 0 )
-            {
-            LcFastForwardL( EFalse );
-            }
-        else
-            {
-            file->DisableL();
-            }
-            
-        // Get timestamp for starttime
-        iFRWDStartTime.HomeTime();
-        }
-    else
-        {
-        // Leave if we are not fastrewinding
-        if ( iFRWDStartTime.Int64() == 0 )
-            {
-            User::Leave( KErrAlreadyExists );
-            }
-
-        // Set new position
-        file->SetPositionL( PositionMicroSecondsL( ETrue ) );
-        
-        // Reset timer
-        iFRWDStartTime = TTime( 0 );
-        }
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::FastRewind" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalSeconds CMusEngClipVideoPlayer::LcFileDurationL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::DurationL" )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds duration = file->DurationL();
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::DurationL" )
-    
-    return TTimeIntervalSeconds( static_cast< TInt >( 
-        duration.Int64() / KMicroSecondsInOneSecond ) );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalSeconds CMusEngClipVideoPlayer::LcFilePositionL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::LcFilePositionL" )
-    
-    TTimeIntervalMicroSeconds currentPosition = PositionMicroSecondsL();
-    
-    MUS_LOG1( "mus: [ENGINE] <- CMusEngClipVideoPlayer::LcFilePositionL, %d", 
-              currentPosition.Int64() )
-    
-    return TTimeIntervalSeconds( static_cast< TInt >( 
-        currentPosition.Int64() / KMicroSecondsInOneSecond ) );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetLcFilePositionL( 
-    const TTimeIntervalSeconds& aPosition )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::SetPositionL ( %d )",
-              aPosition.Int() )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds position( 
-        KMicroSecondsInOneSecond * static_cast< TInt64 >( aPosition.Int() ) );
-
-    if ( position == 0 )
-        {
-        iRewindedToBeginning = ETrue;
-        }
-        
-    file->SetPositionL( position );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::SetPositionL ()" )
-    }
-
-// -----------------------------------------------------------------------------
-// Check is file DRM protected.
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::IsProtectedFileL( const TDesC& aClipFile )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::IsProtectedFileL(...)" )
-
-    TBool isDRMProtected = EFalse;
-    DRMCommon* drmapi = DRMCommon::NewL();
-    CleanupStack::PushL( drmapi );
-
-    User::LeaveIfError( drmapi->Connect() );
-    //Check DRM file protection
-    User::LeaveIfError( drmapi->IsProtectedFile( aClipFile, isDRMProtected ) );
-    drmapi->Disconnect();
-
-    CleanupStack::PopAndDestroy( drmapi );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::IsProtectedFileL(...)" )
-    return isDRMProtected;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalMicroSeconds CMusEngClipVideoPlayer::PositionMicroSecondsL( 
-    TBool aActualPosition )
-    {
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds position = file->PositionL();
-    TTimeIntervalMicroSeconds duration = file->DurationL();
-       
-    TTimeIntervalMicroSeconds calculatedPosition;
-    
-    // Adjust position if we are fastforwarding or -rewinding
-    if ( iFFWDStartTime.Int64() != 0 )
-        {
-        TTime now;
-        now.HomeTime();
-        calculatedPosition = KFastWindingFactor *
-                             now.MicroSecondsFrom( iFFWDStartTime ).Int64() +
-                             position.Int64();
-        if ( calculatedPosition > duration )
-            {
-            calculatedPosition = duration;
-            }
-        }
-    else if ( iFRWDStartTime.Int64() != 0 )
-        {
-        TTime now;
-        now.HomeTime();
-        calculatedPosition = position.Int64() -
-                             KFastWindingFactor *
-                             now.MicroSecondsFrom( iFRWDStartTime ).Int64();
-        if ( calculatedPosition < 0 )
-            {
-            calculatedPosition = 0;
-            }
-            
-        if ( calculatedPosition == 0 )
-            {
-            iRewindedToBeginning = ETrue;
-            }
-        }
-    else
-        {
-        calculatedPosition = position;
-        }
-    
-    if ( !aActualPosition )
-        {
-        calculatedPosition = 
-            GetVideoSinkRelativeFilePos( calculatedPosition, duration );
-        }
-        
-    return calculatedPosition;
-    }
-
-// -----------------------------------------------------------------------------
-// Modifies file position if position has reached end before clip has ended.
-// File position is not going in sync with local video playback as playback
-// buffers media before starting playing.
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalMicroSeconds CMusEngClipVideoPlayer::GetVideoSinkRelativeFilePos( 
-    const TTimeIntervalMicroSeconds& aActualPosition, 
-    const TTimeIntervalMicroSeconds& aDuration )
-    { 
-    MUS_LOG1( "mus: [ENGINE] PositionMicroSecondsL, pos before mod:%d", 
-              aActualPosition.Int64() )
-    
-    TTimeIntervalMicroSeconds tempCalculatedPosition( aActualPosition );
-    
-    if ( iDelayFileEndingPos != 0 )
-        {
-        iDelayFileEndingPos = aDuration;
-        tempCalculatedPosition = iDelayFileEndingPos;
-        }
-    else
-        {
-        // FRWD can go to zero even if clip has not ended, do not modify 
-        // time in such situation.
-        if ( aActualPosition == 0 && 
-             !HasClipEnded() && 
-             iFRWDStartTime.Int64() == 0 && 
-             !iRewindedToBeginning )
-            {
-            const TInt KMusDelayEndingModifier = 2;
-            iDelayFileEndingPos = aDuration.Int64() - 
-                iBufferingPeriod.Int64() / KMusDelayEndingModifier;
-            tempCalculatedPosition = iDelayFileEndingPos;
-            if ( iPreviousPos > tempCalculatedPosition )
-                {
-                tempCalculatedPosition = iPreviousPos;
-                }
-            }
-        else
-            {
-            iDelayFileEndingPos = 0;
-            }
-        
-        if ( iRewindedToBeginning && aActualPosition > 0 )
-            {
-            iRewindedToBeginning = EFalse;
-            }
-            
-        if ( tempCalculatedPosition < 0 )
-            {
-            tempCalculatedPosition = 0;
-            }
-        }
-    
-    iPreviousPos = tempCalculatedPosition;
-            
-    return tempCalculatedPosition;
-    }
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musenginepluginentry.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "musengsessionmanager.h"
-#include <ECom.h>
-#include <ImplementationProxy.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TImplementationProxy KMusEnginePluginImplementationTable[] =
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x20021341, CMusEngSessionManager::NewL )
-    };
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
-    {
-    aTableCount = sizeof( KMusEnginePluginImplementationTable ) /
-                  sizeof( TImplementationProxy );
-
-    return KMusEnginePluginImplementationTable;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musenglivesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musenglivesession.h"
-#include "lcsessionobserver.h"
-#include "musenglogger.h"
-#include "musengremotevideoplayer.h"
-#include "musenglivevideoplayer.h"
-#include "svptimer.h"
-
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds
-// 6 seconds keepalive timer, needs to be more than receiving timeout
-const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6; 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveSession* CMusEngLiveSession::NewL()
-    {
-    CMusEngLiveSession* self = new( ELeave )CMusEngLiveSession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveSession::~CMusEngLiveSession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::~CMusEngLiveSession()" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::~CMusEngLiveSession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngLiveSession::EnableDisplayL() %d", 
-              aEnable )
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngLiveSession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngLiveSession::SetOrientationL() %d", 
-              aOrientation )
-                  
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::SetOrientationL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::SetRectsL()" )  
-         
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::SetRectsL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveSession::CMusEngLiveSession() 
-    : CMusEngMceSession()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ConstructL()" )
-    
-    CMusEngMceSession::ConstructL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::EstablishLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::EstablishLcSessionL" )
-
-    iTimer = CSVPTimer::NewL( *this, 1 ); 
-    iTimer->SetTime(2000);
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::EstablishLcSessionL" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::TerminateLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::TerminateLcSessionL" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::TerminateLcSessionL" )
-    }
-
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musenglivevideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglivevideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengdisplayhandler.h"
-#include "musenglogger.h"
-
-// SYSTEM
-#include <e32base.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer* CMusEngLiveVideoPlayer::NewL( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    TMusEngCameraHandler& aCameraHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngLiveVideoPlayer( 
-        aDisplayHandler, aCameraHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer::CMusEngLiveVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    TMusEngCameraHandler& aCameraHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngLocalVideoPlayer( aDisplayHandler, aLcAudioControl ),
-    iCameraHandler( aCameraHandler )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer::~CMusEngLiveVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveVideoPlayer::LcIsPlayingL()
-    {
-//    return iCameraHandler.IsPlayingL();
-    return ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcPlayL()
-    {
-//    iCameraHandler.PlayL();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcPauseL()
-    {
-//    iCameraHandler.PauseL();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngLiveVideoPlayer::LcCameraControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcDestinationFileControl* CMusEngLiveVideoPlayer::LcDestinationFileControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngLiveVideoPlayer::LcZoomControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngLiveVideoPlayer::LcBrightnessControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::SetLcFileNameL( const TFileName& aFileName )
-    {
-    iFileName = aFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-TFileName& CMusEngLiveVideoPlayer::LcFileName()
-    {
-    return iFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcDestinationFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcRecordL( TBool aRecord )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngLiveVideoPlayer::LcRecordL(( %d )", 
-              aRecord )    
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveVideoPlayer::LcRecordL" ) 
-    }    
-
-// -----------------------------------------------------------------------------
-// From MLcDestinationFileControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveVideoPlayer::LcIsRecording()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveVideoPlayer::LcIsRecording()" )    
-    
-    TBool isEnabled( EFalse );
-                 
-    return isEnabled;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musenglocalvideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglocalvideoplayer.h"
-#include "musengdisplayhandler.h"
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLocalVideoPlayer::CMusEngLocalVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngVideoPlayerBase( aDisplayHandler, aLcAudioControl )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLocalVideoPlayer::~CMusEngLocalVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState 
-CMusEngLocalVideoPlayer::LcVideoPlayerState() const
-    {
-    return MLcVideoPlayer::EPlaying;
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngLocalVideoPlayer::SetLcWindowRectL( TRect aRect )
-    {
-    iDisplayHandler.SetSecondaryRectL( aRect );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngLocalVideoPlayer::LcWindowRect()
-    {
-    return iDisplayHandler.SecondaryRect();
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengmcesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,662 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengmcesession.h"
-#include "lcsessionobserver.h"
-#include "musenglogger.h"
-#include "lcuiprovider.h"
-#include "lcvideoplayer.h"
-#include "musengremotevideoplayer.h"
-#include "musenglivevideoplayer.h"
-
-// SYSTEM
-#include <audiopreference.h>
-#include <e32property.h>
-
-#include <cntitem.h>
-#include <cntfield.h>
-#include <cntdef.h>
-
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::CMusEngMceSession()
-    {
-    iBackground = IsBackgroundStartup();
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::ConstructL()" )
-    
-    iLiveVideoPlayer = CMusEngLiveVideoPlayer::NewL( *this, iCameraHandler, *this );      
-    iLcSessionState = MLcSession::EUninitialized;
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::~CMusEngMceSession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::~CMusEngMceSession()" )
-
-    delete iRemoteAddress;
-    delete iRemoteVideoPlayer; 
-    delete iLiveVideoPlayer;            
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::~CMusEngMceSession()" )
-    }
-	
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngMceSession::Rect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::Rect()" )
-    return iRect;
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetRectL( const TRect& aRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  CMusEngSession::SetRectL()" )
-    iRect = aRect;
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::SetSecondaryRectL()" )
-    
-    // Same rect is set by primary and secondary setters
-    iRect = aSecondaryRect;
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngMceSession::SecondaryRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::SecondaryRect()" )
-    return iRect;
-    }
-
-#if 0
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetSecondaryRectL()" )
-    
-    iLocalRect = aSecondaryRect;
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetSecondaryRectL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngTwoWaySession::SecondaryRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SecondaryRect()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SecondaryRect()" )
-    return iLocalRect;
-    }
-
-#endif
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-MMusEngDisplayHandler::TDisplayOrientation CMusEngMceSession::OrientationL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::RotationL()" )           
-    return MMusEngDisplayHandler::EPortrait;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngMceSession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngMceSession::SetOrientationL() %d", 
-              aOrientation )
-              
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::SetOrientationL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngMceSession::EnableDisplay() %d", 
-              aEnable )
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::EnableDisplay()")
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsDisplayEnabled()
-    {
-    TBool enabled( EFalse );
-    return enabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsDisplayActive()
-    {
-    return ( IsDisplayEnabled() );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession 
-// -----------------------------------------------------------------------------
-//
-MLcSession::TLcSessionState CMusEngMceSession::LcSessionState() const
-    {
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::LcSessionState()" )
-
-    TLcSessionState lcSessionState = MLcSession::EUninitialized;
-
-/*
-    if ( iSession )
-        {
-        switch( iSession->State() )
-            {
-            case CMceSession::EIdle: 
-                {
-                lcSessionState = MLcSession::EInitialized;
-                break;
-                }
-            case CMceSession::EIncoming:
-            case CMceSession::EProceeding:
-            case CMceSession::EReserving:
-                {
-                lcSessionState = MLcSession::EReceived;
-                break;
-                }
-            
-            case CMceSession::EOffering:
-            case CMceSession::EAnswering:
-                {
-                lcSessionState = MLcSession::EOpening;
-                break;
-                }
-            case CMceSession::EEstablished:
-                {
-                lcSessionState = MLcSession::EOpen;
-                break;
-                }
-            case CMceSession::ECancelling:
-            case CMceSession::ETerminating:
-                {
-                lcSessionState = MLcSession::EClosing;
-                break;
-                }
-            case CMceSession::ETerminated:
-                {
-                lcSessionState = MLcSession::EClosed;
-                break;
-                }
-            default:
-               {
-               lcSessionState = MLcSession::EUninitialized;
-               break;
-               }
-            }
-        }
-*/
-
-    return  iLcSessionState;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcSessionObserver( MLcSessionObserver* aObserver )
-    {
-    iLcSessionObserver = aObserver;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcUiProvider( MLcUiProvider* aUiProvider )
-    {
-    iLcUiProvider = aUiProvider;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngMceSession::RemoteVideoPlayer()
-    {
-    return iRemoteVideoPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngMceSession::LocalVideoPlayer()
-    {
-    return iLiveVideoPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::LocalDisplayName()
-    {
-    return KNullDesC;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::RemoteDisplayName()
-    {
-    return *iRemoteAddress;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::SetParameter( TInt /*aId*/, TInt /*aValue*/ )
-    {
-    return KErrNotSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::ParameterValue( TInt /*aId*/ )
-    {
-    return KErrNotSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsBackgroundStartup()
-    {    
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcAudioMutedL()
-    {    
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::MuteLcAudioL( TBool aMute )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcMicMutedL()
-    {
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::MuteLcMicL( TBool aMute )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsEnablingLcLoudspeakerAllowed()
-    {
-    return ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::EnableLcLoudspeakerL( TBool aEnabled )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcLoudspeakerEnabled()
-    {
-    return ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::LcVolumeL()
-    {
-    return 5;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcVolumeL( TInt aValue )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::IncreaseLcVolumeL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::DecreaseLcVolumeL()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::TimedOut( TInt aTimerId )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut()" )
-
-    iLcSessionState = MLcSession::EOpen;
-
-    if ( iLcSessionObserver )
-        {
-    	MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), StateChanged" )
-        iLcSessionObserver->StateChanged( *this );
-        }
-
-/*
-        switch( aTimerId )
-            {
-            case CMceSession::EIdle: 
-                {
-                lcSessionState = MLcSession::EInitialized;
-                break;
-                }
-            case CMceSession::EIncoming:
-            case CMceSession::EProceeding:
-            case CMceSession::EReserving:
-                {
-                lcSessionState = MLcSession::EReceived;
-                break;
-                }
-            
-            case CMceSession::EOffering:
-            case CMceSession::EAnswering:
-                {
-                lcSessionState = MLcSession::EOpening;
-                break;
-                }
-            case CMceSession::EEstablished:
-                {
-                lcSessionState = MLcSession::EOpen;
-                break;
-                }
-            case CMceSession::ECancelling:
-            case CMceSession::ETerminating:
-                {
-                lcSessionState = MLcSession::EClosing;
-                break;
-                }
-            case CMceSession::ETerminated:
-                {
-                lcSessionState = MLcSession::EClosed;
-                break;
-                }
-            default:
-               {
-               lcSessionState = MLcSession::EUninitialized;
-               break;
-               }
-            }
-*/
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::TimedOut()" )
-    }
-
-
-
-TInt CMusEngMceSession::SetForegroundStatus( TBool aIsForeground )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngMceSession::SetForegroundStatus() %d", 
-              aIsForeground )
-    /*          
-    if ( aIsForeground )
-        {
-        // Only clear the bg info, do not ever enable it again
-        iBackground = EFalse;
-        }
-    */    
-    return KErrNone;
-    }
-
-_LIT( KIpVtEngStubRemoteDetails, "5556567844" );
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::RemoteDetails()
-    {
-    return KIpVtEngStubRemoteDetails();
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetRemoteL( const TDesC& aRemote )
-{
-    iRemoteAddress = aRemote.AllocL();
-}
-
-#if 0
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionStateChange()
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->StateChanged( *this );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionUpdate()
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->Updated( *this );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionFailure( TInt aReason )
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->Failed( *this, aReason );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerStateChange( 
-    MLcVideoPlayer* aPlayer )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->StateChanged( *aPlayer );
-        }
-    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformUiProviderAboutReceivingStart()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::InformUiProviderAboutReceivingStart()" )
-    if ( iBackground && iLcUiProvider )
-        {
-        MUS_LOG( "mus: [ENGINE]     receiving started in BG mode, switching to FG" )
-        iLcUiProvider->HandleForegroundStatus( ETrue );
-        iBackground = EFalse;
-        }
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::InformUiProviderAboutReceivingStart()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerUpdate( 
-    MLcVideoPlayer* aPlayer )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->Updated( *aPlayer );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerFailure( 
-    MLcVideoPlayer* aPlayer, 
-    TInt aReason )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->Failed( *aPlayer, aReason );
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MLcUiProvider& CMusEngMceSession::LcUiProviderL()
-    {
-    __ASSERT_ALWAYS( iLcUiProvider, User::Leave( KErrNotReady ) );
-    return *iLcUiProvider;
-    }
-#endif
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::UpdateLcSessionL()
-		{
-		}
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::SendDialTone( TChar aKey )
-    {    
-    return ETrue;
-    }
-
-
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengmceutils.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,594 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utilities to get and set profile used with SWIS.
-*
-*/
-
-
-
-// USER
-
-#include "musengmceutils.h"
-#include "muslogger.h"
-
-// SYSTEM
-
-#include <mcesession.h>
-#include <mcevideostream.h>
-#include <mceaudiostream.h>
-#include <mcertpsink.h>
-#include <mcemediasource.h>
-#include <mcertpsource.h>
-#include <mcecamerasource.h>
-#include <mcedisplaysink.h>
-#include <mcefilesource.h>
-#include <mcefilesink.h>
-#include <mcespeakersink.h>
-
-
-
-
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is a video stream with RTP source
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsVideoInStream( CMceMediaStream& aStream )
-    {
-    return ( aStream.Type() == KMceVideo &&
-             aStream.Source() && 
-             aStream.Source()->Type() == KMceRTPSource );
-    }
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is a video stream with RTP sink
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsVideoOutStream( CMceMediaStream& aStream )
-    {
-    TBool isOutStream( EFalse );
-    if ( aStream.Type() == KMceVideo )
-        {
-        CMceMediaSink* rtpSink = MusEngMceUtils::GetMediaSink(
-                                                   aStream,
-                                                   KMceRTPSink );
-        
-        isOutStream = ( rtpSink != NULL );
-        }
-    return isOutStream;
-    }
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is an audio stream with RTP source
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsAudioInStream( CMceMediaStream& aStream )
-    {
-    return ( aStream.Type() == KMceAudio &&
-             aStream.Source() && 
-             aStream.Source()->Type() == KMceRTPSource );
-    }
-    
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with RTP sink.
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetVideoOutStreamL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVideoOutStreamL()" )
-
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* videoOut = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoOutStream( *streams[i] ) )      
-            {
-            __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
-            
-            videoOut = static_cast<CMceVideoStream*>( streams[i] );
-            }
-            
-            // Check if bound stream is a video stream with RTP sink.
-        if ( streams[i]->BoundStream() &&
-             MusEngMceUtils::IsVideoOutStream( streams[i]->BoundStreamL() ) )
-            {
-            __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
-            
-            videoOut = static_cast<CMceVideoStream*>( 
-                                   &streams[i]->BoundStreamL() );
-            }   
-        }
-
-    __ASSERT_ALWAYS( videoOut, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVideoOutStreamL()" )
-
-    return videoOut;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with RTP source.
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetVideoInStreamL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVideoInStreamL()" )
-
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* videoIn = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoInStream( *streams[i] ) )
-            
-            {
-            __ASSERT_ALWAYS( !videoIn, User::Leave( KErrOverflow ) );
-
-            videoIn = static_cast<CMceVideoStream*>( streams[i] );
-            }
-            
-        // Check if bound stream is a video stream with RTP souce.
-        if ( streams[i]->BoundStream() &&
-             MusEngMceUtils::IsVideoInStream( streams[i]->BoundStreamL() ) )
-            {
-            __ASSERT_ALWAYS( !videoIn, User::Leave( KErrOverflow ) );
-
-            videoIn = static_cast<CMceVideoStream*>( 
-                                    &streams[i]->BoundStreamL() );
-            }       
-        }
-
-    __ASSERT_ALWAYS( videoIn, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVideoInStreamL()" )
-
-    return videoIn;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with file sink
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetRecordingStream( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetRecordingStreamL()" )
-    
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* recordingStream = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( streams[i]->Type() == KMceVideo )
-            {
-            if ( MusEngMceUtils::GetMediaSink( *streams[i], KMceFileSink ) )
-                {
-                recordingStream = static_cast<CMceVideoStream*>( streams[i] );
-                }
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetRecordingStreamL()" )
-    
-    return recordingStream;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a mediastream.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSink( CMceMediaStream& aStream,
-                                             TMceSinkType aType,
-                                             TMceSourceType aAssociatedSourceType )
-    {
-    const RPointerArray<CMceMediaSink>& sinks = aStream.Sinks();
-    for ( TInt i = 0; i < sinks.Count(); ++i )
-        {
-        if ( sinks[i]->Type() == aType && 
-           ( aAssociatedSourceType == KMusEngNoAssociatedSourceType || 
-             aStream.Source()->Type() == aAssociatedSourceType ) )
-            {
-            return sinks[i];
-            }
-        }
-        
-    return NULL;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a mediastream.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSinkL( CMceMediaStream& aStream,
-                                              TMceSinkType aType,
-                                              TMceSourceType aAssociatedSourceType )
-    {
-
-    CMceMediaSink* sink = MusEngMceUtils::GetMediaSink( aStream, aType, aAssociatedSourceType );
-
-    __ASSERT_ALWAYS( sink, User::Leave( KErrNotFound ) );
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a session.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSink( CMceSession& aSession,
-                                             TMceSinkType aType,
-                                             TMceSourceType aAssociatedSourceType,
-                                             TBool aStrictMatch )
-    {
-    CMceMediaSink* sink = NULL;
-
-    TRAP_IGNORE( sink = MusEngMceUtils::GetMediaSinkL( 
-            aSession, aType, aAssociatedSourceType, aStrictMatch ) )
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a session.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSinkL( CMceSession& aSession,
-                                              TMceSinkType aType,
-                                              TMceSourceType aAssociatedSourceType,
-                                              TBool aStrictMatch )
-    {
-    CMceMediaSink* sink = NULL;
-    
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        sink = MusEngMceUtils::GetMediaSink( *streams[i], aType, aAssociatedSourceType );
-        if ( sink )
-            {
-            return sink;
-            }
-        
-        if ( streams[i]->BoundStream() )
-            {
-            sink = MusEngMceUtils::GetMediaSink( streams[i]->BoundStreamL(), 
-                                                 aType,
-                                                 aAssociatedSourceType );
-            if ( sink )
-                {
-                return sink;
-                }
-            }
-        }
-    
-    if ( !sink && aAssociatedSourceType != KMusEngNoAssociatedSourceType && !aStrictMatch )
-        {
-        // No preferred match, try without source preference
-        sink = GetMediaSinkL( aSession, aType );
-        }
-
-    __ASSERT_ALWAYS( sink, User::Leave( KErrNotFound ) );
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a speaker sink contained by specified stream or bound stream.
-// -----------------------------------------------------------------------------
-//
-CMceSpeakerSink* MusEngMceUtils::GetSpeaker( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetSpeaker()" )
-
-    CMceSpeakerSink* speaker = NULL;
-    
-    if ( aStream.Type() == KMceAudio )
-        {
-        speaker = static_cast<CMceSpeakerSink*>(
-                    MusEngMceUtils::GetMediaSink( aStream, KMceSpeakerSink ) );
-    
-        if ( !speaker && aStream.BoundStream() )
-            {
-            CMceMediaStream* boundStream = NULL;
-            TRAPD( error, boundStream = &aStream.BoundStreamL() )
-            
-            if ( error == KErrNone )
-                {
-                speaker = static_cast<CMceSpeakerSink*>(
-                            MusEngMceUtils::GetMediaSink( *boundStream, 
-                                                          KMceSpeakerSink ) );
-                }
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetSpeaker()" )
-
-    return speaker;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// Gets handle to a camera source.
-// -----------------------------------------------------------------------------
-//
-CMceCameraSource* MusEngMceUtils::GetCameraL( CMceSession& aSession )
-    {
-    // Camera can be only in out stream
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetCameraL()" )
-
-    CMceVideoStream* videoOut = MusEngMceUtils::GetVideoOutStreamL( aSession );
-
-    if ( !( videoOut->Source() &&
-            videoOut->Source()->Type() == KMceCameraSource ) )
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetCameraL()" )
-    return static_cast<CMceCameraSource*>( videoOut->Source() );
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a file source.
-// -----------------------------------------------------------------------------
-//
-CMceFileSource* MusEngMceUtils::GetFileSourceL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetFileSourceL()" )
-
-    CMceVideoStream* videoOut = MusEngMceUtils::GetVideoOutStreamL( aSession );
-
-    if ( !( videoOut->Source() &&
-            videoOut->Source()->Type() == KMceFileSource ) )
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetFileSourceL()" )
-    return static_cast<CMceFileSource*>( videoOut->Source() );
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetDisplay( 
-    CMceSession& aSession, TBool aPreferViewFinder  )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetDisplay()" )
-    TMceSourceType preferredSource = 
-        aPreferViewFinder ? KMceCameraSource : KMusEngNoAssociatedSourceType;
-    return static_cast<CMceDisplaySink*>(
-            MusEngMceUtils::GetMediaSink( aSession, KMceDisplaySink, preferredSource ) );
-
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetDisplayL( 
-    CMceSession& aSession, TBool aPreferViewFinder )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetDisplayL()" )
-
-    CMceDisplaySink* display = MusEngMceUtils::GetDisplay( aSession, aPreferViewFinder );
-
-    __ASSERT_ALWAYS( display, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetDisplayL()" )
-    return display;
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying received video.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetReceivingDisplay( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetReceivingDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetReceivingDisplay()" )
-    
-    // Search display which is connected with rtp source
-    TMceSourceType preferredSource = KMceRTPSource;
-    return static_cast<CMceDisplaySink*>( MusEngMceUtils::GetMediaSink( 
-                aSession, KMceDisplaySink, preferredSource, ETrue ) );
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying received video.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetReceivingDisplayL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetReceivingDisplayL()" )
-
-    CMceDisplaySink* display = GetReceivingDisplay( aSession );
-    __ASSERT_ALWAYS( display != NULL, User::Leave( KErrNotFound ) );
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetReceivingDisplay()" )
-    
-    return display;
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying viewfinder content.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetVfDisplay( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVfDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVfDisplay()" )
-    
-    // Search display which is connected with camera
-    TMceSourceType preferredSource = KMceCameraSource;
-    return static_cast<CMceDisplaySink*>( MusEngMceUtils::GetMediaSink( 
-                aSession, KMceDisplaySink, preferredSource, ETrue ) );
-    }
-
-// -----------------------------------------------------------------------------
-// Adds display sink to specified stream if one does not exist already.
-// Display rect is set in both cases.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::AddDisplayL( CMceMediaStream& aStream, 
-                                  CMceManager& aManager,
-                                  const TRect& aDisplayRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::AddDisplayL()" )
-    
-    __ASSERT_ALWAYS( aStream.Type() == KMceVideo, User::Leave( KErrArgument ) );
-
-    CMceDisplaySink* display = static_cast<CMceDisplaySink*>(
-                                    MusEngMceUtils::GetMediaSink( 
-                                                            aStream,
-                                                            KMceDisplaySink ) );
-
-    if ( !display )
-        {
-        display = CMceDisplaySink::NewLC( aManager );
-        aStream.AddSinkL( display );
-        CleanupStack::Pop( display );
-        }
-
-    display->SetDisplayRectL( aDisplayRect );
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::AddDisplayL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Adds display sink to specified stream if one does not exist already.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::AddSpeakerL( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::AddSpeakerL()" )
-    
-    __ASSERT_ALWAYS( aStream.Type() == KMceAudio, User::Leave( KErrArgument ) );
-
-    CMceSpeakerSink* speaker = static_cast<CMceSpeakerSink*>(
-                                    MusEngMceUtils::GetMediaSink( 
-                                                            aStream,
-                                                            KMceSpeakerSink ) );
-
-    if ( !speaker )
-        {
-        speaker = CMceSpeakerSink::NewLC();
-        aStream.AddSinkL( speaker );
-        CleanupStack::Pop( speaker );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::AddSpeakerL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Disables parameter stream, its' source and all the sinks.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::DisableStreamL( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::DisableStreamL()" )
-    
-    aStream.DisableL();
-    
-    if ( aStream.Source() )
-        {
-        aStream.Source()->DisableL();
-        }
-        
-    for ( TInt sinkIndex = 0; sinkIndex < aStream.Sinks().Count(); ++sinkIndex )
-        {
-        aStream.Sinks()[ sinkIndex ]->DisableL();
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::DisableStreamL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::DoEnableDisplayL( CMceDisplaySink& aDisplay, TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> MusEngMceUtils::DoEnableDisplayL() %d", 
-              aEnable )
-    
-    if ( aEnable )
-        {
-        if ( !aDisplay.IsEnabled() )
-            {
-            aDisplay.EnableL();
-            MUS_LOG( "                  Display enabled" )
-            }
-        else
-            {
-            MUS_LOG( "                  Display already enabled, ignore" )
-            }
-        }
-    else
-        {
-        if ( aDisplay.IsEnabled() )
-            {
-            aDisplay.DisableL();
-            MUS_LOG( "                  Display disabled" )
-            }
-        else
-            {
-            MUS_LOG( "                  Display already disabled, ignore" )
-            }
-        }  
-        
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::DoEnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TInt MusEngMceUtils::EnableInactivityTimer( 
-    CMceSession& aSession, 
-    TUint32 aInactivityTimeout )
-    {
-    TInt err( KErrNotFound );
-    CMceVideoStream* stream = NULL;
-    TRAP_IGNORE( stream = MusEngMceUtils::GetVideoInStreamL( aSession ) )
-    if ( stream )
-        {
-        // Instream has always RTP source
-        err = KErrNone;
-        CMceRtpSource* rtpSource = static_cast<CMceRtpSource*>( stream->Source() );
-        TRAP( err, rtpSource->EnableInactivityTimerL( aInactivityTimeout ) ) 
-        }
-    
-    return err;
-    }
-      
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengremotevideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengremotevideoplayer.h"
-#include "musengdisplayhandler.h"
-
-// SYSTEM
-#include <e32base.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer* CMusEngRemoteVideoPlayer::NewL(
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngRemoteVideoPlayer( 
-        aDisplayHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer::CMusEngRemoteVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngVideoPlayerBase( aDisplayHandler, aLcAudioControl )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer::~CMusEngRemoteVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState 
-CMusEngRemoteVideoPlayer::LcVideoPlayerState() const
-    {
-    return MLcVideoPlayer::EPlaying;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngRemoteVideoPlayer::LcIsPlayingL()
-    {
-
-    return ETrue;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengsessionmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "musengsessionmanager.h"
-#include "musengmcesession.h"
-#include "musengtwowaysession.h"
-#include "musenglivesession.h"
-#include "lcsession.h"
-#include "mccdatasender.h"
-#include "mccdatareceiver.h"
-#include "musenglogger.h"
-#include "mccdatastructures.h"
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionManager* CMusEngSessionManager::NewL()
-    {
-    CMusEngSessionManager* self = new( ELeave )CMusEngSessionManager();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-        
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-CMusEngSessionManager::~CMusEngSessionManager()
-    {
-    delete iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionManager::CMusEngSessionManager()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionManager::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngSessionManager::ConstructL()" )
-    //iMsgReceiver = CMccDataReceiver::NewL(*this);    
-    //iMsgSender = CMccDataSender::NewL();
-    //iSession = CMusEngTwoWaySession::NewL();
-    iSession = CMusEngLiveSession::NewL();
-    _LIT(KDisplayName,"+358504871872");
-    iSession->SetRemoteL( KDisplayName() );
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngSessionManager::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MLcSession& CMusEngSessionManager::Session()
-    {
-    return *iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionManager::DataReceived( const TDataMessage& aData )
-    {
-    }
-
-
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengtwowayrecvsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,521 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengtwowayrecvsession.h"
-#include "lcsessionobserver.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "mussipprofilehandler.h"
-#include "musenglivevideoplayer.h"
-#include "musengremotevideoplayer.h"
-
-// SYSTEM
-#include <mcemanager.h>
-#include <mcecamerasource.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcesession.h>
-#include <mcertpsource.h>
-#include <mcestreambundle.h>
-#include <musmanager.h>
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds
-// 6 seconds keepalive timer, needs to be more than receiving timeout
-const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6; 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession* CMusEngTwoWayRecvSession::NewL()
-    {
-    CMusEngTwoWayRecvSession* self = new( ELeave )CMusEngTwoWayRecvSession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()" )
-    
-    delete iLiveVideoPlayer;  
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWayRecvSession::EnableDisplayL() %d", 
-              aEnable )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-    MusEngMceUtils::DoEnableDisplayL( *display, aEnable );
-                
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-    if ( vfDisplay )
-        {
-        MusEngMceUtils::DoEnableDisplayL( *vfDisplay, aEnable );  
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::TDisplayOrientation CMusEngTwoWayRecvSession::OrientationL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::RotationL()" )
-    
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-    
-    TDisplayOrientation displayOrientation;
-    CMceDisplaySink::TRotation rotation( display->RotationL() );
-    
-    MUS_LOG1( "mus: [ENGINE]     MCE rotation is %d", rotation )
-    
-    if ( rotation == CMceDisplaySink::ENone )
-        {
-        displayOrientation = CMusEngMceSession::EPortrait;
-        }
-    else
-        {
-        displayOrientation = CMusEngMceSession::ELandscape;
-        }
-    
-    MUS_LOG1( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::RotationL() %d", 
-              displayOrientation )
-    
-    return displayOrientation;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngTwoWayRecvSession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetOrientationL() %d", 
-              aOrientation )
-              
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-            
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-
-    CMceDisplaySink::TRotation rotation = ( aOrientation == EPortrait ) ? 
-        CMceDisplaySink::ENone : CMceDisplaySink::EClockwise90Degree;
-    
-    display->SetRotationL( rotation );
-    if ( vfDisplay )
-        {
-        vfDisplay->SetRotationL( rotation );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetOrientationL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetRectsL()" )  
-     
-    iLocalRect = aLocalRect;
-    iRect = aRemoteRect;
-    RectChangedL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetRectsL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetSecondaryRectL()" )
-    
-    iLocalRect = aSecondaryRect;
-    RectChangedL();
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetSecondaryRectL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngTwoWayRecvSession::SecondaryRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SecondaryRect()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SecondaryRect()" )
-    return iLocalRect;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TMusEngCameraHandler& CMusEngTwoWayRecvSession::Camera()
-    {
-    return iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngTwoWayRecvSession::LocalVideoPlayer()
-    {
-    return iLiveVideoPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void CMusEngTwoWayRecvSession::RectChangedL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::RectChangedL()" )
-
-
-    // If session is not yet created, do nothing
-    if ( iSession && iSession->State() != CMceSession::ETerminated )
-        {
-        TRect remoteRect( Rect() );
-        MUS_LOG2( "mus: [ENGINE]  remote tl.ix=%d tl.iy=%d", 
-                  remoteRect.iTl.iX, remoteRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  remote brc%d br.iy=%d", 
-                  remoteRect.iBr.iX, remoteRect.iBr.iY )    
-        MUS_LOG2( "mus: [ENGINE]  local tl.ix=%d tl.iy=%d", 
-                  iLocalRect.iTl.iX, iLocalRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  local br.ix=%d br.iy=%d", 
-                  iLocalRect.iBr.iX, iLocalRect.iBr.iY )
-        
-        if ( remoteRect != iSetRemoteRect )
-            {
-            CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-            display->SetDisplayRectL( remoteRect );
-            iSetRemoteRect = remoteRect;
-            }
-        
-        if ( iLocalRect != iSetLocalRect )
-            {
-            CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-            if ( vfDisplay )
-                {
-                vfDisplay->SetDisplayRectL( iLocalRect );
-                }
-            iSetLocalRect = iLocalRect;
-            }
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::RectChangedL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    iCameraHandler.SetSession( iSession );
-    
-    // Force bandwidth line usage in sdp as it is mandatory
-    // at MT side based on GSMA VS specification IR.74. Bandwidth is set to
-    // session or to media level based on sender's way of usage. If other end
-    // is not using bandwidth attribute at all, media level is preferred.
-    SetSessionSdpLinesL( *iSession, ETrue );
-
-    CMceStreamBundle* localBundle =
-                              CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
-
-    const RPointerArray<CMceMediaStream>& streams = iSession->Streams();
-    
-    CMceMediaStream* videoInStream = NULL;
-    CMceMediaStream* videoOutStream = NULL;
-    
-    // Search interesting video streams, sendrecv is preferred
-    TBool sendRecvVideoFound( EFalse );
-    for( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoInStream( *streams[i] ) &&
-             !sendRecvVideoFound )
-            {
-            videoInStream = streams[i];
-            
-            if ( streams[i]->BoundStream() )
-                {
-                videoOutStream = &streams[i]->BoundStreamL();
-                }
-            }
-        else if ( streams[i]->BoundStream() &&
-                  MusEngMceUtils::IsVideoInStream( streams[i]->BoundStreamL() ) &&
-                  !sendRecvVideoFound )
-            {
-            videoInStream = &streams[i]->BoundStreamL();
-                
-            videoOutStream = streams[i];
-            }
-        else
-            {
-            // NOP
-            }
-        
-        sendRecvVideoFound = ( videoInStream && videoOutStream );
-        }
-    
-    CompleteSessionStructureAudioPartL( streams, *localBundle, videoInStream, videoOutStream );
-    
-    if ( videoInStream )
-        {
-        CompleteSessionStructureInStreamL( *videoInStream, *localBundle );
-        }
-    else
-        {
-        // At least receiving video stream is required
-        User::Leave( KErrCorrupt );
-        }
-    
-    if ( videoOutStream )
-        {
-        CompleteSessionStructureOutStreamL( *videoOutStream );
-        }
-    
-    // Destroy bundle if it is not needed or transfer ownership
-    if ( localBundle->Streams().Count() > 1 )
-        {
-        iSession->AddBundleL( localBundle );
-        CleanupStack::Pop( localBundle );
-        }
-    else
-        {
-        CleanupStack::PopAndDestroy( localBundle );
-        }
-    
-    AdjustStreamsAndCodecsL();
-    
-    iSession->UpdateL();
-    
-    // Now session state is right to adjust volume
-    SetSpeakerVolumeL( LcVolumeL() );
-    
-    iSipProfileHandler->CreateProfileL( iSession->Profile() );
-    
-    iRemoteVideoPlayer->SetMceSession( iSession );
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession::CMusEngTwoWayRecvSession() 
-    : CMusEngReceiveSession()
-    {
-    iMceManagerUid.iUid = CMusManager::ESipInviteDesired2WayVideo;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::ConstructL()" )
-    
-    iCameraHandler.ReadCameraUsageKeyL();
-    CMusEngReceiveSession::ConstructL();
-    
-    iLiveVideoPlayer = 
-        CMusEngLiveVideoPlayer::NewL( *this, iCameraHandler, *this );
-    
-    // Override receiving timeout and keepalive values of
-    // normal one-way receiving session
-    //
-    iReceivingInactivityTimeout = KMusEngTwoWayReceivingActivityTimeout; 
-    iKeepaliveTimer = KMusEngTwoWayRtpKeepAliveTimer;
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// When checking audio streams also not interesting streams are removed from
-// session. Stream if removed if one of following apply:
-// 1. Is not and does not contain incoming video or audio
-// 2. We already have one incoming video stream
-// 3. Stream is audio and we run operator variant where audio is 
-//    not allowed.
-// 4. Two-way video exists and this one is audio
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL( 
-    const RPointerArray<CMceMediaStream>& aStreams, 
-    CMceStreamBundle& aLocalBundle, 
-    CMceMediaStream* aVideoInStream,
-    CMceMediaStream* aVideoOutStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL()" )
-    
-    // Audio streams not allowed in two-way session or in operator variant
-    TBool audioAllowed(  !( aVideoInStream && aVideoOutStream ) && !iOperatorVariant );
-    
-    for( TInt i = 0; i < aStreams.Count(); ++i )
-        {
-        // Audio supported currently only in recvonly case
-        if ( audioAllowed &&
-             MusEngMceUtils::IsAudioInStream( *aStreams[i] ) )
-            {
-            MusEngMceUtils::AddSpeakerL( *aStreams[i] );
-            
-            aLocalBundle.AddStreamL( *aStreams[i] );
-            
-            // Disable possible opposite stream to indicate that sendrecv audio is
-            // not allowed.
-            if ( aStreams[i]->BoundStream() )
-                {
-                MusEngMceUtils::DisableStreamL( aStreams[i]->BoundStreamL() );
-                }
-            }
-        else if ( audioAllowed &&
-                  aStreams[i]->BoundStream() &&
-                  MusEngMceUtils::IsAudioInStream( aStreams[i]->BoundStreamL() ) )
-            {
-            MusEngMceUtils::AddSpeakerL( aStreams[i]->BoundStreamL() );
-    
-            aLocalBundle.AddStreamL( aStreams[i]->BoundStreamL() );
-            
-            // Disable opposite stream to indicate that sendrecv audio is not allowed.
-            MusEngMceUtils::DisableStreamL( *aStreams[i] );
-            }
-        else if ( aStreams[ i ] != aVideoInStream && aStreams[ i ] != aVideoOutStream )
-            {
-           iSession->RemoveStreamL( *aStreams[i] );
-        
-            // Since succesfull removal of a stream has decreased the amount
-            // of streams in array by one, we have to modify the index
-            --i;
-            }
-        else
-            {
-            // NOP
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL( 
-    CMceMediaStream& aVideoInStream, CMceStreamBundle& aLocalBundle )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL()" )
-    
-    SetMediaSdpLinesL( aVideoInStream, ETrue );
-
-    MusEngMceUtils::AddDisplayL( aVideoInStream, *iManager, Rect() );
-    
-    static_cast<CMceRtpSource*>(aVideoInStream.Source())->UpdateL( 
-                                           KMusEngJitterBufferLength,
-                                           KMusEngJitterBufferTreshold,
-                                           KMusEngTwoWayReceivingActivityTimeout );
-                                            
-    aLocalBundle.AddStreamL( aVideoInStream );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL( 
-    CMceMediaStream& aVideoOutStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL()" )
-    
-    SetMediaSdpLinesL( aVideoOutStream, ETrue );
-        
-    CMceCameraSource* camera = NULL;
-    TRAP_IGNORE( camera = MusEngMceUtils::GetCameraL( *iSession ) )
-    if ( !camera )
-        {
-        camera = CMceCameraSource::NewLC( *iManager );
-        aVideoOutStream.SetSourceL( camera );
-        CleanupStack::Pop( camera );
-        }
-       
-    camera->DisableL(); // Start session in pause mode.
-    
-    iCameraHandler.InitializeL( *camera );
-    
-    CMceVideoStream* vfStream = CMceVideoStream::NewLC();
-
-    vfStream->SetSourceL( aVideoOutStream.Source() );
-         
-    // Complete stream
-    MusEngMceUtils::AddDisplayL( *vfStream, *iManager, SecondaryRect() );
-    
-    iSession->AddStreamL( vfStream );
-    CleanupStack::Pop( vfStream );
-    
-    iLiveVideoPlayer->SetMceSession( iSession );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL()" )
-    }
-
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengtwowaysession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengtwowaysession.h"
-#include "lcsessionobserver.h"
-#include "musenglogger.h"
-#include "musengremotevideoplayer.h"
-#include "musenglivevideoplayer.h"
-#include "svptimer.h"
-
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds
-// 6 seconds keepalive timer, needs to be more than receiving timeout
-const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6; 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession* CMusEngTwoWaySession::NewL()
-    {
-    CMusEngTwoWaySession* self = new( ELeave )CMusEngTwoWaySession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession::~CMusEngTwoWaySession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWaySession::EnableDisplayL() %d", 
-              aEnable )
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngTwoWaySession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetOrientationL() %d", 
-              aOrientation )
-                  
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetOrientationL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetRectsL()" )  
-         
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetRectsL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession::CMusEngTwoWaySession() 
-    : CMusEngMceSession()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::ConstructL()" )
-    
-    CMusEngMceSession::ConstructL();
-    
-    iRemoteVideoPlayer = CMusEngRemoteVideoPlayer::NewL( *this, *this ); 
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::EstablishLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::EstablishLcSessionL" )
-
-    iTimer = CSVPTimer::NewL( *this, 1 ); 
-    iTimer->SetTime(2000);
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::EstablishLcSessionL" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::TerminateLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::TerminateLcSessionL" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::TerminateLcSessionL" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngTwoWaySession::RemoteVideoPlayer()
-    {
-    return iRemoteVideoPlayer;
-    }
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengvideoplayerbase.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglocalvideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengdisplayhandler.h"
-
-// SYSTEM
-#include <e32base.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngVideoPlayerBase::CMusEngVideoPlayerBase( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    iDisplayHandler( aDisplayHandler ),
-    iLcAudioControl( aLcAudioControl )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngVideoPlayerBase::~CMusEngVideoPlayerBase()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::LcPlayL(MLcVideoPlayer::TLcVideoPlayerSource /*aSource*/)
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::LcPauseL()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcWindow* CMusEngVideoPlayerBase::LcWindow()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngVideoPlayerBase::LcCameraControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcSourceFileControl* CMusEngVideoPlayerBase::LcSourceFileControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcDestinationFileControl* CMusEngVideoPlayerBase::LcDestinationFileControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcAudioControl* CMusEngVideoPlayerBase::LcAudioControl()
-    {
-    return &iLcAudioControl;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngVideoPlayerBase::LcZoomControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngVideoPlayerBase::LcBrightnessControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::EnableLcWindowL( TBool aEnable )
-    {
-    iDisplayHandler.EnableDisplayL( aEnable );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngVideoPlayerBase::IsLcWindowEnabled()
-    {
-    return iDisplayHandler.IsDisplayEnabled();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::SetLcWindowRectL( TRect aRect )
-    {
-    iDisplayHandler.SetRectL( aRect );
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngVideoPlayerBase::LcWindowRect()
-    {
-    return iDisplayHandler.Rect();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::SetLcWindowOrientationL( 
-    TLcWindowOrientation aOrientation )
-    {
-    if ( aOrientation == MLcWindow::ELandscape )
-        {
-        iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::ELandscape );
-        }
-    else 
-        {
-        iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::EPortrait );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-MLcWindow::TLcWindowOrientation CMusEngVideoPlayerBase::LcWindowOrientationL()
-    {
-    MLcWindow::TLcWindowOrientation orientation;
-    if ( iDisplayHandler.OrientationL() == MMusEngDisplayHandler::ELandscape )
-        {
-        orientation = MLcWindow::ELandscape;
-        }
-    else
-        {
-        orientation = MLcWindow::EPortrait;
-        }
-    return orientation;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/svptimer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Timer service for SVP     
-*
-*/
-
-
-#include "svptimer.h"
-#include "svptimerobserver.h"
-
-
-const TInt KMicroSecondsCoefficient = 1000;
-
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::CSVPTimer
-// ---------------------------------------------------------------------------
-//
-CSVPTimer::CSVPTimer( MSVPTimerObserver& aObserver, TInt aTimerId ): 
-    CTimer( EPriorityHigh ),
-    iObserver( aObserver ),
-    iId( aTimerId )
-    {
-    CActiveScheduler::Add( this );
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::CSVPTimer
-// ---------------------------------------------------------------------------
-//
-void CSVPTimer::ConstructL()
-    {
-    CTimer::ConstructL();
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::CSVPTimer
-// ---------------------------------------------------------------------------
-//
-CSVPTimer* CSVPTimer::NewL( MSVPTimerObserver& aObserver,
-                            TInt aTimerId )
-    {
-    CSVPTimer* self = new (ELeave) CSVPTimer( aObserver, aTimerId );
-    
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::~CSVPTimer
-// ---------------------------------------------------------------------------
-//  
-CSVPTimer::~CSVPTimer()
-    {
-    Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::RunL
-// ---------------------------------------------------------------------------
-//  
-void CSVPTimer::RunL()
-    {
-    iObserver.TimedOut( iId );
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::SetTime
-// ---------------------------------------------------------------------------
-//  
-void CSVPTimer::SetTime( TInt aMilliSeconds )
-    {    
-    // Milliseconds to microseconds conversion
-    const TTimeIntervalMicroSeconds32 time(
-        KMicroSecondsCoefficient * aMilliSeconds );
-    
-    CTimer::After( time ); // NB, CTimer::After calls SetActive
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::Stop
-// ---------------------------------------------------------------------------
-//  
-void CSVPTimer::Stop()
-    {
-    Cancel(); 
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::Id
-// ---------------------------------------------------------------------------
-//  
-TInt CSVPTimer::Id() const
-    {
-    return iId;
-    }
-
-//  End of File
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/data/20029876.rss	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "registryinfov2.rh"
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-    dll_uid = 0x20029876;
-    interfaces = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x20021340;
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = 0x20029876;
-                    version_no = 1;
-                    default_data = "Videotelephony";
-                    }            
-                };
-            }
-        };
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_MMPFILES
-ipvtengineplugin.mmp
-
-
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/group/ipvtengineplugin.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-* 
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET         ipvtengineplugin.dll
-TARGETTYPE     PLUGIN
-UID            0x10009D8D 0x20029876
-VENDORID       VID_DEFAULT
-CAPABILITY     CAP_ECOM_PLUGIN
-
-SOURCEPATH     ../data
-START RESOURCE 20029876.rss
-TARGET         ipvtengineplugin.rsc
-END
-
-SOURCEPATH  	../src
-SOURCE      	musenginepluginentry.cpp
-SOURCE      	musengsessionmanager.cpp
-
-
-SOURCE      	musengmcesession.cpp
-SOURCE          musengtwowaysession.cpp
-SOURCE          musengcamerahandler.cpp
-SOURCE          musengvideoplayerbase.cpp
-SOURCE          musenglocalvideoplayer.cpp
-SOURCE          musenglivevideoplayer.cpp
-SOURCE          musengremotevideoplayer.cpp
-SOURCE          svptimer.cpp
-SOURCE          mccdatasender.cpp
-SOURCE          mccdatareceiver.cpp
-SOURCE          mccscreen.cpp
-
-USERINCLUDE     ../inc
-USERINCLUDE 	../../../../../../inc
-
-
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE 	/epoc32/include/ecom
-
-LIBRARY         euser.lib
-LIBRARY         bafl.lib
-LIBRARY		centralrepository.lib
-LIBRARY		charconv.lib
-LIBRARY         cntmodel.lib ecom.lib
-LIBRARY ws32.lib
-LIBRARY bitgdi.lib
-LIBRARY fbscli.lib
-LIBRARY cone.lib
-LIBRARY lcvtindicatorcontroller.lib
-DEBUGLIBRARY    flogger.lib
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/lcvtindicatorcontroller.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*!
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Handles phone indicators.
-*/
-
-#ifndef LCVTINDICATORCONTROLLER_H_
-#define LCVTINDICATORCONTROLLER_H_
-
-// FORWARD DECLARATION
-
-class LcVtIndicatorControllerImpl;
-
-class LcVtIndicatorController
-    {
-public:
-    IMPORT_C explicit LcVtIndicatorController();
-    IMPORT_C virtual ~LcVtIndicatorController();
-
-    IMPORT_C void enableActiveCallIndicator();
-    IMPORT_C void disableActiveCallIndicator();
-    
-private:
-    LcVtIndicatorControllerImpl* mIndicatorimpl;
-    
-    friend class UT_LcVtIndicatorController;
-    };
-
-#endif /* LCVTINDICATORCONTROLLER_H_ */
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccdatareceiver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef MCCDATARECEIVER_H
-#define MCCDATARECEIVER_H
-#include <E32Base.h>
-#include <e32msgqueue.h>
-
-#include "mccdatareceiverobserver.h"
-#include "mccdatastructures.h"
-
-
-// CLASS DECLARATION
-
-/**
-*  CMccDataReceiver class declaration
-*/
-class CMccDataReceiver : public CActive
-	{
-    public:
-    
-	    static CMccDataReceiver* NewL( MMccDataReceiverObserver& aObserver );
-		
-	    ~CMccDataReceiver(); 
-		
-    	    TDataMessage iInitData;
-	 	
-    public: // From CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError(TInt aError);	
-
-    private:
-        CMccDataReceiver( MMccDataReceiverObserver& aObserver );
-	    void ConstructL(); // second construction phase
-
-    private:
-	    
-		RMsgQueue<TDataMessage> iMsgQueue;		
-		MMccDataReceiverObserver* iObserver;
-
-    };
-
-
-#endif
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccdatareceiverobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef MCCDATARECEIVEROBSERVER_H
-#define MCCDATARECEIVEROBSERVER_H
-
-#include <E32Base.h>
-#include "mccdatastructures.h"
-
-// CLASS DECLARATION
-
-/**
-*  CMccDataReceiver class declaration
-*/
-class MMccDataReceiverObserver
-	{
-    public:
-    
-		virtual void DataReceived( const TDataMessage& aData ) = 0;
-
-    };
-
-
-#endif
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccdatasender.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef MCCDATASENDER_H
-#define MCCDATASENDER_H
-#include <E32Base.h>
-#include <e32msgqueue.h>
-
-#include "mccdatastructures.h"
-
-
-// CLASS DECLARATION
-
-/**
-*  CMccPeriodicRunner class declaration
-*/
-class CMccDataSender : public CActive
-	{
-    public:
-    
-	    static CMccDataSender* NewL();
-		
-	    ~CMccDataSender(); 
-		
-	public:
-	 
-	 	void Send( const TDataMessage& aData );
-	 	
-    public: // From CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError(TInt aError);	
-
-    private:
-        CMccDataSender();
-	    void ConstructL(); // second construction phase
-
-    private:
-	    
-		RMsgQueue<TDataMessage> iMsgQueue;
-		TDataMessage iBuffer;
-		 
-    };
-
-
-#endif
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccdatastructures.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef MCCDATASTRUCTURES_H
-#define MCCDATASTRUCTURES_H
-
-#include <E32Base.h>
-
-enum TDataId 
-{
-  EUninitialized,
-  EInitComplete,
-  EEstablish,
-  EProceeding,
-  EEstablished,
-  ETerminate,
-  ETerminated
-};
-
-class TDataMessage
-{
-public:
-    TDataId iDataId;
-    TInt iDataIntValue;
-    TBuf<50> iDataBufValue;
-
-};
-
-
-
-#endif
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/mccscreen.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    
-*
-*/
-
-
-
-#ifndef MCCSCREEN_H
-#define MCCSCREEN_H
-
-#include <w32std.h>
-#include "svptimerobserver.h"
-
-class CCamera;
-class MCameraDirectViewFinder;
-class CSVPTimer;
-
-/**
-* Screen for viewfinder, may use bitmap viewfinder or direct viewfinder
-* depending on supported camera vf modes.
-* 
-*/
-class CMccScreen : public CBase
-    {
-
-    public:
-        
-        enum TMccScreenType
-            {
-            EBitmapScreen,
-            EDirectScreen
-            };
-    
-    public:
-
-        static CMccScreen* NewL( CCamera* aCamera,
-                                 TPoint aPos, 
-                                 TSize aArea, 
-                                 TInt aIndex, 
-                                 TInt aWindowOrdinalPosition,
-                                 TInt aWindowOrdinalPriority,
-                                 TBool aSecondary,
-                                 RDrawableWindow* aParentWindow = 0);
-
-        ~CMccScreen();
-        
-        
-        
-    public:
-
-        virtual void StartL();
-        
-        virtual void Stop();
-        
-        virtual void Draw( CFbsBitmap& aFrame );
-        
-        virtual TInt SetCamera( CCamera* aCamera );
-        
-        void SetPrimaryRectL(TRect aRect);
-        void SetSecondaryRectL(TRect aRect);
-        
-        void Update(TBool aIsForeground);
-        
-    protected:
-        
-        void StopCamera();
-        
-        TBool VfStartPossible();
-        
-        void ConstructL();
-
-        CMccScreen( TMccScreenType aScreenType,
-                    CCamera* aCamera,
-                    TPoint aPos, 
-                    TSize aArea, 
-                    TInt aIndex, 
-                    TInt aWindowOrdinalPosition,
-                    TInt aWindowOrdinalPriority,
-                    TBool aSecondary = EFalse,
-                    RDrawableWindow* aParentWindow = 0);
-
-    protected:
-        
-        CCamera* iCamera;    
-        TInt iDeviceIndex;
-        TPoint iPosition;
-        TSize iArea;
-        TInt iWindowOrdinalPosition;
-        TInt iWindowOrdinalPriority; 
-        
-        RWsSession           iRwSession;
-        RWindowGroup*        iRwGroup;
-        RWindow*             iRw;
-        CWsScreenDevice*     iDev;
-        
-        CWindowGc* iGraphicsContext;
-        
-        TMccScreenType iScreenType;  
-                
-        TBool iSecondary;
-        TRect iPrimaryRect;
-        TRect iSecondaryRect;
-        
-        RDrawableWindow* iParentWindow;
-        
-        
-        
-#ifdef TEST_EUNIT
-    friend class UT_CMccCameraHandler;
-    friend class UT_CMccScreen;
-#endif
-    
-};
-
-/**
-* Bitamp viewfinder screen. Uses DSA to draw vf bitmaps.
-* 
-*/
-class CMccScreenBitmap : public CMccScreen, 
-                         public MDirectScreenAccess,
-                         public MSVPTimerObserver
-	{
-
-	public:
-
-		static CMccScreenBitmap* NewL( CCamera* aCamera,
-                                       TPoint aPos, 
-                                       TSize aArea, 
-                                       TInt aIndex, 
-                                       TInt aWindowOrdinalPosition,
-                                       TInt aWindowOrdinalPriority,
-                                       TBool aSecondary,
-                                       RDrawableWindow* aParentWindow = 0);
-
-		~CMccScreenBitmap();
-	    
-	public: // From CMccScreen
-
-		virtual void StartL();
-		
-		virtual void Stop();
-		
-		virtual void Draw( CFbsBitmap& aFrame );
-		
-		void TimedOut( TInt aTimerId );
-		
-	private:
-	    
-	    void ConstructL();
-
-	    CMccScreenBitmap( CCamera* aCamera,
-                    TPoint aPos, 
-                    TSize aArea, 
-                    TInt aIndex, 
-                    TInt aWindowOrdinalPosition,
-                    TInt aWindowOrdinalPriority,
-                    TBool aSecondary,
-                    RDrawableWindow* aParentWindow = 0);
-		
-		void Restart( RDirectScreenAccess::TTerminationReasons aReason );
-		
-		void AbortNow( RDirectScreenAccess::TTerminationReasons aReason );
-		
-		void StartCameraL();
-		
-		void StartDsaL();
-		
-		TPoint UpdateViewFinderArea( TSize aViewFinderImageSize );
-
-        void DoDraw( CFbsBitmap& aFrame );
-        
-        void DoScreenDeviceUpdate();
-        
-        void AttachFrameL( CFbsBitmap* aFrame );
-                
-        void DetachFrame();
-        
-        void StoreFrameDataL( CFbsBitmap& aFrame );
-         
-        CFbsBitmap* RestoreFrameLC();
-		
-		void DrawBlackBorders();
-        
-	private:
-
-		CDirectScreenAccess* iDirectScreenAccess;
-		CFbsBitGc* iGc;
-		RRegion* iRegion;
-		CFbsScreenDevice* iFbsDev;
-		
-		TRect iViewFinderImageRect;	
-		
-		TBool iFirstImageDrawn;
-		
-		CFbsBitmap* iAttachedFrame;
-		
-		TBool iAborted;
-		
-	    TSize iPausedFrameSize;
-	    TDisplayMode iPausedFrameDisplayMode;
-	    HBufC8* iPausedFrameData;
-	    
-	    TBool iStopped;
-	    
-	    CSVPTimer* iTimer;
-
-		
-#ifdef TEST_EUNIT
-    friend class UT_CMccCameraHandler;
-    friend class UT_CMccScreen;
-#endif
-    	
-	};
-
-/**
-* Direct viewfinder screen.
-* 
-*/
-class CMccScreenDirect : public CMccScreen
-    {
-
-    public:
-
-        static CMccScreenDirect* NewL( CCamera* aCamera,
-                                       TPoint aPos, 
-                                       TSize aArea, 
-                                       TInt aIndex, 
-                                       TInt aWindowOrdinalPosition,
-                                       TInt aWindowOrdinalPriority );
-
-        ~CMccScreenDirect();
-        
-        
-        
-    public: // From CMccScreen
-
-        virtual void StartL();
-        
-        virtual void Stop();
-        
-        virtual TInt SetCamera( CCamera* aCamera );
-        
-    private:
-        
-        void ConstructL();
-
-        CMccScreenDirect( 
-                    CCamera* aCamera,
-                    TPoint aPos, 
-                    TSize aArea, 
-                    TInt aIndex, 
-                    TInt aWindowOrdinalPosition,
-                    TInt aWindowOrdinalPriority );
-    
-        void StartDirectViewFinderL();
-        
-        TInt HandleDirectViewFinder();
-        
-    private:
-        
-        MCameraDirectViewFinder* iDirectViewFinder;
-
-#ifdef TEST_EUNIT
-    friend class UT_CMccCameraHandler;
-    friend class UT_CMccScreen;
-#endif
-    
-    };
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengcamerahandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGCAMERAHANDLER_H
-#define MUSHENGCAMERAHANDLER_H
-
-// USER
-#include "lccameracontrol.h"
-#include "lcbrightnesscontrol.h"
-#include "lczoomcontrol.h"
-
-// SYSTEM
-#include <e32base.h>
-#include <ecam.h>
-
-class CMusEngMceSession;
-
-// CLASS
-
-class TMusEngCameraHandler :    
-    public MLcCameraControl,
-    public MLcBrightnessControl,
-    public MLcZoomControl
-    {
-        
-    public: // From MLcCameraControl
-        
-        TInt LcCameraCountL();
-
-        TInt CurrentLcCameraIndex();
-        
-        void ToggleLcCameraL();       
-
-    public: // From MLcBrightnessControl
-        
-        TInt MinLcBrightnessL();
-
-        TInt MaxLcBrightnessL();
-
-        TInt LcBrightnessL();
-
-        void SetLcBrightnessL( TInt aValue );
-        
-        void IncreaseLcBrightnessL();
-        
-        void DecreaseLcBrightnessL();
-        
-    public: // From MLcZoomControl
-        
-        TInt MinLcZoomL();
-
-        TInt MaxLcZoomL();
-
-        TInt LcZoomValueL();
-
-        void SetLcZoomValueL( TInt aValue );
-        
-        void LcZoomInL();
-        
-        void LcZoomOutL();     
-                       
-    public:
-        
-        TMusEngCameraHandler();
-        
-        TInt ZoomStepSize( TInt64& aTime );
-        
-        void SetSession( CMusEngMceSession* aSession );
-        
-        TBool IsPlayingL();
-        void PlayL();
-        void PauseL();
-
-
-    private:
-    
-        enum TCurrentCamera
-            {
-            ECameraNotAvailable = KErrNotFound,
-            EBackCamera = 0, 
-            EFrontCamera = 1
-            };         
-   
-        
-    private: // Data
-        
-        
-        TCameraInfo iCameraInfo;
-
-        TInt iDefaultBrightness;
-        
-        TInt64 iZoomInTime;
-        
-        TInt64 iZoomOutTime;        
-                      
-        TInt iSmallZoomStep;
-        
-        TInt iBigZoomStep;
-        
-        TCurrentCamera iCurrentCamera;
-        
-        CMusEngMceSession* iMusSession;
-        TBool iPlaying;
-    };
-
-#endif
-
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengdisplayhandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGDISPLAYHANDLER_H
-#define MUSHENGDISPLAYHANDLER_H
-
-
-#include <e32std.h>
-
-// CLASS DECLARATION
-
-/**
-* An Interface for display services
-*
-* @lib museng.lib
-* @since S60 v3.2
-*/
-class MMusEngDisplayHandler
-    {
-
-    public:
-        
-        /*
-        * Defines possible rotations 
-        */
-        enum TDisplayOrientation
-            {
-            EPortrait, // Normal
-            ELandscape // 90 degree's clockwise rotation
-            };
-
-        /**
-        * Returns currently assigned drawing area
-        *
-        * @return TRect This session drawing area rectangle
-        */
-        virtual TRect Rect() const = 0;
-
-        /**
-        * Sets new drawing area
-        *
-        * @param TRect This session new drawing area rectangle
-        */
-        virtual void SetRectL( const TRect& aRect ) = 0;
-        
-        /**
-        * Sets secondary rect (e.g. viewfinder in twoway session)
-        * @param TRect This session new secondary drawing area rectangle
-        */
-        virtual void SetSecondaryRectL( const TRect& aSecondaryRect ) = 0;
-        
-        /**
-        * Gets secondary rect.
-        * @return TRect This session secondary drawing area rectangle
-        */
-        virtual TRect SecondaryRect() const = 0;
-        
-        /**
-        * Enables or disables display. Call to this function is considered
-        * as a permission or denial to draw to the display.
-        */
-        virtual void EnableDisplayL( TBool aEnable ) = 0;
-        
-        /**
-        * Check whether display is enabled 
-        */
-        virtual TBool IsDisplayEnabled() = 0;
-        
-        /**
-        * Returns current display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Current display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        virtual TDisplayOrientation OrientationL() = 0;
-        
-        /**
-        * Sets display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Sets display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        virtual void SetOrientationL( TDisplayOrientation aOrientation ) = 0;
-        
-        /**
-        * Check if display is actively displaying content
-        * @return ETrue if is displaying content, otherwise EFalse
-        */
-        virtual TBool IsDisplayActive() = 0;
-    };
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musenglivevideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGLIVEVIDEOPLAYER_H
-#define MUSHENGLIVEVIDEOPLAYER_H
-
-// INCLUDES
-#include "musenglocalvideoplayer.h"
-#include "lcdestinationfilecontrol.h"
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class TMusEngCameraHandler;
-
-// CLASS DECLARATION
-class CMusEngLiveVideoPlayer : 
-    public CMusEngLocalVideoPlayer,
-    public MLcDestinationFileControl
-    {
-    public: // Constructors and destructor
-        
-        static CMusEngLiveVideoPlayer* NewL( 
-            MMusEngDisplayHandler& aDisplayHandler,
-            TMusEngCameraHandler& aCameraHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-        ~CMusEngLiveVideoPlayer();
-        
-    public: // From MLcVideoPlayer
-        
-        TBool LcIsPlayingL();
-        
-        void LcPlayL();
-        
-        void LcPauseL();
-
-        MLcCameraControl* LcCameraControl();
-        
-        MLcDestinationFileControl* LcDestinationFileControl();
-            
-        MLcZoomControl* LcZoomControl();
-    
-        MLcBrightnessControl* LcBrightnessControl(); 
-        
-    public: // From MLcDestinationFileControl
-
-        void SetLcFileNameL( const TFileName& aFileName );
-        
-        TFileName& LcFileName();
-
-        void LcRecordL( TBool aRecord );
-
-        TBool LcIsRecording();
-        
-    private: // Constructors
-        
-        CMusEngLiveVideoPlayer(
-            MMusEngDisplayHandler& aDisplayHandler,
-            TMusEngCameraHandler& aCameraHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-    private: // Data
-        
-        TFileName iFileName;
-        TMusEngCameraHandler& iCameraHandler;
-    };
-
-#endif // MUSHENGLIVEVIDEOPLAYER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musenglocalvideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGLOCALVIDEOPLAYER_H
-#define MUSHENGLOCALVIDEOPLAYER_H
-
-// INCLUDES
-#include "musengvideoplayerbase.h"
-
-// CLASS DECLARATION
-class CMusEngLocalVideoPlayer : public CMusEngVideoPlayerBase
-    {
-    public: // Constructors and destructor
-        
-        ~CMusEngLocalVideoPlayer();
-        
-    public: // from CMusEngVideoPlayerBase
-        
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        void SetLcWindowRectL( TRect aRect );
-        
-        TRect LcWindowRect();
-
-        TLcVideoPlayerState iState;
-        
-    protected: // Constructors
-        
-        CMusEngLocalVideoPlayer(
-            MMusEngDisplayHandler& aDisplayHandler,
-            MLcAudioControl& aLcAudioControl );
-    };
-
-#endif // MUSHENGLOCALVIDEOPLAYER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musenglogger.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-#ifndef MUSENGLOGGER_H
-#define MUSENGLOGGER_H
-
-
-#include "muslogger.h"
-
-#if ( !_DEBUG || UNIT_TESTING ) // release or unit test build; no logs
-
-#define MUS_ENG_LOG_SESSION_STATE( aSession )
-#define MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )
-#define MUS_ENG_LOG_STREAM_STATE( aStream )
-#define MUS_ENG_LOG_SINK_STATES( aStream )
-#define MUS_ENG_LOG_SOURCE_STATE( aSource )
-#define MUS_ENG_LOG_SINK_STATE( aSink )
-#define MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )
-
-#else // debug build; logs
-
-#include <mcesession.h>
-#include <mceaudiostream.h>
-#include <mcecamerasource.h>
-#include <mcefilesource.h>
-#include <mcertpsource.h>
-#include <mcedisplaysink.h>
-#include <mcespeakersink.h>
-#include <mcefilesink.h>
-#include <mcertpsink.h>
-
-#define MUS_ENG_LOG_SESSION_STATE( aSession )\
-    {\
-    TBuf<15> state;\
-    switch ( (aSession).State() )\
-        {\
-        case CMceSession::EIdle:\
-            {\
-            state = _L("EIdle");\
-            break;\
-            }\
-        case CMceSession::EOffering :\
-            {\
-            state = _L("EOffering");\
-            break;\
-            }\
-        case CMceSession::EIncoming:\
-            {\
-            state = _L("EIncoming");\
-            break;\
-            }\
-        case CMceSession::EReserving :\
-            {\
-            state = _L("EReserving");\
-            break;\
-            }\
-        case CMceSession::EAnswering :\
-            {\
-            state = _L("EAnswering");\
-            break;\
-            }\
-        case CMceSession::EProceeding :\
-            {\
-            state = _L("EProceeding");\
-            break;\
-            }\
-        case CMceSession::EEstablished:\
-            {\
-            state = _L("EEstablished");\
-            break;\
-            }\
-        case CMceSession::ECancelling:\
-            {\
-            state = _L("ECancelling");\
-            break;\
-            }\
-        case CMceSession::ETerminating:\
-            {\
-            state = _L("ETerminating");\
-            break;\
-            }\
-        case CMceSession::ETerminated:\
-            {\
-            state = _L("ETerminated");\
-            break;\
-            }\
-        default:\
-            {\
-            state = _L("Unknown");\
-            break;\
-            }\
-        }\
-    MUS_LOG_TDESC( "mus: [ENGINE]     Session state is ", state )\
-    }
-
-
-#define MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )\
-    {\
-    MUS_ENG_LOG_SESSION_STATE( aSession )\
-    MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )\
-    }
-
-
-#define MUS_ENG_LOG_STREAM_STATE( aStream )\
-    {\
-    TBuf<20> streamState;\
-    switch ( (aStream).State() )\
-        {\
-        case CMceMediaStream::EUninitialized:\
-            {\
-            streamState = _L("EIdle");\
-            break;\
-            }\
-        case CMceMediaStream::EInitialized:\
-            {\
-            streamState = _L("EInitialized");\
-            break;\
-            }\
-        case CMceMediaStream::EBuffering:\
-            {\
-            streamState = _L("EBuffering");\
-            break;\
-            }\
-        case CMceMediaStream::EIdle:\
-            {\
-            streamState = _L("EIdle");\
-            break;\
-            }\
-        case CMceMediaStream::EStreaming:\
-            {\
-            streamState = _L("EStreaming");\
-            break;\
-            }\
-        case CMceMediaStream::EDisabled:\
-            {\
-            streamState = _L("EDisabled");\
-            break;\
-            }\
-        case CMceMediaStream::ENoResources:\
-            {\
-            streamState = _L("ENoResources");\
-            break;\
-            }\
-        case CMceMediaStream::ETranscodingRequired:\
-            {\
-            streamState = _L("ETranscodingRequired");\
-            break;\
-            }\
-        case CMceMediaStream::ETranscoding:\
-            {\
-            streamState = _L("ETranscoding");\
-            break;\
-            }\
-        default:\
-            {\
-            streamState = _L("Unknown");\
-            break;\
-            }\
-        }\
-        if ( (aStream).Type() == KMceAudio )\
-            {\
-            MUS_LOG_TDESC( "mus: [ENGINE]     AudioStream state is ", streamState )\
-            }\
-        else\
-            {\
-            MUS_LOG_TDESC( "mus: [ENGINE]     VideoStream state is ", streamState )\
-            }\
-        MUS_ENG_LOG_SOURCE_STATE( (aStream).Source() )\
-        MUS_ENG_LOG_SINK_STATES( (aStream) )\
-    }
-
-
-#define MUS_ENG_LOG_SINK_STATES( aStream )\
-    {\
-    for ( TInt sinkIndex = 0; sinkIndex < aStream.Sinks().Count(); ++sinkIndex )\
-        {\
-        MUS_ENG_LOG_SINK_STATE( aStream.Sinks()[ sinkIndex ] )\
-        }\
-    }
-    
-
-#define MUS_ENG_LOG_SOURCE_STATE( aSource )\
-    {\
-    if ( aSource )\
-        {\
-        TBuf<10> sourceState;\
-        if ( aSource->IsEnabled() )\
-            {\
-            sourceState = _L("enabled");\
-            }\
-        else\
-            {\
-            sourceState = _L("disabled");\
-            }\
-        switch ( aSource->Type() )\
-            {\
-            case KMceCameraSource:\
-                {\
-                MUS_LOG_TDESC( "                    CameraSource is ", sourceState )\
-                break;\
-                }\
-            case KMceFileSource:\
-                {\
-                MUS_LOG_TDESC( "                    FileSource is ", sourceState )\
-                break;\
-                }\
-            case KMceRTPSource:\
-                {\
-                MUS_LOG_TDESC( "                    RtpSource is ", sourceState )\
-                break;\
-                }\
-            default:\
-                {\
-                MUS_LOG_TDESC( "                    UnknownSource is ", sourceState )\
-                break;\
-                }\
-            }\
-        }\
-    else\
-        {\
-        MUS_LOG( "                    No source in stream" )\
-        }\
-    }
-
-#define MUS_ENG_LOG_SINK_STATE( aSink )\
-    {\
-    if ( aSink )\
-        {\
-        TBuf<10> sinkState;\
-        if ( aSink->IsEnabled() )\
-            {\
-            sinkState = _L("enabled");\
-            }\
-        else\
-            {\
-            sinkState = _L("disabled");\
-            }\
-        switch ( aSink->Type() )\
-            {\
-            case KMceDisplaySink:\
-                {\
-                MUS_LOG_TDESC( "                    DisplaySink is ", sinkState )\
-                break;\
-                }\
-            case KMceSpeakerSink:\
-                {\
-                MUS_LOG_TDESC( "                    SpeakerSink is ", sinkState )\
-                break;\
-                }\
-            case KMceRTPSink:\
-                {\
-                MUS_LOG_TDESC( "                    RtpSink is ", sinkState )\
-                break;\
-                }\
-            case KMceFileSink:\
-                {\
-                MUS_LOG_TDESC( "                    FileSink is ", sinkState )\
-                break;\
-                }\
-            default:\
-                {\
-                MUS_LOG_TDESC( "                    UnknownSink is ", sinkState )\
-                break;\
-                }\
-            }\
-        }\
-    }
-    
-
-#define MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )\
-    {\
-    MUS_LOG1( "                  StatusCode is %d", aStatusCode )\
-    HBufC16* reasonPhrase = HBufC16::NewLC( aReasonPhrase.Length() );\
-    reasonPhrase->Des().Copy( aReasonPhrase );\
-    MUS_LOG_TDESC( "                  ReasonPhrase is ",(*reasonPhrase) )\
-    CleanupStack::PopAndDestroy( reasonPhrase );\
-    }
-    
-    
-
-#endif // _DEBUG
-
-
-#endif // MUSENGLOGGER_H
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengmcesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,295 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSENGMCESESSION_H
-#define MUSENGMCESESSION_H
-
-// USER
-#include "musengcamerahandler.h"
-#include "musengdisplayhandler.h"
-#include "lcsession.h"
-#include "lcaudiocontrol.h"
-#include "svptimerobserver.h"
-
-#include <e32base.h>
-
-#include    <lcvtindicatorcontroller.h>
-
-
-// FORWARD DECLARATIONS
-class CContactTextField;
-class CPbkContactItem;
-class CPbkContactEngine;
-class MLcSessionObserver;
-class CMusEngLiveVideoPlayer;
-class CMusEngRemoteVideoPlayer;
-class CSVPTimer;
-class CMccScreen;
-
-
-// CONSTANTS
-
-_LIT8( KMusEngAcceptContactHeader, 
-       "Accept-Contact: *;+g.3gpp.cs-voice; explicit" );
-_LIT8( KMusAcceptHeader, 
-       "Accept: application/sdp" );
-_LIT8( KMusEngSessionSdpLineXApplication, "a=X-application:com.nokia.rtvs\r\n" );
-_LIT8( KMusEngSessionSdpLineApplication , "a=application:com.gsma.rts\r\n" );
-_LIT8( KMusEngSessionSdpLineType, "a=type:videolive\r\n" );
-_LIT8( KMusEngSessionSdpLineBandwidthLine  , "b=AS:" );
-_LIT8( KMusEngSessionSdpLineBandwidthField  , "b=AS:85\r\n" );
-_LIT8( KMusEngSessionSdpLineTiasLine  , "b=TIAS:" );
-_LIT8( KMusPPreferredIdentity, "P-Preferred-Identity" );
-_LIT8( KMusEngNewLine  , "\r\n" );
-
-const TInt KMusTiasMultiplier = 1000;
-const TUint8 KMusEngRtpKeepAliveTimer = 5;
-const TUint8 KMusEngKeepAlivePayloadTypeVideoH263 = 96;
-const TUint8 KMusEngKeepAlivePayloadTypeAudio = 97;
-const TUint8 KMusEngKeepAlivePayloadTypeVideoAvc = 98;
-
-// CLASS DECLARATION
-
-/**
-* Base class for Multimedia Sharing Engine MCE sessions, inherited by
-* CMusEngLiveSession CMusEngClipSession and CMusEngReceiveSession.
-*
-* CMusEngMceSession encapsulates CMCESession and simplifies use of
-* MCE Sessions to user interface. Also splits observers messy events
-* to simplified function calls.
-*
-* @lib musengine.lib
-*/
-class CMusEngMceSession : public CBase,
-                          public MLcSession,
-                          public MLcAudioControl,
-			  public MMusEngDisplayHandler,
-			  public MSVPTimerObserver
-    {
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngMceSession();
-
-        void SetRemoteL( const TDesC& aRemote );
-	      void ToggleCameraL();
-	      void PlayCameraL();
-	      void PauseCameraL();
-        void InformUiProviderAboutReceivingStart();
-
-    public: //  from MSVPTimerObserver
-
-        virtual void TimedOut( TInt aTimerId );       
-
-        
-    public: //  from MMusEngDisplayHandler
-
-        /**
-        * Returns currently assigned drawing area
-        *
-        * @return TRect This session drawing area rectangle
-        */
-        TRect Rect() const;
-        
-        /**
-        * Sets new drawing area
-        *
-        * @param TRect This session new drawing area rectangle
-        */
-        void SetRectL( const TRect& aRect );
-        
-        /**
-        * Sets secondary rect (e.g. viewfinder in twoway session)
-        * @param TRect This session new secondary drawing area rectangle
-        */
-        void SetSecondaryRectL( const TRect& aSecondaryRect );
-        
-        /**
-        * Gets secondary rect.
-        * @return TRect This session secondary drawing area rectangle
-        */
-        virtual TRect SecondaryRect() const;
-            
-        /**
-        * Returns current display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Current display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        TDisplayOrientation OrientationL();
-        
-        /**
-        * Sets display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Sets display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        void SetOrientationL( TDisplayOrientation aOrientation );
-
-        /**
-        * Permission to draw on screen device.
-        * 
-        * @pre Session is ongoing
-        */
-        void EnableDisplayL( TBool aEnable );
-        
-        /**
-        * Implements virtual from MMusEngDisplayHandler
-        *
-        * @pre Session is ongoing
-        */
-        TBool IsDisplayEnabled();
-        
-        /**
-        * Implements virtual from MMusEngDisplayHandler
-        *
-        * @pre Session is ongoing
-        */
-        TBool IsDisplayActive();
-
-        
-    public: // From MMusEngAudioRoutingObserver
-        
-        void AudioRoutingChanged();        
-        
-        
-    public: // From MLcSession
-        
-        virtual TLcSessionState LcSessionState() const;
-        
-        void SetLcSessionObserver( MLcSessionObserver* aObserver );
-
-        void SetLcUiProvider( MLcUiProvider* aUiProvider );        
-        
-        virtual MLcVideoPlayer* RemoteVideoPlayer();
-    
-        virtual MLcVideoPlayer* LocalVideoPlayer();       
-       
-        virtual const TDesC& LocalDisplayName();
-    
-        virtual const TDesC& RemoteDisplayName();
-
-        TInt SetParameter( TInt aId, TInt aValue );
-
-        TInt ParameterValue( TInt aId );    
-        
-        TBool IsBackgroundStartup();
-        
-        TInt SetForegroundStatus( TBool aIsForeground );
-        
-        const TDesC& RemoteDetails();
-        
-        TBool SendDialTone( TChar aKey);
-        
-        
-    public: // From MLcAudioControl
-        
-        TBool IsLcAudioMutedL();
-
-        void MuteLcAudioL( TBool aMute );       
-
-        TBool IsLcMicMutedL();    
-
-        void MuteLcMicL( TBool aMute );
-        
-        TBool IsEnablingLcLoudspeakerAllowed();
-
-        void EnableLcLoudspeakerL( TBool aEnabled );
-        
-        TBool IsLcLoudspeakerEnabled();
-
-        TInt LcVolumeL();
-     
-        void SetLcVolumeL( TInt aValue );    
-    
-        void IncreaseLcVolumeL();
-        
-        void DecreaseLcVolumeL();        
-
-        
-    protected: // CONSTRUCTORS
-
-        /**
-        * Constructor
-        *
-        */
-        CMusEngMceSession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-                            
-    protected: // Data
-
-        /**
-        * Drawing area rect.
-        */
-        TRect iRect;
-        
-        /**
-        * ETrue if operator specific behavior is expected
-        */
-        TBool iOperatorVariant;
-
-        /**
-        * Session state for MLcSession 
-        */
-        MLcSession::TLcSessionState iLcSessionState;       
-                                
-        TMusEngCameraHandler iCameraHandler;
-
-        CMusEngLiveVideoPlayer* iLiveVideoPlayer;
-        CMusEngRemoteVideoPlayer* iRemoteVideoPlayer;
-        TRect iSetRemoteRect;
-        TRect iSetLocalRect;
-	CSVPTimer* iTimer;
-    	TLcSessionState lLcSessionState;
-	HBufC* iRemoteAddress;
-	CMccScreen* iScreen;
-
-    private: // Data
-
-        /**
-        * The session observer, if present.
-        */
-        MLcSessionObserver* iLcSessionObserver;
-
-        /**
-        * The UI provider, if present.
-        */        
-        MLcUiProvider* iLcUiProvider;        
-                
-        /**
-        * Value indicates whether session was started in background mode.
-        * (see IsBackgroundStartup()). Once sending of video started, 
-        * iBackground is set to EFalse
-        */
-        TBool iBackground;
-        
-        // indicator control
-        LcVtIndicatorController* iIndicatorCtr;
-
-
-    };
-    
-#endif // MUSENGMCESESSION_H
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengremotevideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGREMOTEVIDEOPLAYER_H
-#define MUSHENGREMOTEVIDEOPLAYER_H
-
-// INCLUDES
-#include <e32base.h>
-#include "musengvideoplayerbase.h"
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class MLcWindow;
-class MLcAudioControl;
-
-// CLASS DECLARATION
-class CMusEngRemoteVideoPlayer : public CMusEngVideoPlayerBase
-    {
-    public: // Constructors and destructor
-        
-        static CMusEngRemoteVideoPlayer* NewL( MMusEngDisplayHandler& aDisplayHandler,
-                                               MLcAudioControl& aLcAudioControl );
-        
-        ~CMusEngRemoteVideoPlayer();
-     
-        
-    public: // from CMusEngVideoPlayerBase
-        
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        TBool LcIsPlayingL();
-        
-        TLcVideoPlayerState iState;
-        
-    private: // Constructors
-        
-        CMusEngRemoteVideoPlayer( MMusEngDisplayHandler& aDisplayHandler,
-                                  MLcAudioControl& aLcAudioControl );
-        void ConstructL();
-        
-    private: // Data
-  
-    };
-
-#endif // MUSHENGREMOTEVIDEOPLAYER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengsessionmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef CMUSENGSESSIONMANAGER_H
-#define CMUSENGSESSIONMANAGER_H
-
-// INCLUDES
-#include "lcengine.h"
-#include "mccdatareceiverobserver.h"
-
-// FORWARD DECLARATIONS
-class MLcSession;
-class CMusEngMceSession;
-class MLcUiProvider;
-class CMccDataReceiver;
-class CMccDataSender;
-
-class CMusEngSessionManager : public CLcEngine, public MMccDataReceiverObserver
-    {
-    public:
-    
-        static CMusEngSessionManager* NewL();
-        ~CMusEngSessionManager();
-
-	void DataReceived( const TDataMessage& aData );
-    
-    public: // From CLcEngine
-    
-        MLcSession& Session();       
-        
-        TBool IsFeatureSupported( TLcFeature aLcFeature );
-        
-    private: // Constructors
-
-        CMusEngSessionManager();
-        void ConstructL();
-               
-    private: // Data
-        
-        CMusEngMceSession* iSession;
-
-        CMccDataReceiver* iMsgReceiver;
-        CMccDataSender* iMsgSender;
-
-    private: // Constants
-        
-        static const int VTSETTING_ALWAYS_ASK_FIRST = 0;
-        static const int VTSETTING_DO_NOT_SHOW = 1;
-        static const int VTSETTING_SHOW_AUTOMATICALLY = 2;
-        
-    };  
-    
-#endif // CMUSENGSESSIONMANAGER_H
-
-// end of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengtwowayrecvsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYRECVSESSION_H
-#define MUSHENGTWOWAYRECVSESSION_H
-
-// USER
-#include "musengreceivesession.h"
-#include "musunittesting.h"
-#include "mussettings.h"
-#include "musengcamerahandler.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class CMceDisplaySink;
-class CMceStreamBundle;
-class CMusEngLiveVideoPlayer;
-
-
-class CMusEngTwoWayRecvSession : public CMusEngReceiveSession
-    {
-    MUS_UNITTEST( UT_CMusEngTwoWayRecvSession )
-
-    
-    public:
-        /**
-        * Creates new MultimediaSharing two-way receive session.
-        * @return CMusEngTwoWayRecvSession* New instanse of specified class
-        */
-        static CMusEngTwoWayRecvSession* NewL();
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngTwoWayRecvSession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-
-        CMusEngMceSession::TDisplayOrientation OrientationL();
-        
-        void SetOrientationL( TDisplayOrientation aOrientation );
-        
-    public:
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        void SetRectsL( const TRect& aRemoteRect,
-                                 const TRect& aLocalRect );
-   
-        /**
-        * Gets camera handler (can be used for zooming etc.) 
-        */
-        TMusEngCameraHandler& Camera();
- 
-    public: // from MLcSession
-    
-        MLcVideoPlayer* LocalVideoPlayer();        
-        
-    protected: // From CMusEngReceiveSession
-        
-        /**
-        * Sets local rect (viewfinder).
-        * 
-        */
-        void SetSecondaryRectL( const TRect& aSecondaryRect );
-        
-        /**
-        * Gets local rect (viewfinder).
-        * 
-        */
-        TRect SecondaryRect() const;
-        
-        void CompleteSessionStructureL();
-        
-        void RectChangedL();
-   
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngTwoWayRecvSession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-        
-    private:
-        
-        void CompleteSessionStructureAudioPartL( 
-                   const RPointerArray<CMceMediaStream>& aStreams, 
-                   CMceStreamBundle& aLocalBundle, 
-                   CMceMediaStream* aVideoInStream,
-                   CMceMediaStream* aVideoOutStream );
-          
-        void CompleteSessionStructureInStreamL( CMceMediaStream& aVideoInStream, 
-                                                CMceStreamBundle& aLocalBundle );
-          
-        void CompleteSessionStructureOutStreamL( CMceMediaStream& aVideoOutStream );
-        
-
-    private:
-        
-        TRect iLocalRect;
-        
-        TMusEngCameraHandler iCameraHandler;
-        
-        /// The live video player implementing MLcVideoPlayer
-        CMusEngLiveVideoPlayer* iLiveVideoPlayer;  
-        
-        TRect iSetRemoteRect;
-        TRect iSetLocalRect;
-       
-    };
-
-#endif
-
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengtwowaysession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYSESSION_H
-#define MUSHENGTWOWAYSESSION_H
-
-// USER
-#include "musengmcesession.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class MMusEngLiveSessionObserver;
-class CMceDisplaySink;
-class MMusEngTwoWaySessionObserver;
-class CMusEngRemoteVideoPlayer;
-
-
-class CMusEngTwoWaySession : public CMusEngMceSession
-    {    
-    public:
-        /**
-        * Creates new MultimediaSharing Live session.
-        * @return CMusEngTwoWaySession* New instanse of specified class
-        */
-        static CMusEngTwoWaySession* NewL();
-
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngTwoWaySession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-
-        void SetOrientationL( MMusEngDisplayHandler::TDisplayOrientation aOrientation );
-
-        void EstablishLcSessionL();
-        
-        void TerminateLcSessionL();        
-
-				void UpdateLcSessionL();
-        
-    public:
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        void SetRectsL( const TRect& aRemoteRect,
-                        const TRect& aLocalRect );
-        
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngTwoWaySession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-
-    };
-
-#endif
-
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/musengvideoplayerbase.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGVIDEOPLAYERBASE_H
-#define MUSHENGVIDEOPLAYERBASE_H
-
-// INCLUDES
-#include <e32base.h>
-#include "lcvideoplayer.h"
-#include "lcwindow.h"
-
-// FORWARD DECLARATIONS
-class TMusEngCameraHandler;
-class MMusEngDisplayHandler;
-
-// CLASS DECLARATION
-class CMusEngVideoPlayerBase : 
-    public CBase, public MLcVideoPlayer, public MLcWindow
-    {
-    public: // Constructors and destructor
-        
-        ~CMusEngVideoPlayerBase();
-        
-    public: // From MLcVideoPlayer
-    
-        virtual void LcPlayL(MLcVideoPlayer::TLcVideoPlayerSource aSource);
-        
-        virtual void LcPauseL();        
-        
-        MLcWindow* LcWindow();
-
-        virtual MLcCameraControl* LcCameraControl();
-        
-        virtual MLcSourceFileControl* LcSourceFileControl();
-        
-        virtual MLcDestinationFileControl* LcDestinationFileControl();
-        
-        MLcAudioControl* LcAudioControl();
-    
-        virtual MLcZoomControl* LcZoomControl();
-    
-        virtual MLcBrightnessControl* LcBrightnessControl();
-        
-        virtual MLcVideoPlayer::TLcVideoPlayerSource LcVideoPlayerSourceL();
-        
-    
-    public: // from MLcWindow
-        
-        void EnableLcWindowL( TBool aEnable );
-        
-        TBool IsLcWindowEnabled();        
-        
-        void SetLcWindowRectL( TRect aRect );
-        
-        TRect LcWindowRect();
-        
-        void SetLcWindowOrientationL( 
-            TLcWindowOrientation aOrientation );
-        
-        TLcWindowOrientation LcWindowOrientationL();    
-        
-    protected: // Constructors
-        
-        CMusEngVideoPlayerBase(
-            MMusEngDisplayHandler& aDisplayHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-    protected: // Data
-        
-        MMusEngDisplayHandler& iDisplayHandler;
-        MLcAudioControl& iLcAudioControl;
-        MLcVideoPlayer::TLcVideoPlayerSource iVideoPlayerSource;
-    };
-
-#endif // MUSHENGVIDEOPLAYERBASE_H
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/svptimer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Timer services for SVP
-*
-*/
-
-
-
-#ifndef SVPTIMER_H
-#define SVPTIMER_H
-
-#include <e32base.h>
-
-class MSVPTimerObserver;
-
-/**
- *  SVP timer
- *
- *  Provides timer service for SVP 
- *
- *  @lib 
- *  @since S60 3.2
- */
-class CSVPTimer : public CTimer
-    {
-
-public:
-
-    /**
-    * Two-phased constructor.
-    */
-    static CSVPTimer* NewL( MSVPTimerObserver& aObserver,
-                            TInt aTimerId );
-    
-    /**
-    * Destructor.
-    */
-    virtual ~CSVPTimer();
-
-public: // new methods
-
-    /**
-    * Sets the timer to be fired after given number of milliseconds.
-    * @since Series 60 3.2
-    * @param aMilliSeconds Time in milliseconds 
-    * @return 
-    */
-    void SetTime( TInt aMilliSeconds, TInt aTimerId );
-
-    /**
-    * Stops the timer.
-    * @since Series 60 3.2
-    * @return 
-    */
-    void Stop();
-
-    /**
-    * Returns the Timer ID
-    * @since Series 60 3.2
-    * @return TInt The timer ID.
-    */
-    TInt Id() const;
-    
-public: // methods from base classes
-
-    /**
-    * From CActive Called when an aychronic request is completed.
-    * @since Series 60 3.0
-    * @param None
-    * @return None
-    */
-    void RunL();
-
-private:
-
-    /**
-    * C++ default constructor.
-    */
-    CSVPTimer( MSVPTimerObserver& aObserver, TInt aTimerId );
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private: // data
-    
-    /**
-    * Reference to the observer.
-    */
-    MSVPTimerObserver& iObserver;
-  
-    /**
-    * The timer ID, given to observer when the timer fires.
-    * Timers can be identifies with this ID.
-    */
-    TInt iId;
-		
-    };
-
-#endif // SVPTIMER_H
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/inc/svptimerobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Observer for SVP timer
-*
-*/
-
-
-#ifndef SVPTIMEROBSERVER_H
-#define SVPTIMEROBSERVER_H
-
-#include<e32base.h>
-
-/**
- *  SVP timer observer
- *
- *  Observer for SVP timer
- *
- *  @lib 
- *  @since S60 3.2
- */
-class MSVPTimerObserver
-    {
-
-public: // New functions
-        
-    /**
-    * Notifies, that the previously set timer has now expired.
-    * Implemented by the class using the timer.
-    * @since Series 60 3.2
-    * @param TInt aTimerId The ID of the timer. Observer can identify 
-    * timers from each other with this ID.
-    * @return 
-    */
-    virtual void TimedOut( TInt aTimerId ) = 0;       
-    				
-  		
-    };
-
-#endif // SVPTIMEROBSERVER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/mccdatareceiver.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-        
-// INCLUDE FILES
-#include "mccdatareceiver.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::CMccDataReceiver
-// -----------------------------------------------------------------------------
-//
-CMccDataReceiver::CMccDataReceiver( MMccDataReceiverObserver& aObserver )
-	: CActive( EPriorityStandard ), iObserver( &aObserver )
-	{
-	CActiveScheduler::Add(this);
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMccDataReceiver::ConstructL()
-    {
-
-    TInt err = iMsgQueue.CreateGlobal(_L("IP-VT-Queue2"), 5, EOwnerProcess );
-    if ( err )
-        {
-        User::LeaveIfError( iMsgQueue.OpenGlobal(_L("IP-VT-Queue2")));
-        }
-
-    iMsgQueue.ReceiveBlocking( iInitData );
-
-    iMsgQueue.NotifyDataAvailable( iStatus );
-    SetActive();
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::NewL
-// -----------------------------------------------------------------------------
-//
-CMccDataReceiver* CMccDataReceiver::NewL( MMccDataReceiverObserver& aObserver )
-    {
-    CMccDataReceiver* self = 
-    	new ( ELeave ) CMccDataReceiver( aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-	
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::~CMccDataReceiver
-// -----------------------------------------------------------------------------
-//
-CMccDataReceiver::~CMccDataReceiver()
-    {
-    Cancel();
-	iMsgQueue.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CMccDataReceiver::DoCancel()
-	{
-	iMsgQueue.CancelDataAvailable();	
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::RunL
-// -----------------------------------------------------------------------------
-//	
-void CMccDataReceiver::RunL()
-	{
-	TDataMessage buffer;
-	iMsgQueue.Receive( buffer );
-	iObserver->DataReceived( buffer );
-        iMsgQueue.NotifyDataAvailable( iStatus );
-        SetActive();
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataReceiver::RunError
-// -----------------------------------------------------------------------------
-//	
-TInt CMccDataReceiver::RunError(TInt /*aError*/)
-	{
-	return KErrNone;
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/mccdatasender.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-        
-// INCLUDE FILES
-#include "mccdatasender.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::CMccDataSender
-// -----------------------------------------------------------------------------
-//
-CMccDataSender::CMccDataSender( )
-	: CActive( EPriorityStandard )
-	{
-	CActiveScheduler::Add(this);
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMccDataSender::ConstructL()
-    {
-    TInt err = iMsgQueue.CreateGlobal(_L("IP-VT-Queue1"), 5, EOwnerProcess );
-    if ( err )
-        {
-        User::LeaveIfError( iMsgQueue.OpenGlobal(_L("IP-VT-Queue1")));
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::NewL
-// -----------------------------------------------------------------------------
-//
-CMccDataSender* CMccDataSender::NewL( )
-    {
-    CMccDataSender* self = 
-    	new ( ELeave ) CMccDataSender();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::Send
-// -----------------------------------------------------------------------------
-//
-void CMccDataSender::Send( const TDataMessage& aData )
-{	
-    TInt err = iMsgQueue.Send( aData );
-    
-    if ( err == KErrOverflow )
-        {
-        if ( !IsActive() )
-            {
-            iBuffer = aData;            
-            iMsgQueue.NotifySpaceAvailable( iStatus );    
-    	    SetActive();
-            }
-        else
-            {
-            // TODO
-            // BUFFER OR DROP
-            }
-        }
-	}
-	
-// -----------------------------------------------------------------------------
-// CMccDataSender::~CMccDataSender
-// -----------------------------------------------------------------------------
-//
-CMccDataSender::~CMccDataSender()
-    {
-    Cancel();
-	iMsgQueue.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CMccDataSender::DoCancel()
-	{
-	iMsgQueue.CancelSpaceAvailable();	
-	}
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::RunL
-// -----------------------------------------------------------------------------
-//	
-void CMccDataSender::RunL()
-	{
-    iMsgQueue.Send( iBuffer );
-    iBuffer.iDataId = EUninitialized;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccDataSender::RunError
-// -----------------------------------------------------------------------------
-//	
-TInt CMccDataSender::RunError(TInt /*aError*/)
-	{
-	return KErrNone;
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/mccscreen.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,921 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    
-*
-*/
-
-#include <bitstd.h>
-#include <ecam.h>
-#include <ecam/mcameradirectviewfinder.h>
-#include <coecntrl.h>
-#include <eikenv.h>
-#include <eikappui.h>
-#include "MccScreen.h"
-#include "svptimer.h"
-#include "musenglogger.h"
-
-// EXTERNAL DATA STRUCTURES
-
-// EXTERNAL FUNCTION PROTOTYPES  
-
-// CONSTANTS
-
-_LIT(KMccWindowGroupName,"MccVideoWindow");
-
-// MACROS
-
-// LOCAL CONSTANTS AND MACROS
-
-// MODULE DATA STRUCTURES
-
-// LOCAL FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMccScreen::NewL
-// -----------------------------------------------------------------------------
-//
-CMccScreen* CMccScreen::NewL( CCamera* aCamera,
-    TPoint aPos, 
-    TSize aArea, 
-    TInt aIndex, 
-    TInt aWindowOrdinalPosition,
-    TInt aWindowOrdinalPriority,
-    TBool aSecondary,
-    RDrawableWindow* aParentWindow )
-    {
-    // Resolve screen type based on ecam capabilities, asssume direct vf
-    // to be available if camera not present yet.
-    CMccScreen* screen = NULL;
-    TBool useDirectVf = EFalse; 
-    
-    if ( aCamera )
-        {
-        TCameraInfo info;
-        aCamera->CameraInfo( info );
-        useDirectVf = ( info.iOptionsSupported & TCameraInfo::EViewFinderDirectSupported );
-        }
-    
-    if ( useDirectVf )
-        {
-        TRAPD( err, screen = CMccScreenDirect::NewL( 
-                    aCamera, aPos, aArea, aIndex, 
-                    aWindowOrdinalPosition, aWindowOrdinalPriority ) );
-        // If creation failes for some reason, bitmap vf is tried to be
-        // created as a fallback
-        if ( err == KErrNoMemory )
-            {
-            User::Leave( err );
-            }
-        if ( err )
-            {
-            }
-        }
-    
-    if ( !screen )
-        {
-        screen = CMccScreenBitmap::NewL( 
-                    aCamera, aPos, aArea, aIndex, 
-                    aWindowOrdinalPosition, aWindowOrdinalPriority, aSecondary, aParentWindow );
-        }
-    return screen;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::~CMccScreen
-// -----------------------------------------------------------------------------
-//
-CMccScreen::~CMccScreen()
-    {
-
-    StopCamera();
-    
-    delete iGraphicsContext;
-    delete iDev;
-    delete iRw;
-    delete iRwGroup;
-    iRwSession.Close();
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::StartL
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::StartL()
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::Stop
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::Stop()
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::Draw
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::Draw( CFbsBitmap& /*aFrame*/ )
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::SetCamera
-// -----------------------------------------------------------------------------
-//
-TInt CMccScreen::SetCamera( CCamera* aCamera )
-    {
-    if ( !aCamera )
-        {
-        StopCamera();
-        }
-       
-    iCamera = aCamera; 
-       
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMccScreen::StopCamera
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::StopCamera()
-    {
-    
-    if ( iCamera )
-        {
-        iCamera->StopViewFinder();
-        }
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::VfStartPossible
-// -----------------------------------------------------------------------------
-//
-TBool CMccScreen::VfStartPossible()
-    {
-    return ( iCamera && !iCamera->ViewFinderActive() && 
-             iArea.iWidth > 0 &&
-             iArea.iHeight > 0 );
-    }
-
-void CMccScreen::SetPrimaryRectL(TRect aRect)
-    {
-    MUS_LOG2( "mus: [ENGINE]  -> CMccScreen::SetPrimaryRectL() (%dx%d)", 
-              aRect.Width(), aRect.Height() );
-    MUS_LOG2( "mus: [ENGINE]  -> CMccScreen::SetPrimaryRectL() (%d,%d)", 
-              aRect.iTl.iX, aRect.iTl.iY );
-    iPrimaryRect = aRect;
-    }
-void CMccScreen::SetSecondaryRectL(TRect aRect)
-    {
-    MUS_LOG2( "mus: [ENGINE]  -> CMccScreen::SetSecondaryRectL() (%dx%d)", 
-              aRect.Width(), aRect.Height() );
-    MUS_LOG2( "mus: [ENGINE]  -> CMccScreen::SetSecondaryRectL() (%d,%d)", 
-              aRect.iTl.iX, aRect.iTl.iY );
-    iSecondaryRect = aRect;
-    }
-
-void CMccScreen::Update(TBool aIsForeground)
-    {
-        if ( aIsForeground ){
-    
-            iRwGroup->SetOrdinalPosition( iWindowOrdinalPosition, iWindowOrdinalPriority );
-            iRw->SetOrdinalPosition( iWindowOrdinalPosition, iWindowOrdinalPriority );
-            iRw->HandleTransparencyUpdate();
-            iRwSession.Flush();
-        } else {
-            
-        }
-        
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMccScreen::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::ConstructL()
-    {
-    User::LeaveIfError( iRwSession.Connect() );
-    	
-    // Create window group
-
-    iRwGroup = new (ELeave) RWindowGroup( iRwSession ) ;    
-    
-    RWindowGroup& rootWin = CCoeEnv::Static()->RootWin();
-    rootWin.AllowProcessToCreateChildWindowGroups(TUid::Uid( 0x101F8681 ));
-    TUint32 groupId = rootWin.WindowGroupId(); //iRwSession.GetFocusWindowGroup();
-    TUint32 focusGroupId = iRwSession.GetFocusWindowGroup();
-    //User::LeaveIfError( iRwGroup->ConstructChildApp( groupId, (TUint32)iRwGroup, EFalse ) );
-    User::LeaveIfError( iRwGroup->Construct( (TUint32)iRwGroup, EFalse ) );
-    
-    TBuf<100> name;
-    name.Append(KMccWindowGroupName);
-    iRwGroup->SetName( name );
-    
-    iRwGroup->SetOrdinalPosition( iWindowOrdinalPosition, iWindowOrdinalPriority );
-    //iRwGroup->SetOrdinalPriorityAdjust(1);
-    iRwGroup->AutoForeground(EFalse);
-    
-    // Create screen device
-    iDev = new (ELeave) CWsScreenDevice( iRwSession );
-    iDev->Construct( iDeviceIndex ); 
-    
-    TInt currMode = iDev->CurrentScreenMode();
-    MUS_LOG1( "mus: [ENGINE]  -> CMccScreen::ConstructL() mode: %d", currMode );                   
-    TPixelsTwipsAndRotation sizeAndRotation;
-    iDev->GetScreenModeSizeAndRotation( currMode, sizeAndRotation );
-    
-    MUS_LOG3( "mus: [ENGINE]  -> CMccScreen::ConstructL() (%dx%d) %d", 
-    	sizeAndRotation.iPixelSize.iWidth, sizeAndRotation.iPixelSize.iHeight, sizeAndRotation.iRotation );
-    
-    // Create window
-    iRw = new (ELeave) RWindow( iRwSession );
-    
-    User::LeaveIfError( iRw->Construct( *iRwGroup, (TUint32)iRw ) );
-
-
-    iRw->SetPosition( iPosition );
-
-    iRw->SetSize( iArea );    
-    iRw->SetOrdinalPosition( iWindowOrdinalPosition, iWindowOrdinalPriority );
-    iRw->EnableVisibilityChangeEvents();
-    
-    User::LeaveIfError( iDev->CreateContext( iGraphicsContext ) );
-    
-    iRw->Activate();
-    iRwSession.Flush();
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-CMccScreen::CMccScreen( 
-    TMccScreenType aScreenType,
-    CCamera* aCamera,
-    TPoint aPos, 
-    TSize aArea, 
-    TInt aIndex, 
-    TInt aWindowOrdinalPosition,
-    TInt aWindowOrdinalPriority,
-    TBool aSecondary,
-    RDrawableWindow* aParentWindow ) : 
-    iCamera( aCamera ),
-    iDeviceIndex( aIndex ), 
-    iPosition( aPos ), 
-    iArea( aArea ),
-    iWindowOrdinalPosition( aWindowOrdinalPosition ),
-    iWindowOrdinalPriority( aWindowOrdinalPriority ),
-    iScreenType( aScreenType ),
-    iSecondary(aSecondary),
-    iParentWindow(aParentWindow)/*,
-    iRwSession(CCoeEnv::Static()->WsSession()),
-    iRwGroup(&CCoeEnv::Static()->RootWin()),
-    iDev(CCoeEnv::Static()->ScreenDevice())*/
-    {
-    
-    }
-        
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::CMccScreenBitmap
-// -----------------------------------------------------------------------------
-//
-CMccScreenBitmap* CMccScreenBitmap::NewL( 
-    CCamera* aCamera,
-    TPoint aPos, 
-    TSize aArea, 
-    TInt aIndex, 
-    TInt aWindowOrdinalPosition,
-	TInt aWindowOrdinalPriority,
-	TBool aSecondary,
-	RDrawableWindow* aParentWindow)
-	{
-	CMccScreenBitmap* self = new ( ELeave ) CMccScreenBitmap( aCamera,
-                                                  aPos, 
-	                                              aArea, 
-	                                              aIndex,
-	                                              aWindowOrdinalPosition,
-	                                              aWindowOrdinalPriority,
-	                                              aSecondary,
-	                                              aParentWindow);
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );	
-	return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::CMccScreenBitmap
-// -----------------------------------------------------------------------------
-//
-CMccScreenBitmap::CMccScreenBitmap( 
-    CCamera* aCamera,
-    TPoint aPos, 
-    TSize aArea, 
-    TInt aIndex, 
-    TInt aWindowOrdinalPosition,
-	TInt aWindowOrdinalPriority,
-	TBool aSecondary,
-	RDrawableWindow* aParentWindow) :
-	CMccScreen( EBitmapScreen, aCamera, aPos, aArea, aIndex,
-                aWindowOrdinalPosition, aWindowOrdinalPriority, aSecondary, aParentWindow ),
-	iAborted( ETrue )
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::CMccScreenBitmap
-// -----------------------------------------------------------------------------
-//
-CMccScreenBitmap::~CMccScreenBitmap()
-	{
-	
-	DetachFrame(); // Must do bitmap detach before releasing window resources
-	delete iDirectScreenAccess;
-    
-    delete iPausedFrameData;
-    delete iTimer;
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::ConstructL()
-	{
-    iTimer = CSVPTimer::NewL( *this, 1 ); 
-    
-	CMccScreen::ConstructL();
-	
-	// Create direct screen access                                	
-	//iDirectScreenAccess = CDirectScreenAccess::NewL( iRwSession, *iDev, *iRw, *this );   
-	
-	UpdateViewFinderArea( iArea );
-	
-	StartL(); // Simu HACK
-	iTimer->SetTime(500, 1);
-	}
-    
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::StartL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::StartL()
-	{
-	iStopped = EFalse;
-	
-    if ( iCamera )
-        {
-        StartCameraL();
-        }
-    else if ( iPausedFrameData )
-        {
-           
-        CFbsBitmap* frame = RestoreFrameLC();
-        AttachFrameL( frame );
-        CleanupStack::Pop( frame );
-        }
-    else
-        {
-        // NOP
-        }
-    
-    StartDsaL();
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::StartCameraL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::StartCameraL()
-    {  
-    
-    __ASSERT_ALWAYS( iCamera, User::Leave( KErrNotReady ) );
-    
-    // Camera may modify the size
-    TSize vfBitmapSize = iArea;
-
-    if ( VfStartPossible() )
-        {
-        iCamera->StartViewFinderBitmapsL( vfBitmapSize );
-        }
-    
-     
-    UpdateViewFinderArea( vfBitmapSize );
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::StartDsaL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::StartDsaL()
-    {
-    /*
-    iAborted = EFalse;
-    iDirectScreenAccess->Cancel();
-    iDirectScreenAccess->StartL();
-    iGc = iDirectScreenAccess->Gc();    
-    iFbsDev = iDirectScreenAccess->ScreenDevice();
-    iRegion = iDirectScreenAccess->DrawingRegion();          
-    
-    iGc->SetClippingRegion( iRegion );
-    */
-    // Fill with black areas which are not covered by viewfinder image.
-    // If viewfinder image has not been yet received and drawn, fill whole area.
-    //
-      
- /*   if ( !iFirstImageDrawn )
-        {
-        // Whole area
-        iGc->SetBrushColor( KRgbBlue );
-        iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
-        TPoint pointTl( 0, 0 );
-        TRect rect( pointTl, iArea );
-        iGc->DrawRect( rect );
-        }
-    else
-        {
-        DrawBlackBorders();
-        }
-        
-    if ( iAttachedFrame )
-        {
-        
-        TSize viewFinderImageSize = iAttachedFrame->SizeInPixels();
-        
-        TPoint corner = UpdateViewFinderArea( viewFinderImageSize );
-        
-        iGc->BitBlt( corner, iAttachedFrame );
-        }
-        
-    DoScreenDeviceUpdate();
-    */
-    //iGc->SetBrushStyle( CGraphicsContext::ENullBrush );
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::Stop
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::Stop()
-	{
-	// Don't do anything yet, wait for next frame and then stop camera
-	iStopped = ETrue;
-	}
-	
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::Restart
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::Restart( RDirectScreenAccess::TTerminationReasons /*aReason*/ )
-	{
-	
-	TRAP_IGNORE( StartDsaL() );
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::AbortNow
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::AbortNow( RDirectScreenAccess::TTerminationReasons /*aReason*/ )
-	{
-	iDirectScreenAccess->Cancel();
-	
-	iAborted = ETrue;
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::Draw
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::Draw( CFbsBitmap& aFrame )
-	{
-	if ( iStopped )
-	    {
-	    
-	    // Screen was waiting for freeze frame from camera, inform observer
-	    // that camera is not needed anymore
-	    StoreFrameDataL( aFrame );
-	    CFbsBitmap* frame = RestoreFrameLC();
-	    AttachFrameL( frame );
-	    CleanupStack::Pop( frame );
-
-	    StopCamera();
-	    }
-	else
-	    {
-        // When normal frame draw is requested, attached frame is not anymore drawn
-        DetachFrame();
-        
-        DoDraw( aFrame );
-	    }
-	}
-
-void CMccScreenBitmap::TimedOut( TInt aTimerId )
-    {         
-    iGraphicsContext->Activate(*iRw);
-    iRw->Invalidate();
-    iRw->BeginRedraw();
-    TRgb color1(0,0,255,255);
-    iGraphicsContext->Clear();
-    iGraphicsContext->SetBrushColor( color1 );
-    iGraphicsContext->SetBrushStyle( CGraphicsContext::ESolidBrush );
-    iGraphicsContext->DrawRect( iPrimaryRect );
-    TRgb color2(0,255,0,255);
-    iGraphicsContext->SetBrushColor( color2 );
-    iGraphicsContext->DrawRect( iSecondaryRect );
-    iRw->EndRedraw();
-    iGraphicsContext->Deactivate();
-    iRwSession.Flush();
-    
-    /*
-    if ( !iAborted && iGc ){
-        iGc->SetBrushColor( KRgbBlue );
-        iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
-        iGc->DrawRect( iPrimaryRect );
-        iGc->SetBrushColor( KRgbGreen );
-        iGc->DrawRect( iSecondaryRect );
-        DoScreenDeviceUpdate();
-        }
-        */
-    iTimer->SetTime(500, 1);
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::AttachFrameL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::AttachFrameL( CFbsBitmap* aFrame )
-    {
-    
-    __ASSERT_ALWAYS( aFrame, User::Leave( KErrArgument ) );
-    
-    DetachFrame();
-    
-    iAttachedFrame = aFrame;
-    
-    DoDraw( *iAttachedFrame );
-
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::DetachFrame
-// -----------------------------------------------------------------------------
-//		
-void CMccScreenBitmap::DetachFrame()
-    {	
-    if ( iAttachedFrame )
-        {
-        iAttachedFrame->Reset();
-        delete iAttachedFrame;
-        }
-        
-    iAttachedFrame = NULL;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::UpdateViewFinderArea
-// -----------------------------------------------------------------------------
-//
-TPoint CMccScreenBitmap::UpdateViewFinderArea( TSize aViewFinderImageSize )
-    {
-    TPoint corner( 0, 0 );
-	if ( aViewFinderImageSize.iWidth < iArea.iWidth )
-	    {
-	    // Divide the subtraction by two (i.e. do centering)
-	    corner.iX = ( iArea.iWidth - aViewFinderImageSize.iWidth ) >> 1;
-	    }
-	    
-    if ( aViewFinderImageSize.iHeight < iArea.iHeight )
-	    {
-	    // Divide the subtraction by two (i.e. do centering)
-	    corner.iY = ( iArea.iHeight - aViewFinderImageSize.iHeight ) >> 1;
-	    }
-	    
-	iViewFinderImageRect = TRect( corner, aViewFinderImageSize );
-	
-	return corner;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::DoDraw
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::DoDraw( CFbsBitmap& aFrame )
-    {	
-    if ( !iAborted && iGc )
-        {
-        iFirstImageDrawn = ETrue;
-        	
-       	TSize viewFinderImageSize = aFrame.SizeInPixels();
-        
-       	TBool imageSizeChanged = ( viewFinderImageSize != iViewFinderImageRect.Size() );
-       	
-    	TPoint corner = UpdateViewFinderArea( viewFinderImageSize );
-    	
-    	if ( imageSizeChanged )
-    	    {
-    	    // Size of bitmap changed suddenly, borders need to be redrawn
-    	    DrawBlackBorders();
-    	    }
-
-        iGc->BitBlt( corner, &aFrame );
-        
-        DoScreenDeviceUpdate();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::DoScreenDeviceUpdate
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::DoScreenDeviceUpdate()
-    {
-    if ( iFbsDev )
-        {
-        iFbsDev->Update();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::StoreFrameDataL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::StoreFrameDataL( CFbsBitmap& aFrame )
-    {
-    
-    iPausedFrameSize = aFrame.SizeInPixels();
-    iPausedFrameDisplayMode = aFrame.DisplayMode();
-    TInt bitmapSizeInBytes = 
-            CFbsBitmap::ScanLineLength( iPausedFrameSize.iWidth, iPausedFrameDisplayMode ) *
-            iPausedFrameSize.iHeight;
-    HBufC8* pausedFrameData = HBufC8::NewLC( bitmapSizeInBytes );
-    aFrame.LockHeap();
-    pausedFrameData->Des().Copy( (TUint8*)aFrame.DataAddress(), bitmapSizeInBytes );
-    aFrame.UnlockHeap(); 
-    delete iPausedFrameData;
-    iPausedFrameData = pausedFrameData;
-    CleanupStack::Pop( pausedFrameData );
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::RestoreFrameLC
-// -----------------------------------------------------------------------------
-//
-CFbsBitmap* CMccScreenBitmap::RestoreFrameLC()
-    {
-    
-    __ASSERT_ALWAYS( iPausedFrameData, User::Leave( KErrNotReady ) );
-    
-    CFbsBitmap* tempFrame = new ( ELeave ) CFbsBitmap;
-    CleanupStack::PushL( tempFrame );
-    
-    User::LeaveIfError( tempFrame->Create( iPausedFrameSize, iPausedFrameDisplayMode ) );
-    TInt bitmapSizeInBytes = 
-            CFbsBitmap::ScanLineLength( iPausedFrameSize.iWidth, iPausedFrameDisplayMode ) *
-            iPausedFrameSize.iHeight;
-   
-    tempFrame->LockHeap();
-    Mem::Copy( tempFrame->DataAddress(), 
-               iPausedFrameData->Des().Ptr(), 
-               bitmapSizeInBytes );
-    tempFrame->UnlockHeap();
-    
-    
-    return tempFrame;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenBitmap::DrawBlackBorders
-// -----------------------------------------------------------------------------
-//
-void CMccScreenBitmap::DrawBlackBorders()
-    {
-    iGc->SetBrushColor( KRgbBlue );
-    iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
-            
-    // Upper area
-    TPoint pointTl( 0, 0 );
-    TPoint pointBr( iArea.iWidth, iViewFinderImageRect.iTl.iY );
-    TRect rect( pointTl, pointBr );
-    iGc->DrawRect( rect );
-    
-    // Lower area
-    pointTl.SetXY( 0, iViewFinderImageRect.iBr.iY );
-    pointBr.SetXY( iArea.iWidth, iArea.iHeight );
-    rect.SetRect( pointTl, pointBr );
-    iGc->DrawRect( rect );
-    
-    // Left area
-    pointTl.SetXY( 0, iViewFinderImageRect.iTl.iY );
-    pointBr.SetXY( iViewFinderImageRect.iTl.iX, iViewFinderImageRect.iBr.iY );
-    rect.SetRect( pointTl, pointBr );
-    iGc->DrawRect( rect );
-    
-    // Right area
-    pointTl.SetXY( iViewFinderImageRect.iBr.iX, iViewFinderImageRect.iTl.iY );
-    pointBr.SetXY( iArea.iWidth, iViewFinderImageRect.iBr.iY );
-    rect.SetRect( pointTl, pointBr );
-    iGc->DrawRect( rect );
-    }
-	
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::NewL
-// -----------------------------------------------------------------------------
-//
-CMccScreenDirect* CMccScreenDirect::NewL( CCamera* aCamera,
-    TPoint aPos, 
-    TSize aArea, 
-    TInt aIndex, 
-    TInt aWindowOrdinalPosition,
-    TInt aWindowOrdinalPriority )
-    {
-    
-    CMccScreenDirect* self = new ( ELeave ) CMccScreenDirect( aCamera,
-                                                      aPos, 
-                                                      aArea, 
-                                                      aIndex,
-                                                      aWindowOrdinalPosition,
-                                                      aWindowOrdinalPriority );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );  
-    
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::~CMccScreenDirect
-// -----------------------------------------------------------------------------
-//
-CMccScreenDirect::~CMccScreenDirect()
-    {
-    
-    if ( iDirectViewFinder )
-        {
-        iDirectViewFinder->Release();
-        iDirectViewFinder = NULL;
-        }
-
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::StartL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenDirect::StartL()
-    {
-
-    
-    if ( iDirectViewFinder && iDirectViewFinder->ViewFinderState() == 
-            CCamera::CCameraDirectViewFinder::EViewFinderPause )
-        {
-        
-        iDirectViewFinder->ResumeViewFinderDirectL();
-        }
-    else if ( VfStartPossible() )
-        {
-       
-        StartDirectViewFinderL();
-        }
-    else
-        {
-        // NOP
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::Stop
-// -----------------------------------------------------------------------------
-//
-void CMccScreenDirect::Stop()
-    {
-    
-    if ( iDirectViewFinder )
-        {
-		// TBD: pausing disabled temporarily due problems in it
-        //TRAP_IGNORE( iDirectViewFinder->PauseViewFinderDirectL() )
-        }
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::SetCamera
-// -----------------------------------------------------------------------------
-//
-TInt CMccScreenDirect::SetCamera( CCamera* aCamera )
-    {
-    CMccScreen::SetCamera( aCamera );
-    
-    return HandleDirectViewFinder();
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenDirect::ConstructL()
-    {
-        
-    CMccScreen::ConstructL();
-    
-    User::LeaveIfError( HandleDirectViewFinder() );
- 
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::CMccScreenDirect
-// -----------------------------------------------------------------------------
-//
-CMccScreenDirect::CMccScreenDirect( 
-    CCamera* aCamera,
-    TPoint aPos, 
-    TSize aArea, 
-    TInt aIndex, 
-    TInt aWindowOrdinalPosition,
-    TInt aWindowOrdinalPriority ) : 
-    CMccScreen( EDirectScreen, aCamera, aPos, aArea, aIndex,
-                aWindowOrdinalPosition, aWindowOrdinalPriority )
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::StartDirectViewFinderL
-// -----------------------------------------------------------------------------
-//
-void CMccScreenDirect::StartDirectViewFinderL()
-    {
-    if ( VfStartPossible() )
-        {
-        // Camera may modify the size
-        TSize vfBitmapSize = iArea;
-        
-        TPoint point( 0, 0 );
-        TRect vfRect( point, vfBitmapSize );
-        iCamera->StartViewFinderDirectL( iRwSession, *iDev, *iRw, vfRect );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreenDirect::HandleDirectViewFinder
-// -----------------------------------------------------------------------------
-//
-TInt CMccScreenDirect::HandleDirectViewFinder()
-    {
-    TInt err( KErrNone );
-    if ( iCamera )
-        {
-        if ( !iDirectViewFinder )
-            {
-
-            iDirectViewFinder = static_cast<MCameraDirectViewFinder*>(
-                iCamera->CustomInterface( TUid::Uid( KECamMCameraDirectViewFinderUidValue ) ) );
-            
-            if ( !iDirectViewFinder )
-                {
-                err = KErrNotSupported;
-                }
-            }
-        }
-    else if ( iDirectViewFinder )
-        {
-        iDirectViewFinder->Release();
-        iDirectViewFinder = NULL;
-        }
-    else
-        {
-        // NOP
-        }
-    return err; 
-    }
-
-
-// End of file
-
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengcamerahandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,278 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengcamerahandler.h"
-#include "musenglogger.h"
-#include "musengmcesession.h"
-
-
-// SYSTEM
-#include <e32base.h>
-
-const TInt KMaxBrightness = 100;
-const TInt KMinBrightness = -100;
-const TInt KBrightnessStepSize = 10;
-
-
-//Number of big and small zoom steps on Zoom scale
-const TInt KZoomBigStepCount = 15;
-const TInt KZoomSmallStepCount = KZoomBigStepCount*2;
-const TInt KZoomStepMinSize = 1;
-
-const TInt64 KZoomFasterTime = 333333; // 1/3 second
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TMusEngCameraHandler::TMusEngCameraHandler() :
-    iDefaultBrightness( 0 ),
-    iZoomInTime(0),
-    iZoomOutTime(0),
-    iSmallZoomStep( KZoomStepMinSize ),
-    iBigZoomStep( KZoomStepMinSize ),
-    iCurrentCamera( TMusEngCameraHandler::ECameraNotAvailable )
-    {
-    iPlaying = ETrue; //Keep it true -> first play not reported up!
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcCameraCountL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcCameraCountL()" )
-    
-    return 2;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::CurrentLcCameraIndex()
-    {
-    return iCurrentCamera;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::ToggleLcCameraL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::ToggleLcCamera()" )
-    iMusSession->ToggleCameraL();
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::ToggleLcCamera()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MinLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MinLcBrightnessL()" )
- 
-    // minimum brightness is not in camera info, but a constant
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MinLcBrightnessL(): %d",
-              KMinBrightness )
-
-    return KMinBrightness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MaxLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MaxLcBrightnessL()" )
-    
-    // maximum brightness is not in camera info, but a constant
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MaxLcBrightnessL(): %d",
-              KMaxBrightness )
-
-    return KMaxBrightness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcBrightnessL()" )
-    
-    return 5;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetLcBrightnessL( TInt aValue )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> TMusEngCameraHandler::SetLcBrightnessL( %d )",
-              aValue )
-
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::SetLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::IncreaseLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::IncreaseLcBrightnessL()" )
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::IncreaseLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::DecreaseLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::DecreaseLcBrightnessL()" )
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::DecreaseLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MinLcZoomL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MinLcZoomL()" )
-
-    return 1;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MaxLcZoomL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MaxLcZoomL()" )
-
-    return 10;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcZoomValueL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomValueL" )
-
-
-    return 5;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetLcZoomValueL( TInt aValue )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> TMusEngCameraHandler::SetLcZoomValueL( %d )", 
-              aValue )
-                  
-    MUS_LOG( "mus: [ENGINE]  <- MusEngCameraHandler::SetLcZoomValueL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::LcZoomInL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomInL()" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::LcZoomInL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::LcZoomOutL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomOutL()" )
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::LcZoomOutL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetSession(CMusEngMceSession* aSession )
-    {
-    iMusSession = aSession;
-    }
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool TMusEngCameraHandler::IsPlayingL()
-    {
-    return iPlaying;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::PlayL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::PlayL()" )
-		if (!iPlaying) 
-		  {
-      iPlaying = ETrue;
-      iMusSession->PlayCameraL();
-		  }
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::PlayL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::PauseL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::PauseL()" )
-    iPlaying = EFalse;
-    iMusSession->PauseCameraL();
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::PauseL()" )
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengclipvideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,535 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musengclipvideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengmceutils.h"
-#include "musengdisplayhandler.h"
-#include "muslogger.h"
-
-// SYSTEM
-#include <mcesession.h>
-#include <mcevideostream.h>
-#include <mcefilesource.h>
-#include <drmcommon.h>
-
-// CONSTANTS
-const TInt64 KMicroSecondsInOneSecond = 1000000;
-const TInt KFastWindingFactor = 4;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer* CMusEngClipVideoPlayer::NewL( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngClipVideoPlayer( 
-        aDisplayHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer::CMusEngClipVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngLocalVideoPlayer( aDisplayHandler, aLcAudioControl )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer::~CMusEngClipVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::HasClipEnded()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::HasClipEnded" )
-
-    TBool hasClipEnded( EFalse );
-
-    if ( iMceSession )
-        {    
-        CMceVideoStream* videoOut = NULL;
-        
-        TRAPD( err, 
-               videoOut = MusEngMceUtils::GetVideoOutStreamL( *iMceSession ) );
-        if ( err != KErrNone ) 
-            {
-            MUS_LOG1( "mus: [ENGINE]     Error in GetVideoOutStreamL %d", err )
-            return EFalse;
-            }
-
-        CMceFileSource* filesource = NULL;
-        TRAP( err, filesource = MusEngMceUtils::GetFileSourceL( *iMceSession ) )
-
-        if ( err == KErrNone )
-            {
-            TTimeIntervalMicroSeconds position;
-            TTimeIntervalMicroSeconds duration;
-            TRAP( err, position = filesource->PositionL() );
-            TRAPD( err2, duration = filesource->DurationL() );
-            if ( err != KErrNone || err2 != KErrNone )
-                {
-                return EFalse;
-                }
-                
-            MUS_LOG2( "mus: [ENGINE]    position = %Ld, duration = %Ld", 
-                      position.Int64(), duration.Int64() )
-                        
-            hasClipEnded = 
-                ( position.Int64() == 0 && 
-                  !filesource->IsEnabled() && 
-                  videoOut->State() == CMceMediaStream::EDisabled );
-            }
-        }
-
-    if ( hasClipEnded )
-        {
-        iDelayFileEndingPos = 0;
-        }
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::HasClipEnded" )
-    
-    return hasClipEnded;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetBufferingPeriod( 
-    const TTimeIntervalMicroSeconds& aPeriod )
-    {
-    iBufferingPeriod = aPeriod;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::LcIsPlayingL()
-    {
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    return ( MusEngMceUtils::GetFileSourceL( *iMceSession )->IsEnabled() );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcPlayL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::LcPlayL" )
-    
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );    
-    
-    if ( !file->IsEnabled() )
-        {
-        file->EnableL();   
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::LcPlayL" )    
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcPauseL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::LcPauseL" )
-    
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );    
-    
-    if ( file->IsEnabled() )
-        {
-        file->DisableL();
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::LcPauseL" )   
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcSourceFileControl* CMusEngClipVideoPlayer::LcSourceFileControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetLcFileNameL( const TFileName& aFileName )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::SetLcFileNameL" )
-    
-    __ASSERT_ALWAYS( !IsProtectedFileL( aFileName ),
-                     User::Leave( KErrPermissionDenied ) );    
-
-    if ( iMceSession )
-        {
-        CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-        file->UpdateL( aFileName );
-        }
-    
-    iFileName = aFileName;
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::SetLcFileNameL" )    
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TFileName& CMusEngClipVideoPlayer::LcFileName()
-    {
-    return iFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// Since MCE does not at the moment support SetFastForwardL function, this
-// functionality is implemented by taking a timestamp when forwarding is
-// started and calculating a new position when it is ended.
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcFastForwardL( TBool aUseFFWD )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::FastForward( %d )", 
-              aUseFFWD )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    if ( aUseFFWD )
-        {
-        // Ignore if we are already fastforwarding
-        if ( iFFWDStartTime.Int64() > 0 )
-            {
-            return;
-            }
-
-        // Stop rewinding if ongoing, else just pause file source
-        if ( iFRWDStartTime.Int64() > 0 )
-            {
-            LcFastRewindL( EFalse );
-            }
-        else
-            {
-            file->DisableL();
-            }
-            
-        // Get timestamp for starttime
-        iFFWDStartTime.HomeTime();
-        }
-    else
-        {
-        // Leave if we are not fastforwarding
-        if ( iFFWDStartTime.Int64() == 0 )
-            {
-            User::Leave( KErrAlreadyExists );
-            }
-
-        // Set new position
-        file->SetPositionL( PositionMicroSecondsL( ETrue ) );
-        
-        // Reset timer
-        iFFWDStartTime = TTime( 0 );
-        }
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::FastForward" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// Since MCE does not at the moment support SetFastRewindL function, this
-// functionality is implemented by taking a timestamp when rewinding is
-// started and calculating a new position when it is ended.
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcFastRewindL( TBool aUseFRWD )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::FastRewind( %d )", 
-              aUseFRWD )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    if ( aUseFRWD )
-        {
-        // Ignore if we are already fastrewinding
-        if ( iFRWDStartTime.Int64() > 0 )
-            {
-            return;
-            }
-
-        // Stop fastforwarding if ongoing, else just pause file source
-        if ( iFFWDStartTime.Int64() > 0 )
-            {
-            LcFastForwardL( EFalse );
-            }
-        else
-            {
-            file->DisableL();
-            }
-            
-        // Get timestamp for starttime
-        iFRWDStartTime.HomeTime();
-        }
-    else
-        {
-        // Leave if we are not fastrewinding
-        if ( iFRWDStartTime.Int64() == 0 )
-            {
-            User::Leave( KErrAlreadyExists );
-            }
-
-        // Set new position
-        file->SetPositionL( PositionMicroSecondsL( ETrue ) );
-        
-        // Reset timer
-        iFRWDStartTime = TTime( 0 );
-        }
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::FastRewind" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalSeconds CMusEngClipVideoPlayer::LcFileDurationL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::DurationL" )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds duration = file->DurationL();
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::DurationL" )
-    
-    return TTimeIntervalSeconds( static_cast< TInt >( 
-        duration.Int64() / KMicroSecondsInOneSecond ) );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalSeconds CMusEngClipVideoPlayer::LcFilePositionL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::LcFilePositionL" )
-    
-    TTimeIntervalMicroSeconds currentPosition = PositionMicroSecondsL();
-    
-    MUS_LOG1( "mus: [ENGINE] <- CMusEngClipVideoPlayer::LcFilePositionL, %d", 
-              currentPosition.Int64() )
-    
-    return TTimeIntervalSeconds( static_cast< TInt >( 
-        currentPosition.Int64() / KMicroSecondsInOneSecond ) );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetLcFilePositionL( 
-    const TTimeIntervalSeconds& aPosition )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::SetPositionL ( %d )",
-              aPosition.Int() )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds position( 
-        KMicroSecondsInOneSecond * static_cast< TInt64 >( aPosition.Int() ) );
-
-    if ( position == 0 )
-        {
-        iRewindedToBeginning = ETrue;
-        }
-        
-    file->SetPositionL( position );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::SetPositionL ()" )
-    }
-
-// -----------------------------------------------------------------------------
-// Check is file DRM protected.
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::IsProtectedFileL( const TDesC& aClipFile )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::IsProtectedFileL(...)" )
-
-    TBool isDRMProtected = EFalse;
-    DRMCommon* drmapi = DRMCommon::NewL();
-    CleanupStack::PushL( drmapi );
-
-    User::LeaveIfError( drmapi->Connect() );
-    //Check DRM file protection
-    User::LeaveIfError( drmapi->IsProtectedFile( aClipFile, isDRMProtected ) );
-    drmapi->Disconnect();
-
-    CleanupStack::PopAndDestroy( drmapi );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::IsProtectedFileL(...)" )
-    return isDRMProtected;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalMicroSeconds CMusEngClipVideoPlayer::PositionMicroSecondsL( 
-    TBool aActualPosition )
-    {
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds position = file->PositionL();
-    TTimeIntervalMicroSeconds duration = file->DurationL();
-       
-    TTimeIntervalMicroSeconds calculatedPosition;
-    
-    // Adjust position if we are fastforwarding or -rewinding
-    if ( iFFWDStartTime.Int64() != 0 )
-        {
-        TTime now;
-        now.HomeTime();
-        calculatedPosition = KFastWindingFactor *
-                             now.MicroSecondsFrom( iFFWDStartTime ).Int64() +
-                             position.Int64();
-        if ( calculatedPosition > duration )
-            {
-            calculatedPosition = duration;
-            }
-        }
-    else if ( iFRWDStartTime.Int64() != 0 )
-        {
-        TTime now;
-        now.HomeTime();
-        calculatedPosition = position.Int64() -
-                             KFastWindingFactor *
-                             now.MicroSecondsFrom( iFRWDStartTime ).Int64();
-        if ( calculatedPosition < 0 )
-            {
-            calculatedPosition = 0;
-            }
-            
-        if ( calculatedPosition == 0 )
-            {
-            iRewindedToBeginning = ETrue;
-            }
-        }
-    else
-        {
-        calculatedPosition = position;
-        }
-    
-    if ( !aActualPosition )
-        {
-        calculatedPosition = 
-            GetVideoSinkRelativeFilePos( calculatedPosition, duration );
-        }
-        
-    return calculatedPosition;
-    }
-
-// -----------------------------------------------------------------------------
-// Modifies file position if position has reached end before clip has ended.
-// File position is not going in sync with local video playback as playback
-// buffers media before starting playing.
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalMicroSeconds CMusEngClipVideoPlayer::GetVideoSinkRelativeFilePos( 
-    const TTimeIntervalMicroSeconds& aActualPosition, 
-    const TTimeIntervalMicroSeconds& aDuration )
-    { 
-    MUS_LOG1( "mus: [ENGINE] PositionMicroSecondsL, pos before mod:%d", 
-              aActualPosition.Int64() )
-    
-    TTimeIntervalMicroSeconds tempCalculatedPosition( aActualPosition );
-    
-    if ( iDelayFileEndingPos != 0 )
-        {
-        iDelayFileEndingPos = aDuration;
-        tempCalculatedPosition = iDelayFileEndingPos;
-        }
-    else
-        {
-        // FRWD can go to zero even if clip has not ended, do not modify 
-        // time in such situation.
-        if ( aActualPosition == 0 && 
-             !HasClipEnded() && 
-             iFRWDStartTime.Int64() == 0 && 
-             !iRewindedToBeginning )
-            {
-            const TInt KMusDelayEndingModifier = 2;
-            iDelayFileEndingPos = aDuration.Int64() - 
-                iBufferingPeriod.Int64() / KMusDelayEndingModifier;
-            tempCalculatedPosition = iDelayFileEndingPos;
-            if ( iPreviousPos > tempCalculatedPosition )
-                {
-                tempCalculatedPosition = iPreviousPos;
-                }
-            }
-        else
-            {
-            iDelayFileEndingPos = 0;
-            }
-        
-        if ( iRewindedToBeginning && aActualPosition > 0 )
-            {
-            iRewindedToBeginning = EFalse;
-            }
-            
-        if ( tempCalculatedPosition < 0 )
-            {
-            tempCalculatedPosition = 0;
-            }
-        }
-    
-    iPreviousPos = tempCalculatedPosition;
-            
-    return tempCalculatedPosition;
-    }
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musenginepluginentry.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "musengsessionmanager.h"
-#include <ECom.h>
-#include <ImplementationProxy.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TImplementationProxy KMusEnginePluginImplementationTable[] =
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x20029876, CMusEngSessionManager::NewL )
-    };
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
-    {
-    aTableCount = sizeof( KMusEnginePluginImplementationTable ) /
-                  sizeof( TImplementationProxy );
-
-    return KMusEnginePluginImplementationTable;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musenglivevideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglivevideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengdisplayhandler.h"
-#include "musenglogger.h"
-
-// SYSTEM
-#include <e32base.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer* CMusEngLiveVideoPlayer::NewL( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    TMusEngCameraHandler& aCameraHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngLiveVideoPlayer( 
-        aDisplayHandler, aCameraHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer::CMusEngLiveVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    TMusEngCameraHandler& aCameraHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngLocalVideoPlayer( aDisplayHandler, aLcAudioControl ),
-    iCameraHandler( aCameraHandler )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer::~CMusEngLiveVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveVideoPlayer::LcIsPlayingL()
-    {
-    return iCameraHandler.IsPlayingL();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcPlayL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveVideoPlayer::LcPlayL" ) 
-    iCameraHandler.PlayL();
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveVideoPlayer::LcPlayL" ) 
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcPauseL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveVideoPlayer::LcPauseL" ) 
-    iCameraHandler.PauseL();
-    MUS_LOG( "mus: [ENGINE]  <> CMusEngLiveVideoPlayer::LcPauseL" ) 
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngLiveVideoPlayer::LcCameraControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcDestinationFileControl* CMusEngLiveVideoPlayer::LcDestinationFileControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngLiveVideoPlayer::LcZoomControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngLiveVideoPlayer::LcBrightnessControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::SetLcFileNameL( const TFileName& aFileName )
-    {
-    iFileName = aFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-TFileName& CMusEngLiveVideoPlayer::LcFileName()
-    {
-    return iFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcDestinationFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcRecordL( TBool aRecord )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngLiveVideoPlayer::LcRecordL(( %d )", 
-              aRecord )    
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveVideoPlayer::LcRecordL" ) 
-    }    
-
-// -----------------------------------------------------------------------------
-// From MLcDestinationFileControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveVideoPlayer::LcIsRecording()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveVideoPlayer::LcIsRecording()" )    
-    
-    TBool isEnabled( EFalse );
-                 
-    return isEnabled;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musenglocalvideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglocalvideoplayer.h"
-#include "musengdisplayhandler.h"
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLocalVideoPlayer::CMusEngLocalVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngVideoPlayerBase( aDisplayHandler, aLcAudioControl )
-    {
-    iState = EInit;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLocalVideoPlayer::~CMusEngLocalVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState 
-CMusEngLocalVideoPlayer::LcVideoPlayerState() const
-    {
-    return iState;
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngLocalVideoPlayer::SetLcWindowRectL( TRect aRect )
-    {
-    iDisplayHandler.SetSecondaryRectL( aRect );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngLocalVideoPlayer::LcWindowRect()
-    {
-    return iDisplayHandler.SecondaryRect();
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengmcesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,796 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengmcesession.h"
-#include "lcsessionobserver.h"
-#include "musenglogger.h"
-#include "lcuiprovider.h"
-#include "lcvideoplayer.h"
-#include "musengremotevideoplayer.h"
-#include "musenglivevideoplayer.h"
-#include "mccscreen.h"
-
-// SYSTEM
-#include <audiopreference.h>
-#include <e32property.h>
-
-#include <cntitem.h>
-#include <cntfield.h>
-#include <cntdef.h>
-#include <cntfldst.h>
-
-
-#include "svptimer.h"
-
-RDrawableWindow* testWindow = 0;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::CMusEngMceSession()
-    {
-    iBackground = IsBackgroundStartup();
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::ConstructL()" )
-
-    iRemoteVideoPlayer = CMusEngRemoteVideoPlayer::NewL( *this, *this ); 
-    iLiveVideoPlayer = CMusEngLiveVideoPlayer::NewL( *this, iCameraHandler, *this );      
-    iLcSessionState = MLcSession::EUninitialized;
-
-    iTimer = CSVPTimer::NewL( *this, 1 ); 
-    iCameraHandler.SetSession( this );
-    
-    // indicator control
-    iIndicatorCtr = new  ( ELeave ) LcVtIndicatorController();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::~CMusEngMceSession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::~CMusEngMceSession()" )
-
-    delete iRemoteAddress;
-    delete iRemoteVideoPlayer; 
-    delete iLiveVideoPlayer;    
-    delete iScreen;
-    
-    if (iIndicatorCtr)
-        {
-        iIndicatorCtr->disableActiveCallIndicator();
-        delete iIndicatorCtr;
-        }    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::~CMusEngMceSession()" )
-    }
-	
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngMceSession::Rect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::Rect()" )
-    return iRect;
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetRectL( const TRect& aRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  CMusEngSession::SetRectL()" )
-    if ( !iScreen ){
-        iScreen = CMccScreen::NewL(0,TPoint(0,0), TSize(640,640), 0, 1, 0, EFalse, testWindow);
-        }
-    iRect = aRect;
-    if ( iScreen )
-        {
-        iScreen->SetPrimaryRectL(iRect);
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::SetSecondaryRectL()" )
-    if ( !iScreen ){
-        iScreen = CMccScreen::NewL(0,TPoint(0,0), TSize(640,640), 0, 1, 0, EFalse, testWindow);
-        }
-    // Same rect is set by primary and secondary setters
-    iSetLocalRect = aSecondaryRect;
-    if ( iScreen )
-        {
-        iScreen->SetSecondaryRectL(iSetLocalRect);
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngMceSession::SecondaryRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::SecondaryRect()" )
-    return iSetLocalRect;
-    }
-
-#if 0
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetSecondaryRectL()" )
-    
-    iLocalRect = aSecondaryRect;
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetSecondaryRectL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngTwoWaySession::SecondaryRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SecondaryRect()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SecondaryRect()" )
-    return iLocalRect;
-    }
-
-#endif
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-MMusEngDisplayHandler::TDisplayOrientation CMusEngMceSession::OrientationL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::RotationL()" )           
-    return MMusEngDisplayHandler::EPortrait;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngMceSession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngMceSession::SetOrientationL() %d", 
-              aOrientation )
-              
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::SetOrientationL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngMceSession::EnableDisplay() %d", 
-              aEnable )
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::EnableDisplay()")
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsDisplayEnabled()
-    {
-    TBool enabled( EFalse );
-    return enabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsDisplayActive()
-    {
-    return ( IsDisplayEnabled() );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession 
-// -----------------------------------------------------------------------------
-//
-MLcSession::TLcSessionState CMusEngMceSession::LcSessionState() const
-    {
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::LcSessionState()" )
-
-    TLcSessionState lcSessionState = MLcSession::EUninitialized;
-
-/*
-    if ( iSession )
-        {
-        switch( iSession->State() )
-            {
-            case CMceSession::EIdle: 
-                {
-                lcSessionState = MLcSession::EInitialized;
-                break;
-                }
-            case CMceSession::EIncoming:
-            case CMceSession::EProceeding:
-            case CMceSession::EReserving:
-                {
-                lcSessionState = MLcSession::EReceived;
-                break;
-                }
-            
-            case CMceSession::EOffering:
-            case CMceSession::EAnswering:
-                {
-                lcSessionState = MLcSession::EOpening;
-                break;
-                }
-            case CMceSession::EEstablished:
-                {
-                lcSessionState = MLcSession::EOpen;
-                break;
-                }
-            case CMceSession::ECancelling:
-            case CMceSession::ETerminating:
-                {
-                lcSessionState = MLcSession::EClosing;
-                break;
-                }
-            case CMceSession::ETerminated:
-                {
-                lcSessionState = MLcSession::EClosed;
-                break;
-                }
-            default:
-               {
-               lcSessionState = MLcSession::EUninitialized;
-               break;
-               }
-            }
-        }
-*/
-
-    return  iLcSessionState;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcSessionObserver( MLcSessionObserver* aObserver )
-    {
-    iLcSessionObserver = aObserver;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcUiProvider( MLcUiProvider* aUiProvider )
-    {
-    iLcUiProvider = aUiProvider;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngMceSession::RemoteVideoPlayer()
-    {
-    return iRemoteVideoPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngMceSession::LocalVideoPlayer()
-    {
-    return iLiveVideoPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::LocalDisplayName()
-    {
-    return KNullDesC;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::RemoteDisplayName()
-    {
-    return *iRemoteAddress;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::SetParameter( TInt aId, TInt aValue )
-    {
-        if ( aId == 0 ){
-            testWindow = reinterpret_cast<RDrawableWindow*>(aValue);
-        }
-    return KErrNotSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::ParameterValue( TInt /*aId*/ )
-    {
-    return KErrNotSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsBackgroundStartup()
-    {    
-    return ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::SendDialTone( TChar aKey )
-    {    
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngMceSession::SendDialTone() key = %c",aKey )
-    return ETrue;
-    }
-
- // -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcAudioMutedL()
-    {    
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::MuteLcAudioL( TBool aMute )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcMicMutedL()
-    {
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::MuteLcMicL( TBool aMute )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsEnablingLcLoudspeakerAllowed()
-    {
-    return ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::EnableLcLoudspeakerL( TBool aEnabled )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcLoudspeakerEnabled()
-    {
-    return ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::LcVolumeL()
-    {
-    return 5;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcVolumeL( TInt aValue )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::IncreaseLcVolumeL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::DecreaseLcVolumeL()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::TimedOut( TInt aTimerId )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut()" )
-
-/*
-    iLcSessionState = MLcSession::EOpen;
-
-    if ( iLcSessionObserver )
-        {
-    	MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), StateChanged" )
-        iLcSessionObserver->StateChanged( *this );
-        }
-*/
-        switch( aTimerId )
-            {
-            case 1: 
-                {
-    						MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), StateChanged -> Established" )
-                
-    					InformUiProviderAboutReceivingStart();
-    						
-    					iLcSessionState = MLcSession::EOpen;
-        				iLcSessionObserver->StateChanged( *this );
-
-								// starting remote playing timer        				
-        				iTimer->SetTime(10000, 3);
-
-                break;
-                }
-            case 2: 
-                {
-    						MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), StateChanged -> RemotePlaying" )
-    						iRemoteVideoPlayer->iState = MLcVideoPlayer::EPlaying;
-        				iLcSessionObserver->StateChanged( *iRemoteVideoPlayer );
-                break;
-                }
-            case 3: 
-                {
-    						MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), StateChanged -> LocalPlaying" )
-    						iLiveVideoPlayer->iState = MLcVideoPlayer::EPlaying;
-        				iLcSessionObserver->StateChanged( *iLiveVideoPlayer );
-        				iTimer->SetTime(5000, 2);
-                break;
-                }
-            case 10: 
-                {
-    						MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), Camera Toggle, StateChanged -> LocalPaused" )
-    						iLiveVideoPlayer->iState = MLcVideoPlayer::EPaused;
-        				iLcSessionObserver->StateChanged( *iLiveVideoPlayer );
-        				iTimer->SetTime(10000, 11);
-                break;
-                }
-            case 11: 
-                {
-    						MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), Camera Toggle, StateChanged -> LocalPlaying" )
-    						iLiveVideoPlayer->iState = MLcVideoPlayer::EPlaying;
-        				iLcSessionObserver->StateChanged( *iLiveVideoPlayer );
-                break;
-                }
-            case 12: 
-                {
-    						MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), Camera Play, StateChanged -> LocalPlaying" )
-    						iLiveVideoPlayer->iState = MLcVideoPlayer::EPlaying;
-        				iLcSessionObserver->StateChanged( *iLiveVideoPlayer );
-                break;
-                }
-            case 13: 
-                {
-    						MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), Camera Pause, StateChanged -> LocalIdle" )
-    						iLiveVideoPlayer->iState = MLcVideoPlayer::EPaused;
-        				iLcSessionObserver->StateChanged( *iLiveVideoPlayer );
-                break;
-                }
-                
-
-            case 14:
-                {
-                MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TimedOut(), StateChanged -> EReceived" )
-                InformUiProviderAboutReceivingStart();
-                iLcSessionState = MLcSession::EReceived;
-                iLcSessionObserver->StateChanged( *this );
-                break;
-                }
-
-            default:
-               {
-               iLcSessionState = MLcSession::EUninitialized;
-               break;
-               }
-						}
-/*
-        switch( aTimerId )
-            {
-            case CMceSession::EIdle: 
-                {
-                lcSessionState = MLcSession::EInitialized;
-                break;
-                }
-            case CMceSession::EIncoming:
-            case CMceSession::EProceeding:
-            case CMceSession::EReserving:
-                {
-                lcSessionState = MLcSession::EReceived;
-                break;
-                }
-            
-            case CMceSession::EOffering:
-            case CMceSession::EAnswering:
-                {
-                lcSessionState = MLcSession::EOpening;
-                break;
-                }
-            case CMceSession::EEstablished:
-                {
-                lcSessionState = MLcSession::EOpen;
-                break;
-                }
-            case CMceSession::ECancelling:
-            case CMceSession::ETerminating:
-                {
-                lcSessionState = MLcSession::EClosing;
-                break;
-                }
-            case CMceSession::ETerminated:
-                {
-                lcSessionState = MLcSession::EClosed;
-                break;
-                }
-            default:
-               {
-               lcSessionState = MLcSession::EUninitialized;
-               break;
-               }
-            }
-*/
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::TimedOut()" )
-    }
-
-
-
-TInt CMusEngMceSession::SetForegroundStatus( TBool aIsForeground )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngMceSession::SetForegroundStatus() %d", 
-              aIsForeground )
-    if ( iScreen ){
-        iScreen->Update(aIsForeground);
-    }
-    
-    if ( aIsForeground )
-        {
-        iIndicatorCtr->disableActiveCallIndicator();
-        }
-    else {
-        iIndicatorCtr->enableActiveCallIndicator();
-        }
-    return KErrNone;
-    }
-
-_LIT( KIpVtEngStubRemoteDetails, "5556567844" );
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::RemoteDetails()
-    {
-    return KIpVtEngStubRemoteDetails();
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetRemoteL( const TDesC& aRemote )
-{
-    iRemoteAddress = aRemote.AllocL();
-}
-
-#if 0
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionStateChange()
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->StateChanged( *this );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionUpdate()
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->Updated( *this );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionFailure( TInt aReason )
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->Failed( *this, aReason );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerStateChange( 
-    MLcVideoPlayer* aPlayer )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->StateChanged( *aPlayer );
-        }
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerUpdate( 
-    MLcVideoPlayer* aPlayer )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->Updated( *aPlayer );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerFailure( 
-    MLcVideoPlayer* aPlayer, 
-    TInt aReason )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->Failed( *aPlayer, aReason );
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MLcUiProvider& CMusEngMceSession::LcUiProviderL()
-    {
-    __ASSERT_ALWAYS( iLcUiProvider, User::Leave( KErrNotReady ) );
-    return *iLcUiProvider;
-    }
-#endif
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformUiProviderAboutReceivingStart()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::InformUiProviderAboutReceivingStart()" )
-    if ( iBackground && iLcUiProvider )
-        {
-        MUS_LOG( "mus: [ENGINE]     receiving started in BG mode, switching to FG" )
-        iBackground = EFalse;
-        iLcUiProvider->HandleForegroundStatus( ETrue );
-        }
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::InformUiProviderAboutReceivingStart()" )
-    }
-
-void CMusEngMceSession::ToggleCameraL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::ToggleCameraL()" )
-    if( iLiveVideoPlayer->iState == MLcVideoPlayer::EPlaying )
-        {
-    		MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::ToggleCameraL(), start timer" )
-        iTimer->SetTime(5000, 10);
-        }
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::ToggleCameraL()" )
-    }
-    
-void CMusEngMceSession::PlayCameraL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::PlayCameraL()" )
-    iTimer->SetTime(5000, 12);
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::PlayCameraL()" )
-    }
-
-void CMusEngMceSession::PauseCameraL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::PauseCameraL()" )
-    iTimer->SetTime(5000, 13);
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::PauseCameraL()" )
-    }
-    
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengmceutils.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,594 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utilities to get and set profile used with SWIS.
-*
-*/
-
-
-
-// USER
-
-#include "musengmceutils.h"
-#include "muslogger.h"
-
-// SYSTEM
-
-#include <mcesession.h>
-#include <mcevideostream.h>
-#include <mceaudiostream.h>
-#include <mcertpsink.h>
-#include <mcemediasource.h>
-#include <mcertpsource.h>
-#include <mcecamerasource.h>
-#include <mcedisplaysink.h>
-#include <mcefilesource.h>
-#include <mcefilesink.h>
-#include <mcespeakersink.h>
-
-
-
-
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is a video stream with RTP source
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsVideoInStream( CMceMediaStream& aStream )
-    {
-    return ( aStream.Type() == KMceVideo &&
-             aStream.Source() && 
-             aStream.Source()->Type() == KMceRTPSource );
-    }
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is a video stream with RTP sink
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsVideoOutStream( CMceMediaStream& aStream )
-    {
-    TBool isOutStream( EFalse );
-    if ( aStream.Type() == KMceVideo )
-        {
-        CMceMediaSink* rtpSink = MusEngMceUtils::GetMediaSink(
-                                                   aStream,
-                                                   KMceRTPSink );
-        
-        isOutStream = ( rtpSink != NULL );
-        }
-    return isOutStream;
-    }
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is an audio stream with RTP source
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsAudioInStream( CMceMediaStream& aStream )
-    {
-    return ( aStream.Type() == KMceAudio &&
-             aStream.Source() && 
-             aStream.Source()->Type() == KMceRTPSource );
-    }
-    
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with RTP sink.
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetVideoOutStreamL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVideoOutStreamL()" )
-
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* videoOut = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoOutStream( *streams[i] ) )      
-            {
-            __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
-            
-            videoOut = static_cast<CMceVideoStream*>( streams[i] );
-            }
-            
-            // Check if bound stream is a video stream with RTP sink.
-        if ( streams[i]->BoundStream() &&
-             MusEngMceUtils::IsVideoOutStream( streams[i]->BoundStreamL() ) )
-            {
-            __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
-            
-            videoOut = static_cast<CMceVideoStream*>( 
-                                   &streams[i]->BoundStreamL() );
-            }   
-        }
-
-    __ASSERT_ALWAYS( videoOut, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVideoOutStreamL()" )
-
-    return videoOut;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with RTP source.
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetVideoInStreamL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVideoInStreamL()" )
-
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* videoIn = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoInStream( *streams[i] ) )
-            
-            {
-            __ASSERT_ALWAYS( !videoIn, User::Leave( KErrOverflow ) );
-
-            videoIn = static_cast<CMceVideoStream*>( streams[i] );
-            }
-            
-        // Check if bound stream is a video stream with RTP souce.
-        if ( streams[i]->BoundStream() &&
-             MusEngMceUtils::IsVideoInStream( streams[i]->BoundStreamL() ) )
-            {
-            __ASSERT_ALWAYS( !videoIn, User::Leave( KErrOverflow ) );
-
-            videoIn = static_cast<CMceVideoStream*>( 
-                                    &streams[i]->BoundStreamL() );
-            }       
-        }
-
-    __ASSERT_ALWAYS( videoIn, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVideoInStreamL()" )
-
-    return videoIn;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with file sink
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetRecordingStream( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetRecordingStreamL()" )
-    
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* recordingStream = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( streams[i]->Type() == KMceVideo )
-            {
-            if ( MusEngMceUtils::GetMediaSink( *streams[i], KMceFileSink ) )
-                {
-                recordingStream = static_cast<CMceVideoStream*>( streams[i] );
-                }
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetRecordingStreamL()" )
-    
-    return recordingStream;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a mediastream.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSink( CMceMediaStream& aStream,
-                                             TMceSinkType aType,
-                                             TMceSourceType aAssociatedSourceType )
-    {
-    const RPointerArray<CMceMediaSink>& sinks = aStream.Sinks();
-    for ( TInt i = 0; i < sinks.Count(); ++i )
-        {
-        if ( sinks[i]->Type() == aType && 
-           ( aAssociatedSourceType == KMusEngNoAssociatedSourceType || 
-             aStream.Source()->Type() == aAssociatedSourceType ) )
-            {
-            return sinks[i];
-            }
-        }
-        
-    return NULL;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a mediastream.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSinkL( CMceMediaStream& aStream,
-                                              TMceSinkType aType,
-                                              TMceSourceType aAssociatedSourceType )
-    {
-
-    CMceMediaSink* sink = MusEngMceUtils::GetMediaSink( aStream, aType, aAssociatedSourceType );
-
-    __ASSERT_ALWAYS( sink, User::Leave( KErrNotFound ) );
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a session.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSink( CMceSession& aSession,
-                                             TMceSinkType aType,
-                                             TMceSourceType aAssociatedSourceType,
-                                             TBool aStrictMatch )
-    {
-    CMceMediaSink* sink = NULL;
-
-    TRAP_IGNORE( sink = MusEngMceUtils::GetMediaSinkL( 
-            aSession, aType, aAssociatedSourceType, aStrictMatch ) )
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a session.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSinkL( CMceSession& aSession,
-                                              TMceSinkType aType,
-                                              TMceSourceType aAssociatedSourceType,
-                                              TBool aStrictMatch )
-    {
-    CMceMediaSink* sink = NULL;
-    
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        sink = MusEngMceUtils::GetMediaSink( *streams[i], aType, aAssociatedSourceType );
-        if ( sink )
-            {
-            return sink;
-            }
-        
-        if ( streams[i]->BoundStream() )
-            {
-            sink = MusEngMceUtils::GetMediaSink( streams[i]->BoundStreamL(), 
-                                                 aType,
-                                                 aAssociatedSourceType );
-            if ( sink )
-                {
-                return sink;
-                }
-            }
-        }
-    
-    if ( !sink && aAssociatedSourceType != KMusEngNoAssociatedSourceType && !aStrictMatch )
-        {
-        // No preferred match, try without source preference
-        sink = GetMediaSinkL( aSession, aType );
-        }
-
-    __ASSERT_ALWAYS( sink, User::Leave( KErrNotFound ) );
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a speaker sink contained by specified stream or bound stream.
-// -----------------------------------------------------------------------------
-//
-CMceSpeakerSink* MusEngMceUtils::GetSpeaker( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetSpeaker()" )
-
-    CMceSpeakerSink* speaker = NULL;
-    
-    if ( aStream.Type() == KMceAudio )
-        {
-        speaker = static_cast<CMceSpeakerSink*>(
-                    MusEngMceUtils::GetMediaSink( aStream, KMceSpeakerSink ) );
-    
-        if ( !speaker && aStream.BoundStream() )
-            {
-            CMceMediaStream* boundStream = NULL;
-            TRAPD( error, boundStream = &aStream.BoundStreamL() )
-            
-            if ( error == KErrNone )
-                {
-                speaker = static_cast<CMceSpeakerSink*>(
-                            MusEngMceUtils::GetMediaSink( *boundStream, 
-                                                          KMceSpeakerSink ) );
-                }
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetSpeaker()" )
-
-    return speaker;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// Gets handle to a camera source.
-// -----------------------------------------------------------------------------
-//
-CMceCameraSource* MusEngMceUtils::GetCameraL( CMceSession& aSession )
-    {
-    // Camera can be only in out stream
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetCameraL()" )
-
-    CMceVideoStream* videoOut = MusEngMceUtils::GetVideoOutStreamL( aSession );
-
-    if ( !( videoOut->Source() &&
-            videoOut->Source()->Type() == KMceCameraSource ) )
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetCameraL()" )
-    return static_cast<CMceCameraSource*>( videoOut->Source() );
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a file source.
-// -----------------------------------------------------------------------------
-//
-CMceFileSource* MusEngMceUtils::GetFileSourceL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetFileSourceL()" )
-
-    CMceVideoStream* videoOut = MusEngMceUtils::GetVideoOutStreamL( aSession );
-
-    if ( !( videoOut->Source() &&
-            videoOut->Source()->Type() == KMceFileSource ) )
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetFileSourceL()" )
-    return static_cast<CMceFileSource*>( videoOut->Source() );
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetDisplay( 
-    CMceSession& aSession, TBool aPreferViewFinder  )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetDisplay()" )
-    TMceSourceType preferredSource = 
-        aPreferViewFinder ? KMceCameraSource : KMusEngNoAssociatedSourceType;
-    return static_cast<CMceDisplaySink*>(
-            MusEngMceUtils::GetMediaSink( aSession, KMceDisplaySink, preferredSource ) );
-
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetDisplayL( 
-    CMceSession& aSession, TBool aPreferViewFinder )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetDisplayL()" )
-
-    CMceDisplaySink* display = MusEngMceUtils::GetDisplay( aSession, aPreferViewFinder );
-
-    __ASSERT_ALWAYS( display, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetDisplayL()" )
-    return display;
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying received video.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetReceivingDisplay( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetReceivingDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetReceivingDisplay()" )
-    
-    // Search display which is connected with rtp source
-    TMceSourceType preferredSource = KMceRTPSource;
-    return static_cast<CMceDisplaySink*>( MusEngMceUtils::GetMediaSink( 
-                aSession, KMceDisplaySink, preferredSource, ETrue ) );
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying received video.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetReceivingDisplayL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetReceivingDisplayL()" )
-
-    CMceDisplaySink* display = GetReceivingDisplay( aSession );
-    __ASSERT_ALWAYS( display != NULL, User::Leave( KErrNotFound ) );
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetReceivingDisplay()" )
-    
-    return display;
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying viewfinder content.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetVfDisplay( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVfDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVfDisplay()" )
-    
-    // Search display which is connected with camera
-    TMceSourceType preferredSource = KMceCameraSource;
-    return static_cast<CMceDisplaySink*>( MusEngMceUtils::GetMediaSink( 
-                aSession, KMceDisplaySink, preferredSource, ETrue ) );
-    }
-
-// -----------------------------------------------------------------------------
-// Adds display sink to specified stream if one does not exist already.
-// Display rect is set in both cases.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::AddDisplayL( CMceMediaStream& aStream, 
-                                  CMceManager& aManager,
-                                  const TRect& aDisplayRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::AddDisplayL()" )
-    
-    __ASSERT_ALWAYS( aStream.Type() == KMceVideo, User::Leave( KErrArgument ) );
-
-    CMceDisplaySink* display = static_cast<CMceDisplaySink*>(
-                                    MusEngMceUtils::GetMediaSink( 
-                                                            aStream,
-                                                            KMceDisplaySink ) );
-
-    if ( !display )
-        {
-        display = CMceDisplaySink::NewLC( aManager );
-        aStream.AddSinkL( display );
-        CleanupStack::Pop( display );
-        }
-
-    display->SetDisplayRectL( aDisplayRect );
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::AddDisplayL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Adds display sink to specified stream if one does not exist already.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::AddSpeakerL( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::AddSpeakerL()" )
-    
-    __ASSERT_ALWAYS( aStream.Type() == KMceAudio, User::Leave( KErrArgument ) );
-
-    CMceSpeakerSink* speaker = static_cast<CMceSpeakerSink*>(
-                                    MusEngMceUtils::GetMediaSink( 
-                                                            aStream,
-                                                            KMceSpeakerSink ) );
-
-    if ( !speaker )
-        {
-        speaker = CMceSpeakerSink::NewLC();
-        aStream.AddSinkL( speaker );
-        CleanupStack::Pop( speaker );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::AddSpeakerL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Disables parameter stream, its' source and all the sinks.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::DisableStreamL( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::DisableStreamL()" )
-    
-    aStream.DisableL();
-    
-    if ( aStream.Source() )
-        {
-        aStream.Source()->DisableL();
-        }
-        
-    for ( TInt sinkIndex = 0; sinkIndex < aStream.Sinks().Count(); ++sinkIndex )
-        {
-        aStream.Sinks()[ sinkIndex ]->DisableL();
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::DisableStreamL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::DoEnableDisplayL( CMceDisplaySink& aDisplay, TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> MusEngMceUtils::DoEnableDisplayL() %d", 
-              aEnable )
-    
-    if ( aEnable )
-        {
-        if ( !aDisplay.IsEnabled() )
-            {
-            aDisplay.EnableL();
-            MUS_LOG( "                  Display enabled" )
-            }
-        else
-            {
-            MUS_LOG( "                  Display already enabled, ignore" )
-            }
-        }
-    else
-        {
-        if ( aDisplay.IsEnabled() )
-            {
-            aDisplay.DisableL();
-            MUS_LOG( "                  Display disabled" )
-            }
-        else
-            {
-            MUS_LOG( "                  Display already disabled, ignore" )
-            }
-        }  
-        
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::DoEnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TInt MusEngMceUtils::EnableInactivityTimer( 
-    CMceSession& aSession, 
-    TUint32 aInactivityTimeout )
-    {
-    TInt err( KErrNotFound );
-    CMceVideoStream* stream = NULL;
-    TRAP_IGNORE( stream = MusEngMceUtils::GetVideoInStreamL( aSession ) )
-    if ( stream )
-        {
-        // Instream has always RTP source
-        err = KErrNone;
-        CMceRtpSource* rtpSource = static_cast<CMceRtpSource*>( stream->Source() );
-        TRAP( err, rtpSource->EnableInactivityTimerL( aInactivityTimeout ) ) 
-        }
-    
-    return err;
-    }
-      
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengremotevideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengremotevideoplayer.h"
-#include "musengdisplayhandler.h"
-
-// SYSTEM
-#include <e32base.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer* CMusEngRemoteVideoPlayer::NewL(
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngRemoteVideoPlayer( 
-        aDisplayHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer::CMusEngRemoteVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngVideoPlayerBase( aDisplayHandler, aLcAudioControl )
-    {
-    iState = EInit;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer::~CMusEngRemoteVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState 
-CMusEngRemoteVideoPlayer::LcVideoPlayerState() const
-    {
-    return iState;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngRemoteVideoPlayer::LcIsPlayingL()
-    {
-    return ETrue;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengsessionmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "musengsessionmanager.h"
-#include "musengmcesession.h"
-#include "musengtwowaysession.h"
-#include "lcsession.h"
-#include "mccdatasender.h"
-#include "mccdatareceiver.h"
-#include "musenglogger.h"
-#include "mccdatastructures.h"
-#include <settingsinternalcrkeys.h>
-#include <centralrepository.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionManager* CMusEngSessionManager::NewL()
-    {
-    CMusEngSessionManager* self = new( ELeave )CMusEngSessionManager();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-        
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-CMusEngSessionManager::~CMusEngSessionManager()
-    {
-    delete iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionManager::CMusEngSessionManager()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionManager::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngSessionManager::ConstructL()" )
-    //iMsgReceiver = CMccDataReceiver::NewL(*this);
-    MUS_LOG( "mus: [ENGINE]  MsgQueue1 setup complete" )
-    //iMsgSender = CMccDataSender::NewL();
-    MUS_LOG( "mus: [ENGINE]  MsgQueue2 setup complete" )
-    iSession = CMusEngTwoWaySession::NewL();
-    iSession->SetRemoteL( _L("Homer Simpson") );
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngSessionManager::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MLcSession& CMusEngSessionManager::Session()
-    {
-    return *iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionManager::DataReceived( const TDataMessage& aData )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngSessionManager::IsFeatureSupported( TLcFeature aLcFeature )
-    {
-    TBool ret = EFalse;
-    if ( ELcSendVideoQuery == aLcFeature )
-        {
-        TInt videoSendingSetting;
-        CRepository* repository = CRepository::NewL( KCRUidTelephonySettings );
-        if ( KErrNone == repository->Get(KSettingsVTVideoSending, videoSendingSetting) )
-            {
-            if ( VTSETTING_ALWAYS_ASK_FIRST == videoSendingSetting ) 
-                ret = ETrue;
-            }
-        delete repository;
-        }
-    return ret;
-    }
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengtwowayrecvsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,521 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengtwowayrecvsession.h"
-#include "lcsessionobserver.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "mussipprofilehandler.h"
-#include "musenglivevideoplayer.h"
-#include "musengremotevideoplayer.h"
-
-// SYSTEM
-#include <mcemanager.h>
-#include <mcecamerasource.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcesession.h>
-#include <mcertpsource.h>
-#include <mcestreambundle.h>
-#include <musmanager.h>
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds
-// 6 seconds keepalive timer, needs to be more than receiving timeout
-const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6; 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession* CMusEngTwoWayRecvSession::NewL()
-    {
-    CMusEngTwoWayRecvSession* self = new( ELeave )CMusEngTwoWayRecvSession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()" )
-    
-    delete iLiveVideoPlayer;  
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWayRecvSession::EnableDisplayL() %d", 
-              aEnable )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-    MusEngMceUtils::DoEnableDisplayL( *display, aEnable );
-                
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-    if ( vfDisplay )
-        {
-        MusEngMceUtils::DoEnableDisplayL( *vfDisplay, aEnable );  
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::TDisplayOrientation CMusEngTwoWayRecvSession::OrientationL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::RotationL()" )
-    
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-    
-    TDisplayOrientation displayOrientation;
-    CMceDisplaySink::TRotation rotation( display->RotationL() );
-    
-    MUS_LOG1( "mus: [ENGINE]     MCE rotation is %d", rotation )
-    
-    if ( rotation == CMceDisplaySink::ENone )
-        {
-        displayOrientation = CMusEngMceSession::EPortrait;
-        }
-    else
-        {
-        displayOrientation = CMusEngMceSession::ELandscape;
-        }
-    
-    MUS_LOG1( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::RotationL() %d", 
-              displayOrientation )
-    
-    return displayOrientation;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngTwoWayRecvSession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetOrientationL() %d", 
-              aOrientation )
-              
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-            
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-
-    CMceDisplaySink::TRotation rotation = ( aOrientation == EPortrait ) ? 
-        CMceDisplaySink::ENone : CMceDisplaySink::EClockwise90Degree;
-    
-    display->SetRotationL( rotation );
-    if ( vfDisplay )
-        {
-        vfDisplay->SetRotationL( rotation );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetOrientationL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetRectsL()" )  
-     
-    iLocalRect = aLocalRect;
-    iRect = aRemoteRect;
-    RectChangedL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetRectsL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetSecondaryRectL()" )
-    
-    iLocalRect = aSecondaryRect;
-    RectChangedL();
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetSecondaryRectL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngTwoWayRecvSession::SecondaryRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SecondaryRect()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SecondaryRect()" )
-    return iLocalRect;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TMusEngCameraHandler& CMusEngTwoWayRecvSession::Camera()
-    {
-    return iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngTwoWayRecvSession::LocalVideoPlayer()
-    {
-    return iLiveVideoPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void CMusEngTwoWayRecvSession::RectChangedL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::RectChangedL()" )
-
-
-    // If session is not yet created, do nothing
-    if ( iSession && iSession->State() != CMceSession::ETerminated )
-        {
-        TRect remoteRect( Rect() );
-        MUS_LOG2( "mus: [ENGINE]  remote tl.ix=%d tl.iy=%d", 
-                  remoteRect.iTl.iX, remoteRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  remote brc%d br.iy=%d", 
-                  remoteRect.iBr.iX, remoteRect.iBr.iY )    
-        MUS_LOG2( "mus: [ENGINE]  local tl.ix=%d tl.iy=%d", 
-                  iLocalRect.iTl.iX, iLocalRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  local br.ix=%d br.iy=%d", 
-                  iLocalRect.iBr.iX, iLocalRect.iBr.iY )
-        
-        if ( remoteRect != iSetRemoteRect )
-            {
-            CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-            display->SetDisplayRectL( remoteRect );
-            iSetRemoteRect = remoteRect;
-            }
-        
-        if ( iLocalRect != iSetLocalRect )
-            {
-            CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-            if ( vfDisplay )
-                {
-                vfDisplay->SetDisplayRectL( iLocalRect );
-                }
-            iSetLocalRect = iLocalRect;
-            }
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::RectChangedL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    iCameraHandler.SetSession( iSession );
-    
-    // Force bandwidth line usage in sdp as it is mandatory
-    // at MT side based on GSMA VS specification IR.74. Bandwidth is set to
-    // session or to media level based on sender's way of usage. If other end
-    // is not using bandwidth attribute at all, media level is preferred.
-    SetSessionSdpLinesL( *iSession, ETrue );
-
-    CMceStreamBundle* localBundle =
-                              CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
-
-    const RPointerArray<CMceMediaStream>& streams = iSession->Streams();
-    
-    CMceMediaStream* videoInStream = NULL;
-    CMceMediaStream* videoOutStream = NULL;
-    
-    // Search interesting video streams, sendrecv is preferred
-    TBool sendRecvVideoFound( EFalse );
-    for( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoInStream( *streams[i] ) &&
-             !sendRecvVideoFound )
-            {
-            videoInStream = streams[i];
-            
-            if ( streams[i]->BoundStream() )
-                {
-                videoOutStream = &streams[i]->BoundStreamL();
-                }
-            }
-        else if ( streams[i]->BoundStream() &&
-                  MusEngMceUtils::IsVideoInStream( streams[i]->BoundStreamL() ) &&
-                  !sendRecvVideoFound )
-            {
-            videoInStream = &streams[i]->BoundStreamL();
-                
-            videoOutStream = streams[i];
-            }
-        else
-            {
-            // NOP
-            }
-        
-        sendRecvVideoFound = ( videoInStream && videoOutStream );
-        }
-    
-    CompleteSessionStructureAudioPartL( streams, *localBundle, videoInStream, videoOutStream );
-    
-    if ( videoInStream )
-        {
-        CompleteSessionStructureInStreamL( *videoInStream, *localBundle );
-        }
-    else
-        {
-        // At least receiving video stream is required
-        User::Leave( KErrCorrupt );
-        }
-    
-    if ( videoOutStream )
-        {
-        CompleteSessionStructureOutStreamL( *videoOutStream );
-        }
-    
-    // Destroy bundle if it is not needed or transfer ownership
-    if ( localBundle->Streams().Count() > 1 )
-        {
-        iSession->AddBundleL( localBundle );
-        CleanupStack::Pop( localBundle );
-        }
-    else
-        {
-        CleanupStack::PopAndDestroy( localBundle );
-        }
-    
-    AdjustStreamsAndCodecsL();
-    
-    iSession->UpdateL();
-    
-    // Now session state is right to adjust volume
-    SetSpeakerVolumeL( LcVolumeL() );
-    
-    iSipProfileHandler->CreateProfileL( iSession->Profile() );
-    
-    iRemoteVideoPlayer->SetMceSession( iSession );
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession::CMusEngTwoWayRecvSession() 
-    : CMusEngReceiveSession()
-    {
-    iMceManagerUid.iUid = CMusManager::ESipInviteDesired2WayVideo;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::ConstructL()" )
-    
-    iCameraHandler.ReadCameraUsageKeyL();
-    CMusEngReceiveSession::ConstructL();
-    
-    iLiveVideoPlayer = 
-        CMusEngLiveVideoPlayer::NewL( *this, iCameraHandler, *this );
-    
-    // Override receiving timeout and keepalive values of
-    // normal one-way receiving session
-    //
-    iReceivingInactivityTimeout = KMusEngTwoWayReceivingActivityTimeout; 
-    iKeepaliveTimer = KMusEngTwoWayRtpKeepAliveTimer;
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// When checking audio streams also not interesting streams are removed from
-// session. Stream if removed if one of following apply:
-// 1. Is not and does not contain incoming video or audio
-// 2. We already have one incoming video stream
-// 3. Stream is audio and we run operator variant where audio is 
-//    not allowed.
-// 4. Two-way video exists and this one is audio
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL( 
-    const RPointerArray<CMceMediaStream>& aStreams, 
-    CMceStreamBundle& aLocalBundle, 
-    CMceMediaStream* aVideoInStream,
-    CMceMediaStream* aVideoOutStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL()" )
-    
-    // Audio streams not allowed in two-way session or in operator variant
-    TBool audioAllowed(  !( aVideoInStream && aVideoOutStream ) && !iOperatorVariant );
-    
-    for( TInt i = 0; i < aStreams.Count(); ++i )
-        {
-        // Audio supported currently only in recvonly case
-        if ( audioAllowed &&
-             MusEngMceUtils::IsAudioInStream( *aStreams[i] ) )
-            {
-            MusEngMceUtils::AddSpeakerL( *aStreams[i] );
-            
-            aLocalBundle.AddStreamL( *aStreams[i] );
-            
-            // Disable possible opposite stream to indicate that sendrecv audio is
-            // not allowed.
-            if ( aStreams[i]->BoundStream() )
-                {
-                MusEngMceUtils::DisableStreamL( aStreams[i]->BoundStreamL() );
-                }
-            }
-        else if ( audioAllowed &&
-                  aStreams[i]->BoundStream() &&
-                  MusEngMceUtils::IsAudioInStream( aStreams[i]->BoundStreamL() ) )
-            {
-            MusEngMceUtils::AddSpeakerL( aStreams[i]->BoundStreamL() );
-    
-            aLocalBundle.AddStreamL( aStreams[i]->BoundStreamL() );
-            
-            // Disable opposite stream to indicate that sendrecv audio is not allowed.
-            MusEngMceUtils::DisableStreamL( *aStreams[i] );
-            }
-        else if ( aStreams[ i ] != aVideoInStream && aStreams[ i ] != aVideoOutStream )
-            {
-           iSession->RemoveStreamL( *aStreams[i] );
-        
-            // Since succesfull removal of a stream has decreased the amount
-            // of streams in array by one, we have to modify the index
-            --i;
-            }
-        else
-            {
-            // NOP
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL( 
-    CMceMediaStream& aVideoInStream, CMceStreamBundle& aLocalBundle )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL()" )
-    
-    SetMediaSdpLinesL( aVideoInStream, ETrue );
-
-    MusEngMceUtils::AddDisplayL( aVideoInStream, *iManager, Rect() );
-    
-    static_cast<CMceRtpSource*>(aVideoInStream.Source())->UpdateL( 
-                                           KMusEngJitterBufferLength,
-                                           KMusEngJitterBufferTreshold,
-                                           KMusEngTwoWayReceivingActivityTimeout );
-                                            
-    aLocalBundle.AddStreamL( aVideoInStream );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL( 
-    CMceMediaStream& aVideoOutStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL()" )
-    
-    SetMediaSdpLinesL( aVideoOutStream, ETrue );
-        
-    CMceCameraSource* camera = NULL;
-    TRAP_IGNORE( camera = MusEngMceUtils::GetCameraL( *iSession ) )
-    if ( !camera )
-        {
-        camera = CMceCameraSource::NewLC( *iManager );
-        aVideoOutStream.SetSourceL( camera );
-        CleanupStack::Pop( camera );
-        }
-       
-    camera->DisableL(); // Start session in pause mode.
-    
-    iCameraHandler.InitializeL( *camera );
-    
-    CMceVideoStream* vfStream = CMceVideoStream::NewLC();
-
-    vfStream->SetSourceL( aVideoOutStream.Source() );
-         
-    // Complete stream
-    MusEngMceUtils::AddDisplayL( *vfStream, *iManager, SecondaryRect() );
-    
-    iSession->AddStreamL( vfStream );
-    CleanupStack::Pop( vfStream );
-    
-    iLiveVideoPlayer->SetMceSession( iSession );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL()" )
-    }
-
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengtwowaysession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengtwowaysession.h"
-#include "lcsessionobserver.h"
-#include "musenglogger.h"
-#include "musengremotevideoplayer.h"
-#include "musenglivevideoplayer.h"
-#include "svptimer.h"
-
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds
-// 6 seconds keepalive timer, needs to be more than receiving timeout
-const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6;
-
-//Uncomment this for MT Simulation.
-//#define MT_Simulation
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession* CMusEngTwoWaySession::NewL()
-    {
-    CMusEngTwoWaySession* self = new( ELeave )CMusEngTwoWaySession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession::~CMusEngTwoWaySession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWaySession::EnableDisplayL() %d", 
-              aEnable )
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngTwoWaySession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetOrientationL() %d", 
-              aOrientation )
-                  
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetOrientationL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetRectsL()" )  
-         
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetRectsL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession::CMusEngTwoWaySession() 
-    : CMusEngMceSession()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::ConstructL()" )
-    
-    CMusEngMceSession::ConstructL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::EstablishLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::EstablishLcSessionL" )
-
-    #ifdef MT_Simulation
-    if ( LcSessionState() != MLcSession::EReceived ) {
-    iTimer->SetTime(2000, 14);
-    } else {
-    iTimer->SetTime(2000, 1);
-    }
-    #else
-    
-    iTimer->SetTime(2000, 1);
-    #endif
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::EstablishLcSessionL" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::TerminateLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::TerminateLcSessionL" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::TerminateLcSessionL" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::UpdateLcSessionL()
-    {     
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::UpdateLcSessionL" )
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::UpdateLcSessionL" )
-    }
-    
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/musengvideoplayerbase.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglocalvideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengdisplayhandler.h"
-
-// SYSTEM
-#include <e32base.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngVideoPlayerBase::CMusEngVideoPlayerBase( 
-    MMusEngDisplayHandler& aDisplayHandler, MLcAudioControl& aLcAudioControl ) 
-    :iDisplayHandler( aDisplayHandler ),
-     iLcAudioControl( aLcAudioControl )     
-    {
-    iVideoPlayerSource = MLcVideoPlayer::ECameraSource ;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngVideoPlayerBase::~CMusEngVideoPlayerBase()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerSource CMusEngVideoPlayerBase::LcVideoPlayerSourceL()
-    {
-    return iVideoPlayerSource;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::LcPlayL(MLcVideoPlayer::TLcVideoPlayerSource aSource)
-    {
-    iVideoPlayerSource = aSource;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::LcPauseL()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcWindow* CMusEngVideoPlayerBase::LcWindow()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngVideoPlayerBase::LcCameraControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcSourceFileControl* CMusEngVideoPlayerBase::LcSourceFileControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcDestinationFileControl* CMusEngVideoPlayerBase::LcDestinationFileControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcAudioControl* CMusEngVideoPlayerBase::LcAudioControl()
-    {
-    return &iLcAudioControl;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngVideoPlayerBase::LcZoomControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngVideoPlayerBase::LcBrightnessControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::EnableLcWindowL( TBool aEnable )
-    {
-    iDisplayHandler.EnableDisplayL( aEnable );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngVideoPlayerBase::IsLcWindowEnabled()
-    {
-    return iDisplayHandler.IsDisplayEnabled();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::SetLcWindowRectL( TRect aRect )
-    {
-    iDisplayHandler.SetRectL( aRect );
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngVideoPlayerBase::LcWindowRect()
-    {
-    return iDisplayHandler.Rect();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::SetLcWindowOrientationL( 
-    TLcWindowOrientation aOrientation )
-    {
-    if ( aOrientation == MLcWindow::ELandscape )
-        {
-        iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::ELandscape );
-        }
-    else 
-        {
-        iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::EPortrait );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-MLcWindow::TLcWindowOrientation CMusEngVideoPlayerBase::LcWindowOrientationL()
-    {
-    MLcWindow::TLcWindowOrientation orientation;
-    if ( iDisplayHandler.OrientationL() == MMusEngDisplayHandler::ELandscape )
-        {
-        orientation = MLcWindow::ELandscape;
-        }
-    else
-        {
-        orientation = MLcWindow::EPortrait;
-        }
-    return orientation;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/ipvtengine/src/svptimer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Timer service for SVP     
-*
-*/
-
-
-#include "svptimer.h"
-#include "svptimerobserver.h"
-
-
-const TInt KMicroSecondsCoefficient = 1000;
-
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::CSVPTimer
-// ---------------------------------------------------------------------------
-//
-CSVPTimer::CSVPTimer( MSVPTimerObserver& aObserver, TInt aTimerId ): 
-    CTimer( EPriorityHigh ),
-    iObserver( aObserver ),
-    iId( aTimerId )
-    {
-    CActiveScheduler::Add( this );
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::CSVPTimer
-// ---------------------------------------------------------------------------
-//
-void CSVPTimer::ConstructL()
-    {
-    CTimer::ConstructL();
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::CSVPTimer
-// ---------------------------------------------------------------------------
-//
-CSVPTimer* CSVPTimer::NewL( MSVPTimerObserver& aObserver,
-                            TInt aTimerId )
-    {
-    CSVPTimer* self = new (ELeave) CSVPTimer( aObserver, aTimerId );
-    
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::~CSVPTimer
-// ---------------------------------------------------------------------------
-//  
-CSVPTimer::~CSVPTimer()
-    {
-    Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::RunL
-// ---------------------------------------------------------------------------
-//  
-void CSVPTimer::RunL()
-    {
-    iObserver.TimedOut( iId );
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::SetTime
-// ---------------------------------------------------------------------------
-//  
-void CSVPTimer::SetTime( TInt aMilliSeconds, TInt aTimerId )
-    {
-    if ( IsActive() )
-        {
-        //iObserver.TimedOut( iId ); // Discard previous request
-        Cancel();
-        }
-        
-    iId = aTimerId;
-        
-    // Milliseconds to microseconds conversion
-    const TTimeIntervalMicroSeconds32 time(
-        KMicroSecondsCoefficient * aMilliSeconds );
-    
-    CTimer::After( time ); // NB, CTimer::After calls SetActive
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::Stop
-// ---------------------------------------------------------------------------
-//  
-void CSVPTimer::Stop()
-    {
-    Cancel(); 
-    }
-
-// ---------------------------------------------------------------------------
-// CSVPTimer::Id
-// ---------------------------------------------------------------------------
-//  
-TInt CSVPTimer::Id() const
-    {
-    return iId;
-    }
-
-//  End of File
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/bwins/mceclientstubu.def	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,310 +0,0 @@
-EXPORTS
-	??0TMceTransactionDataContainer@@QAE@XZ @ 1 NONAME ; TMceTransactionDataContainer::TMceTransactionDataContainer(void)
-	??1CMceAmrCodec@@UAE@XZ @ 2 NONAME ; CMceAmrCodec::~CMceAmrCodec(void)
-	??1CMceAudioStream@@UAE@XZ @ 3 NONAME ; CMceAudioStream::~CMceAudioStream(void)
-	??1CMceAvcCodec@@UAE@XZ @ 4 NONAME ; CMceAvcCodec::~CMceAvcCodec(void)
-	??1CMceCameraSource@@UAE@XZ @ 5 NONAME ; CMceCameraSource::~CMceCameraSource(void)
-	??1CMceDisplaySink@@UAE@XZ @ 6 NONAME ; CMceDisplaySink::~CMceDisplaySink(void)
-	??1CMceFileSink@@UAE@XZ @ 7 NONAME ; CMceFileSink::~CMceFileSink(void)
-	??1CMceFileSource@@UAE@XZ @ 8 NONAME ; CMceFileSource::~CMceFileSource(void)
-	??1CMceH263Codec@@UAE@XZ @ 9 NONAME ; CMceH263Codec::~CMceH263Codec(void)
-	??1CMceInSession@@UAE@XZ @ 10 NONAME ; CMceInSession::~CMceInSession(void)
-	??1CMceManager@@UAE@XZ @ 11 NONAME ; CMceManager::~CMceManager(void)
-	??1CMceMediaSink@@UAE@XZ @ 12 NONAME ; CMceMediaSink::~CMceMediaSink(void)
-	??1CMceMediaSource@@UAE@XZ @ 13 NONAME ; CMceMediaSource::~CMceMediaSource(void)
-	??1CMceMediaStream@@UAE@XZ @ 14 NONAME ; CMceMediaStream::~CMceMediaStream(void)
-	??1CMceOutSession@@UAE@XZ @ 15 NONAME ; CMceOutSession::~CMceOutSession(void)
-	??1CMceRtpSink@@UAE@XZ @ 16 NONAME ; CMceRtpSink::~CMceRtpSink(void)
-	??1CMceRtpSource@@UAE@XZ @ 17 NONAME ; CMceRtpSource::~CMceRtpSource(void)
-	??1CMceSession@@UAE@XZ @ 18 NONAME ; CMceSession::~CMceSession(void)
-	??1CMceSpeakerSink@@UAE@XZ @ 19 NONAME ; CMceSpeakerSink::~CMceSpeakerSink(void)
-	??1CMceStreamBundle@@UAE@XZ @ 20 NONAME ; CMceStreamBundle::~CMceStreamBundle(void)
-	??1CMceVideoStream@@UAE@XZ @ 21 NONAME ; CMceVideoStream::~CMceVideoStream(void)
-	??1CMusTestSessionSimulator@@QAE@XZ @ 22 NONAME ; CMusTestSessionSimulator::~CMusTestSessionSimulator(void)
-	??1CSIP@@UAE@XZ @ 23 NONAME ; CSIP::~CSIP(void)
-	??1CSIPManagedProfile@@UAE@XZ @ 24 NONAME ; CSIPManagedProfile::~CSIPManagedProfile(void)
-	??1CSIPManagedProfileRegistry@@UAE@XZ @ 25 NONAME ; CSIPManagedProfileRegistry::~CSIPManagedProfileRegistry(void)
-	??1CSIPProfile@@UAE@XZ @ 26 NONAME ; CSIPProfile::~CSIPProfile(void)
-	??1CSIPProfileRegistry@@UAE@XZ @ 27 NONAME ; CSIPProfileRegistry::~CSIPProfileRegistry(void)
-	??1CSIPProfileRegistryBase@@UAE@XZ @ 28 NONAME ; CSIPProfileRegistryBase::~CSIPProfileRegistryBase(void)
-	?AcceptL@CMceInSession@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 29 NONAME ; void CMceInSession::AcceptL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?AcceptL@CMceInSession@@QAEXXZ @ 30 NONAME ; void CMceInSession::AcceptL(void)
-	?AddBundleL@CMceSession@@QAEXPAVCMceStreamBundle@@@Z @ 31 NONAME ; void CMceSession::AddBundleL(class CMceStreamBundle *)
-	?AddCodecL@CMceAudioStream@@QAEXPAVCMceAudioCodec@@@Z @ 32 NONAME ; void CMceAudioStream::AddCodecL(class CMceAudioCodec *)
-	?AddCodecL@CMceVideoStream@@QAEXPAVCMceVideoCodec@@@Z @ 33 NONAME ; void CMceVideoStream::AddCodecL(class CMceVideoCodec *)
-	?AddSinkL@CMceMediaStream@@QAEXPAVCMceMediaSink@@@Z @ 34 NONAME ; void CMceMediaStream::AddSinkL(class CMceMediaSink *)
-	?AddStreamL@CMceOutSession@@UAEXPAVCMceMediaStream@@@Z @ 35 NONAME ; void CMceOutSession::AddStreamL(class CMceMediaStream *)
-	?AddStreamL@CMceSession@@UAEXPAVCMceMediaStream@@@Z @ 36 NONAME ; void CMceSession::AddStreamL(class CMceMediaStream *)
-	?AddStreamL@CMceStreamBundle@@QAEXAAVCMceMediaStream@@@Z @ 37 NONAME ; void CMceStreamBundle::AddStreamL(class CMceMediaStream &)
-	?AllowedBitrates@CMceCodec@@QBEIXZ @ 38 NONAME ; unsigned int CMceCodec::AllowedBitrates(void) const
-	?AllowedFrameRates@CMceVideoCodec@@QBEIXZ @ 39 NONAME ; unsigned int CMceVideoCodec::AllowedFrameRates(void) const
-	?AllowedResolutions@CMceVideoCodec@@QBEIXZ @ 40 NONAME ; unsigned int CMceVideoCodec::AllowedResolutions(void) const
-	?BindL@CMceMediaStream@@QAEXPAV1@@Z @ 41 NONAME ; void CMceMediaStream::BindL(class CMceMediaStream *)
-	?Bitrate@CMceCodec@@QBEIXZ @ 42 NONAME ; unsigned int CMceCodec::Bitrate(void) const
-	?BoundStream@CMceMediaStream@@QBEHXZ @ 43 NONAME ; int CMceMediaStream::BoundStream(void) const
-	?BoundStreamL@CMceMediaStream@@QBEAAV1@XZ @ 44 NONAME ; class CMceMediaStream & CMceMediaStream::BoundStreamL(void) const
-	?BrightnessL@CMceCameraSource@@QAEHXZ @ 45 NONAME ; int CMceCameraSource::BrightnessL(void)
-	?Bundles@CMceSession@@QBEABV?$RPointerArray@VCMceStreamBundle@@@@XZ @ 46 NONAME ; class RPointerArray<class CMceStreamBundle> const & CMceSession::Bundles(void) const
-	?CamerasAvailable@CMceCameraSource@@QBEHXZ @ 47 NONAME ; int CMceCameraSource::CamerasAvailable(void) const
-	?CancelL@CMceOutSession@@QAEXXZ @ 48 NONAME ; void CMceOutSession::CancelL(void)
-	?CancelTranscodeL@CMceFileSource@@QAEXXZ @ 49 NONAME ; void CMceFileSource::CancelTranscodeL(void)
-	?Clear@TMceTransactionDataContainer@@QAEXXZ @ 50 NONAME ; void TMceTransactionDataContainer::Clear(void)
-	?CloneL@CMceAmrCodec@@UBEPAVCMceAudioCodec@@XZ @ 51 NONAME ; class CMceAudioCodec * CMceAmrCodec::CloneL(void) const
-	?CloneL@CMceAvcCodec@@UBEPAVCMceVideoCodec@@XZ @ 52 NONAME ; class CMceVideoCodec * CMceAvcCodec::CloneL(void) const
-	?CloneL@CMceH263Codec@@UBEPAVCMceVideoCodec@@XZ @ 53 NONAME ; class CMceVideoCodec * CMceH263Codec::CloneL(void) const
-	?CodecMode@CMceCodec@@QBEIXZ @ 54 NONAME ; unsigned int CMceCodec::CodecMode(void) const
-	?Codecs@CMceAudioStream@@QAEABV?$RPointerArray@VCMceAudioCodec@@@@XZ @ 55 NONAME ; class RPointerArray<class CMceAudioCodec> const & CMceAudioStream::Codecs(void)
-	?Codecs@CMceVideoStream@@QAEABV?$RPointerArray@VCMceVideoCodec@@@@XZ @ 56 NONAME ; class RPointerArray<class CMceVideoCodec> const & CMceVideoStream::Codecs(void)
-	?ConfigKeyL@CMceVideoCodec@@QBEPAVHBufC8@@XZ @ 57 NONAME ; class HBufC8 * CMceVideoCodec::ConfigKeyL(void) const
-	?Connection@CSIP@@QBEPAVCSIPConnection@@K@Z @ 58 NONAME ; class CSIPConnection * CSIP::Connection(unsigned long) const
-	?ConnectionActive@CMceSession@@QBEHXZ @ 59 NONAME ; int CMceSession::ConnectionActive(void) const
-	?ContrastL@CMceCameraSource@@QAEHXZ @ 60 NONAME ; int CMceCameraSource::ContrastL(void)
-	?CurrentMediaElement@CMceFileSource@@QAEHI@Z @ 61 NONAME ; int CMceFileSource::CurrentMediaElement(unsigned int)
-	?DefaultHeadersL@CMceManager@@QBEPAVCDesC8Array@@ABVTDesC8@@@Z @ 62 NONAME ; class CDesC8Array * CMceManager::DefaultHeadersL(class TDesC8 const &) const
-	?DefaultProfileL@CSIPProfileRegistryBase@@QAEPAVCSIPProfile@@XZ @ 63 NONAME ; class CSIPProfile * CSIPProfileRegistryBase::DefaultProfileL(void)
-	?DigitalZoomFactorL@CMceCameraSource@@QAEHXZ @ 64 NONAME ; int CMceCameraSource::DigitalZoomFactorL(void)
-	?Disable@CSIPProfileRegistry@@QAEHAAVCSIPProfile@@@Z @ 65 NONAME ; int CSIPProfileRegistry::Disable(class CSIPProfile &)
-	?DisableInactivityTimerL@CMceRtpSource@@QAEXXZ @ 66 NONAME ; void CMceRtpSource::DisableInactivityTimerL(void)
-	?DisableL@CMceCameraSource@@UAEXXZ @ 67 NONAME ; void CMceCameraSource::DisableL(void)
-	?DisableL@CMceDisplaySink@@UAEXXZ @ 68 NONAME ; void CMceDisplaySink::DisableL(void)
-	?DisableL@CMceFileSink@@UAEXXZ @ 69 NONAME ; void CMceFileSink::DisableL(void)
-	?DisableL@CMceFileSource@@UAEXXZ @ 70 NONAME ; void CMceFileSource::DisableL(void)
-	?DisableL@CMceMediaStream@@UAEXXZ @ 71 NONAME ; void CMceMediaStream::DisableL(void)
-	?DisableL@CMceRtpSink@@UAEXXZ @ 72 NONAME ; void CMceRtpSink::DisableL(void)
-	?DisableL@CMceRtpSource@@UAEXXZ @ 73 NONAME ; void CMceRtpSource::DisableL(void)
-	?DisableL@CMceSpeakerSink@@UAEXXZ @ 74 NONAME ; void CMceSpeakerSink::DisableL(void)
-	?DisableSsrcL@CMceRtpSource@@QAEXI@Z @ 75 NONAME ; void CMceRtpSource::DisableSsrcL(unsigned int)
-	?DisplayRectL@CMceDisplaySink@@QAE?BVTRect@@XZ @ 76 NONAME ; class TRect const CMceDisplaySink::DisplayRectL(void)
-	?DisplaysAvailable@CMceDisplaySink@@QBEHXZ @ 77 NONAME ; int CMceDisplaySink::DisplaysAvailable(void) const
-	?DurationL@CMceFileSource@@QBE?AVTTimeIntervalMicroSeconds@@XZ @ 78 NONAME ; class TTimeIntervalMicroSeconds CMceFileSource::DurationL(void) const
-	?EnableInactivityTimerL@CMceRtpSource@@QAEXK@Z @ 79 NONAME ; void CMceRtpSource::EnableInactivityTimerL(unsigned long)
-	?EnableL@CMceCameraSource@@UAEXXZ @ 80 NONAME ; void CMceCameraSource::EnableL(void)
-	?EnableL@CMceDisplaySink@@UAEXXZ @ 81 NONAME ; void CMceDisplaySink::EnableL(void)
-	?EnableL@CMceFileSink@@UAEXXZ @ 82 NONAME ; void CMceFileSink::EnableL(void)
-	?EnableL@CMceFileSource@@UAEXXZ @ 83 NONAME ; void CMceFileSource::EnableL(void)
-	?EnableL@CMceMediaStream@@UAEXXZ @ 84 NONAME ; void CMceMediaStream::EnableL(void)
-	?EnableL@CMceRtpSink@@UAEXXZ @ 85 NONAME ; void CMceRtpSink::EnableL(void)
-	?EnableL@CMceRtpSource@@UAEXXZ @ 86 NONAME ; void CMceRtpSource::EnableL(void)
-	?EnableL@CMceSpeakerSink@@UAEXXZ @ 87 NONAME ; void CMceSpeakerSink::EnableL(void)
-	?EnableL@CSIPProfileRegistry@@QAEXAAVCSIPProfile@@AAVMSIPConnectionObserver@@@Z @ 88 NONAME ; void CSIPProfileRegistry::EnableL(class CSIPProfile &, class MSIPConnectionObserver &)
-	?EnableSsrcL@CMceRtpSource@@QAEXI@Z @ 89 NONAME ; void CMceRtpSource::EnableSsrcL(unsigned int)
-	?EnableVAD@CMceAmrCodec@@UAEHH@Z @ 90 NONAME ; int CMceAmrCodec::EnableVAD(int)
-	?EstablishL@CMceOutSession@@QAEXKPAVCDesC8Array@@PAVHBufC8@@10@Z @ 91 NONAME ; void CMceOutSession::EstablishL(unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *, class CDesC8Array *)
-	?ExposureL@CMceCameraSource@@QAE?AW4TExposure@CCamera@@XZ @ 92 NONAME ; enum CCamera::TExposure CMceCameraSource::ExposureL(void)
-	?FourCC@CMceCodec@@QBEKXZ @ 93 NONAME ; unsigned long CMceCodec::FourCC(void) const
-	?FrameRate@CMceVideoCodec@@QBENXZ @ 94 NONAME ; double CMceVideoCodec::FrameRate(void) const
-	?FrameSize@CMceCodec@@QBEIXZ @ 95 NONAME ; unsigned int CMceCodec::FrameSize(void) const
-	?GetCameraInfo@CMceCameraSource@@QBEXAAVTCameraInfo@@@Z @ 96 NONAME ; void CMceCameraSource::GetCameraInfo(class TCameraInfo &) const
-	?GetContent@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 97 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetContent(void)
-	?GetContentHeaders@TMceTransactionDataContainer@@QAEPAVCDesC8Array@@XZ @ 98 NONAME ; class CDesC8Array * TMceTransactionDataContainer::GetContentHeaders(void)
-	?GetContentType@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 99 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetContentType(void)
-	?GetHeaders@TMceTransactionDataContainer@@QAEPAVCDesC8Array@@XZ @ 100 NONAME ; class CDesC8Array * TMceTransactionDataContainer::GetHeaders(void)
-	?GetModifierL@CMceSession@@QBEXKAAI@Z @ 101 NONAME ; void CMceSession::GetModifierL(unsigned long, unsigned int &) const
-	?GetParameter@CSIPProfile@@QBEHKAAH@Z @ 102 NONAME ; int CSIPProfile::GetParameter(unsigned long, int &) const
-	?GetParameter@CSIPProfile@@QBEHKAAK@Z @ 103 NONAME ; int CSIPProfile::GetParameter(unsigned long, unsigned long &) const
-	?GetParameter@CSIPProfile@@QBEHKAAPBVMDesC8Array@@@Z @ 104 NONAME ; int CSIPProfile::GetParameter(unsigned long, class MDesC8Array const * &) const
-	?GetParameter@CSIPProfile@@QBEHKAAPBVTDesC8@@@Z @ 105 NONAME ; int CSIPProfile::GetParameter(unsigned long, class TDesC8 const * &) const
-	?GetReasonPhrase@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 106 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetReasonPhrase(void)
-	?GetStatusCode@TMceTransactionDataContainer@@QAEHXZ @ 107 NONAME ; int TMceTransactionDataContainer::GetStatusCode(void)
-	?IsEnabled@CMceMediaSink@@QBEHXZ @ 108 NONAME ; int CMceMediaSink::IsEnabled(void) const
-	?IsEnabled@CMceMediaSource@@QBEHXZ @ 109 NONAME ; int CMceMediaSource::IsEnabled(void) const
-	?IsEnabled@CMceMediaStream@@QBEHXZ @ 110 NONAME ; int CMceMediaStream::IsEnabled(void) const
-	?IsEnabled@CSIPProfileRegistry@@QBEHABVCSIPProfile@@@Z @ 111 NONAME ; int CSIPProfileRegistry::IsEnabled(class CSIPProfile const &) const
-	?IsSigCompSupportedL@CSIP@@QBEHXZ @ 112 NONAME ; int CSIP::IsSigCompSupportedL(void) const
-	?IsSsrcEnabledL@CMceRtpSource@@QAEHI@Z @ 113 NONAME ; int CMceRtpSource::IsSsrcEnabledL(unsigned int)
-	?KeepAliveData@CMceCodec@@QBEABVTDesC8@@XZ @ 114 NONAME ; class TDesC8 const & CMceCodec::KeepAliveData(void) const
-	?KeepAlivePayloadType@CMceCodec@@QBEEXZ @ 115 NONAME ; unsigned char CMceCodec::KeepAlivePayloadType(void) const
-	?KeepAliveTimer@CMceCodec@@QBEEXZ @ 116 NONAME ; unsigned char CMceCodec::KeepAliveTimer(void) const
-	?LastPacket@CMceRtpSink@@QBEKXZ @ 117 NONAME ; unsigned long CMceRtpSink::LastPacket(void) const
-	?LastRegistrationError@CSIPProfileRegistryBase@@QBEHABVCSIPProfile@@@Z @ 118 NONAME ; int CSIPProfileRegistryBase::LastRegistrationError(class CSIPProfile const &) const
-	?LocalMediaPort@CMceMediaStream@@QBEIXZ @ 119 NONAME ; unsigned int CMceMediaStream::LocalMediaPort(void) const
-	?MMFPriority@CMceCodec@@QBEHXZ @ 120 NONAME ; int CMceCodec::MMFPriority(void) const
-	?MMFPriorityPreference@CMceCodec@@QBEHXZ @ 121 NONAME ; int CMceCodec::MMFPriorityPreference(void) const
-	?MaxBitRate@CMceVideoCodec@@QBEIXZ @ 122 NONAME ; unsigned int CMceVideoCodec::MaxBitRate(void) const
-	?MaxVolumeL@CMceSpeakerSink@@QBEHXZ @ 123 NONAME ; int CMceSpeakerSink::MaxVolumeL(void) const
-	?MediaAttributeLinesL@CMceMediaStream@@QAEPAVMDesC8Array@@XZ @ 124 NONAME ; class MDesC8Array * CMceMediaStream::MediaAttributeLinesL(void)
-	?MediaElementCountL@CMceFileSource@@QBEHI@Z @ 125 NONAME ; int CMceFileSource::MediaElementCountL(unsigned int) const
-	?NegotiatedSecurityMechanismL@CSIP@@QAEPAVHBufC8@@ABVTDesC8@@@Z @ 126 NONAME ; class HBufC8 * CSIP::NegotiatedSecurityMechanismL(class TDesC8 const &)
-	?NewL@CMceAudioStream@@SAPAV1@XZ @ 127 NONAME ; class CMceAudioStream * CMceAudioStream::NewL(void)
-	?NewL@CMceAvcCodec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 128 NONAME ; class CMceAvcCodec * CMceAvcCodec::NewL(class TBuf8<20>)
-	?NewL@CMceCameraSource@@SAPAV1@AAVCMceManager@@@Z @ 129 NONAME ; class CMceCameraSource * CMceCameraSource::NewL(class CMceManager &)
-	?NewL@CMceCameraSource@@SAPAV1@XZ @ 130 NONAME ; class CMceCameraSource * CMceCameraSource::NewL(void)
-	?NewL@CMceDisplaySink@@SAPAV1@AAVCMceManager@@@Z @ 131 NONAME ; class CMceDisplaySink * CMceDisplaySink::NewL(class CMceManager &)
-	?NewL@CMceDisplaySink@@SAPAV1@XZ @ 132 NONAME ; class CMceDisplaySink * CMceDisplaySink::NewL(void)
-	?NewL@CMceFileSink@@SAPAV1@ABV?$TBuf@$0BAA@@@@Z @ 133 NONAME ; class CMceFileSink * CMceFileSink::NewL(class TBuf<256> const &)
-	?NewL@CMceFileSource@@SAPAV1@AAVCMceManager@@ABV?$TBuf@$0BAA@@@@Z @ 134 NONAME ; class CMceFileSource * CMceFileSource::NewL(class CMceManager &, class TBuf<256> const &)
-	?NewL@CMceH263Codec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 135 NONAME ; class CMceH263Codec * CMceH263Codec::NewL(class TBuf8<20>)
-	?NewL@CMceInSession@@SAPAV1@AAVCMceManager@@ABVTDesC8@@@Z @ 136 NONAME ; class CMceInSession * CMceInSession::NewL(class CMceManager &, class TDesC8 const &)
-	?NewL@CMceInSession@@SAPAV1@XZ @ 137 NONAME ; class CMceInSession * CMceInSession::NewL(void)
-	?NewL@CMceManager@@SAPAV1@ABVTUid@@PAVTMceTransactionDataContainer@@@Z @ 138 NONAME ; class CMceManager * CMceManager::NewL(class TUid const &, class TMceTransactionDataContainer *)
-	?NewL@CMceOutSession@@SAPAV1@AAVCMceEvent@@@Z @ 139 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceEvent &)
-	?NewL@CMceOutSession@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@PAVHBufC8@@@Z @ 140 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class HBufC8 *)
-	?NewL@CMceOutSession@@SAPAV1@AAVCMceRefer@@@Z @ 141 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceRefer &)
-	?NewL@CMceOutSession@@SAPAV1@XZ @ 142 NONAME ; class CMceOutSession * CMceOutSession::NewL(void)
-	?NewL@CMceRtpSink@@SAPAV1@HPAVHBufC8@@@Z @ 143 NONAME ; class CMceRtpSink * CMceRtpSink::NewL(int, class HBufC8 *)
-	?NewL@CMceRtpSink@@SAPAV1@XZ @ 144 NONAME ; class CMceRtpSink * CMceRtpSink::NewL(void)
-	?NewL@CMceRtpSource@@SAPAV1@IIKPAVHBufC8@@@Z @ 145 NONAME ; class CMceRtpSource * CMceRtpSource::NewL(unsigned int, unsigned int, unsigned long, class HBufC8 *)
-	?NewL@CMceSpeakerSink@@SAPAV1@XZ @ 146 NONAME ; class CMceSpeakerSink * CMceSpeakerSink::NewL(void)
-	?NewL@CMceStreamBundle@@SAPAV1@W4TMceStreamBundleType@1@@Z @ 147 NONAME ; class CMceStreamBundle * CMceStreamBundle::NewL(enum CMceStreamBundle::TMceStreamBundleType)
-	?NewL@CMceVideoStream@@SAPAV1@XZ @ 148 NONAME ; class CMceVideoStream * CMceVideoStream::NewL(void)
-	?NewL@CSIP@@SAPAV1@ABVTUid@@AAVMSIPObserver@@@Z @ 149 NONAME ; class CSIP * CSIP::NewL(class TUid const &, class MSIPObserver &)
-	?NewL@CSIPManagedProfileRegistry@@SAPAV1@AAVMSIPProfileRegistryObserver@@@Z @ 150 NONAME ; class CSIPManagedProfileRegistry * CSIPManagedProfileRegistry::NewL(class MSIPProfileRegistryObserver &)
-	?NewL@CSIPProfileRegistry@@SAPAV1@AAVCSIP@@AAVMSIPProfileRegistryObserver@@@Z @ 151 NONAME ; class CSIPProfileRegistry * CSIPProfileRegistry::NewL(class CSIP &, class MSIPProfileRegistryObserver &)
-	?NewLC@CMceAudioStream@@SAPAV1@XZ @ 152 NONAME ; class CMceAudioStream * CMceAudioStream::NewLC(void)
-	?NewLC@CMceAvcCodec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 153 NONAME ; class CMceAvcCodec * CMceAvcCodec::NewLC(class TBuf8<20>)
-	?NewLC@CMceCameraSource@@SAPAV1@AAVCMceManager@@@Z @ 154 NONAME ; class CMceCameraSource * CMceCameraSource::NewLC(class CMceManager &)
-	?NewLC@CMceCameraSource@@SAPAV1@XZ @ 155 NONAME ; class CMceCameraSource * CMceCameraSource::NewLC(void)
-	?NewLC@CMceDisplaySink@@SAPAV1@AAVCMceManager@@@Z @ 156 NONAME ; class CMceDisplaySink * CMceDisplaySink::NewLC(class CMceManager &)
-	?NewLC@CMceDisplaySink@@SAPAV1@XZ @ 157 NONAME ; class CMceDisplaySink * CMceDisplaySink::NewLC(void)
-	?NewLC@CMceFileSink@@SAPAV1@ABV?$TBuf@$0BAA@@@@Z @ 158 NONAME ; class CMceFileSink * CMceFileSink::NewLC(class TBuf<256> const &)
-	?NewLC@CMceFileSource@@SAPAV1@AAVCMceManager@@ABV?$TBuf@$0BAA@@@@Z @ 159 NONAME ; class CMceFileSource * CMceFileSource::NewLC(class CMceManager &, class TBuf<256> const &)
-	?NewLC@CMceH263Codec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 160 NONAME ; class CMceH263Codec * CMceH263Codec::NewLC(class TBuf8<20>)
-	?NewLC@CMceRtpSink@@SAPAV1@XZ @ 161 NONAME ; class CMceRtpSink * CMceRtpSink::NewLC(void)
-	?NewLC@CMceRtpSource@@SAPAV1@IIKPAVHBufC8@@@Z @ 162 NONAME ; class CMceRtpSource * CMceRtpSource::NewLC(unsigned int, unsigned int, unsigned long, class HBufC8 *)
-	?NewLC@CMceSpeakerSink@@SAPAV1@XZ @ 163 NONAME ; class CMceSpeakerSink * CMceSpeakerSink::NewLC(void)
-	?NewLC@CMceStreamBundle@@SAPAV1@W4TMceStreamBundleType@1@@Z @ 164 NONAME ; class CMceStreamBundle * CMceStreamBundle::NewLC(enum CMceStreamBundle::TMceStreamBundleType)
-	?NewLC@CMceVideoStream@@SAPAV1@XZ @ 165 NONAME ; class CMceVideoStream * CMceVideoStream::NewLC(void)
-	?NewLC@CSIP@@SAPAV1@ABVTUid@@AAVMSIPObserver@@@Z @ 166 NONAME ; class CSIP * CSIP::NewLC(class TUid const &, class MSIPObserver &)
-	?NewLC@CSIPManagedProfileRegistry@@SAPAV1@AAVMSIPProfileRegistryObserver@@@Z @ 167 NONAME ; class CSIPManagedProfileRegistry * CSIPManagedProfileRegistry::NewLC(class MSIPProfileRegistryObserver &)
-	?NewLC@CSIPProfileRegistry@@SAPAV1@AAVCSIP@@AAVMSIPProfileRegistryObserver@@@Z @ 168 NONAME ; class CSIPProfileRegistry * CSIPProfileRegistry::NewLC(class CSIP &, class MSIPProfileRegistryObserver &)
-	?Originator@CMceSession@@QBEABVTDesC8@@XZ @ 169 NONAME ; class TDesC8 const & CMceSession::Originator(void) const
-	?PayloadType@CMceCodec@@QBEEXZ @ 170 NONAME ; unsigned char CMceCodec::PayloadType(void) const
-	?PositionL@CMceFileSource@@QBE?AVTTimeIntervalMicroSeconds@@XZ @ 171 NONAME ; class TTimeIntervalMicroSeconds CMceFileSource::PositionL(void) const
-	?Preference@CMceCodec@@QBEHXZ @ 172 NONAME ; int CMceCodec::Preference(void) const
-	?PriorityL@CMceDisplaySink@@QAEIXZ @ 173 NONAME ; unsigned int CMceDisplaySink::PriorityL(void)
-	?Profile@CMceSession@@QBEKXZ @ 174 NONAME ; unsigned long CMceSession::Profile(void) const
-	?ProfileL@CSIPProfileRegistryBase@@QAEPAVCSIPProfile@@K@Z @ 175 NONAME ; class CSIPProfile * CSIPProfileRegistryBase::ProfileL(unsigned long)
-	?ProfilesL@CSIPProfileRegistryBase@@QAEXAAV?$RPointerArray@VCSIPProfile@@@@@Z @ 176 NONAME ; void CSIPProfileRegistryBase::ProfilesL(class RPointerArray<class CSIPProfile> &)
-	?ProfilesL@CSIPProfileRegistryBase@@QAEXABVTDesC8@@AAV?$RPointerArray@VCSIPProfile@@@@@Z @ 177 NONAME ; void CSIPProfileRegistryBase::ProfilesL(class TDesC8 const &, class RPointerArray<class CSIPProfile> &)
-	?ProfilesL@CSIPProfileRegistryBase@@QAEXABVTSIPProfileTypeInfo@@AAV?$RPointerArray@VCSIPProfile@@@@@Z @ 178 NONAME ; void CSIPProfileRegistryBase::ProfilesL(class TSIPProfileTypeInfo const &, class RPointerArray<class CSIPProfile> &)
-	?Recipient@CMceSession@@QBEABVTDesC8@@XZ @ 179 NONAME ; class TDesC8 const & CMceSession::Recipient(void) const
-	?RejectL@CMceInSession@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 180 NONAME ; void CMceInSession::RejectL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?RejectL@CMceInSession@@QAEXXZ @ 181 NONAME ; void CMceInSession::RejectL(void)
-	?RemoveBundleL@CMceSession@@QAEXAAVCMceStreamBundle@@@Z @ 182 NONAME ; void CMceSession::RemoveBundleL(class CMceStreamBundle &)
-	?RemoveCodecL@CMceAudioStream@@QAEXAAVCMceAudioCodec@@@Z @ 183 NONAME ; void CMceAudioStream::RemoveCodecL(class CMceAudioCodec &)
-	?RemoveCodecL@CMceVideoStream@@QAEXAAVCMceVideoCodec@@@Z @ 184 NONAME ; void CMceVideoStream::RemoveCodecL(class CMceVideoCodec &)
-	?RemoveSinkL@CMceMediaStream@@QAEXAAVCMceMediaSink@@@Z @ 185 NONAME ; void CMceMediaStream::RemoveSinkL(class CMceMediaSink &)
-	?RemoveStreamL@CMceSession@@QAEXAAVCMceMediaStream@@@Z @ 186 NONAME ; void CMceSession::RemoveStreamL(class CMceMediaStream &)
-	?RemoveStreamL@CMceStreamBundle@@QAEXAAVCMceMediaStream@@@Z @ 187 NONAME ; void CMceStreamBundle::RemoveStreamL(class CMceMediaStream &)
-	?ReplaceCodecsL@CMceVideoStream@@QAEXPAV?$RPointerArray@VCMceVideoCodec@@@@@Z @ 188 NONAME ; void CMceVideoStream::ReplaceCodecsL(class RPointerArray<class CMceVideoCodec> *)
-	?Resolution@CMceVideoCodec@@QBE?AVTSize@@XZ @ 189 NONAME ; class TSize CMceVideoCodec::Resolution(void) const
-	?RingL@CMceInSession@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 190 NONAME ; void CMceInSession::RingL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?RotationL@CMceDisplaySink@@QAE?AW4TRotation@1@XZ @ 191 NONAME ; enum CMceDisplaySink::TRotation CMceDisplaySink::RotationL(void)
-	?RoutingL@CMceSpeakerSink@@QBEHXZ @ 192 NONAME ; int CMceSpeakerSink::RoutingL(void) const
-	?SIP@CSIPProfileRegistry@@QBEAAVCSIP@@XZ @ 193 NONAME ; class CSIP & CSIPProfileRegistry::SIP(void) const
-	?SaveL@CSIPManagedProfileRegistry@@QAEXAAVCSIPProfile@@@Z @ 194 NONAME ; void CSIPManagedProfileRegistry::SaveL(class CSIPProfile &)
-	?SdpName@CMceCodec@@QBEABVTDesC8@@XZ @ 195 NONAME ; class TDesC8 const & CMceCodec::SdpName(void) const
-	?SendRRL@CMceRtpSource@@QAEXXZ @ 196 NONAME ; void CMceRtpSource::SendRRL(void)
-	?SendSRL@CMceRtpSink@@QAEXXZ @ 197 NONAME ; void CMceRtpSink::SendSRL(void)
-	?Session@CMceMediaStream@@QBEPAVCMceSession@@XZ @ 198 NONAME ; class CMceSession * CMceMediaStream::Session(void) const
-	?SessionSDPLinesL@CMceSession@@QAEPAVMDesC8Array@@XZ @ 199 NONAME ; class MDesC8Array * CMceSession::SessionSDPLinesL(void)
-	?SessionTimer@CMceSession@@QBEKXZ @ 200 NONAME ; unsigned long CMceSession::SessionTimer(void) const
-	?Sessions@CMceManager@@QBEABV?$RPointerArray@VCMceSession@@@@XZ @ 201 NONAME ; class RPointerArray<class CMceSession> const & CMceManager::Sessions(void) const
-	?SetAllowedBitrates@CMceAmrCodec@@UAEHI@Z @ 202 NONAME ; int CMceAmrCodec::SetAllowedBitrates(unsigned int)
-	?SetAllowedBitrates@CMceAvcCodec@@UAEHI@Z @ 203 NONAME ; int CMceAvcCodec::SetAllowedBitrates(unsigned int)
-	?SetAllowedBitrates@CMceH263Codec@@UAEHI@Z @ 204 NONAME ; int CMceH263Codec::SetAllowedBitrates(unsigned int)
-	?SetAllowedFrameRatesL@CMceAvcCodec@@UAEXI@Z @ 205 NONAME ; void CMceAvcCodec::SetAllowedFrameRatesL(unsigned int)
-	?SetAllowedFrameRatesL@CMceH263Codec@@UAEXI@Z @ 206 NONAME ; void CMceH263Codec::SetAllowedFrameRatesL(unsigned int)
-	?SetAllowedResolutionsL@CMceAvcCodec@@UAEXI@Z @ 207 NONAME ; void CMceAvcCodec::SetAllowedResolutionsL(unsigned int)
-	?SetAllowedResolutionsL@CMceH263Codec@@UAEXI@Z @ 208 NONAME ; void CMceH263Codec::SetAllowedResolutionsL(unsigned int)
-	?SetBitrate@CMceAmrCodec@@UAEHI@Z @ 209 NONAME ; int CMceAmrCodec::SetBitrate(unsigned int)
-	?SetBitrate@CMceAvcCodec@@UAEHI@Z @ 210 NONAME ; int CMceAvcCodec::SetBitrate(unsigned int)
-	?SetBitrate@CMceH263Codec@@UAEHI@Z @ 211 NONAME ; int CMceH263Codec::SetBitrate(unsigned int)
-	?SetBrightnessL@CMceCameraSource@@QAEXH@Z @ 212 NONAME ; void CMceCameraSource::SetBrightnessL(int)
-	?SetCameraIndexL@CMceCameraSource@@QAEXH@Z @ 213 NONAME ; void CMceCameraSource::SetCameraIndexL(int)
-	?SetCodecMode@CMceAmrCodec@@UAEHI@Z @ 214 NONAME ; int CMceAmrCodec::SetCodecMode(unsigned int)
-	?SetCodecMode@CMceAvcCodec@@UAEHI@Z @ 215 NONAME ; int CMceAvcCodec::SetCodecMode(unsigned int)
-	?SetCodecMode@CMceH263Codec@@UAEHI@Z @ 216 NONAME ; int CMceH263Codec::SetCodecMode(unsigned int)
-	?SetConfigKeyL@CMceAvcCodec@@UAEXABVTDesC8@@@Z @ 217 NONAME ; void CMceAvcCodec::SetConfigKeyL(class TDesC8 const &)
-	?SetConfigKeyL@CMceH263Codec@@UAEXABVTDesC8@@@Z @ 218 NONAME ; void CMceH263Codec::SetConfigKeyL(class TDesC8 const &)
-	?SetContent@TMceTransactionDataContainer@@QAEXPAVHBufC8@@@Z @ 219 NONAME ; void TMceTransactionDataContainer::SetContent(class HBufC8 *)
-	?SetContentHeaders@TMceTransactionDataContainer@@QAEXPAVCDesC8Array@@@Z @ 220 NONAME ; void TMceTransactionDataContainer::SetContentHeaders(class CDesC8Array *)
-	?SetContentType@TMceTransactionDataContainer@@QAEXPAVHBufC8@@@Z @ 221 NONAME ; void TMceTransactionDataContainer::SetContentType(class HBufC8 *)
-	?SetContrastL@CMceCameraSource@@QAEXH@Z @ 222 NONAME ; void CMceCameraSource::SetContrastL(int)
-	?SetCurrentMediaElementL@CMceFileSource@@QAEXIH@Z @ 223 NONAME ; void CMceFileSource::SetCurrentMediaElementL(unsigned int, int)
-	?SetDefaultHeadersL@CMceManager@@QAEXPAVCDesC8Array@@0@Z @ 224 NONAME ; void CMceManager::SetDefaultHeadersL(class CDesC8Array *, class CDesC8Array *)
-	?SetDigitalZoomFactorL@CMceCameraSource@@QAEXH@Z @ 225 NONAME ; void CMceCameraSource::SetDigitalZoomFactorL(int)
-	?SetDisplay@CMceDisplaySink@@QAEXAAVRWindow@@AAVCWindowGc@@@Z @ 226 NONAME ; void CMceDisplaySink::SetDisplay(class RWindow &, class CWindowGc &)
-	?SetDisplayIndexL@CMceDisplaySink@@QAEXH@Z @ 227 NONAME ; void CMceDisplaySink::SetDisplayIndexL(int)
-	?SetDisplayRectL@CMceDisplaySink@@QAEXABVTRect@@@Z @ 228 NONAME ; void CMceDisplaySink::SetDisplayRectL(class TRect const &)
-	?SetEventObserver@CMceManager@@QAEXPAVMMceEventObserver@@@Z @ 229 NONAME ; void CMceManager::SetEventObserver(class MMceEventObserver *)
-	?SetExposureL@CMceCameraSource@@QAEXW4TExposure@CCamera@@@Z @ 230 NONAME ; void CMceCameraSource::SetExposureL(enum CCamera::TExposure)
-	?SetFastForwardL@CMceFileSource@@QAEXH@Z @ 231 NONAME ; void CMceFileSource::SetFastForwardL(int)
-	?SetFastRewindL@CMceFileSource@@QAEXH@Z @ 232 NONAME ; void CMceFileSource::SetFastRewindL(int)
-	?SetFrameRateL@CMceAvcCodec@@UAEXN@Z @ 233 NONAME ; void CMceAvcCodec::SetFrameRateL(double)
-	?SetFrameRateL@CMceH263Codec@@UAEXN@Z @ 234 NONAME ; void CMceH263Codec::SetFrameRateL(double)
-	?SetHeaders@TMceTransactionDataContainer@@QAEXPAVCDesC8Array@@@Z @ 235 NONAME ; void TMceTransactionDataContainer::SetHeaders(class CDesC8Array *)
-	?SetInEventObserver@CMceManager@@QAEXPAVMMceInEventObserver@@@Z @ 236 NONAME ; void CMceManager::SetInEventObserver(class MMceInEventObserver *)
-	?SetInReferObserver@CMceManager@@QAEXPAVMMceInReferObserver@@@Z @ 237 NONAME ; void CMceManager::SetInReferObserver(class MMceInReferObserver *)
-	?SetInSessionObserver@CMceManager@@QAEXPAVMMceInSessionObserver@@@Z @ 238 NONAME ; void CMceManager::SetInSessionObserver(class MMceInSessionObserver *)
-	?SetKeepAliveDataL@CMceCodec@@QAEXABVTDesC8@@@Z @ 239 NONAME ; void CMceCodec::SetKeepAliveDataL(class TDesC8 const &)
-	?SetKeepAlivePayloadTypeL@CMceCodec@@QAEXE@Z @ 240 NONAME ; void CMceCodec::SetKeepAlivePayloadTypeL(unsigned char)
-	?SetKeepAliveTimerL@CMceCodec@@QAEXE@Z @ 241 NONAME ; void CMceCodec::SetKeepAliveTimerL(unsigned char)
-	?SetLocalMediaPortL@CMceMediaStream@@QAEXI@Z @ 242 NONAME ; void CMceMediaStream::SetLocalMediaPortL(unsigned int)
-	?SetMMFPriorityL@CMceCodec@@QAEXH@Z @ 243 NONAME ; void CMceCodec::SetMMFPriorityL(int)
-	?SetMMFPriorityPreferenceL@CMceCodec@@QAEXH@Z @ 244 NONAME ; void CMceCodec::SetMMFPriorityPreferenceL(int)
-	?SetMaxBitrateL@CMceAvcCodec@@UAEXI@Z @ 245 NONAME ; void CMceAvcCodec::SetMaxBitrateL(unsigned int)
-	?SetMaxBitrateL@CMceH263Codec@@UAEXI@Z @ 246 NONAME ; void CMceH263Codec::SetMaxBitrateL(unsigned int)
-	?SetMaxPTime@CMceAmrCodec@@UAEHI@Z @ 247 NONAME ; int CMceAmrCodec::SetMaxPTime(unsigned int)
-	?SetMediaAttributeLinesL@CMceMediaStream@@QAEXPAVCDesC8Array@@@Z @ 248 NONAME ; void CMceMediaStream::SetMediaAttributeLinesL(class CDesC8Array *)
-	?SetMediaObserver@CMceManager@@QAEXPAVMMceStreamObserver@@@Z @ 249 NONAME ; void CMceManager::SetMediaObserver(class MMceStreamObserver *)
-	?SetModifierL@CMceSession@@QAEXKI@Z @ 250 NONAME ; void CMceSession::SetModifierL(unsigned long, unsigned int)
-	?SetPTime@CMceAmrCodec@@UAEHI@Z @ 251 NONAME ; int CMceAmrCodec::SetPTime(unsigned int)
-	?SetParameter@CSIPManagedProfile@@QAEHKABVMDesC8Array@@@Z @ 252 NONAME ; int CSIPManagedProfile::SetParameter(unsigned long, class MDesC8Array const &)
-	?SetPayloadType@CMceAmrCodec@@UAEHE@Z @ 253 NONAME ; int CMceAmrCodec::SetPayloadType(unsigned char)
-	?SetPayloadType@CMceAvcCodec@@UAEHE@Z @ 254 NONAME ; int CMceAvcCodec::SetPayloadType(unsigned char)
-	?SetPayloadType@CMceH263Codec@@UAEHE@Z @ 255 NONAME ; int CMceH263Codec::SetPayloadType(unsigned char)
-	?SetPositionL@CMceFileSource@@QAEXABVTTimeIntervalMicroSeconds@@@Z @ 256 NONAME ; void CMceFileSource::SetPositionL(class TTimeIntervalMicroSeconds const &)
-	?SetPreferenceL@CMceCodec@@QAEXH@Z @ 257 NONAME ; void CMceCodec::SetPreferenceL(int)
-	?SetPreferredEncodingDecodingDeviceL@CMceAvcCodec@@UAEXVTUid@@@Z @ 258 NONAME ; void CMceAvcCodec::SetPreferredEncodingDecodingDeviceL(class TUid)
-	?SetPreferredEncodingDecodingDeviceL@CMceH263Codec@@UAEXVTUid@@@Z @ 259 NONAME ; void CMceH263Codec::SetPreferredEncodingDecodingDeviceL(class TUid)
-	?SetPriorityL@CMceDisplaySink@@QAEXI@Z @ 260 NONAME ; void CMceDisplaySink::SetPriorityL(unsigned int)
-	?SetReasonPhrase@TMceTransactionDataContainer@@QAEXPAVHBufC8@@@Z @ 261 NONAME ; void TMceTransactionDataContainer::SetReasonPhrase(class HBufC8 *)
-	?SetReferObserver@CMceManager@@QAEXPAVMMceReferObserver@@@Z @ 262 NONAME ; void CMceManager::SetReferObserver(class MMceReferObserver *)
-	?SetResolutionL@CMceAvcCodec@@UAEXVTSize@@@Z @ 263 NONAME ; void CMceAvcCodec::SetResolutionL(class TSize)
-	?SetResolutionL@CMceH263Codec@@UAEXVTSize@@@Z @ 264 NONAME ; void CMceH263Codec::SetResolutionL(class TSize)
-	?SetRotationL@CMceDisplaySink@@QAEXW4TRotation@1@@Z @ 265 NONAME ; void CMceDisplaySink::SetRotationL(enum CMceDisplaySink::TRotation)
-	?SetRoutingL@CMceSpeakerSink@@QAEXH@Z @ 266 NONAME ; void CMceSpeakerSink::SetRoutingL(int)
-	?SetRtpObserver@CMceManager@@QAEXPAVMMceRtpObserver@@@Z @ 267 NONAME ; void CMceManager::SetRtpObserver(class MMceRtpObserver *)
-	?SetSamplingFreq@CMceAmrCodec@@UAEHI@Z @ 268 NONAME ; int CMceAmrCodec::SetSamplingFreq(unsigned int)
-	?SetSessionObserver@CMceManager@@QAEXPAVMMceSessionObserver@@@Z @ 269 NONAME ; void CMceManager::SetSessionObserver(class MMceSessionObserver *)
-	?SetSessionSDPLinesL@CMceSession@@QAEXPAVCDesC8Array@@@Z @ 270 NONAME ; void CMceSession::SetSessionSDPLinesL(class CDesC8Array *)
-	?SetSourceL@CMceMediaStream@@QAEXPAVCMceMediaSource@@@Z @ 271 NONAME ; void CMceMediaStream::SetSourceL(class CMceMediaSource *)
-	?SetStandByTimerL@CMceCodec@@QAEXK@Z @ 272 NONAME ; void CMceCodec::SetStandByTimerL(unsigned long)
-	?SetStateL@CMceCodec@@QAEXW4TState@1@@Z @ 273 NONAME ; void CMceCodec::SetStateL(enum CMceCodec::TState)
-	?SetStatusCode@TMceTransactionDataContainer@@QAEXH@Z @ 274 NONAME ; void TMceTransactionDataContainer::SetStatusCode(int)
-	?SetVolumeL@CMceSpeakerSink@@QAEXH@Z @ 275 NONAME ; void CMceSpeakerSink::SetVolumeL(int)
-	?SetWhiteBalanceL@CMceCameraSource@@QAEXW4TWhiteBalance@CCamera@@@Z @ 276 NONAME ; void CMceCameraSource::SetWhiteBalanceL(enum CCamera::TWhiteBalance)
-	?SetZoomFactorL@CMceCameraSource@@QAEXH@Z @ 277 NONAME ; void CMceCameraSource::SetZoomFactorL(int)
-	?Sinks@CMceMediaStream@@QBEABV?$RPointerArray@VCMceMediaSink@@@@XZ @ 278 NONAME ; class RPointerArray<class CMceMediaSink> const & CMceMediaStream::Sinks(void) const
-	?Source@CMceMediaStream@@QBEPAVCMceMediaSource@@XZ @ 279 NONAME ; class CMceMediaSource * CMceMediaStream::Source(void) const
-	?Ssrc@CMceRtpSink@@QBEKXZ @ 280 NONAME ; unsigned long CMceRtpSink::Ssrc(void) const
-	?Ssrc@CMceRtpSource@@QBEKXZ @ 281 NONAME ; unsigned long CMceRtpSource::Ssrc(void) const
-	?Ssrcs@CMceRtpSource@@QBEABV?$RArray@I@@XZ @ 282 NONAME ; class RArray<unsigned int> const & CMceRtpSource::Ssrcs(void) const
-	?State@CMceCodec@@QBE?AW4TState@1@XZ @ 283 NONAME ; enum CMceCodec::TState CMceCodec::State(void) const
-	?State@CMceMediaStream@@QBE?AW4TState@1@XZ @ 284 NONAME ; enum CMceMediaStream::TState CMceMediaStream::State(void) const
-	?State@CMceSession@@QBE?AW4TState@1@XZ @ 285 NONAME ; enum CMceSession::TState CMceSession::State(void) const
-	?Streams@CMceSession@@QBEABV?$RPointerArray@VCMceMediaStream@@@@XZ @ 286 NONAME ; class RPointerArray<class CMceMediaStream> const & CMceSession::Streams(void) const
-	?Streams@CMceStreamBundle@@QAEABV?$RPointerArray@VCMceMediaStream@@@@XZ @ 287 NONAME ; class RPointerArray<class CMceMediaStream> const & CMceStreamBundle::Streams(void)
-	?SupportedAudioCodecs@CMceManager@@QBEABV?$RPointerArray@$$CBVCMceAudioCodec@@@@XZ @ 288 NONAME ; class RPointerArray<class CMceAudioCodec const > const & CMceManager::SupportedAudioCodecs(void) const
-	?SupportedProfileTypesL@CSIPProfileRegistryBase@@QAEXAAV?$RArray@VTSIPProfileTypeInfo@@@@@Z @ 289 NONAME ; void CSIPProfileRegistryBase::SupportedProfileTypesL(class RArray<class TSIPProfileTypeInfo> &)
-	?SupportedSecurityMechanismsL@CSIP@@QBEPAVCDesC8Array@@XZ @ 290 NONAME ; class CDesC8Array * CSIP::SupportedSecurityMechanismsL(void) const
-	?SupportedVideoCodecs@CMceManager@@QBEABV?$RPointerArray@$$CBVCMceVideoCodec@@@@XZ @ 291 NONAME ; class RPointerArray<class CMceVideoCodec const > const & CMceManager::SupportedVideoCodecs(void) const
-	?SupportedVideoCodecs@CMceVideoStream@@QBEABV?$RPointerArray@$$CBVCMceVideoCodec@@@@XZ @ 292 NONAME ; class RPointerArray<class CMceVideoCodec const > const & CMceVideoStream::SupportedVideoCodecs(void) const
-	?TerminateL@CMceSession@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 293 NONAME ; void CMceSession::TerminateL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?TranscodeL@CMceFileSource@@QAEXABV?$TBuf@$0BAA@@@@Z @ 294 NONAME ; void CMceFileSource::TranscodeL(class TBuf<256> const &)
-	?TranscodingProgressL@CMceFileSource@@QBEHXZ @ 295 NONAME ; int CMceFileSource::TranscodingProgressL(void) const
-	?Type@CMceCodec@@QBEIXZ @ 296 NONAME ; unsigned int CMceCodec::Type(void) const
-	?Type@CMceMediaSink@@QBEIXZ @ 297 NONAME ; unsigned int CMceMediaSink::Type(void) const
-	?Type@CMceMediaSource@@QBEIXZ @ 298 NONAME ; unsigned int CMceMediaSource::Type(void) const
-	?Type@CMceMediaStream@@QBEIXZ @ 299 NONAME ; unsigned int CMceMediaStream::Type(void) const
-	?Type@CMceStreamBundle@@QBE?AW4TMceStreamBundleType@1@XZ @ 300 NONAME ; enum CMceStreamBundle::TMceStreamBundleType CMceStreamBundle::Type(void) const
-	?Type@CSIPProfile@@QBEABVTSIPProfileTypeInfo@@XZ @ 301 NONAME ; class TSIPProfileTypeInfo const & CSIPProfile::Type(void) const
-	?UpdateL@CMceFileSource@@QAEXABV?$TBuf@$0BAA@@@@Z @ 302 NONAME ; void CMceFileSource::UpdateL(class TBuf<256> const &)
-	?UpdateL@CMceRtpSink@@QAEXHPAVHBufC8@@@Z @ 303 NONAME ; void CMceRtpSink::UpdateL(int, class HBufC8 *)
-	?UpdateL@CMceRtpSource@@QAEXIIKPAVHBufC8@@@Z @ 304 NONAME ; void CMceRtpSource::UpdateL(unsigned int, unsigned int, unsigned long, class HBufC8 *)
-	?UpdateL@CMceSession@@QAEXKPAVCDesC8Array@@PAVHBufC8@@10@Z @ 305 NONAME ; void CMceSession::UpdateL(unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *, class CDesC8Array *)
-	?VolumeL@CMceSpeakerSink@@QBEHXZ @ 306 NONAME ; int CMceSpeakerSink::VolumeL(void) const
-	?WhiteBalanceL@CMceCameraSource@@QAE?AW4TWhiteBalance@CCamera@@XZ @ 307 NONAME ; enum CCamera::TWhiteBalance CMceCameraSource::WhiteBalanceL(void)
-	?ZoomFactorL@CMceCameraSource@@QAEHXZ @ 308 NONAME ; int CMceCameraSource::ZoomFactorL(void)
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/group/mceclient.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Definition of project MceClientStub
-*
-*/
-
-
-// To get the APP_LAYER_SYSTEMINCLUDE-definition
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-TARGET              	mceclient.dll
-TARGETTYPE            dll
-UID                  	0x1000008d 0x00000111 // Experimental UID
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-SOURCE                  mcemanager.cpp
-SOURCE                  mcesession.cpp
-SOURCE                  mceoutsession.cpp
-SOURCE                  mceinsession.cpp
-SOURCE                  mcestreambundle.cpp
-SOURCE                  mcemediastream.cpp
-SOURCE                  mcevideostream.cpp
-SOURCE                  mceaudiostream.cpp
-SOURCE                  mcemediasource.cpp
-SOURCE                  mcecamerasource.cpp
-SOURCE                  mcefilesource.cpp
-SOURCE                  mcefilesink.cpp
-SOURCE                  mcertpsource.cpp
-SOURCE                  mcemediasink.cpp
-SOURCE                  mcedisplaysink.cpp
-SOURCE                  mcertpsink.cpp
-SOURCE                  mcespeakersink.cpp
-SOURCE                  mcecodec.cpp
-SOURCE                  mceaudiocodec.cpp
-SOURCE                  mceamrcodec.cpp
-SOURCE                  mcevideocodec.cpp
-SOURCE                  mceh263codec.cpp
-SOURCE                  mceavccodec.cpp
-SOURCE                  mcetransactiondatacontainer.cpp
-SOURCE                  staticdllentry.cpp
-
-SOURCEPATH              ../../sipprofilestub/src
-SOURCE                  sipprofileregistrybasestub.cpp
-SOURCE                  sipprofileregistrystub.cpp
-SOURCE                  sipprofilestub.cpp sipmanagedprofileregistrystub.cpp sipmanagedprofilestub.cpp sipstub.cpp
-
-
-USERINCLUDE             ../inc
-USERINCLUDE		../../sipprofilestub/inc
-USERINCLUDE     ../../../../../../inc /Mush/inc
-
-
-// to replace SIP profiles with a stub
-SYSTEMINCLUDE           ../../sipprofilestub/inc
-SYSTEMINCLUDE           /epoc32/include
-
-// Default system include paths for application layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 euser.lib
-LIBRARY                 bafl.lib
-LIBRARY 				        ws32.lib
-LIBRARY 				        bitgdi.lib
-LIBRARY 				        fbscli.lib
-
-
-
-EXPORTUNFROZEN
-
-SOURCEPATH 							../src
-SOURCE 								  mussessionsimulator.cpp
-SOURCEPATH 							../../sipprofilestub/src
-SOURCE 									sipprofilealrcontroller.cpp
-SOURCEPATH 							../src
-SOURCE 									mccscreen.cpp
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mccscreen.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    
-*
-*/
-
-
-
-#ifndef MCCSCREEN_H
-#define MCCSCREEN_H
-
-#include <w32std.h>
-
-class CMccScreen : public CBase, 
-                   public MDirectScreenAccess
-	{
-
-	public:
-
-		// Construction & destruction
-		static CMccScreen* NewL( TPoint aPos, 
-                                 TSize aArea, 
-                                 TInt aIndex, 
-                                 TInt aWindowOrdinalPosition,
-                                 TInt aWindowOrdinalPriority,
-                                 TSize aViewFinderImageSize );
-
-		~CMccScreen();
-		
-		void ConstructL( TSize aViewFinderImageSize );
-	    
-	public:
-
-		void StartL();
-		
-		void Stop();
-		
-		void Draw( CFbsBitmap& aFrame );
-		
-		void AttachFrameL( CFbsBitmap* aFrame );
-		
-		void DetachFrame();
-		
-	private:
-
-		CMccScreen( TPoint aPos, 
-                    TSize aArea, 
-                    TInt aIndex, 
-                    TInt aWindowOrdinalPosition,
-                    TInt aWindowOrdinalPriority );
-		
-		void Restart( RDirectScreenAccess::TTerminationReasons aReason );
-		
-		void AbortNow( RDirectScreenAccess::TTerminationReasons aReason );
-		
-		TPoint UpdateViewFinderArea( TSize aViewFinderImageSize );
-
-        void DoDraw( CFbsBitmap& aFrame );
-        
-        void DoScreenDeviceUpdate();
-        
-	private:
-
-	    RWsSession           iRwSession;
-		RWindowGroup*        iRwGroup;
-		RWindow*             iRw;
-		CWsScreenDevice*     iDev;
-		TInt 				 iDeviceIndex;
-		CDirectScreenAccess* iDirectScreenAccess;
-		CFbsBitGc* iGc;
-		RRegion* iRegion;
-		CFbsScreenDevice* iFbsDev;
-		
-		TPoint iPosition;
-		TSize  iArea;
-		
-		TInt iWindowOrdinalPosition;
-		TInt iWindowOrdinalPriority;
-		
-		TRect iViewFinderImageRect;	
-		
-		TBool iFirstImageDrawn;
-		
-		CFbsBitmap* iAttachedFrame;
-		
-		TBool iAborted;
-		
-    #ifdef TEST_EUNIT
-    	friend class UT_CMccCameraHandler;
-    #endif
-    	
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceamrcodec.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEAMRCODEC_H
-#define CMCEAMRCODEC_H
-
-// INCLUDES
-#include <mceaudiocodec.h>
-#include <mcedefs.h>
-
-// CONSTANTS
-const TInt KMceAmrNbBitrate475 = 4750;
-const TInt KMceAmrNbBitrate515 = 5150;
-const TInt KMceAmrNbBitrate590 = 5900;
-const TInt KMceAmrNbBitrate670 = 6700;
-const TInt KMceAmrNbBitrate740 = 7400;
-const TInt KMceAmrNbBitrate795 = 7950;
-const TInt KMceAmrNbBitrate102 = 10200;
-const TInt KMceAmrNbBitrate122 = 12200;
-
-const TUint KMceAllowedAmrNbBitrate475 = 0x0001;
-const TUint KMceAllowedAmrNbBitrate515 = 0x0002;
-const TUint KMceAllowedAmrNbBitrate590 = 0x0004;
-const TUint KMceAllowedAmrNbBitrate670 = 0x0008;
-const TUint KMceAllowedAmrNbBitrate740 = 0x0010;
-const TUint KMceAllowedAmrNbBitrate795 = 0x0020;
-const TUint KMceAllowedAmrNbBitrate102 = 0x0040;
-const TUint KMceAllowedAmrNbBitrate122 = 0x0080;
-const TUint KMceAllowedAmrNbBitrateAll = 0x00FF;
-
-const TUint KMceAmrNbSamplingFreq = 8000;
-const TUint KMceAmrWbSamplingFreq = 16000;
-
-const TUint KMceDefaultMaxPtime = 400;
-const TUint KMceDefaultPtime = 20;
-
-// DATA TYPES
-enum TAmrCodecMode
-    {
-    EMceBandwidthEfficient = 4,
-    EMceOctetAligned
-    };
-
-// CLASS DECLARATION
-
-/**
-* Class for the AMR codec information.
-*
-* It checks the validity of inserted values for AMR.
-* 
-*  @lib mceclient.lib
-*/
-class CMceAmrCodec : public CMceAudioCodec
-    {
-	public:  // Constructors and destructor
-	    
-	    /**
-	    * Destructor.
-	    */
-	    IMPORT_C ~CMceAmrCodec();
-	        
-	public: // From base class
-
-	    /**
-	    * Enable / Disable Voice Activity Detection.
-	    * @param aEnableVAD, Boolean indicating whether to enable Voice Activity Detection
-	    * @return KErrNotSupported if codec doesn't support VAD; otherwise KErrNone.
-	    */
-	    IMPORT_C TInt EnableVAD(TBool aEnableVAD);
-
-	    /**
-	    * Sets bitrate used with codec for encoding.
-	    * @param aBitrate, bitrate value for encoding
-	    * @return KErrNotSupported if codec doesn't support bitrate value issued; otherwise KErrNone.
-	    */
-	    IMPORT_C TInt SetBitrate(TUint aBitrate);
-	    
-	    /**
-	    * Sets bitrates allowed with codec.
-	    * @param aBitrates, allowed bitrate values (like KMceAmrNbBitrate590|KMceAmrNbBitrate670)
-	    * @return KErrNotSupported if codec doesn't support bitrate value issued; otherwise KErrNone.
-	    */
-	    IMPORT_C TInt SetAllowedBitrates(TUint aBitrates);
-	        
-	    /**
-	    * Sets the sampling frequency.
-	    * @param aSamplingFreq, Sampling frequency to be used
-	    * @return KErrNotSupported if codec doesn't support sampling frequency issued; otherwise KErrNone.
-	    */
-	    IMPORT_C TInt SetSamplingFreq(TUint aSamplingFreq);
-
-	    /**
-	    * Sets the packetization rate. 
-	    * @param aPTime, Packetization rate, must be multiple of audio frame size.
-	    * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
-	    */
-	    IMPORT_C TInt SetPTime(TUint aPTime);
-	    
-	    /**
-	    * Sets the maximum packetization rate.
-	    * @param aMaxPTime, maximum allowed packetization rate, must be multiple of audio frame size.
-	    * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
-	    */
-	    IMPORT_C TInt SetMaxPTime(TUint aMaxPTime);
-
-	    /**
-	    * Sets the payload type identifier.
-	    * @param aPayloadType payload type identifier.
-	    * @return One of the standard system-wide error codes.
-	    */
-	    IMPORT_C TInt SetPayloadType(TUint8 aPayloadType);
-
-	    /**
-	    * Sets the codec mode.
-	    * @param aCodecMode	Codec mode ( Bandwidth efficient / octet aligned )
-	    * @return KErrNotSupported if codec doesnt' support codec mode value issued; otherwise KErrNone.
-	    */
-	    IMPORT_C TInt SetCodecMode(TUint aCodecMode);
-	    
-	    /**
-	    * Clones codec, ownership is transferred.
-	    * @return cloned codec
-	    */
-	    IMPORT_C CMceAudioCodec* CloneL() const;
-
-	public: 
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aSdpName sdp name
-	    */
-	    static CMceAmrCodec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName);
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aSdpName sdp name
-	    */
-	    static CMceAmrCodec* NewLC(TBuf8<KMceMaxSdpNameLength> aSdpName);
-
-	    	    
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    */
-	    CMceAmrCodec();
-
-	    /**
-	    * By default Symbian 2nd phase constructor is private.
-	    */
-	    void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName); 
-
-	    /**
-	    * Sets the sdp name.
-	    * @param aSdpName the sdp name
-	    */
-	    void SetSdpNameL( const TDesC8& aSdpName );
-
-		//for testing
-
-	    MCE_UNIT_TEST_DEFS	    
-    };
-
-
-#endif      
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceaudiocodec.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEAUDIOCODEC_H
-#define CMCEAUDIOCODEC_H
-
-// INCLUDES
-#include <e32base.h>
-#include <mcedefs.h>
-#include <mcecodec.h>
-
-// FORWARD DECLARATIONS
-class RReadStream;
-class RWriteStream;
-class CMceComAudioCodec;
-class CMceMediaStream;
-class TMceIds;
-class TMceEvent;
-class TMceMediaId;
-class TMceFactory;
-class TMceAudioCodecFactory;
-
-// CLASS DECLARATION
-
-/**
-* Container class for audio codecs.
-*
-* It defines attributes that can be set and get from audio codec.
-* These attributes are used in single audio stream and they
-* are negotiated with remote terminal.
-*
-*  @lib mceclient.lib
-*/
-class CMceAudioCodec : public CMceCodec
-    {
-	public:  // Constructors and destructor
-	        
-	    /**
-	    * Destructor.
-	    */
-	    virtual ~CMceAudioCodec();
-
-	public: // New functions
-	        
-	    /**
-	    * Enable / Disable Voice Activity Detection.
-	    * @param aEnableVAD, Boolean indicating whether to enable Voice Activity Detection
-	    * @return KErrNotSupported if codec doesn't support VAD; otherwise KErrNone.
-	    */
-	    virtual TInt EnableVAD(TBool aEnableVAD) = 0;
-	    
-	    /**
-	    * Sets the sampling frequency.
-	    * @param aSamplingFreq, Sampling frequency to be used
-	    * @return KErrNotSupported if codec doesn't support sampling frequency issued; otherwise KErrNone.
-	    */
-	    virtual TInt SetSamplingFreq(TUint aSamplingFreq) = 0;
-	    
-	    /**
-	    * Sets the packetization rate. 
-	    * @param aPTime, Packetization rate, must be multiple of audio frame size.
-	    * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
-	    */
-	    virtual TInt SetPTime(TUint aPTime) = 0;        
-	    
-	    /**
-	    * Sets the maximum packetization rate.
-	    * @param aMaxPTime, maximum allowed packetization rate, must be multiple of audio frame size.
-	    * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
-	    */
-	    virtual TInt SetMaxPTime(TUint aMaxPTime) = 0; 
-	          
-	    /**
-	    * Clones codec, ownership is transferred.
-	    * @return cloned codec
-	    */
-	    virtual CMceAudioCodec* CloneL() const = 0;
-	    
-	    /**
-	    * Gets sampling frequency used currently.
-	    * @return Sampling frequency
-	    */
-	    virtual TUint SamplingFreq() const;
-
-	    /**
-	    * Get VAD status.
-	    * @return Boolean indicating is VAD activated
-	    */
-	    virtual TBool VAD() const;
-	    
-	    /**
-	    * Gets the packetization rate.
-	    * @return packetization rate.
-	    */
-	    virtual TUint PTime() const;        
-	    
-	    /**
-	    * Gets max packetization rate.
-	    * @return Max packetization rate.
-	    */
-	    virtual TUint MaxPTime() const;
-
-	public: 
-
-	    /**
-	    * Initializes 
-	    * @param aParent the parent
-	    */
-	    virtual void InitializeL( CMceMediaStream& aParent );    
-	                
-	                
-	protected:  // New functions
-
-	    /**
-	    * C++ default constructor.
-	    */
-	    CMceAudioCodec();
-
-
-    public: // stub data
-
-	    /**
-        * Enables or disables VAD
-        */
-        TBool iEnableVAD;
-
-    	/**
-        * Sampling frequency used with codec
-        */
-    	TUint iSamplingFreq;
-
-    	/**
-        * Stream's packet time
-        */
-    	TUint iPTime;
-    	
-    	/**
-        * Stream's max packet time
-        */
-    	TUint iMaxPTime;
-    };
-
-
-#endif
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceaudiostream.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEAUDIOSTREAM_H
-#define CMCEAUDIOSTREAM_H
-
-//  INCLUDES
-#include <e32std.h>  		
-#include <mcemediastream.h>
-
-// CONSTANTS
-const TMceMediaType KMceAudio = 1;
-
-// FORWARD DECLARATIONS
-class CMceAudioCodec;
-
-// CLASS DECLARATION
-
-/**
-* Class for representing unidirectional audio stream.
-*
-* It defines the used audio codecs for the stream.
-* In order to be complete structure, at least one codec is required.
-*
-*  @lib mceclient.lib
-*/
-class CMceAudioStream: public CMceMediaStream
-	{
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceAudioStream* NewL();
-	   
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceAudioStream* NewLC();
-		
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceAudioStream();
-
-	public: // Functions
-
-	    /**
-	    * Returns the available codecs to the session.
-	    * For CMEOutSession, array contains all codecs supported by
-	    * terminal in default. For CMEInSession, array contains codecs
-	    * that were offered by remote terminal, and supported by local terminal.
-	    * @return codecs available for the session.
-	    */
-		IMPORT_C const RPointerArray<CMceAudioCodec>& Codecs();
-
-	    /**
-	    * Adds codec to the stream, ownership is transferred.
-	    * @param aCodec codec added to the stream
-	    */
-		IMPORT_C void AddCodecL( CMceAudioCodec* aCodec );
-
-	    /**
-	    * Removes codec from the stream
-	    * @param aCodec codec removed from stream
-	    */
-		IMPORT_C void RemoveCodecL( CMceAudioCodec& aCodec );
-
-	    
-	public: //from CMceMediaStream
-		
-	    /**
-	    * Initializes 
-	    * @param aParent the parent
-	    */
-	    void InitializeL( CMceSession& aParent );
-
-	    /**
-	    * Initializes 
-	    * @param aManager the manager. Ownership is NOT transferred
-	    */
-	   void InitializeL( CMceManager* aManager );
-		
-
-	private: //methods
-
-	    /**
-	     * C++ default constructor.
-	     */
-		CMceAudioStream();
-
-	    /**
-	    * Second-phase constructor.
-	    */
-		void ConstructL();
-	    		
-
-	private: // Owned data
-
-	    /**
-	     * codecs
-	     */
-		RPointerArray<CMceAudioCodec> iCodecs;
-
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceavccodec.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCEAVCCODEC_H
-#define MCEAVCCODEC_H
-
-// INCLUDES
-#include <mcevideocodec.h>
-#include <mcedefs.h>
-
-// CONSTANTS
-
-const TUint KMceAvcClockRate = 90000;
-
-// Allowedbitrates bitfield combines avc profile-level-id information in
-// similar manner  as defined in RFC 3984. Most significant byte stores
-// profile-id value, seconds significant byte contains profile-iop value and
-// last two bytes contain profile-level information.
-//
-const TUint KMceAvcBitrateLevel1 = 0x0001;
-const TUint KMceAvcBitrateLevel1b = 0x0002;
-const TUint KMceAvcBitrateLevel1_1 = 0x0004;
-const TUint KMceAvcBitrateLevel1_2 = 0x0008;
-const TUint KMceAvcBitrateLevel1_3 = 0x0010;
-const TUint KMceAvcBitrateLevel2 = 0x0020;
-
-const TUint KMceAvcCodecProfileIopConstraintSet = 0x0100;
-const TUint KMceAvcCodecProfileIopConstraintSet1 = 0x0200;
-const TUint KMceAvcCodecProfileIopConstraintSet2 = 0x0400;
-
-const TUint KMceAvcCodecProfileIdBaseline = 0x1000;
-const TUint KMceAvcCodecProfileIdMain = 0x2000;
-const TUint KMceAvcCodecProfileIdExtended = 0x4000; 
-const TUint KMceAvcCodecProfileIdHigh = 0x8000; 
-
-const TUint KMceAllowedAvcBitrateAll = 0x00FF;
-
-// Different framerates may be supported depending on profile level.
-//
-const TUint KMceAvcFrameRate7_5 = 0x0001;
-const TUint KMceAvcFrameRate12_5 = 0x0002;
-const TUint KMceAvcFrameRate15 = 0x0004;
-const TUint KMceAvcFrameRate30 = 0x0008;
-const TUint KMceAvcFrameRate36 = 0x0010;
-
-const TUint KMceAllowedAvcFrameRateAll = 0x00FF;
-
-// Different resolutions may be supported depending on profile level.
-//
-const TUint KMceAvcResolution176x144 = 0x0001;
-const TUint KMceAvcResolution320x240 = 0x0002;
-const TUint KMceAvcResolution352x288 = 0x0004;
-
-const TUint KMceAllowedAvcResolutionAll = 0x000F;
-
-
-// DATA TYPES
-enum TAvcCodecMode
-    {
-    KMceAvcModeSingleNal,
-    KMceAvcModeNonInterleaved,
-    KMceAvcModeInterleaved
-    };
-    
-    
-// CLASS DECLARATION
-
-/**
-* Class for the H264 codec information.
-*
-* It checks the validity of inserted values for H264
-* 
-*  @lib mceclient.lib
-*/
-class CMceAvcCodec : public CMceVideoCodec
-    {
-    
-	public:  // Constructors and destructor
-	    
-	    /**
-	    * Destructor.
-	    */
-	    IMPORT_C ~CMceAvcCodec();
-
-	public: 
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aSdpName sdp name
-	    */
-	    IMPORT_C static CMceAvcCodec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName);
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aSdpName sdp name
-	    */
-	    IMPORT_C static CMceAvcCodec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName );
-	        
-	public: // From base classes
-
-	    /**
-	    * Sets bitrate used with codec for encoding.
-	    * @param aBitrate bitrate value for encoding
-	    * @return KErrNotSupported if codec doesn't support bitrate
-	    *         value issued
-	    */
-	    virtual TInt SetBitrate( TUint aBitrate );
-	    
-	    /**
-	    * Sets bitrates allowed with codec.
-	    * @param aBitrates allowed bitrate values
-	    * @return KErrNotSupported if codec doesn't support bitrate
-	    *         values issued
-	    */
-	    virtual TInt SetAllowedBitrates( TUint aBitrates );
-	    
-	    /**
-	    * Sets the codec specific mode.
-	    * @param aCodecMode mode of the codec 
-	    * @return KErrNotSupported if codec doesnt' support codec mode
-	    *         value issued
-	    */
-	    virtual TInt SetCodecMode( TUint aCodecMode );
-	    
-	    /**
-	    * Sets the payload type.
-	    * @param aPayloadType type identifier of the payload
-	    * @return KErrNotSupported if codec doesn't support payload type issued
-	    */
-	    virtual TInt SetPayloadType( TUint8 aPayloadType );
-	    
-        /**
-	    * Clones the codec.
-	    * @return cloned codec; ownership is transferred
-	    */
-	    virtual CMceVideoCodec* CloneL() const;
-	    
-	    /**
-	    * Sets maximum bitrate of the codec.
-	    * @param aMaxBitrate value of maximum bitrate used for encoding
-	    * @leave KErrNotSupported if codec doesn't support frame sizes issued
-	    */
-	    virtual void SetMaxBitrateL( TUint aMaxBitrate );
-        
-        /**
-	    * Sets resolutions allowed with the codec.
-	    * @param aResolutions bitfield of allowed resolutions
-	    * @leave KErrNotSupported if codec doesn't support resolutions issued
-	    */
-        virtual void SetAllowedResolutionsL( TUint aResolutions );
-        
-        /**
-	    * Sets resolution of the video.
-	    * @param aResolution resolution of the video in pixels
-	    * @leave KErrNotSupported if codec doesn't support resolution issued
-	    */
-        virtual void SetResolutionL( TSize aResolution );
-        
-        /**
-	    * Sets frame rates allowed with the codec.
-	    * @param aFrameRates allowed frame rate values as a bitfield
-	    * @leave KErrNotSupported if codec doesn't support frame rates issued
-	    */
-        virtual void SetAllowedFrameRatesL( TUint aFrameRates );
-        
-        /**
-	    * Sets frame rate used with the codec for encoding.
-	    * @param aFrameRate frame rate for encoding
-	    * @leave KErrNotSupported if codec doesn't support frame rate value
-	    *        issued
-	    */
-        virtual void SetFrameRateL( TReal aFrameRate );
-        
-        /**
-        * Sets preferred encoding device for uplink stream and preferred decoding
-        * device for downlink stream.
-        * @param aEncodingDecodingDevice
-        * @leave KErrNotSupported if setting preferred device is not possible
-        */
-        virtual void SetPreferredEncodingDecodingDeviceL( 
-                                    TUid aEncodingDecodingDevice );
-        
-        /**
-        * Set config key (sprop-parameter-sets)
-        * @param aConfigKey, config key as Base64 encoded
-        * @leave KErrNotSupported if setting config key is not possible
-        */
-        virtual void SetConfigKeyL( const TDesC8& aConfigKey );
-
-
-    private: // Helper functions
-	    
-	    /**
-	    * Sets the sdp name.
-	    * @param aSdpName the sdp name
-	    */
-	    void SetSdpNameL( const TDesC8& aSdpName );
-	    
-	private: // Constructors
-
-	    /**
-	    * C++ default constructor.
-	    */
-	    CMceAvcCodec();
-
-	    /**
-	    * By default Symbian 2nd phase constructor is private.
-	    */
-	    void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName); 
-
-
-    public: // Stub data
- 
-        TUint8 iPacketizationMode;
-        
-        TUint8 iAllowedPacketizationModes;   
-
-
-    //for testing
-
-	MCE_UNIT_TEST_DEFS	    
-
-    };
-
-
-#endif      
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcecamerasource.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCECAMERASOURCE_H
-#define MCECAMERASOURCE_H
-
-// INCLUDES
-#include <e32std.h>
-#include <ecam.h>
-#include "mcemediasource.h"
-
-// CONSTANTS
-const TMceSourceType KMceCameraSource = 3;
-
-//FORWARD DECLARATIONS
-class CMceManager;
-class CMceItcSender;
-
-// CLASS DECLARATION
-
-/**
-* Class representing camera in MCE.
-*
-* CMceCameraSource can be used to record video from camera.
-*
-* Enable (continue) and Disable (pause) operations to it are considered
-* to be local, so they are not signalled to remote terminal.
-*
-* In common situation camera source is combined with display sink which acts
-* as a viewfinder for the camera.
-* 
-* @lib mceclient.lib
-*/
-class CMceCameraSource : public CMceMediaSource
-	{
-    friend class UT_CMusEngLiveSession;
-    friend class UT_CMusEngTwoWaySession;
-    friend class UT_TMusEngCameraHandler;
-
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aManager reference to the manager
-	    */
-		IMPORT_C static CMceCameraSource* NewL( CMceManager& aManager );
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aManager reference to the manager
-	    */
-		IMPORT_C static CMceCameraSource* NewLC( CMceManager& aManager );
-		
-        /// Not in the real implementation 
-        IMPORT_C static CMceCameraSource* NewL();		
-		
-		/// Not in the real implementation 
-		IMPORT_C static CMceCameraSource* NewLC();
-		
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceCameraSource();
-
-	public: // From CMceMediaSource
-
-	    /**
-	    * Enables the source explicitly.
-	    */
-		IMPORT_C void EnableL(); 
-
-	    /**
-	    * Disables the source explicitly.
-	    */
-		IMPORT_C void DisableL(); 
-
-	public: // New functions
-	
-	    /**
-	    * Gets the number of cameras on the device.
-	    * @return number of available cameras 
-	    */
-	    IMPORT_C TInt CamerasAvailable() const;
-
-        /**
-        * Sets index of physical camera to be used.
-        * @param aCameraIndex, index of the camera to be used; First camera has
-        *        index 0 and number of available cameras can be retrieved by 
-        *        calling CMceCameraSource::CamerasAvailable                                  
-        */
-        IMPORT_C void SetCameraIndexL( TInt aCameraIndex );
-        
-        /** 
-    	* Gets information about the camera device.
-    	* @param aInfo on return information about the camera device
-    	*/
-        IMPORT_C void GetCameraInfo( TCameraInfo& aInfo ) const;
-        
-        /** 
-    	* Sets the zoom factor.
-    	* This must be in the range of TCameraInfo::iMinZoom to 
-    	* TCameraInfo::iMaxZoom inclusive.
-    	* @param aZoomFactor required zoom factor
-    	* @leave KErrArgument if the specified zoom factor is out of range
-    	*/
-    	IMPORT_C void SetZoomFactorL( TInt aZoomFactor );
-    	
-    	/** 
-	    * Gets the currently set zoom factor.
-        * @return current zoom factor
-	    */
-	    IMPORT_C TInt ZoomFactorL();
-    	
-        /** 
-        * Sets the digital zoom factor.
-        * This must be in the range of 0 to TCameraInfo::iMaxDigitalZoom 
-        * inclusive.
-        * @param aDigitalZoomFactor The required digital zoom factor
-        * @leave KErrArgument if the zoom factor is out of range
-        */
-        IMPORT_C void SetDigitalZoomFactorL( TInt aDigitalZoomFactor );
-
-        /** 
-        * Gets the currently set digital zoom factor.
-        * @return current digital zoom factor 
-        */
-        IMPORT_C TInt DigitalZoomFactorL();
-
-        /**
-        * Sets the contrast adjustment of the device.
-        * @param aContrast required contrast value; This must be in the 
-        *        range of -100 to +100 or CCamera::EContrastAuto.
-        * @leave KErrNotSupported if contrast adjustment is not supported, 
-        *        see TCameraInfo::TOptions
-        * @leave KErrArgument if the specified contrast value is out of 
-        *        range
-        */
-        IMPORT_C void SetContrastL( TInt aContrast );
-
-        /** 
-        * Gets the current contrast value.
-        * @return current contrast value
-        */
-        IMPORT_C TInt ContrastL();
-
-        /** 
-        * Sets the brightness adjustment of the device.
-        * No effect if this is not supported, see TCameraInfo::TOptions.
-        * 
-        * @param aBrightness required brightness adjustment; This must be 
-        *        in the range of -100 to +100 or CCamera::EBrightnessAuto
-        * @leave KErrNotSupported if brightness adjustment is not supported, 
-        *        see TCameraInfo::TOptions
-        * @leave KErrArgument if the brightness adjustment is out of range
-        */
-        IMPORT_C void SetBrightnessL( TInt aBrightness );
-
-        /** 
-        * Gets the currently set brightness adjustment value.
-        * @return current brightness adjustment value
-        */
-        IMPORT_C TInt BrightnessL();
-
-        /** 
-        * Sets the exposure adjustment of the device.
-        * @param aExposure required exposure adjustment
-        * @leave KErrNotSupported if the specified exposure adjustment is
-        *        not supported, see CameraInfo::iExposureModesSupported
-        */
-        IMPORT_C void SetExposureL( CCamera::TExposure aExposure );
-
-        /** 
-        * Gets the currently set exposure setting value.
-        * @return current exposure setting value
-        */
-        IMPORT_C CCamera::TExposure ExposureL();
-
-        /** 
-        * Sets the white balance adjustment of the device.
-        * @param aWhiteBalance required white balance adjustment
-        * @leave KErrNotSupported if the specified white balance adjustment is 
-        *        not supported, see TCameraInfo::iWhiteBalanceModesSupported
-        */
-        IMPORT_C void SetWhiteBalanceL( CCamera::TWhiteBalance aWhiteBalance );
-
-        /** 
-        * Gets the currently set white balance adjustment value.
-        * @return current white balance adjustment value
-        */
-        IMPORT_C CCamera::TWhiteBalance WhiteBalanceL();
-
-	public: // internal
-	
-	    /**
-	    * Initializes 
-	    * @param aManager the manager. Ownership is NOT transferred
-	    */
-	    void InitializeL( CMceManager* aManager );
-
-	private:
-
-	    /**
-	    * C++ constructor.
-	    */
-		CMceCameraSource();
-    
-    private: // Owned data
-   
-        TCameraInfo iCameraInfo;
-        
-	private: // Not owned data
-
-        //CMceManager* iManager;
-
-    private: // Reserved for future use
-    
-        TAny* iReserved;       	
-        
-
-    public: // stub data
-	
-	    TInt iCameraIndex;
-	    TInt iCameraCount;
-        TInt iZoomFactor;
-        TInt iDigitalZoomFactor;
-        TInt iContrast;
-        TInt iBrightness;
-        TInt iExposure;
-        TInt iWhiteBalance;
-	    	    
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcecodec.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,412 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCECODEC_H
-#define MCECODEC_H
-
-// INCLUDES
-#include <e32base.h>
-#include "mcedefs.h"
-
-// FORWARD DECLARATIONS
-class RReadStream;
-class RWriteStream;
-class CMceComCodec;
-
-class CMceMediaStream;
-class TMceEvent;
-class TMceMediaId;
-class TMceFactory;
-
-// DATA TYPES
-typedef TUint TMceCodecType;
-
-
-// CLASS DECLARATION
-
-/**
-* Base class for codecs.
-*
-* It defines setters and getters for generic codec attributes.
-*
-* In some systems certain device resources cannot be shared. For example
-* speaker of the device might not be able to play simultaneously several
-* differently encoded audio streams. Or only one client at the time
-* could use the camera of the device. Codec states can be used to overcome
-* situations where single codec would occupy some resource for excessive
-* period of time or permanently. 
-*
-* Codec can be in one of the three states:
-*
-* When codec is in state EEnabled, resources, associated with the codec,
-* are reserved for the codec and in some cases cannot be used by other
-* software components. Precondition for reserving resources for the codec
-* is that associated device resource (e.g. speaker sink of downlink or
-* camera source of uplink) is also enabled.
-*
-* When codec is in state EStandby, resources are not reserved for the codec
-* and therefore can be used by other software components. If the stream 
-* (uplink or downlink), into which this codec is attached, encounters data
-* encoded with the codec, codec in state EStandby is tried to be enabled.
-* If enabling succeeds, codec state changes to EEnabled and associated
-* resources are reserved.
-*
-* When codec is in state EDisabled, resources are not reserved for the codec
-* and are not even tried to be reserved.    
-*
-* @lib mceclient.lib
-*/
-class CMceCodec : public CBase
-    {
-    
-    public:  // Codec states
-    
-        enum TState
-            {
-            EDisabled, 
-            EStandby,
-            EEnabled
-            };
-    
-	public:  // Constructors and destructor
-	        
-	    /**
-	    * Destructor.
-	    */
-	    virtual ~CMceCodec();
-
-	public: // New functions
-	         
-	    /**
-	    * Sets bitrate used with codec for encoding.
-	    * @param aBitrate bitrate value for encoding
-	    * @return KErrNotSupported if codec doesn't support bitrate
-	    *         value issued
-	    */
-	    virtual TInt SetBitrate( TUint aBitrate ) = 0;
-	    
-	    /**
-	    * Sets bitrates allowed with codec.
-	    * @param aBitrates allowed bitrate values
-	    * @return KErrNotSupported if codec doesn't support bitrate
-	    *         values issued
-	    */
-	    virtual TInt SetAllowedBitrates( TUint aBitrates ) = 0;
-	    
-	    /**
-	    * Sets the codec specific mode.
-	    * @param aCodecMode mode of the codec 
-	    * @return KErrNotSupported if codec doesnt' support codec mode
-	    *         value issued
-	    */
-	    virtual TInt SetCodecMode( TUint aCodecMode ) = 0;
-	    
-	    /**
-	    * Sets the payload type.
-	    * @param aPayloadType type identifier of the payload
-	    * @return KErrNotSupported if codec doesn't support payload type issued
-	    */
-	    virtual TInt SetPayloadType( TUint8 aPayloadType ) = 0;
-	    
-	
-	public: // New functions          
-
-        /**
-        * Sets the state of the codec.
-        * @param aState desired codec state
-        */
-        IMPORT_C void SetStateL( CMceCodec::TState aState );
-
-        /**
-        * Sets the timer period in seconds from starting of inactivity
-        * to automatically changing to state CMceCodec::EStandby .
-        * @param aTimerValue timer period in seconds
-        */
-        IMPORT_C void SetStandByTimerL( TUint32 aTimerValue );
-
-        /**
-	    * Sets MMF priority value for the codec.
-	    * @param aPriority priority of the codec
-	    */
-        IMPORT_C void SetMMFPriorityL( TInt aPriority );
-        
-        /**
-	    * Sets MMF priority preference value for the codec.
-	    * @param aPriorityPreference priority preference of the codec
-	    */
-        IMPORT_C void SetMMFPriorityPreferenceL( TInt aPriorityPreference );
-        
-        /**
-        * Set keep alive packets send timer value.
-        * @param aTimerValue timer value in ms for keep alive packets
-        * @return One of the standard system-wide error codes.
-        */
-        IMPORT_C void SetKeepAliveTimerL( TUint8 aTimerValue );
-
-        /**
-        * Set keep alive packets payload type.
-        * @param aKeepAlivePT payload type for keep alive packets
-        * @return One of the standard system-wide error codes.
-        */
-        IMPORT_C void SetKeepAlivePayloadTypeL( TUint8 aKeepAlivePT );
-
-        /**
-        * Set keep alive packets payload data.
-        * @param aData payload data for keep alive packets
-        * @return One of the standard system-wide error codes.
-        */
-        IMPORT_C void SetKeepAliveDataL( const TDesC8& aData );        
-        
-
-    public: // Getters
-
-        /**
-	    * Gets the state of the codec
-	    * @return state of the codec
-	    */	
-	    IMPORT_C CMceCodec::TState State() const;
-	     
-        /**
-	    * Media id of the codec.
-	    * @return media id
-	    */
-		//IMPORT_C TMceMediaId Id() const;
-		
-		/**
-	    * Type of the codec
-	    * @return codec type
-	    */
-		IMPORT_C TMceCodecType Type() const;
-    	    
-	    /**
-	    * Gets codec fourCC.
-	    * @return fourCC value
-	    */        
-	    IMPORT_C TUint32 FourCC() const;
-
-	    /**
-	    * Gets current bitrate.
-	    * @return bitrate value
-	    */
-	    IMPORT_C TUint Bitrate() const;
-
-	    /**
-	    * Gets allowed bitrate values.
-	    * @return bitrate values
-	    */
-	    IMPORT_C TUint AllowedBitrates() const;
-	    
-	    /**
-	    * Gets current frame size of the codec.
-	    * @return size of single frame used by the codec
-	    */        
-	    IMPORT_C TUint FrameSize() const;
-
-	    /**
-	    * Gets the codec mode.
-	    * @return codec mode
-	    */
-	    IMPORT_C TUint CodecMode() const;
-	    	    
-	    /**
-	    * Gets the payload type identifier.
-	    * @return payload type used
-	    */
-	    IMPORT_C TUint8 PayloadType() const;
-	    
-	    /**
-	    * Gets the sdp name.
-	    * @return sdp name of the codec
-	    */
-	    IMPORT_C const TDesC8& SdpName() const;
-
-		/**
-	    * Gets MMF priority
-	    * @return MMF priority
-	    */
-		IMPORT_C TInt MMFPriority() const;
-		
-		/**
-	    * Gets MMF priority preference
-	    * @return current MMFPriorityPreference
-	    */
-		IMPORT_C TInt MMFPriorityPreference() const;
-		
-		/**
-        * Gets keep alive packets send timer value.
-        * @return keep alive packets send timer value (ms).
-        */
-        IMPORT_C TUint8 KeepAliveTimer() const;
-
-        /**
-        * Gets keep alive packets payload type.
-        * @return keep alive packets payload type.
-        */
-        IMPORT_C TUint8 KeepAlivePayloadType() const;
-
-        /**
-        * Gets keep alive packets payload data.
-        * @return keep alive packets payload data.
-        */
-        IMPORT_C const TDesC8& KeepAliveData() const;     
-        
-
-	public: // Preference manipulation    
-	    
-	    /**
-	    * Gets the preference value.
-	    * @return preference value of the codec
-	    */
-	    IMPORT_C TInt Preference() const; 
-	    
-	    /**
-	    * Sets the preference value used in media negotiation.
-	    * Codec with preference value 0 is considered as the most preferenced
-	    * codec. Preference of codecs with the same preference value is
-	    * determined by order they were added to the stream. 
-	    * @param aPreference preference value of the codec
-	    */
-	    IMPORT_C void SetPreferenceL( TInt aPeference );
-	    	    
-	
-	public: // Internal
-	 
-	    /**
-	    * Initializes the codec.
-	    * @param aParent the parent
-	    */
-	    virtual void InitializeL( CMceMediaStream& aParent );           
-	    
-	  
-	                
-	protected: // New functions
-	    
-	    /**
-	    * Sets the sdp name.
-	    * @param aSdpName sdp name for the codec
-	    */
-	    virtual void SetSdpNameL( const TDesC8& aSdpName ) = 0;
-
-	    /**
-	    * C++ default constructor.
-	    */
-	    CMceCodec();
-		
-	protected: // Data
-		
-		/**
-		* Codec type.
-		*/
-		TMceCodecType iType;
-
-	protected: // NOT owned data
-			
-	    /**
-	    * Parent stream, not owned.
-	    */
-		CMceMediaStream* iStream;
-
-    private: // Reserved for future use
-    
-        TAny* iReserved;       
-
-    public: // stub data
-    
-        /**
-         * type of session
-         */
-        //TMceMediaId iID;
-    	
-    	/**
-         * Fmtp attribute
-         */
-        HBufC8* iFmtpAttr;
-
-    	/**
-        * Sdp name used in SDP messages
-        */
-    	TBuf8<KMceMaxSdpNameLength> iSdpName;		
-
-    	/**
-        * Payload type
-        */
-    	TUint8 iPayloadType;
-
-        /**
-         * Is enabled
-         */
-        TBool iIsEnabled;
-        
-       	/**
-        * Stream's bit rate
-        */
-    	TUint iBitrate;
-
-    	/**
-        * Stream's allowed bit rates
-        */
-    	TUint32 iAllowedBitrates;
-
-    	/**
-        * Codec mode ( e.g. PCMU, PCMA, Bandwidth efficient, octet aligned )
-        */
-    	TUint32 iCodecMode;		
-    	
-    	/**
-    	* Codec FourCC
-    	*/
-    	TUint32 iFourCC;
-
-    	/**
-        * Codecs frame size
-        */
-    	TUint iFrameSize;
-    	
-    	/**
-        * 
-        */
-        TInt iMMFPriority;
-        
-        /**
-        * 
-        */
-        TInt iMMFPriorityPreference;
-        
-    	/**
-        * 
-        */
-        TUint8 iKeepAliveTimer;
-        
-    	/**
-        * Codecs frame size
-        */
-    	TUint8 iKeepAlivePayloadType;
-
-        /**
-        * 
-        */
-        TBuf8<10> iKeepAliveData;
-        
-        TInt iPreference;
-	
-    };
-
-
-#endif
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcedefs.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCEDEFS_H
-#define MCEDEFS_H
-
-#include <e32base.h>
-
-const TInt KMceMaxSdpNameLength = 20;
-const TUint8 KMceMaxPacketrate = 10;
-const TInt KMcePTimeFactor = 1000;
-
-const TInt KMceMaxSizeInReadStream = 1000;
-const TInt KMceExternalizeBufferExpandSize = 100;
-const TInt KMceArrayGranularity = 5;
-
-
-_LIT8( KMceSDPNamePCMU, "PCMU" );
-_LIT8( KMceSDPNamePCMA, "PCMA" );
-_LIT8( KMceSDPNameAMR, "AMR" );
-
-_LIT8( KMceSDPNameH263, "H263" );
-_LIT8( KMceSDPNameH2632000, "H263-2000" );
-_LIT8( KMceSDPNameH2631998, "H263-1998" );
-_LIT8( KMceSDPNameH264, "H264" );
-
-typedef TInt TMceReturnStatus;
-const TMceReturnStatus KMceAsync = 1;
-const TMceReturnStatus KMceReady = 0;
-
-// SESSION MODIFIERS
-
-/**
-* Data type for session modifiers.
-*/
-typedef TUint32 TMceSessionModifier;
-
-
-/** 
-* Usage of QOS preconditions within session;
-* This modifier can be set only when session is in state MceSession::EIdle. 
-* By default, session is in preconditions supported mode.
-*
-* KMcePreconditionsNotUsed indicates that preconditions are not used.
-* KMcePreconditionsSupported indicates that preconditions are supported
-*/
-// KEY
-const TMceSessionModifier KMcePreconditions = 0;
-// VALUES
-const TUint KMcePreconditionsNotUsed = 0;
-const TUint KMcePreconditionsSupported = 1;
-
-/** 
-* Usage of reliable provisional responses (aka 100rel) within session.
-* This modifier can be set only when session is in state MceSession::EIdle 
-* or MceSession::EIncoming.
-* By default, session is in 100rel supported mode.
-* 
-* KMce100RelNotUsed indicates that 100rel is not used.
-* KMce100RelSupported indicates that 100rel is supported.
-* KMce100RelRequired indicates that 100rel is required.
-*/
-// KEY
-const TMceSessionModifier KMce100Rel = 1;
-// VALUES
-const TUint KMce100RelNotUsed = 0;
-const TUint KMce100RelSupported = 1;
-const TUint KMce100RelRequired = 2;
-
-
-
-#ifdef __MWERKS__
-#pragma warn_emptydecl off
-#endif
-
-#ifdef MCE_UNIT_TEST
-#include "mcetestdefs.h"
-#else
-#define MCE_UNIT_TEST_DEFS
-#endif
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcedisplaysink.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCEDISPLAYSINK_H
-#define MCEDISPLAYSINK_H
-
-// INCLUDES
-#include "mcemediasink.h"
-
-// FORWARD DECLARATIONS
-class CMceManager;
-class RWindow;
-class CWindowGc;
-class CMccScreen;
-
-// DATA TYPES
-const TMceSinkType KMceDisplaySink = 3;
-
-
-// CLASS DECLARATION
-
-/**
-* Class representing display in MCE.
-*
-* CMceDisplaySink can be used to show video on screen or as a viewfinder
-* of the camera.
-*
-* Enable and Disable operations to it are considered to be local, 
-* so they are not signalled to remote terminal.
-* 
-* @lib mceclient.lib
-*/
-class CMceDisplaySink : public CMceMediaSink
-	{
-	
-	public:
-    
-        enum TRotation
-            {
-            ENone, 
-            EClockwise90Degree, 
-            EClockwise180Degree,
-            EClockwise270Degree
-            };
-            
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aManager reference to the manager
-	    */
-		IMPORT_C static CMceDisplaySink* NewL( CMceManager& aManager );
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aManager reference to the manager
-	    */
-		IMPORT_C static CMceDisplaySink* NewLC( CMceManager& aManager );
-
-		/// Not in the real implementation
-        IMPORT_C static CMceDisplaySink* NewL();
-
-        /// Not in the real implementation
-        IMPORT_C static CMceDisplaySink* NewLC();		
-		
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceDisplaySink();
-
-
-	public: // From CMceMediaSink
-
-	    /**
-	    * Enables the sink explicitly.
-	    */
-		IMPORT_C void EnableL(); 
-
-	    /**
-	    * Disables the sink explicitly.
-	    */
-		IMPORT_C void DisableL(); 
-
-
-    public: // New functions
-    	
-    	/**
-	    * Gets the number of available displays on the device.
-	    * @return number of available displays 
-	    */
-	    IMPORT_C TInt DisplaysAvailable() const;
-	    
-	    /**
-	    * Sets index of physical display to be used.
-	    * @param aDisplayIndex, index of the display to be used; number of 
-	    *        available displays can be retrieved by calling 
-	    *        CMceDisplaySink::DisplaysAvailable
-	    * @leave KErrNotSupported if requested display cannot be used
-	    */
-	    IMPORT_C void SetDisplayIndexL( TInt aDisplayIndex ); 
-	    	
-		/**
-		* Sets display resources.
-		* @param aWindow handle to the display window of the user
-		* @param aGc graphics context of the user
-		*/
-		IMPORT_C void SetDisplay( RWindow& aWindow, CWindowGc& aGc );
-		
-        /**
-        * Sets display rectangle. Display data is drawn to the given area.
-        * @param aRect display area
-        */
-		IMPORT_C void SetDisplayRectL( const TRect& aRect );
-		
-        /**
-        * Gets current display rectagle. 
-        * @return current display rectangle 
-        */
-		IMPORT_C const TRect DisplayRectL();
-		
-		/*
-		* Sets display sink priority. Priority value 0 is the highest priority. 
-		* Display sink with higher priority draws over less priority display
-		* if display rectangles overlap.
-		* @param aPriority priority value
-		*/
-		IMPORT_C void SetPriorityL( TUint aPriority );
-		
-		/*
-		* Display sink's current priority.
-		* @return priority value
-		*/
-		IMPORT_C TUint PriorityL();
-
-        /*
-		* Sets display sink rotation. 
-		* @param aRotation rotation value
-		*/
-		IMPORT_C void SetRotationL( TRotation aRotation );
-		
-		/*
-		* Display sink's current rotation.
-		* @return rotation value
-		*/
-		IMPORT_C TRotation RotationL();
-
-		
-	public: // internal
-	
-	    /**
-	    * Initializes 
-	    * @param aManager the manager. Ownership is NOT transferred
-	    */
-	    void InitializeL( CMceManager* aManager );
-
-	    	    
-	private:
-
-	    /**
-	     * C++ constructor.
-	     */
-		CMceDisplaySink();
-
-    private: // Reserved for future use
-    
-        TAny* iReserved;         	
-
-    public: // stub data
-    
-        TInt iDisplayIndex;
-        
-        TRect iDisplayRect;
-        
-        TUint iDisplayPriority;
-        
-        TRotation iRotation;
-        
-        CMccScreen* iScreen;
-
-	};
-
-#endif 
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcefilesink.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCEFILESINK_H
-#define MCEFILESINK_H
-
-// INCLUDES
-#include <e32std.h>  
-#include <MceMediaSink.h>
-
-// FORWARD DECLARATIONS
-
-// DATA TYPES
-const TMceSinkType KMceFileSink = 4;
-
-
-// CLASS DECLARATION
-
-/**
-* Class representing file sink in Mce.
-*
-* CMceFileSink can be used to record a stream to the file. The file may consist of
-* both audio and video data. If both media elements are available and should be
-* recorded to the same file, the same file sink should be attached to audio stream
-* and video stream. Recording only one of the media elements is possible as well.
-*
-* Enable (continue) and Disable (pause) operations to it are considered
-* to be local, so they are not signalled to remote terminal.
-* 
-* @lib mceclient.lib
-*/
-class CMceFileSink : public CMceMediaSink
-	{
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aFileName name of the file including full path info
-	    */
-		IMPORT_C static CMceFileSink* NewL( const TFileName& aFileName );
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aFileName name of the file including full path info
-	    */
-		IMPORT_C static CMceFileSink* NewLC( const TFileName& aFileName );
-
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceFileSink();
-
-
-	public: // From CMceMediaSink
-
-	    /**
-	    * Enables the sink explicitly.
-	    */
-		IMPORT_C void EnableL(); 
-
-	    /**
-	    * Disables the sink explicitly.
-	    */
-		IMPORT_C void DisableL(); 	    
-	    	    
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    */
-		CMceFileSink();
-
-	    /**
-	    * Second-phase constructor.
-	    */
-		void ConstructL( const TFileName& aFileName );
-    
-    public: // Stub data
-    
-        TFileName iFileName;
-        
-	};
-
-#endif 
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcefilesource.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCEFILESOURCE_H
-#define MCEFILESOURCE_H
-
-// INCLUDES
-#include "mcemediasource.h"
-#include "mcemediastream.h"
-
-// CONSTANTS
-const TMceSourceType KMceFileSource = 4;
-
-//FORWARD DECLARATIONS
-class CMceManager;
-
-// CLASS DECLARATION
-
-/**
-* Class representing file source in MCE.
-*
-* CMceFileSource can be used for streaming file contents. The file may contain
-* both audio and video data. If the user wants to stream both media types,
-* the same file source should be attached to audio stream and video stream. 
-*
-* The file may contain also several elements of the same media type (e.g. 
-* 3 audio channels) and the user might want to use only some of those. 
-* This can be handled by defining index of the file's current media element:
-*
-* - Get number of audio media elements within the file (e.g. returns 3)
-* - Set current audio element index to be 0
-* - Attach the file source to the audioStreamOne (audio element 0 is attached)
-* - Set current audio element index to be 2
-* - Attach the file source to the audioStreamTwo (audio element 2 is attached)
-* - Consequently, file's audio channel 0 would be streamed over the audioStreamOne
-*   and channel 2 over the audioStreamTwo. Channel 1 would be ignored.
-*
-* Enable (continue) and Disable (pause) operations to it are considered
-* to be local, so they are not signalled to remote terminal.
-* 
-* @lib mceclient.lib
-*/
-class CMceFileSource : public CMceMediaSource
-	{
-
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aManager associated MCE manager
-	    * @param aFileName name of the file including full path info
-	    */
-		IMPORT_C static CMceFileSource* NewL( CMceManager& aManager,
-		                                      const TFileName& aFileName );
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aManager associated MCE manager
-	    * @param aFileName name of the file including full path info
-	    */
-		IMPORT_C static CMceFileSource* NewLC( CMceManager& aManager,
-		                                       const TFileName& aFileName );
-		
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceFileSource();
-
-
-	public: // From CMceMediaSource
-
-	    /**
-	    * Enables the source explicitly.
-	    */
-		IMPORT_C void EnableL(); 
-
-	    /**
-	    * Disables the source explicitly.
-	    */
-		IMPORT_C void DisableL(); 
-
-
-	public: // Functions
-
-        /**
-        * Updates file for the source.
-        * @param aFileName name of the file including full path info
-        */
-        IMPORT_C void UpdateL ( const TFileName& aFileName );
-
-        /**
-        * Determines how many media elements of the spesified type the file
-        * source contains. E.g. audio file may contain N number of audio
-        * channels which has to be streamed over N number of audio streams.
-        * @param aType the type of media
-        * @return the number of media elements (of spesified type)
-        *         the file contains
-        */
-        IMPORT_C TInt MediaElementCountL( TMceMediaType aType ) const;
-        
-        /**
-        * Sets currently managed media element of the spesified media type. 
-        * The setting is effective when the file source is attached to
-        * media stream of the spesified type. Current media element can be
-        * defined for each media type the file contains. By default, media
-        * element 0 of each media type is used.
-        * @param aType the type of media
-        * @param aIndex new index of the current media element
-        * @leave KErrArgument if media element spesified by input parameters
-        *        does not exist
-        */
-        IMPORT_C void SetCurrentMediaElementL( TMceMediaType aType, TInt aIndex );
-
-        /**
-        * Gets currently managed media element of the spesified media type. 
-        * @param aType the type of media
-        * @return index of the current media element or KErrNotFound if no media
-        *         elements of the spesified type exists
-        */
-        IMPORT_C TInt CurrentMediaElement( TMceMediaType aType );
-        
-        /**
-        * Sets the position within the file from where to start playback.
-        * @pre IsEnabled() == EFalse and contains audio/video
-        * @param aPosition from start of the file in microseconds
-        */
-        IMPORT_C void SetPositionL( const TTimeIntervalMicroSeconds& aPosition );
-        
-        /**
-        * Gets the current playback position in microseconds from the start of the file.
-        * @pre contains audio/video
-        * @return current position from start of the file in microseconds
-        */
-        IMPORT_C TTimeIntervalMicroSeconds PositionL() const;
-        
-        /**
-        * Returns the duration of the file in microseconds.
-        * @pre contains audio/video
-        * @return duration of the file in microseconds.
-        */
-        IMPORT_C TTimeIntervalMicroSeconds DurationL() const;
-
-        /**
-        * Sets fast forward on/off.
-        * @pre contains video
-        * @param aUseFFWD ETrue if fast forward is enabled; otherwise EFalse
-        */
-        IMPORT_C void SetFastForwardL( TBool aUseFFWD );
-        
-        /**
-        * Sets fast rewind on/off.
-        * @pre contains video
-        * @param aUseFRWD ETrue if fast rewind is enabled; otherwise EFalse
-        */
-        IMPORT_C void SetFastRewindL( TBool aUseFRWD );
-
-        /**
-        * Starts transcoding of file. After the transcoding is complete,
-        * file of this source is changed into the transcoded file.
-        * @pre CMceMediaStream::State() == ETranscodingRequired
-        * @post CMceMediaStream::State() == ETranscoding
-        * @param aFileName Name of the transcoding output file.
-        */
-        IMPORT_C void TranscodeL( const TFileName& aFileName );
-
-        /**
-        * Cancels transcoding of file. 
-        * @pre CMceMediaStream::State() == ETranscoding
-        * @post CMceMediaStream::State() == ETranscodingRequired
-        */
-        IMPORT_C void CancelTranscodeL();
-
-        /**
-        * Gets the current transcoding progress in percentage.
-        * Value is updated with MMceStreamObserver::StreamStateChanged() event.
-        * @pre CMceMediaStream::State() == ETranscoding
-        * @return Transcoding progress in persentage (0-100).
-        */
-        IMPORT_C TInt TranscodingProgressL() const;
-        
-
-	public: // internal
-	
-	    /**
-	    * Initializes 
-	    * @param aManager the manager. Ownership is NOT transferred
-	    */
-	    void InitializeL( CMceManager* aManager );
-	    
-	public: 
-
-	    /**
-	    * Two-phased constructor.
-	    */
-	    static CMceFileSource* NewL();
-
-	    /**
-	    * Two-phased constructor.
-	    */
-		static CMceFileSource* NewLC();
-
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    */
-		CMceFileSource();
-
-	    /**
-	    * Second-phase constructor.
-	    */
-		void ConstructL( CMceManager* aManager,
-		                 const TFileName& aFileName );	  
-
-
-    public: // Stub data
-
-        TBool iFastForward;
-        TBool iFastRewind;
-        TTimeIntervalMicroSeconds iPosition;
-
-        //TMceFileInfo iFileInfo;
-        //TBuf8<256> iFileName;
-        
-        TBool iInitialInfoRetrieved;    
-
-        TInt iCurrentAudioElement;
-        TInt iCurrentVideoElement;  
-        
-        
-        TFileName iFileName;
-        TTimeIntervalMicroSeconds iDuration;
-        TInt iAudioElementCount;
-        TInt iVideoElementCount;
-        
-        TInt iTranscodingPercentage;
-        
-        // If this code is != KErrNone, next operation that can fail will fail
-	    // (leave or return a value) with this code. Variable is reseted before 
-	    // failing. 
-	    // Obs! Check that wanted failing is really implemented in this stub
-	    mutable TInt iFailWithCode;
-	    
-	};
-
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceh263codec.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEH263CODEC_H
-#define CMCEH263CODEC_H
-
-// INCLUDES
-#include "mcevideocodec.h"
-#include "mcedefs.h"
-
-// CONSTANTS
-
-const TUint KMceH263FrameHeight = 176;
-const TUint KMceH263FrameWidth = 144;
-const TUint KMceH263ClockRate = 90000;
-const TReal KMceH263FrameRate = 15;
-
-const TInt  KMceH263Level10Bitrate = 64000;
-const TInt  KMceH263Level45Bitrate = 128000;
-
-const TUint KMceAllowedH263Bitrate10 = 0x0001;
-const TUint KMceAllowedH263Bitrate45 = 0x0002;
-const TUint KMceAllowedH263BitrateAll = 0x00FF;
-
-// CLASS DECLARATION
-
-/**
-* Class for the H263 codec information.
-*
-* It checks the validity of inserted values for H263
-* 
-*  @lib mceclient.lib
-*/
-class CMceH263Codec : public CMceVideoCodec
-    {
-    
-	public:  // Constructors and destructor
-	    
-	    /**
-	    * Destructor.
-	    */
-	    IMPORT_C ~CMceH263Codec();
-
-	public: 
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aSdpName sdp name
-	    */
-	    IMPORT_C static CMceH263Codec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName);
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aSdpName sdp name
-	    */
-	    IMPORT_C static CMceH263Codec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName );
-	        
-	public: // From base classes
-
-	    /**
-	    * Sets bitrate used with codec for encoding.
-	    * @param aBitrate bitrate value for encoding
-	    * @return KErrNotSupported if codec doesn't support bitrate
-	    *         value issued
-	    */
-	    virtual TInt SetBitrate( TUint aBitrate );
-	    
-	    /**
-	    * Sets bitrates allowed with codec.
-	    * @param aBitrates allowed bitrate values
-	    * @return KErrNotSupported if codec doesn't support bitrate
-	    *         values issued
-	    */
-	    virtual TInt SetAllowedBitrates( TUint aBitrates );
-	    
-	    /**
-	    * Sets the codec specific mode.
-	    * @param aCodecMode mode of the codec 
-	    * @return KErrNotSupported if codec doesnt' support codec mode
-	    *         value issued
-	    */
-	    virtual TInt SetCodecMode( TUint aCodecMode );
-	    
-	    /**
-	    * Sets the payload type.
-	    * @param aPayloadType type identifier of the payload
-	    * @return KErrNotSupported if codec doesn't support payload type issued
-	    */
-	    virtual TInt SetPayloadType( TUint8 aPayloadType );
-	    
-        /**
-	    * Clones the codec.
-	    * @return cloned codec; ownership is transferred
-	    */
-	    virtual CMceVideoCodec* CloneL() const;
-	    
-	    /**
-	    * Sets maximum bitrate of the codec.
-	    * @param aMaxBitrate value of maximum bitrate used for encoding
-	    * @leave KErrNotSupported if codec doesn't support frame sizes issued
-	    */
-	    virtual void SetMaxBitrateL( TUint aMaxBitrate );
-        
-        /**
-	    * Sets resolutions allowed with the codec.
-	    * @param aResolutions bitfield of allowed resolutions
-	    * @leave KErrNotSupported if codec doesn't support resolutions issued
-	    */
-        virtual void SetAllowedResolutionsL( TUint aResolutions );
-        
-        /**
-	    * Sets resolution of the video.
-	    * @param aResolution resolution of the video in pixels
-	    * @leave KErrNotSupported if codec doesn't support resolution issued
-	    */
-        virtual void SetResolutionL( TSize aResolution );
-        
-        /**
-	    * Sets frame rates allowed with the codec.
-	    * @param aFrameRates allowed frame rate values as a bitfield
-	    * @leave KErrNotSupported if codec doesn't support frame rates issued
-	    */
-        virtual void SetAllowedFrameRatesL( TUint aFrameRates );
-        
-        /**
-	    * Sets frame rate used with the codec for encoding.
-	    * @param aFrameRate frame rate for encoding
-	    * @leave KErrNotSupported if codec doesn't support frame rate value
-	    *        issued
-	    */
-        virtual void SetFrameRateL( TReal aFrameRate );
-        
-        /**
-        * Sets preferred encoding device for uplink stream and preferred decoding
-        * device for downlink stream.
-        * @param aEncodingDecodingDevice
-        * @leave KErrNotSupported if setting preferred device is not possible
-        */
-        virtual void SetPreferredEncodingDecodingDeviceL( 
-                                    TUid aEncodingDecodingDevice );
-        
-        /**
-        * Set config key (sprop-parameter-sets)
-        * @param aConfigKey, config key as Base64 encoded
-        * @leave KErrNotSupported if setting config key is not possible
-        */
-        virtual void SetConfigKeyL( const TDesC8& aConfigKey );
-        
-        
-    private: // Helper functions
-	    
-	    /**
-	    * Sets the sdp name.
-	    * @param aSdpName the sdp name
-	    */
-	    void SetSdpNameL( const TDesC8& aSdpName );
-	    
-	private: // Constructors
-
-	    /**
-	    * C++ default constructor.
-	    */
-	    CMceH263Codec();
-
-	    /**
-	    * By default Symbian 2nd phase constructor is private.
-	    */
-	    void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName); 
-
-	    
-
-    private: // Data
-
-    private: // Reserved for future use
-    
-        TAny* iReserved;     
-
-
-    };
-
-
-#endif      
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceinsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEINSESSION_H
-#define CMCEINSESSION_H
-
-//  INCLUDES
-#include <e32std.h>
-#include <mcesession.h>
-
-// CLASS DECLARATION
-
-/**
-* Class for mobile terminated MCE sessions.
-*
-* CMceInSession represents incoming invitation to join in a session.
-*
-* The characteristics of the session are defined by remote terminal. Theses charactereistics
-* are defined using SDP and are turned by MCE server into structure of media streams attached 
-* into the session. The user of this class is then responsible to either reject accept
-* the invitation.
-*
-* Accepting the invitation is executed in two steps. First after receiving the invitation
-* the user must complete the media structure. Streams attached to the session are not complete,
-* but they must be completed by the user. Those componens defined in SDP are put automatically
-* into media structure (like streams and RTP sinks and sources), but other relations must
-* be completed by user. When media structure is complete, UpdateL method is called and session
-* establishement continues with second step.
-*
-* After all media resources are succesfully negotiated and reserved, session state is changed
-* to Proceeding, and end used can be alarmed about incoming invitation. Typically, at this state
-* 180 Ringing response is sent to network. If end user accepts the invitation, 200 OK is
-* sent to network and session is established.
-*
-* After the session has been succesfylly established, it can be later updated and
-* must be finally terminated.
-*
-* This class is never instantiated by user, but the ownership is in any case transferred
-* to it. See class MMceInSessionObserver.
-*
-* If for any reason instance of this class is deleted while in established state,
-* session is automatically terminated by MCE server.
-*
-*  @lib mceclient.lib
-*/
-class CMceInSession : public CMceSession
-	{
-
-	public: // Constructors and destructor
-
-	    /**
-	    * Destructor 
-	    */
-		IMPORT_C ~CMceInSession();
-
-	public: // Functions
-
-	    /**
-	    * Indicates to the server side, that 180(Ringing) response for the 
-	    * incoming INVITE request can be sent. Does not establish session.
-	    * @pre State() == CMceSession::EProceeding
-	    * @param aHeaders, SIP headers to be added. Ownership is
-		*		 transferred.
-		* @param aContentType, a type of content. Ownership
-		*		 is transferred.
-	    * @param aContent, content to be added in body. Ownership is 
-		*		 transferred.
-
-	    */
-		IMPORT_C void RingL( CDesC8Array* aHeaders = 0,
-					 		 HBufC8* aContentType = 0,
-					 		 HBufC8* aContent = 0 );
-
-	    /**
-	    * Answers to an incoming session. Indicates to server side that the 
-	    * 200(OK) response for the incoming INVITE has to be sent.
-	    * @pre State() == CMceSession::EProceeding
-	    * @post State() == CMceSession::EAnswering	    
-	    */
-		IMPORT_C void AcceptL();
-
-       /**
-	    * Answers to an incoming session. Indicates to server side that the 
-	    * given response for the incoming INVITE has to be sent.
-	    * @pre State() == CMceSession::EProceeding && ( 200 <= aCode <= 300 )
-	    * @post State() == CMceSession::EAnswering	    
-	    * @param aReason, reason phrase
-	    * @param aCode, reason code
-	    * @param aHeaders, SIP headers to be added. Ownership is
-		*		 transferred.
-		* @param aContentType, a type of content. Ownership
-		*		 is transferred.
-	    * @param aContent, content to be added in body. Ownership is 
-		*		 transferred.
-	    */
-		IMPORT_C void AcceptL(  const TDesC8& aReason,
-	           			        TUint32 aCode,
-	           			        CDesC8Array* aHeaders = 0,
-					 		    HBufC8* aContentType = 0,
-					 		    HBufC8* aContent = 0 );
-
-	    /**
-	    * Rejects the incoming session. Indicates to server side that 
-	    * 603(Decline) response has to be sent.
-	    * @pre State() == CMceSession::EIncoming ||
-	    *      State() == CMceSession::EProceeding
-	    * @post State() == CMceSession::ETerminated	    
-	    */
-	    IMPORT_C void RejectL();
-        
-        /**
-	    * Rejects the incoming session. Indicates to server side that 
-	    * 603(Decline) response has to be sent.
-	    * @pre ( State() == CMceSession::EIncoming ||
-	    *        State() == CMceSession::EProceeding ) &&
-	    *        ( 300 <= aCode < 700 )
-	    * @post State() == CMceSession::ETerminated	    
-	    * @param aReason, reason phrase
-	    * @param aCode, reason code
-	    * @param aHeaders, SIP headers to be added. Ownership is
-		*		 transferred.
-		* @param aContentType, a type of content. Ownership
-		*		 is transferred.
-	    * @param aContent, content to be added in body. Ownership is 
-		*		 transferred.
-	    */
-	    IMPORT_C void RejectL(  const TDesC8& aReason,
-	           			        TUint32 aCode,
-	           			        CDesC8Array* aHeaders = 0,
-					 		    HBufC8* aContentType = 0,
-					 		    HBufC8* aContent = 0 );
-
-	public: // serialization
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aReadStream, read stream
-	    * @param aManager, reference to session manager.
-	    * @param aProfileId, id of the sip profile used for the session.
-	    */
-		static CMceInSession* NewL( RReadStream& aReadStream,
-									  CMceManager& aManager,
-									  TUint32 aProfileId );
-	    /**
-	    * Two-phased constructor.
-	    * For temporay use only.
-	    */
-        IMPORT_C static CMceInSession* NewL();
-
-	    /**
-	     * C++ default constructor.
-	     * @param aManager, reference to session manager.
-	     * @param aProfileId, id of the sip profile used for the session.
-	     */
-		CMceInSession( CMceManager* aManager, TUint32 aProfileId );
-		
-		
-	private://methods
-
-	    /**
-	     * second-phase constructor
-	     * @param aOriginator, the originator
-	     * @param aRecipient, the recipient
-	     */
-	    void ConstructL( const TDesC8& aOriginator, const TDesC8& aRecipient );
-	
-	public: // Stub constructor	
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aManager, reference to session manager.
-	    */
-		IMPORT_C static CMceInSession* NewL( CMceManager& aManager,
-		                                     const TDesC8& aOriginator );
-
-
-    public: // Stub data
-    
-        TBool iRingingCalled;
-        									  
-		};
-
-
-	#endif 
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceinsessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MMCEINSESSIONOBSERVER_H
-#define MMCEINSESSIONOBSERVER_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class CMceInSession;
-class TMceTransactionDataContainer;
-
-// CLASS DECLARATION
-
-/**
-*  An interface to be implemented by users of MCE if they wish to receive
-*  invitations to session from network.
-*
-*  This observer is set using CMceManager::SetInSessionObserver function.
-*
-*  @lib mceclient.lib
-*/
-class MMceInSessionObserver
-	{
-
-	public: // Functions
-
-	    /**
-	    * Incoming session invitation. The CMceInSession is given to the
-		* application as a callback.
-	    * @param aSession, pointer to the incoming session. Ownership is
-		*	     transferred.
-	    * @param aContainer, if present, holds details of
-	    *        transaction causing state change.
-	    */
-		virtual void IncomingSession(
-	                CMceInSession* aSession,
-    				TMceTransactionDataContainer* aContainer ) = 0;
-    				    				
-	    /**
-	    * Incoming session update. The new updated CMceInSession is given to the
-		* application as a callback.
-	    * @param aOrigSession, the original session to be updated. This instance
-	    *        cannot be used anymore, all actions done using aUpdatedSession instance.
-	    * @param aUpdatedSession, pointer to the new updated session. Ownership is
-		*	     transferred.
-	    * @param aContainer, if present, holds details of
-	    *        update transaction.
-	    */
-		virtual void IncomingUpdate(
-					CMceSession& aOrigSession, 
-					CMceInSession* aUpdatedSession,
-    				TMceTransactionDataContainer* aContainer ) = 0;
-
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcemanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEMANAGER_H
-#define CMCEMANAGER_H
-
-// INCLUDES
-#include <e32base.h> 
-#include <badesca.h>  
-//#include <mcedefs.h>
-
-// FORWARD DECLARATIONS
-class MMceInSessionObserver;
-class MMceInEventObserver;
-class MMceInReferObserver;
-class MMceSessionObserver;
-class MMceEventObserver;
-class MMceReferObserver;
-class MMceStreamObserver;
-class MMceRtpObserver;
-class CMceSession;
-class CMceEvent;
-class CMceRefer;
-class TMceMediaId;
-class CMceAudioCodec;
-class CMceVideoCodec;
-class TMceTransactionDataContainer;
-class CMusTestSessionSimulator;
-
-// CLASS DECLARATION
-
-/**
-*  Class for connecting to MCE server.
-*
-*  This class provides the connection to the MCE server and
-*  provides functions for setting observers for asynchronous
-*  events.
-* 
-*  The user should create only one instance of this class.
-*
-* @lib mceclient.lib
-*/
-class CMceManager : public CBase
-	{
-
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aAppUid, uid of the application.
-	    * @param aContainer, if set, detailed data provided in observers.
-	    */
-		IMPORT_C static CMceManager* NewL(
-	                            	const TUid& aAppUid, 
-	                            	TMceTransactionDataContainer* aContainer = 0);
-
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceManager();
-
-	public: // Functions
-
-	    /**
-	    * Set observer for incoming sessions.
-	    * @param aInSessionObserver, observer of the sessions.
-	    */
-		IMPORT_C void SetInSessionObserver( 
-		             MMceInSessionObserver* aInSessionObserver );
-		             
-	    /**
-	    * Set observer for incoming events.
-	    * @param aInEventObserver, observer of the events.
-	    */
-		IMPORT_C void SetInEventObserver( 
-		             MMceInEventObserver* aInEventObserver );
-		             
-	    /**
-	    * Set observer for incoming refers.
-	    * @param aInReferObserver, observer of the refers.
-	    */
-		IMPORT_C void SetInReferObserver( 
-		             MMceInReferObserver* aInReferObserver );
-		             
-	    /**
-	    * Set observer for sessions.
-	    * @param aSessionObserver, observer of the sessions.
-	    */
-		IMPORT_C void SetSessionObserver( 
-		             MMceSessionObserver* aSessionObserver );
-
-	    /**
-	    * Set observer for medias
-	    * @param aMediaObserver, observer of medias.
-	    */
-		IMPORT_C void SetMediaObserver( 
-		             MMceStreamObserver* aMediaObserver );
-
-	    /**
-	    * Set observer for rtp
-	    * @param aRtpObserver, observer of rtp
-	    */
-		IMPORT_C void SetRtpObserver( 
-		             MMceRtpObserver* aRtpObserver );
-
-        /**
-        * Sets observer for incoming events.
-        * @param aEventObserver, observer of the event. Ownership is
-		*	     not transferred.
-        */
-		IMPORT_C void SetEventObserver(
-					 MMceEventObserver* aEventObserver);
-					 
-        /**
-        * Sets observer for incoming REFER events.
-        * @param aReferObserver, observer of the event. Ownership is
-		*	     not transferred.
-        */
-		IMPORT_C void SetReferObserver(
-					 MMceReferObserver* aReferObserver);
-		
-	    /**
-	    * Gets currently ongoing sessions
-	    * @return RPointerArray array of sessions.
-	    */
-		IMPORT_C const RPointerArray< CMceSession >& Sessions() const;
-
-        /**
-        * Gets currently ongoing events
-        * @return RPointerArray array of events.
-        */
-		IMPORT_C const RPointerArray< CMceEvent >& Events() const;
-
-        /**
-        * Sets observer for incoming SUBSCRIBE events.
-        * @param aObserver, observer of the event. Ownership is
-		*	     not transferred.
-        */
-		IMPORT_C const RPointerArray< CMceRefer >& Refers() const;
-						
-	    /**
-	    * Returns supported audio codecs of the system.
-	    * @return supported audio codecs of the system.
-	    */
-	    IMPORT_C const RPointerArray<const CMceAudioCodec>& SupportedAudioCodecs() const;
-	    
-	    /**
-	    * Returns supported video codecs of the system.
-	    * @return supported video codecs of the system.
-	    */
-	    IMPORT_C const RPointerArray<const CMceVideoCodec>& SupportedVideoCodecs() const;
-	    
-	    /*
-		* Set default headers for the method. The headers will always be added
-		* to the given SIP methods unless overwritten with
-		* headers given as parameter for the API method triggering the 
-		* sending of request/response.
-		* @param aMethods, the SIP methods the headers are added to.
-		* @param aHeaders, the default headers, ownership is transferred.
-		*/
-		IMPORT_C void SetDefaultHeadersL( CDesC8Array* aMethods, CDesC8Array* aHeaders );
-        
-        /*
-        * Get the default headers assigned for the given method.
-        * If none is assigned, and empty array is returned.
-        * @param aMethod, the method for which the headers are queried.
-        * @return the default headers, ownership is transfered.
-        */	    
-	    IMPORT_C CDesC8Array* DefaultHeadersL( const TDesC8& aMethod ) const;
-
-	    
-	public: // Functions
-
-	    /**
-	    * Gets observer for incoming sessions
-	    * @return incoming session observer
-	    */
-	    MMceInSessionObserver* InSessionObserver() const;
-	    
-	    /**
-	    * Gets session observer
-	    * @return session observer
-	    */
-	    MMceSessionObserver* SessionObserver() const;
-
-	    /**
-	    * Gets media observer
-	    * @return media observer
-	    */
-	    MMceStreamObserver* MediaObserver() const;
-
-	    /**
-	    * Gets rtp observer
-	    * @return rtp observer
-	    */
-	    MMceRtpObserver* RtpObserver() const;
-
-	    	    
-        /**
-        * Returs transaction container for detailed data. 
-        * Returns NULL, if none exists.
-        */
-		TMceTransactionDataContainer* TransactionContainer() const;        
-	    
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    * @param aAppUid, uid of the application.
-	    * @param aContainer, if set, detailed data provided in observers.
-	    */
-	    CMceManager( const TUid& aAppUid, 
-	                 TMceTransactionDataContainer* aContainer = 0);
-
-	    /**
-	     * By default Symbian 2nd phase constructor is private.
-	     */
-	    void ConstructL();	
-	    
-        
-	public: // Stub data
-
-	    /**
-	     * detailed callbacks wanted
-	     */
-	    TBool iDetailedCallbacks;    
-		
-	    /**
-	     * sessions
-	     */
-	    RPointerArray<CMceSession> iSessions;
-        
-	    /**
-	     * supported audio codecs
-	     */
-	    RPointerArray<const CMceAudioCodec> iSupportedAudioCodecs;
-
-        /**
-	     * supported audio codecs
-	     */
-	    RPointerArray<const CMceVideoCodec> iSupportedVideoCodecs;
-	
-    	MMceSessionObserver* iSessionObserver;
-	    MMceStreamObserver* iMediaObserver;
-	    MMceRtpObserver* iRtpObserver;
-	    MMceInSessionObserver* iInSessionObserver;
-	    
-        TMceTransactionDataContainer* iContainer;
-        
-	private: // Data
-	        CMusTestSessionSimulator* iSessionSimulator; 
-          
-	    friend class CMceSession;
-	};
-
-#endif 
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcemediasink.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEMEDIASINK_H
-#define CMCEMEDIASINK_H
-
-// INCLUDES 		
-#include <e32base.h> 		
-#include <badesca.h>
-
-// DATA TYPES
-typedef TUint TMceSinkType;
-
-// FORWARD DECLARATIONS
-class TMceSinkFactory;
-class CMceMediaStream;
-class TMceIds;
-class TMceEvent;
-class TMceMediaId;
-class CMceManager;
-
-
-// CLASS DECLARATION
-
-/**
-* Base class for the MCE media sinks.
-*
-* Media sinks represent the destination of data.
-* CMceMediaSink gets it data from CMceMediaSource through
-* CMceMediaStream. 
-*
-* CMceMediaSink has a type that defines how it can connected to other
-* sources and streams.
-*
-* Enable and Disable operations to sinks are considered to be local,
-* so they are not signalled to remote terminal.
-* 
-*  @lib mceclient.lib
-*/
-class CMceMediaSink: public CBase
-	{
-
-	public: // Destructor
-
-		IMPORT_C ~CMceMediaSink();
-
-	public: // Functions
-
-	    /**
-	    * Returns the type of the sink.
-	    * @return The type of the sink.
-	    */
-		IMPORT_C TMceSinkType Type() const;
-
-	    /**
-	    * Enables streaming explicitly.
-	    */
-		virtual void EnableL() = 0; 
-
-	    /**
-	    * Disables streaming explicitly.
-	    */
-		virtual void DisableL() = 0;
-
-	    /**
-	    * Returns the state of the sink.
-	    * @return ETrue if enabled, EFalse if disabled.
-	    */
-		IMPORT_C TBool IsEnabled() const;
-
-	public: //internal
-		
-	    /**
-	    * Initializes 
-	    * @param aParent the parent
-	    */
-	    virtual void InitializeL( CMceMediaStream& aParent );
-
-        /**
-	    * Initializes 
-	    * @param aManager the manager. Ownership is NOT transferred
-	    */
-	    virtual void InitializeL( CMceManager* aManager );	    
-	    
-	    /**
-	    * Sets and gets reference count describing to how many
-	    * streams sink is associated
-	    * @return reference count reference
-	    */
-	    TInt& ReferenceCount();
-        
-	protected:
-
-	    /**
-	     * C++ default constructor.
-	     */
-		CMceMediaSink();
-
-	    /**
-	    * Enables streaming explicitly.
-	    */
-		void DoEnableL();
-
-	    /**
-	    * Disables streaming explicitly.
-	    */
-		void DoDisableL();
-		
-
-	protected: // NOT owned data
-		
-	    /**
-	     * stream
-	     */
-		CMceMediaStream* iStream;
-		
-    public: // stub data
-    
-        TMceSinkType iType;
-    
-        TBool iIsEnabled;
-	    
-	    TInt iReferenceCount;
-	    
-		};
-
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcemediasource.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEMEDIASOURCE_H
-#define CMCEMEDIASOURCE_H
-
-// INCLUDES 		
-#include <e32base.h> 	
-
-// DATA TYPES
-typedef TUint TMceSourceType;
-
-// FORWARD DECLARATIONS
-class RReadStream;
-class RWriteStream;
-class CMceComMediaSource;
-class TMceSourceFactory;
-class CMceMediaStream;
-class TMceEvent;
-class TMceMediaId;
-class CMceManager;
-
-// CLASS DECLARATION
-
-/**
-* Base class for the MCE media sources.
-*
-* Media sources represent the origin of data.
-* CMceMediaSource puts it data through CMceMediaStream into
-* CMceMediaSink.
-*
-* CMceMediaSource has a type that defines how it can connected to other
-* sinks and streams.
-*
-* Enable and Disable operations to sinks are considered to be local,
-* so they are not signalled to remote terminal.
-* 
-*  @lib mceclient.lib
-*/
-class CMceMediaSource: public CBase
-	{
-	public: // Destructor
-
-		IMPORT_C ~CMceMediaSource();
-
-	public: // Functions
-
-	    /**
-	    * Returns the type of the source.
-	    * @return The type of the source.
-	    */
-		IMPORT_C TMceSourceType Type() const;
-
-	    /**
-	    * Enables streaming explicitly.
-	    */
-		virtual void EnableL() = 0; 
-
-	    /**
-	    * Disables streaming explicitly.
-	    */
-		virtual void DisableL() = 0;
-
-	    /**
-	    * Returns the state of the source.
-	    * @return ETrue if enabled, EFalse if disabled.
-	    */
-		IMPORT_C TBool IsEnabled() const;
-		
-
-	    
-	public: //internal
-	
-	    /**
-	    * Initializes 
-	    * @param aParent the parent
-	    */
-	    virtual void InitializeL( CMceMediaStream& aParent );
-
-        /**
-	    * Initializes 
-	    * @param aManager the manager. Ownership is NOT transferred
-	    */
-	    virtual void InitializeL( CMceManager* aManager );    
-	   	    
-	    /**
-	    * Sets and gets reference count describing to how many
-	    * streams source is associated
-	    * @return reference count reference
-	    */
-	    TInt& ReferenceCount();
-
-	    	    
-	protected:
-
-	    /**
-	     * C++ default constructor.
-	     */
-		CMceMediaSource();
-		
-	    /**
-	    * Enables streaming explicitly.
-	    */
-		void DoEnableL();
-
-	    /**
-	    * Disables streaming explicitly.
-	    */
-		void DoDisableL();
-		
-
-	protected: // NOT owned data
-		
-	    /**
-	     * stream
-	     */
-		RPointerArray<CMceMediaStream> iStreams;
-	    
-	
-	public: // stub data
-	
-	    TBool iIsEnabled;
-	
-	    TMceSourceType iType;
-
-        TInt iReferenceCount;
-
-		};
-
-
-#endif 
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcemediastream.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEMEDIASTREAM_H
-#define CMCEMEDIASTREAM_H
-
-// INCLUDES
-#include <e32base.h>
-
-// DATA TYPES
-typedef TUint TMceMediaType;
- 
-// FORWARD DECLARATIONS
-class CMceComMediaStream;
-class TMceFactory;
-class TMceMediaStreamFactory;
-class RWriteStream;
-class RReadStream;
-class CDesC8Array;
-class CMceSession;
-class TMceIds;
-class TMceEvent;
-class TMceMediaId;
-class CMceManager;
-class CMceSession;
-class CMceMediaSource;
-class CMceMediaSink;
-class MMceComSerializationContext;
-class MDesC8Array;
-
-// CLASS DECLARATION
-
-/**
-* Base class for MCE media streams.
-*
-* MCE Media stream represents stream of data negotiated between two terminals.
-* Streams may transfer any data.
-*
-* Enabling or disabling of a stream is not a local operation, but it requires
-* always signalling. Thus, these operation require always to be completed by
-* calling CMceSession::UpdateL() function.
-*
-*  @lib mceclient.lib
-*/
-class CMceMediaStream : public CBase
-	{
-    public: // Stream states
-
-        enum TState
-            {
-            EUninitialized,       // Stream is created
-            EInitialized,         // Stream is initialized
-            EBuffering,           // Stream is buffering
-            EIdle,                // Stream is not receiving RTP
-            EStreaming,           // Stream is streaming
-            EDisabled,            // Stream is explicitly disabled
-            ENoResources,         // Stream has no needed resources to stream
-            ETranscodingRequired, // Stream requires non-realtime transcoding
-            ETranscoding          // Stream is transcoding in non-realtime
-            };
-	        
-	public: // Destructor
-
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceMediaStream();
-
-	public: // Functions
-
-        /**
-        * Gets the state of the stream.
-        * @return the current state of the stream
-        */
-        IMPORT_C CMceMediaStream::TState State() const;
-
-	    /**
-	    * Returns the type of the stream.
-	    * @return The type of the stream.
-	    */
-		IMPORT_C TMceMediaType Type() const;
-
-	    /**
-		* Configures media stream by updating SDP media lines. 
-		* In order to get complete update, whole session must be 
-		* updated causing sending of re-invite.
-	    * @param aMediaSDPLines, application specific SDP media lines for
-		*		 the stream. Ownership is transferred.
-	    */
-		IMPORT_C void SetMediaAttributeLinesL( CDesC8Array* aMediaSDPLines );
-		
-		/**
-		* Gets attribute lines of the media.
-		* @return array of media attribute lines, owneship is transferred.
-		*/
-		IMPORT_C MDesC8Array* MediaAttributeLinesL();
-		
-		/** 
-	    * Sets local media port
-	    * @param aLocalMediaPort, local port for the media
-	    */
-	    IMPORT_C void SetLocalMediaPortL(TUint aLocalMediaPort); 
-	    
-	    /**
-	    * Gets the local media port.
-	    * @return Local port used for media.
-	    */
-	    IMPORT_C TUint LocalMediaPort() const;
-	    
-	    /**
-	    * Gets the session this stream belongs to, if exists. The
-	    * ownership is not transfered.
-	    * @return Session object
-	    */
-		IMPORT_C CMceSession* Session() const;
-	              
-
-	public: // Local stream control
-
-	    /**
-	    * Enables streaming explicitly.
-	    */
-	    virtual void EnableL(); 
-
-	    /**
-	    * Disables streaming explicitly.
-	    */
-		virtual void DisableL(); 
-		
-		/**
-	    * Returns the state of the stream.
-	    * @return ETrue if enabled, EFalse if disabled.
-	    */
-    	IMPORT_C TBool IsEnabled() const;
-
-
-    public: // Source and sink functions
-
-        /**
-        * Adds source to the stream. CMceMediaStream can only
-        * have one source at a time. Ownership of passed source is transferred.
-        * However, the same source can be also passed to other streams resulting
-        * that streams share ownership of the source. Passing NULL source will
-        * remove source from stream.
-        * In some cases the source might contain a codec. The codec is derived
-        * to the stream when such source is added to the stream. 
-        * Derived codec will get automatically highest preference.
-        * @param aSource source to be added to the stream; ownership is 
-        *        transferred
-        */
-        IMPORT_C void SetSourceL( CMceMediaSource* aSource );
-
-        /**
-        * Adds sink to the stream. CMceMediaStream can have
-        * many sinks at a time. Ownership of passed sink is transferred.
-        * However, the same sink can be also passed to other streams resulting
-        * that streams share ownership of the sink.
-        * @param aSink sink to be added to the stream; ownership is transferred
-        */
-        IMPORT_C void AddSinkL( CMceMediaSink* aSink );
-
-        /**
-        * Gets source of the stream. Returns NULL if source is not set.
-        * @return source of the stream; ownership is not transferred
-        */
-        IMPORT_C CMceMediaSource* Source() const;
-
-        /**
-        * Gets array of sinks of the stream.
-        * @return array of sinks
-        */
-        IMPORT_C const RPointerArray<CMceMediaSink>& Sinks() const;
-
-        /**
-        * Removes sink from the stream.
-        * @post aSink cannot be used anymore and contents of 
-        *       previously returned sink array (CMceMediaStream::Sinks())
-        *       are not anymore valid
-        * @param aSink sink to be removed from the stream
-        */
-        IMPORT_C void RemoveSinkL( CMceMediaSink& aSink );
-
-    public: // Binding opposite way stream
-
-        /**
-        * Binds opposite direction stream to this stream.
-        * @param aStream another stream to be bind to the stream; 
-        *        ownership is transferred
-        */
-        IMPORT_C void BindL( CMceMediaStream* aStream );
-
-        /**
-        * Gets opposite direction stream of this stream.
-        * @return opposite direction stream
-        */
-        IMPORT_C CMceMediaStream& BoundStreamL() const;
-
-        /**
-        * Checks if opposite direction stream is set.
-        * @return ETrue if opposite direction stream is set; 
-        *         otherwise EFalse
-        */
-        IMPORT_C TBool BoundStream() const;
-
-
-	public: //internal
-
-	    /**
-	    * Checks if this is binder (biding owner)
-	    * @return ETrue if this is binder (biding owner)
-	    */
-		TBool Binder() const;
-
-	    /**
-	    * Initializes 
-	    * @param aParent the parent
-	    */
-	    virtual void InitializeL( CMceSession& aParent );
-	    
-	    /**
-	    * Initializes 
-	    * @param aManager the manager. Ownership is NOT transferred
-	    */
-	    virtual void InitializeL( CMceManager* aManager );
-	    
-	protected:
-
-	    /**
-	     * C++ default constructor.
-	     */
-		CMceMediaStream();
-
-	private:
-
-	    /**
-	    * Handles event
-	    * @param aEvent the event
-	    * @return status, if event was consumed or not or object needs update
-	    */
-	    TInt HandleEvent( TMceEvent& aEvent );
-
-	    /**
-	    * one-way bind
-	    * @param aStream another stream to be bind to the stream.
-	    */
-	    void DoBindL( CMceMediaStream* aStream );
-	    
-	    /**
-	    * Deletes sink
-	    * @param aIndex index of sink in the array
-	    */
-        void DeleteSink( TInt aIndex );
-        
-	    /**
-	    * Deletes source
-	    */
-    	void DeleteSource();
-	    
-
-	protected: // NOT owned data
-				
-	    /**
-	     * session
-	     */
-		CMceSession* iSession;
-		
-	protected: // owned data
-
-
-	    /**
-	     * linked stream. Owned if iLinkOwner is ETrue
-	     */
-	    CMceMediaStream* iLinkedStream;	    
-
-    public: // stub data
-    
-        /**
-	     * source
-	     */
-		CMceMediaSource* iSource;
-		
-		/**
-	     * sinks
-	     */
-		RPointerArray<CMceMediaSink> iSinks;
-    
-        TState iState;
-    
-        TMceMediaType iType;
-    
-        TBool iLinkOwner;
-
-        TBool iIsEnabled;
-        
-        TUint iLocalMediaPort;
-        
-        CDesC8Array* iMediaSDPLines;
-	};
-
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceoutsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCEOUTSESSION_H
-#define CMCEOUTSESSION_H
-
-//  INCLUDES
-#include <e32std.h> 
-#include <mcesession.h>
-
-// FORWARD DECLARATIONS
-class CSIPProfile;
-class CMceMediaStream;
-class CMceManager;
-class CMceEvent;
-class CMceRefer;
-
-// CLASS DECLARATION
-
-/**
-* Class for mobile originated MCE sessions.
-*
-* CMceOutSession represents outgoing invitation to remote terminal to join in a session.
-*
-* The characteristics of the session are defined by user of this class by attaching
-* media streams into the session. Theses charactereistics are turned by MCE server into SDP
-* and attached into sent invitation request.
-*
-* After the session has been succesfylly established, it can be later updated and
-* must be finally terminated.
-*
-* If for any reason instance of this class is deleted while in established state,
-* session is automatically terminated by MCE server.
-*
-*  @lib mceclient.lib
-*/
-class CMceOutSession : public CMceSession
-	{
-
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor. Should be used when session
-	    * is established into new logical connection to remote terminal.
-	    * @param aManager, reference to session manager.
-   	    * @param aProfile, sip profile used for the session.
-	    * @param aRecipient, recipient of the session invitation.
-	    * @param aOriginator, originator of the session invitation.
-	    */
-		IMPORT_C static CMceOutSession* NewL(
-									   CMceManager& aManager,
-									   CSIPProfile& aProfile,
-									   const TDesC8& aRecipient,
-									   HBufC8* aOriginator = 0);
-
-	    /**
-	    * Two-phased constructor. Should be used when session is associated
-	    * to existing event. This guarantees that session is established with
-	    * same remote terminal with the event.
-	    * @param aEvent, reference to existing event that is associated
-	    *        with this session.
-	    */
-		IMPORT_C static CMceOutSession* NewL(CMceEvent& aEvent);
-									  
-	    /**
-	    * Two-phased constructor. Should be used when session is associated
-	    * to existing refer. This guarantees that session is established with
-	    * same remote terminal with the refer.
-	    * @param aRefer, reference to existing refer that is associated
-	    *        with this session.
-	    */
-		IMPORT_C static CMceOutSession* NewL(CMceRefer& aRefer);
-	    
-		/// Note: This function exists only in the stub
-	    IMPORT_C static	CMceOutSession* NewL();
-		
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceOutSession();
-
-	public: // from CMceSession
-
-	    /**
-	    * Adds media stream into session.
-		* @pre State() == CMceSession::EIdle ||
-		*      State() == CMceSession::EIncoming ||
-		*      State() == CMceSession::EEstablished
-		* @pre aMediaStream != 0
-	    * @param aMediaStream, media stream to be added.
-	    *		 ownership is transferred.
-	    */
-	    IMPORT_C void AddStreamL( CMceMediaStream* aMediaStream );
-	    
-	public: // Functions
-
-	    /**
-	    * Establishes a SIP session with the recipient.
-	    * The streams in the stream array are offered in the
-	    * SDP codec negotiation.
-	    * @pre State() == CMceSession::EIdle
-	    * @post State() == CMceSession::EOffering
-	    * @param aTimeout, the session timer value in seconds
-	    * @param aHeaders, SIP headers to be added. Ownership is
-		*		 transferred.
-	    * @param aContentType, content type of the body.
-		*		 Ownership is transferred.
-	    * @param aContent, content to be added in body. Ownership is 
-		*		 transferred.
-	    * @param aContentHeaders, content headers to be added. Ownership is
-		*		 transferred.
-	    */
-		IMPORT_C void EstablishL(
-					 TUint32 aTimeout = 0,
-					 CDesC8Array* aHeaders = 0, 
-					 HBufC8* aContentType = 0,
-					 HBufC8* aContent = 0,
-					 CDesC8Array* aContentHeaders = 0 ); 
-
-		/**
-	    * Cancels a previously initialized MO session.
-	    * @pre State() == CMceSession::EOffering
-	    */
-		IMPORT_C void CancelL();
-									  
-	private://methods
-
-	    /**
-	     * C++ default constructor.
-	     * @param aManager, reference to session manager.
-	     * @param aProfileId, id of the sip profile used for the session.
-	     */
-		CMceOutSession( CMceManager* aManager, TUint32 aProfileId );
-
-	    /**
-	     * second-phase constructor
-	     * @param aRecipient, the recipient
-	     * @param aOriginator, the originator
-	     */
-	    void ConstructL( const TDesC8& aRecipient, HBufC8* aOriginator  );
-
-
-	
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcertpobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MMCERTPOBSERVER_H
-#define MMCERTPOBSERVER_H
-
-// INCLUDES
-#include <e32std.h>  
-
-// FORWARD DECLARATIONS
-class CMceMediaStream;
-class CMceRtpSource;
-
-// CLASS DECLARATION
-
-/**
-*  An interface to be implemented by users of MCE if they wish to receive
-*  events from CMceRtpSource.
-*
-*  This observer is set using CMceManager::SetRtpObserver function.
-*
-*  @lib mceclient.lib
-*/
-class MMceRtpObserver
-	{
-	public: 
-        /**
-        * Callback function to indicate that an RTCP sender report
-		* has been received.
-        * @param aSession the session that has changed
-        * @param aStream the stream that has changed
-        */
-        virtual void SRReceived(
-				    CMceSession& aSession,
-					CMceMediaStream& aStream) = 0;
-
-        /**
-        * Callback function to indicate that an RTCP receiver report
-		* has been received.
-        * @param aSession the session that has changed
-        * @param aStream the stream that has changed
-        */
-        virtual void RRReceived(
-				    CMceSession& aSession,
-					CMceMediaStream& aStream) = 0;
-		
-        /**
-        * Callback function to indicate inactivity timer timeout
-		* has occurred. Timer is disabled after the timeout.
-        * @param aStream, the session that has changed.
-        * @param aSource, the source that the timeout occurred.
-        */
-        virtual void InactivityTimeout(
-					CMceMediaStream& aStream,
-					CMceRtpSource& aSource) = 0;    
-
-        /**
-        * Callback function to indicate that spesified CMceRtpSource has
-        * received RTP from a new synchronization source (SSRC).
-        * @param aStream the stream that new SSRC was added to
-        * @param aSource the source that new SSRC was added to
-        * @param aSsrc added SSRC identifier
-        */			
-        virtual void SsrcAdded(
-                        CMceMediaStream& aStream,
-                        CMceRtpSource& aSource,
-                        TUint aSsrc ) = 0;       
-	    
-        /**
-        * Callback function to indicate that spesified CMceRtpSource has
-        * received RTP BYE message from a spesified synchronization 
-        * source (SSRC).
-        * @param aStream the stream that SSRC was removed from
-        * @param aSource the source that SSRC was removed from
-        * @param aSsrc removed SSRC identifier
-        */	
-        virtual void SsrcRemoved(
-                        CMceMediaStream& aStream,
-                        CMceRtpSource& aSource,
-                        TUint aSsrc ) = 0;   
-	};
-
-#endif 
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcertpsink.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCERTPSINK_H
-#define CMCERTPSINK_H
-
-// INCLUDES  
-#include "mcemediasink.h"
-
-// CONSTANTS
-const TMceSinkType KMceRTPSink = 1;
-
-// CLASS DECLARATION
-
-/**
-* Class representing outgoing RTP stream in MCE.
-*
-* CMceRtpSink can be used to send media data to network.
-* It can be configured not to use RTCP during play in order
-* to save bandwith. 
-*
-* CMceRtpSink allows also explicitly sending of RTP RR and SR
-* messages.  
-*
-* Enable and Disable operations to it are considered
-* to be local, so they are not signalled to remote terminal.
-* 
-*  @lib mceclient.lib
-*/
-class CMceRtpSink: public CMceMediaSink
-	{
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceRtpSink* NewL();
-
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceRtpSink* NewLC();
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aSuppressRTCP, ETrue if RTCP not sent during play,
-		*		 EFalse otherwise
-		* @param aIdentity, identity of user placed in RTCP, 
-		*        ownership not transferred.
-	    */
-		IMPORT_C static CMceRtpSink* NewL( TBool aSuppressRTCP, 
-		                                   HBufC8* aIdentity = 0 );
-
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceRtpSink();
-
-	public: // From base class
-
-	    /**
-	    * Locally resumes sending of RTP packets.
-		*/
-		IMPORT_C void EnableL(); 
-
-	    /**
-	    * Locally pauses sending of RTP packets.
-		*/
-		IMPORT_C void DisableL(); 
-
-	public: // Functions
-
-	    /**
-	    * Sends RTCP sender report to recipient.
-	    */
-		IMPORT_C void SendSRL();
-
-	    /**
-	    * Returns the sequence id of the last packet
-		* sent to network. The value is updated only
-		* when sink is disabled.
-		* @pre IsEnabled() == EFalse
-	    * @return sequence number of last sent packet.
-	    */
-		IMPORT_C TUint32 LastPacket() const;
-		
-		/**
-	    * Returns the RTP stream source identifier 
-	    * used in network (SSRC). 
-	    * @pre CMceSession::State() == CMceSession::EEstablished 
-	    * @return source identifier used in network (SSRC).
-	    */
-		IMPORT_C TUint32 Ssrc() const;
-
-	    /**
-	    * Updates settings of rtp sink.
-	    * @pre CMceSession::State() == CMceSession::EIncoming 
-	    * @param aSuppressRTCP, ETrue if RTCP not sent during play,
-		*		 EFalse otherwise
-		* @param aIdentity, identity of user placed in RTCP, 
-		*        ownership not transferred.
-	    */
-		IMPORT_C void UpdateL( TBool aSuppressRTCP, HBufC8* aIdentity = 0  );
-
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    */
-		CMceRtpSink();
-	  				
-	    /**
-	    * second-phase constructor
-	    * @param aSuppressRTCP, ETrue if RTCP not sent during play,
-	    *		 EFalse otherwise
-	    */
-		void ConstructL( TBool aSuppressRTCP );
-
-	public: // stub data
-
-    /**
-     * suppress RTCP
-     */
-    TBool iSuppressRTCP;
-
-    /**
-     * SSRC
-     */
-    TUint32 iSSRC;
-
-    /**
-     * last packet
-     */
-    TUint32 iLastPacket;
-
-
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcertpsource.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCERTPSOURCE_H
-#define CMCERTPSOURCE_H
-
-// INCLUDES
-#include <e32std.h>
-#include <mcemediasource.h>
-
-// CONSTANTS
-const TMceSourceType KMceRTPSource = 1;
-const TInt KMceJitterBufferLength = 10;
-const TInt KMceJitterBufferTreshold = 5;
-
-//FORWARD DECLARATIONS
-class TMceIds;
-
-// CLASS DECLARATION
-
-/**
-* Class representing incoming RTP stream in MCE.
-*
-* CMceRtpSource can be used to receive media data from network.
-* It can be configured with stream specific values to avoid
-* jitter generated by network. It may also be configured to
-* recognize separate media bursts instead of just receiving
-* continuous flow of data. 
-*
-* Events from this class can be received through class MMceRtpObserver.
-*
-* Enable and Disable operations to it are considered to be local, 
-* so they are not signalled to remote terminal.
-*
-* One CMceRTPSource may contain several RTP streams which are identified with
-* synchronization source (SSRC) values. Disabling or enabling CMceRtpSource
-* will affect to all SSRCs but streaming from specific SSRC can be also
-* controlled with EnableSSRCL and Disable SSRCL methods. These are also
-* local operations, thus not signalled to remote terminal.
-* 
-*  @lib mceclient.lib
-*/
-class CMceRtpSource: public CMceMediaSource
-	{
-
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aBufferLength, length in packets of jitter buffer
-	    * @param aBufferTreshold, treshold in packets of jitter buffer
-	    * @param aInactivityTimer, timer (ms) to detect network inactivity.
-	    *		 If 0, no activity detection, otherwise source is set to support
-	    *        talk bursts and report inactivity.
-	    * @param aIdentity, identity of user placed in RTCP, ownership not transferred.
-	    */
-		IMPORT_C static CMceRtpSource* NewL(
-									  TUint aBufferLength = KMceJitterBufferLength,
-									  TUint aBufferTreshold = KMceJitterBufferTreshold,
-									  TUint32 aInactivityTimer = 0,
-									  HBufC8* aIdentity = 0 );
-
-	    /**
-	    * Two-phased constructor.
-	    * @param aBufferLength, length in packets of jitter buffer
-	    * @param aBufferTreshold, treshold in packets of jitter buffer
-	    * @param aInactivityTimer, timer (ms) to detect network inactivity.
-	    *		 If 0, no activity detection, otherwise source is set to support
-	    *        talk bursts and report inactivity.
-	    * @param aIdentity, identity of user placed in RTCP, ownership not transferred.
-	    */
-		IMPORT_C static CMceRtpSource* NewLC(
-									  TUint aBufferLength = KMceJitterBufferLength,
-									  TUint aBufferTreshold = KMceJitterBufferTreshold,
-									  TUint32 aInactivityTimer = 0,
-									  HBufC8* aIdentity = 0 );
-									 
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceRtpSource();
-
-	public: // From base class
-
-	    /**
-	    * Enables streaming explicitly.
-	    */
-		IMPORT_C void EnableL(); 
-
-	    /**
-	    * Disables streaming explicitly.
-	    */
-		IMPORT_C void DisableL(); 
-
-	public: // Functions
-
-	    /**
-	    * Enables RTP inactivity timer.
-	    * @param aInactivityTimer, timer value (ms) that after inactivity
-		*		 of media from network is reported to client.
-	    */
-		IMPORT_C void EnableInactivityTimerL( TUint32 aInactivityTimer ); 
-
-	    /**
-	    * Disables RTP inactivity timer.
-	    */
-		IMPORT_C void DisableInactivityTimerL(); 
-
-	    /**
-	    * Updates settings for incoming session.
-	    * @pre CMceSession::State() == CMceSession::EIncoming 
-	    * @param aBufferLength, length in packets of jitter buffer
-	    * @param aBufferTreshold, treshold in packets of jitter buffer
-	    * @param aInactivityTimer, timer (ms) to detect network inactivity.
-	    *		 If 0, no activity detection, otherwise source is set to support
-	    *        talk bursts and report inactivity.
-	    * @param aIdentity, identity of user placed in RTCP, ownership not transferred.
-	    */
-		IMPORT_C void UpdateL ( TUint aBufferLength = KMceJitterBufferLength,
-								TUint aBufferTreshold = KMceJitterBufferTreshold,
-								TUint32 aInactivityTimer = 0,
-								HBufC8* aIdentity = 0 );
-		
-		/**
-	    * Sends RTCP receiver report to recipient.
-	    */
-		IMPORT_C void SendRRL(); 
-
-        /**
-        * Returns the last RTP stream source identifier 
-        * used in network (SSRC). 
-        * @pre CMceSession::State() == CMceSession::EEstablished 
-        * @return last source identifier used in network (SSRC).
-        */
-        IMPORT_C TUint32 Ssrc() const;
-
-        /**
-        * Gets an array of RTP synchronization source (SSRC) identifiers. 
-        * Array includes all SSRC values this RtpSource has received RTP from.
-        * Changes in array are notified using MMceRtpObserver interface.
-        * @return array of synchronization source identifiers
-        */ 
-        IMPORT_C const RArray<TUint>& Ssrcs() const;			
-
-        /**
-        * Enables streaming from specified synchronization source (SSRC).
-        * @param aSsrc synchronization source to be enabled
-        */			
-        IMPORT_C void EnableSsrcL( TUint aSsrc );
-
-        /**
-        * Disables streaming from specified synchronization source (SSRC).
-        * @param aSsrc synchronization source to be disabled
-        */			
-        IMPORT_C void DisableSsrcL( TUint aSsrc );
-
-        /**
-        * Determines whether specific SSRC is enabled or not.
-        * @param aSsrc the SSRC identifier
-        * @return ETrue if specified SSRC is enabled; otherwise EFalse
-        */			
-        IMPORT_C TBool IsSsrcEnabledL( TUint aSsrc );
-
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    */
-		CMceRtpSource();
-
-	    /**
-	    * second-phase constructor
-	    * @param aBufferLength, length in packets of jitter buffer
-	    * @param aBufferTreshold, treshold in packets of jitter buffer
-	    * @param aInactivityTimer, timer (ms) to detect network inactivity.
-	    *		 If 0, no activity detection, otherwise source is set to support
-	    *        talk burts and report inactivity.
-	    * @param aMediaBurstIndicator, indicator sound to be played before
-	    *        every new burst of media, if source in media burst mode.
-	    */
-		void ConstructL( TUint aBufferLength,
-                         TUint aBufferTreshold,
-                         TUint32 aInactivityTimer,
-                         HBufC8* iMediaBurstIndicator );
-
-
-	public: // Stub data
-	
-         RArray<TUint> iSsrcs;
-	
-	     TUint iBufferLength;
-         TUint iBufferTreshold;
-         TUint32 iInactivityTimer;
-         TUint32 iSilenceTimer;
-         TUint iToneFrequency;
-         TUint iToneLength;
-         HBufC8* iMediaBurstIndicator; 
-         
-	};
-
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,370 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCESESSION_H
-#define CMCESESSION_H
-
-//  INCLUDES
-#include <mcedefs.h>
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class CDesC8Array;
-class TMceIds;
-class CMceMediaStream;
-class CMceManager;
-class TMceFactory;
-class RReadStream;
-class RWriteStream;
-class CMceItcSender;
-class CMceSessionReceiver;
-class MMceFcMsgObserver;
-class CMceComSession;
-class CMceMsgBase;
-class TMceEvent;
-class CMceInSession;
-class MDesC8Array;
-class CMceStreamBundle;
-
-
-// CLASS DECLARATION
-
-/**
-* Base class for MCE sessions, inherited by both CMceInSession and CMceOutSession.
-*
-* CMceSession represents peer-to-peer connection made with remote terminal.
-* This connection is also known as dialog and it is set up using SIP INVITE
-* method.
-*
-* The characteristics of the session are defined by user of this class by attaching
-* media streams into the session.
-*
-* After the session has been succesfylly established, it can be later updated and
-* must be finally terminated.
-*
-* If for any reason instance of this class is deleted while in established state,
-* session is automatically terminated by MCE server.
-*
-*  @lib mceclient.lib
-*/
-class CMceSession : public CBase
-	{	
-	public: // Session states
-
-	    enum TState
-	        {
-	        EIdle, 			// Idle
-	        EOffering,      // Outgoing session, or session update establishment in progress, 
-	        EIncoming,		// Session received incoming call
-	        EReserving,     // UpdateL called to incoming session during session establishment
-	        EAnswering, 	// Answering an incoming call
-	        EProceeding,	// Session media negotiations proceeding
-	        EEstablished,   // Session established
-	        ECancelling,    // Cancelling outgoing session establishment
-	        ETerminating,   // Terminating session
-	        ETerminated,    // Session terminated
-	        };
-
-	public: // Session termination reasons
-
-	    enum TReason
-	        {
-	        EDeclined,
-	        EBusy,
-	        ECancelled,
-	        EDisconnected
-	        };
-
-	public: 
-
-	    /**
-	    * Destructor.
-	    */
-		virtual ~CMceSession();
-
-	public: // Functions
-
-	    /**
-	    * Returns the state of the session.
-	    * @return The current state of the session
-	    */
-	    IMPORT_C TState State() const;
-
-	    /**
-	    * Returns the state of network connection of the session.
-	    * @return ETrue if connection active, EFalse if connection inactive.
-	    */
-	    IMPORT_C TBool ConnectionActive() const;
-
-
-        /**
-        * Removes media stream from session.
-        * @pre State() == CMceSession::EIdle ||
-        *      State() == CMceSession::EIncoming ||
-        *      State() == CMceSession::EEstablished
-        * @post aMediaStream cannot be used anymore and contents of 
-        *       previously returned stream array (CMceSession::Streams())
-        *       are not anymore valid
-        * @param aMediaStream media stream to be removed
-        */
-        IMPORT_C void RemoveStreamL( CMceMediaStream& aMediaStream );
-	    
-	    /**
-	    * Adds media stream into session.
-		* @pre State() == CMceSession::EIdle ||
-		*      State() == CMceSession::EIncoming ||
-		*      State() == CMceSession::EEstablished
-		* @pre aMediaStream != 0
-	    * @param aMediaStream, media stream to be added.
-	    *		 ownership is transferred.
-	    */
-	    virtual void AddStreamL( CMceMediaStream* aMediaStream );
-
-	    /**
-		* Updates offered session parameters during session
-		* establishement phase for first answer.
-	    * Updates established session using re-invite.
-	    * In state EIncoming the timeout value must be smaller or equal to
-	    * offered value obtained by SessionTimer().
-		* @pre State() == CMceSession::EIncoming ||
-		*      State() == CMceSession::EEstablished
-		* @post State() == CMceSession::EReserving for incoming session ||
-		*       State() == CMceSession::EOffering for established session
-	    * @param aTimeout, the session timer value in seconds
-	    * @param aHeaders, SIP headers to be added. Ownership is
-		*		 transferred.
-	    * @param aContentType, content type of the body.
-		*		 Ownership is transferred.
-	    * @param aContent, content to be added in body. Ownership is 
-		*		 transferred.
-	    * @param aContentHeaders, content headers to be added. Ownership is
-		*		 transferred.
-	    */
-		IMPORT_C void UpdateL(
-					 TUint32 aTimeout = 0,
-					 CDesC8Array* aHeaders = 0, 
-					 HBufC8* aContentType = 0,
-					 HBufC8* aContent = 0,
-					 CDesC8Array* aContentHeaders = 0 ); 
-
-        /**
-	    * Terminates established session.
-		* @pre State() == CMceSession::EEstablished
-		* @post State() == CMceSession::ETerminating
-	    * @param aHeaders, SIP headers to be added. Ownership is
-		*		 transferred.
-	    * @param aContentType, content type of the body.
-		*		 Ownership is transferred.
-	    * @param aContent, content to be added in body. Ownership is 
-		*		 transferred.
-	    */
-		IMPORT_C void TerminateL( CDesC8Array* aHeaders = 0,
-					              HBufC8* aContentType = 0,
-					              HBufC8* aContent = 0 ); 
-
-	    /**
-	    * Returns the streams belonging to the session.
-	    * @return streams of the session.
-	    */
-		IMPORT_C const RPointerArray<CMceMediaStream>& Streams() const;
-
-	    /**
-	    * Returns the recipient of the session.
-		* @pre State() == CMceSession::EIncoming ||
-		*      State() == CMceSession::EEstablished
-	    * @return The recipients address.
-	    */
-	    IMPORT_C const TDesC8& Recipient() const;
-
-	    /**
-	    * Returns the originator of the session.
-		* @pre State() == CMceSession::EIdle ||
-		*      State() == CMceSession::EIncoming ||
-		*      State() == CMceSession::EEstablished
-	    * @return the originators address.
-	    */
-	    IMPORT_C const TDesC8& Originator() const;
-
-	    /**
-		* Configures session by updating SDP session lines. 
-		* In order to get complete update, whole session must be 
-		* updated causing sending of re-invite.
-		* @pre State() == CMceSession::EIdle ||
-		*      State() == CMceSession::EIncoming ||
-		*      State() == CMceSession::EEstablished
-		* @pre aSessionSDPLines != 0
-	    * @param aSessionSDPLines, application specific SDP lines for session.
-		*		 Ownership is transferred.
-	    */
-		IMPORT_C void SetSessionSDPLinesL( CDesC8Array* aSessionSDPLines );
-		
-        /**
-        * Gets SDP lines of the session.
-        * @return array of session SDP lines, owneship is transferred.
-        */
-        IMPORT_C MDesC8Array* SessionSDPLinesL();
-		
-		/**
-	    * Returns the session timer value of the session.
-		* @return the session timer value.
-	    */
-		IMPORT_C TUint32 SessionTimer() const;	    
-
-        /**
-        * Adds grouped media streams to the session. Changes SDP
-        * of the session. In order to get complete update, whole
-        * session must be updated causing sending of re-invite.
-        * @pre State() == CMceSession::EIdle ||
-        *      State() == CMceSession::EIncoming ||
-        *      State() == CMceSession::EEstablished
-        * @pre aBundle != 0
-        * @param aBundle group of media streams;
-        *        ownership of the bundle is transferred
-        */
-        IMPORT_C void AddBundleL( CMceStreamBundle* aBundle );
-
-        /**
-        * Removes grouped media stream from session. Changes SDP
-        * of the session. In order to get complete update, whole
-        * session must be updated causing sending of re-invite.
-        * @pre State() == CMceSession::EIdle ||
-        *      State() == CMceSession::EIncoming ||
-        *      State() == CMceSession::EEstablished
-        * @post aBundle cannot be used anymore and contents of 
-        *       previously returned bundle array (CMceSession::Bundles())
-        *       are not anymore valid
-        * @param aBundle bundle to be removed
-        */
-        IMPORT_C void RemoveBundleL( CMceStreamBundle& aBundle );
-
-        /**
-        * Gets the grouped media streams of the session.
-        * @return bundles of the session
-        */
-        IMPORT_C const RPointerArray< CMceStreamBundle >& Bundles() const;
-
-        /**
-        * Gets session modifier of type TUint.
-        * @param aModifier is a modifier to be retrieved
-        * @param aValue on return will contain modifier value
-        * @leave KErrNotFound if modifier is not found
-        */
-        IMPORT_C void GetModifierL( TMceSessionModifier aModifier,
-                                    TUint& aValue ) const;
-
-        /**
-        * Sets session modifier of type TUint.
-        * @param aModifier is a modifier to be set 
-        * @param aValue is a new value of a modifier
-        * @leave KErrNotFound if modifier is not found
-        */
-        IMPORT_C void SetModifierL( TMceSessionModifier aModifier, 
-                                    TUint aValue );  
-                                         
-        /**
-         * Returns the identifier of profile used by the sesison.
-         * @return TUint32 Identifier of the used profile. 0, 
-         *         if session is setup without profile.
-         */
-        IMPORT_C TUint32 Profile() const;
-        
-        
-    public:
-        
-        CMceManager& Manager() const;
-        
-        // Restarts the simulator
-        void RestartSimulator();
-
-	protected:
-
-	    /**
-	     * C++ default constructor.
-	     * @param aManager, reference to session manager.
-	     * @param aProfileId, id of the sip profile used for the session.
-	     */
-		CMceSession( CMceManager* aManager, TUint32 aProfileId );
-
-	    /**
-	     * second-phase constructor
-	     */
-		void ConstructL();
-	    
-        /**
-        * Initializes 
-        */
-        void InitializeL();
-
-
-	protected: // Not owned data
-
-	    /**
-	     * profile id
-	     */
-	     TUint32 iProfileId;
-		 
-	private: // Owned data
-
-	    /**
-	     * media streams
-	     */
-		RPointerArray<CMceMediaStream> iMediaStreams;
-
-        /**
-	     * bundles
-	     */
-		RPointerArray<CMceStreamBundle> iBundles;
-		
-		//for testing
-
-		//friend class CMceManager;
-	
-	public: // stub data
-
-	    CMceManager* iManager;
-	
-	    CMceSession::TState iState;
-	        
-	    TBool iIsConnectionActive;
-	    
-	    HBufC8* iOriginator;
-	    
-	    HBufC8* iRecipient;
-	    
-	    TUint32 iTimeout;
-	    
-	    CDesC8Array* iSessionSDPLines;
-	    
-	    CDesC8Array* iHeaders;
-	    
-	    TBool iForceInternetSignaling;
-	    
-	    TUint i100RelUsage;
-	    
-	    // If this code is != KErrNone, next operation that can fail will fail
-	    // (leave or return a value) with this code. Variable is reseted before 
-	    // failing. 
-	    // Obs! Check that wanted failing is really implemented in this stub
-	    TInt iFailWithCode;
-	    
-	    TBuf8<200> iReasonPhrase;
-	    
-	    TInt iReasonCode;
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcesessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MMCESESSIONOBSERVER_H
-#define MMCESESSIONOBSERVER_H
-
-// INCLUDES
-#include <e32std.h>  
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class TMceTransactionDataContainer;
-
-// CLASS DECLARATION
-
-/**
-*  An interface to be implemented by users of MCE if they wish to use
-*  sessions.
-*
-*  This observer is set using CMceManager::SetSessionObserver function.
-*
-*  @lib mceclient.lib
-*/
-class MMceSessionObserver
-	{
-	public: // Session control callbacks
-
-	    /**
-	    * The state of the session has changed.
-	    * @param aSession, the session that has changed.
-	    * @param aContainer, if present, holds details of
-	    *        transaction causing state change.
-	    */
-	    virtual void SessionStateChanged(
-	    			CMceSession& aSession,
-	    			TMceTransactionDataContainer* aContainer ) = 0;
-
-	    /**
-	    * The state of the connection used by the session has changed.
-	    * @param aSession, the session that has changed.
-	    * @param aActive, ETrue if connection active, EFalse if connection inactive.
-	    */
-	    virtual void SessionConnectionStateChanged(
-	                CMceSession& aSession,
-	                TBool aActive ) = 0;
-	    
-	    /**
-	    * An error has occurred concerning a specific session.
-	    * Note, that each error causes the session state to be ETerminated.
-	    * @param aSession, The session raising the error.
-	    * @param aError, Error code
-	    */
-		virtual void Failed( CMceSession& aSession, TInt aError ) = 0;
-
-		/**
-	    * An session update has been failed concerning a specific session.
-	    * Note, that each error causes the session state to be ETerminated.
-	    * @param aSession, The session raising the error.
-	    * @param aContainer, if present, holds details of
-	    *        transaction causing update.
-	    */
-		virtual void UpdateFailed(
-	    			CMceSession& aSession,
-	    			TMceTransactionDataContainer* aContainer ) = 0;
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcespeakersink.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMCESPEAKERSINK_H
-#define CMCESPEAKERSINK_H
-
-// INCLUDES
-#include <e32std.h>  
-#include <mcemediasink.h>
-
-// DATA TYPES
-const TMceSinkType KMceSpeakerSink = 2;
-
-// CLASS DECLARATION
-
-const TInt KMceAudioRoutePrivate = 3;
-const TInt KMceAudioRoutePublic = 4;
-
-/**
-* Class representing speaker in MCE.
-*
-* CMceSpeakerSink can be used to play out audio.
-*
-* Enable (un-mute) and Disable (mute) operations to it are considered
-* to be local, so they are not signalled to remote terminal.
-* 
-*  @lib mceclient.lib
-*/
-class CMceSpeakerSink: public CMceMediaSink
-	{
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceSpeakerSink* NewL();
-
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceSpeakerSink* NewLC();
-
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceSpeakerSink();
-
-	public: // Functions
-
-	    /**
-	    * Enables streaming explicitly.
-	    */
-		IMPORT_C void EnableL(); 
-
-	    /**
-	    * Disables streaming explicitly.
-	    */
-		IMPORT_C void DisableL(); 
-		
-        /**
-        * Sets volume 
-        * @param aVolume, 
-        */
-		IMPORT_C void SetVolumeL( TInt aVolume );
-		
-        /**
-        * Gets current volume 
-        * @return value of current volume, 
-        */
-		IMPORT_C TInt VolumeL() const;
-		
-        /**
-        * Gets maximum volume 
-        * @return value of mamimum volume, 
-        */
-		IMPORT_C TInt MaxVolumeL() const;
-
-        /**
-        * Sets audio routing 
-        * @param aRoute Required audio route, like KMceAudioRoutePublic. 
-        */
-        IMPORT_C void SetRoutingL( TInt aRoute );
-
-        /**
-        * Gets current audio routing. 
-        * @return TInt Current audio routing. 
-        */
-        IMPORT_C TInt RoutingL() const;
-		
-	private:
-
-	    /**
-	     * C++ default constructor.
-	     */
-		CMceSpeakerSink();
-
-	    /**
-	    * second-phase constructor
-	    */
-		void ConstructL();
-
-	
-		
-		
-    public: // stub data
-    
-        TInt iVolume;
-        
-        TInt iMaxVolume;
-        
-        TInt iAudioRouting;
-
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcestreambundle.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCESTREAMBUNDLE_H
-#define MCESTREAMBUNDLE_H
-
-//  INCLUDES
-#include <e32base.h>  	
-#include <mcedefs.h>
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CMceMediaStream;
-class CMceSession;
-class CMceMediaSink;
-class MMceEndPointProxy;
-
-
-/**
-* Class for handling grouping of Mce streams (i.e. grouping of media lines).
-*
-* Can be used for example to synchronize audio and video streams.
-*
-* If streams are added to the bundle or removed from it after the bundle
-* has been added to the session, the session has to be updated with
-* CMceSEssion::UpdateL() function in order to complete the changes. 
-*
-*  @lib mceclient.lib
-*/
-class CMceStreamBundle: public CBase
-	{
-	public: // Bundle types
-	
-	    enum TMceStreamBundleType
-	        {
-	        ELS,
-	        EFID
-	        };
-	    
-	public: // Constructors and destructor
-
-        /**
-	    * Two-phased constructor.
-	    */
-	    IMPORT_C static CMceStreamBundle* NewL( TMceStreamBundleType aType );
-
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceStreamBundle* NewLC( TMceStreamBundleType aType );
-             
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceStreamBundle();
-
-    public:
-    
-        /**
-	    * Type of the bundle
-	    * @param aParent the parent
-	    */
-	    IMPORT_C TMceStreamBundleType Type() const;
-    
-        /**
-        * Adds stream to the bundle.
-        * @param aStream, stream to be added
-        */
-        IMPORT_C void AddStreamL( CMceMediaStream& aStream );
-        
-        /**
-        * Removes stream from the bundle.
-        * @param aStream, stream to be removed
-        */
-        IMPORT_C void RemoveStreamL( CMceMediaStream& aStream );
-        
-         /**
-	    * Returns the streams belonging to the bundle.
-	    * @return streams of the bundle.
-	    */
-		IMPORT_C const RPointerArray< CMceMediaStream >& Streams();
-
-	public:
-		
-	    /**
-	    * Initializes 
-	    * @param aParent the parent
-	    */
-	    void InitializeL( CMceSession& aParent );
-	    
-
-	private: //methods
-
-	    /**
-	     * C++ default constructor.
-	     */
-		CMceStreamBundle();
-
-	    /**
-	     * second-phase constructor
-	     */
-		void ConstructL( TMceStreamBundleType aType );
-		
-        void AddedSinkL( CMceMediaStream& aStream,
-                         CMceMediaSink*& aCurrentSink,
-                         MMceEndPointProxy*& aProxy );
-
-
-	protected: // NOT owned data
-				
-	    /**
-	     * session
-	     */
-		CMceSession* iSession;
-
-	public: // Stub data
-	
-	    /**
-	    * Bundled streams, streams are not owned
-	    */
-	    RPointerArray< CMceMediaStream > iStreams;
-	    
-	    RPointerArray< CMceMediaStream > iTempStreams;
-		
-    	/**
-        * type
-        */
-        CMceStreamBundle::TMceStreamBundleType iBundleType;
-    
-
-    
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcestreamobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MMCESTREAMOBSERVER_H
-#define MMCESTREAMOBSERVER_H
-
-// INCLUDES
-#include <e32std.h>
-
-// FORWARD DECLARATIONS
-class CMceMediaStream;
-class CMceMediaSink;
-class CMceMediaSource;
-
-// CLASS DECLARATION
-
-/**
-*  An interface to be implemented by users of MCE if they wish to receive
-*  media state events.
-*
-*  This observer is set using CMceManager::SetMediaObserver function.
-*
-*  @lib mceclient.lib
-*/
-class MMceStreamObserver
-	{
-	public: 
-
-	    /**
-	    * The state of the stream has changed.
-	    * @param aStream, the stream that has changed.
-	    */
-	    virtual void StreamStateChanged( 
-	                   CMceMediaStream& aStream) = 0;
-
-	    /**
-	    * The state of the sink has changed.
-	    * @param aStream, the stream that uses the sink.
-	    * @param aSink, the sink that has changed.
-	    */
-	    virtual void StreamStateChanged(
-	                    CMceMediaStream& aStream,
-	                    CMceMediaSink& aSink) = 0;
-
-	    /**
-	    * The state of the source has changed.
-	    * @param aStream, the stream that uses the source.
-	    * @param aSource, the source that has changed.
-	    */
-	    virtual void StreamStateChanged(
-	                    CMceMediaStream& aStream,
-	                    CMceMediaSource& aSource) = 0;
-
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcetransactiondatacontainer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef TMceTRANSACTIONDATACONTAINER_H
-#define TMceTRANSACTIONDATACONTAINER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <badesca.h>
-//#include <mcedefs.h>
-
-// CLASS DECLARATION
-
-/**
-* Container class to hold detailed data of a transaction.
-*
-* It is assumed, that user has only one instance of this class.
-* The same instance is passed between MCE and user, but the data
-* inside of this container is just updated for each event.
-*
-* The data inside the container is valid only during the execution
-* of the callback function. After this the remaining data in container
-* is deleted.
-*
-* @lib mceclient.lib
-*/
-class TMceTransactionDataContainer
-    {
-    public:
-     
-		/**
-		* Default constructor
-		*/
-     	IMPORT_C TMceTransactionDataContainer();
-     	
-		/**
-		* Returns status code
-		* @returns status code of transaction, if any.
-		*/
-     	IMPORT_C TInt GetStatusCode();
-     	
-		/**
-		* Returns reason phrase, ownership is transferred.
-		* @returns reason phrase of transaction, if any.
-		*/
-     	IMPORT_C HBufC8* GetReasonPhrase();
-     	
-		/**
-		* Returns headers, ownership is transferred.
-		* @returns headers of transaction, if any.
-		*/
-     	IMPORT_C CDesC8Array* GetHeaders();
-     	
-		/**
-		* Returns content type, ownership is transferred.
-		* @returns content type of transaction, if any.
-		*/
-     	IMPORT_C HBufC8* GetContentType();
-     	
-		/**
-		* Returns content headers, ownership is transferred.
-		* @returns headers of content, if any.
-		*/
-     	IMPORT_C CDesC8Array* GetContentHeaders();
-     	
-		/**
-		* Returns content, ownership is transferred.
-		* @returns content of transaction, if any.
-		*/
-     	IMPORT_C HBufC8* GetContent();
-     	
-    public: // IMPORTED FOR STUBBING PURPOSES, NORMALLY NOT IMPORTED
-     
-     	IMPORT_C void SetStatusCode( TInt aStatusCode );
-     	
-     	IMPORT_C void SetReasonPhrase( HBufC8* aReasonPhrase );
-     	
-     	IMPORT_C void SetHeaders( CDesC8Array* aHeaders );
-     	
-     	IMPORT_C void SetContentType( HBufC8* aContentType );
-     	
-        IMPORT_C void SetContent( HBufC8* aContent );
-     	
-     	IMPORT_C void SetContentHeaders( CDesC8Array* aHeaders );
-     	
-     	IMPORT_C void Clear();
-     	
-    private:
-    
-		TUint32 iStatusCode;
-		
-		HBufC8* iReasonPhrase;
-		
-		CDesC8Array* iHeaders;
-		
-        HBufC8* iContentType;
-        
-		CDesC8Array* iContentHeaders;
-		
-		HBufC8* iContent;
-		
-	
-    };
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcevideocodec.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCEVIDEOCODEC_H
-#define MCEVIDEOCODEC_H
-
-// INCLUDES
-#include <e32base.h>
-#include "mcecodec.h"
-#include "mcedefs.h"
-
-// FORWARD DECLARATIONS
-class CMceComVideoCodec;
-class TMceVideoCodecFactory;
-class TCCMRVideoCodingOptions;
-
-// CONSTANTS
-const TMceCodecType KMceVideoCodec = 2;
-
-
-// CLASS DECLARATION
-
-/**
-* Base class for video codecs.
-*
-* It defines setters and getters for generic video codec attributes.
-* These attributes are used in single video stream and they
-* are negotiated with remote terminal.
-*
-* @lib mceclient.lib
-*/
-class CMceVideoCodec : public CMceCodec
-    {
-	public:  // Constructors and destructor
-	        
-	    /**
-	    * Destructor.
-	    */
-	    virtual ~CMceVideoCodec();
-	    	 
-		
-    public: // New functions
-        
-        /**
-	    * Clones the codec.
-	    * @return cloned codec; ownership is transferred
-	    */
-	    virtual CMceVideoCodec* CloneL() const = 0;
-	    
-	    /**
-	    * Sets maximum bitrate of the codec.
-	    * @param aMaxBitrate value of maximum bitrate used for encoding
-	    * @leave KErrNotSupported if codec doesn't support frame sizes issued
-	    */
-	    virtual void SetMaxBitrateL( TUint aMaxBitrate ) = 0;
-        
-        /**
-	    * Sets resolutions allowed with the codec.
-	    * @param aResolutions bitfield of allowed resolutions
-	    * @leave KErrNotSupported if codec doesn't support resolutions issued
-	    */
-        virtual void SetAllowedResolutionsL( TUint aResolutions ) = 0;
-        
-        /**
-	    * Sets resolution of the video.
-	    * @param aResolution resolution of the video in pixels
-	    * @leave KErrNotSupported if codec doesn't support resolution issued
-	    */
-        virtual void SetResolutionL( TSize aResolution ) = 0;
-        
-        /**
-	    * Sets frame rates allowed with the codec.
-	    * @param aFrameRates allowed frame rate values as a bitfield
-	    * @leave KErrNotSupported if codec doesn't support frame rates issued
-	    */
-        virtual void SetAllowedFrameRatesL( TUint aFrameRates ) = 0;
-        
-        /**
-	    * Sets frame rate used with the codec for encoding.
-	    * @param aFrameRate frame rate for encoding
-	    * @leave KErrNotSupported if codec doesn't support frame rate value
-	    *        issued
-	    */
-        virtual void SetFrameRateL( TReal aFrameRate ) = 0;
-        
-        /**
-        * Sets preferred encoding device for uplink stream and preferred decoding
-        * device for downlink stream.
-        * @param aEncodingDecodingDevice
-        * @leave KErrNotSupported if setting preferred device is not possible
-        */
-        virtual void SetPreferredEncodingDecodingDeviceL( 
-                                    TUid aEncodingDecodingDevice ) = 0;
-        
-        /**
-        * Set config key (sprop-parameter-sets)
-        * @param aConfigKey, config key as Base64 encoded
-        * @leave KErrNotSupported if setting config key is not possible
-        */
-        virtual void SetConfigKeyL( const TDesC8& aConfigKey ) = 0;
-        
-      
-	public: // Getters
-	    
-	    /**
-	    * Gets maximum bit rate currently allowed
-	    * @return maximum bit rate
-	    */
-	    IMPORT_C TUint MaxBitRate() const;
-
-        /**
-	    * Gets currently allowed resolutions as a bitfield
-	    * @return currently allowed resolutions as a bitfield
-	    */	
-	    IMPORT_C TUint AllowedResolutions() const;
-
-        /**
-	    * Gets current resolution
-	    * @return current resolution
-	    */	    
-	    IMPORT_C TSize Resolution() const;
-	    
-	    /**
-	    * Gets frame rates currently allowed for encoding and decoding.
-	    * @return allowed frame rate values as a bitfield
-	    */
-	    IMPORT_C TUint AllowedFrameRates() const;
-	    
-	    /**
-	    * Gets frame rate currently used for encoding and decoding.
-	    * @return current frame rate value
-	    */
-	    IMPORT_C TReal FrameRate() const;
-		
-		/**
-        * Get config key (sprop-parameter-sets)
-        * @return config key as Base64 encoded or NULL, ownership
-        *   is transferred.
-        */
-        IMPORT_C HBufC8* ConfigKeyL() const;
-        
-	                
-	protected:  // New functions
-
-	    /**
-	    * C++ default constructor.
-	    */
-	    CMceVideoCodec();
-
-
-		
-		
-    private: // Reserved for future use
-    
-        TAny* iReserved;       
-
-    public: // stub data
-    
-        TReal iFrameRate;
-        TUint iMaxBitRate;
-        TUint iAllowedResolutions;
-        TInt iResolutionWidth;
-        TInt iResolutionHeight;
-        TUint iAllowedFrameRates;
-        TUint iClockRate;
-        
-        HBufC8* iConfigKey;
-        TUid iEncodingDecodingDevice;
-        
-    };
-
-
-#endif
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcevideostream.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MCEVIDEOSTREAM_H
-#define MCEVIDEOSTREAM_H
-
-//  INCLUDES
-#include <e32std.h>  		
-#include "mcemediastream.h"
-
-// CONSTANTS
-const TMceMediaType KMceVideo = 2;
-
-// FORWARD DECLARATIONS
-class CMceVideoCodec;
-
-// CLASS DECLARATION
-
-/**
-* Class for representing unidirectional video stream.
-*
-* It defines the used video codecs for the stream.
-* In order to be complete structure, at least one codec is required.
-*
-* @lib mceclient.lib
-*/
-class CMceVideoStream : public CMceMediaStream
-	{
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceVideoStream* NewL();
-	   
-	    /**
-	    * Two-phased constructor.
-	    */
-		IMPORT_C static CMceVideoStream* NewLC();
-		
-	    /**
-	    * Destructor.
-	    */
-		IMPORT_C ~CMceVideoStream();
-
-	public: // Functions
-
-	    /**
-	    * Returns the codecs available to the session.
-	    * For CMceOutSession, array contains all codecs supported by
-	    * terminal in default. For CMceInSession, array contains codecs
-	    * that were offered by remote terminal, and supported by local terminal.
-	    * Codecs are in preference order in the array. 
-	    * Codec in the first element of the array has highest preference.
-	    * Adding, removing or replacing a codec or changing the preference
-	    * of a codec causes the returned array to be in invalid state.
-	    * @return codecs available for the session
-	    */
-		IMPORT_C const RPointerArray<CMceVideoCodec>& Codecs();
-
-        /**
-	    * Adds codec to the stream. The codec contains preference value
-	    * which will define its preference when added to the stream.
-	    * Preference of codecs with the same preference value is determined
-	    * by order they were added to the stream. In case of bound streams,
-	    * codec is also automatically added to the opposite direction stream.
-	    * After adding a codec an array of codecs received with a call
-        * to Codecs() is not valid. 
-	    * @param aCodec codec added to the stream; ownership is transferred
-	    */
-		IMPORT_C void AddCodecL( CMceVideoCodec* aCodec );
-
-	    /**
-	    * Removes codec from the stream. In case of bound streams, codec is
-	    * also automatically removed from the opposite direction stream.
-	    * After removing a codec an array of codecs previously received with 
-	    * a call to Codecs() is not valid. 
-	    * @param aCodec codec removed from stream
-	    */
-		IMPORT_C void RemoveCodecL( CMceVideoCodec& aCodec );
-		
-		/**
-	    * Replaces codecs of the stream. Preference values of codecs will define
-	    * the preference order. In case of bound streams, codecs are
-	    * also automatically added to the opposite direction stream.
-	    * After replacing codecs an array of codecs received with a call
-        * to Codecs() is not valid. 
-	    * @param aCodecs array of codecs which will replace existing codecs; 
-	    *        ownership is transferred
-	    */
-		IMPORT_C void ReplaceCodecsL( RPointerArray<CMceVideoCodec>* aCodecs );
-
-	    /**
-	    * Gets supported video codecs of the current stream configuration.
-	    * Supported codecs for this video stream is affected by attached
-	    * sinks and sources.
-	    * @return supported video codecs of the current stream configuration
-	    */
-	    IMPORT_C const RPointerArray<const CMceVideoCodec>& 
-	                    SupportedVideoCodecs() const;	
-	                    
-	    
-	public: // From CMceMediaStream
-		
-	    /**
-	    * Initializes the stream. 
-	    * @param aParent the parent
-	    */
-	    void InitializeL( CMceSession& aParent );
-
-	    /**
-	    * Initializes the stream.
-	    * @param aManager the manager; ownership is not transferred
-	    */
-	   void InitializeL( CMceManager* aManager );
-	   
-	
-	protected: // From CMceMediaStream
-	
-	    /**
-	    * Determine whether current combination of source and sinks
-	    * is allowed for spesific stream type.
-	    * @return ETrue is combination is allowed; otherwise EFalse
-	    */
-	    virtual TBool IsAllowedCombination();	
-
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    */
-		CMceVideoStream();
-
-	    /**
-	    * Second-phase constructor.
-	    */
-		void ConstructL();
-	    		
-
-	private: // Owned data
-
-	    /**
-	    * Codecs.
-	    */
-		RPointerArray<CMceVideoCodec> iCodecs;
-
-        /**
-	    * Supported video codecs.
-	    */
-	    RPointerArray<const CMceVideoCodec> iSupportedVideoCodecs;
-
-    private: // Reserved for future use
-    
-        TAny* iReserved;       
-
-
-    public: // Stub data	
-    
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mussessionsimulator.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This interface is used by
-*                clients to get and availability setting for Video Charging
-*
-*/
-
-
-#ifndef MUSSESSIONSIMULATOR_H_
-#define MUSSESSIONSIMULATOR_H_
-
-#include <e32base.h>
-#include <mcemanager.h>
-
-class MMceSessionObserver;
-
-class MTimerNotify
-    {
-    public:
-        virtual void TimerExpired(TAny* aTimer,TInt aError) = 0;
-        };
- 
- class CMusTestTimer: public CActive
-        {
-    public:
-        static CMusTestTimer* NewL(const TInt aPriority,MTimerNotify& aNotify);
-        ~CMusTestTimer();
-    public:
-        void At(const TTime& aTime);
-        void After(TTimeIntervalMicroSeconds32 aInterval);
-        void Inactivity(TTimeIntervalSeconds aSeconds);
-    protected:
-        void RunL();
-        void DoCancel();
-    private:
-        CMusTestTimer(const TInt aPriority,MTimerNotify& aNotify);
-        void ConstructL(void);
-    private:
-        RTimer                  iTimer;
-        MTimerNotify&    iNotify;
-        };
-
-class CMusTestSessionSimulator : public MTimerNotify
-    {
-    
-public: 
-    static CMusTestSessionSimulator* NewL( CMceManager& aObserver );
-    CMusTestSessionSimulator( CMceManager& aObserver );
-    ~CMusTestSessionSimulator();
-    void StartL();
-    void Stop();
-    TBool IsRunning();
-private:
-    void ConstructL();    
-    void StateChangeL();
-    void TimerExpired(TAny* aTimer,TInt aError);
-    void SimulateReceiveSession();
-private:
-    CMceManager& iManager;
-     
-private :
-    CMusTestTimer* iTimer;
-    TBool ibIncoming;
-    };
-
-#endif /* MUSSESSIONSIMULATOR_H_ */
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mustestdrawer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The observer class for monitoring SIP profiles.
-*
-*/
-
-
-#ifndef MMUSTESTDRAWER_H
-#define MMUSTESTDRAWER_H
-
-#include <e32base.h>
-#include <w32std.h>
-
-class CMusTestDrawer : public CBase,MDirectScreenAccess
-    {
-public:
-    CMusTestDrawer* NewL();
-    CMusTestDrawer* NewLC();    
-    ~CMusTestDrawer();
-    void DrawL( const TRect& aRect);
-    virtual void Restart(RDirectScreenAccess::TTerminationReasons aReason);
-private:
-    CMusTestDrawer();
-    void ConstructL();
-    
-    };
-
-#endif // MMUSTESTDRAWER_H
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mccscreen.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,402 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    
-*
-*/
-
-
-
-
-#include <bitstd.h>
-#include <w32std.h>
-#include <gdi.h>
-
-#include "MccScreen.h"
-#include "muslogger.h"
-
-// EXTERNAL DATA STRUCTURES
-
-// EXTERNAL FUNCTION PROTOTYPES  
-
-// CONSTANTS
-
-_LIT(KMccWindowGroupName,"32MccVideoWindow");
-
-// MACROS
-
-// LOCAL CONSTANTS AND MACROS
-
-// MODULE DATA STRUCTURES
-
-// LOCAL FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-CMccScreen* CMccScreen::NewL( 
-    TPoint aPos, 
-    TSize aArea, 
-    TInt aIndex, 
-    TInt aWindowOrdinalPosition,
-	TInt aWindowOrdinalPriority,
-	TSize aViewFinderImageSize )
-	{
-	CMccScreen* self = new ( ELeave ) CMccScreen( aPos, 
-	                                              aArea, 
-	                                              aIndex,
-	                                              aWindowOrdinalPosition,
-	                                              aWindowOrdinalPriority );
-	CleanupStack::PushL( self );
-	self->ConstructL( aViewFinderImageSize );
-	CleanupStack::Pop( self );	
-	return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-CMccScreen::CMccScreen( 
-    TPoint aPos, 
-    TSize aArea, 
-    TInt aIndex, 
-    TInt aWindowOrdinalPosition,
-	TInt aWindowOrdinalPriority ) :
-	iDeviceIndex( aIndex ), 
-	iPosition( aPos ), 
-	iArea( aArea ),
-	iWindowOrdinalPosition( aWindowOrdinalPosition ),
-	iWindowOrdinalPriority( aWindowOrdinalPriority ),
-	iAborted( ETrue )
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-CMccScreen::~CMccScreen()
-	{
-	MUS_LOG( "CMccScreen::~CMccScreen" )
-	
-	DetachFrame(); // Must do bitmap detach before releasing window resources
-	delete iDirectScreenAccess;
-	delete iDev;
-	delete iRw;
-    delete iRwGroup;
-    iRwSession.Close();
-    
-	MUS_LOG( "CMccScreen::~CMccScreen, exit" )
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::ConstructL( TSize aViewFinderImageSize )
-	{
-	MUS_LOG( "CMccScreen::ConstructL" )
-    User::LeaveIfError( iRwSession.Connect() );
-	
-	// Create window group
-	TInt groupId = iRwSession.GetFocusWindowGroup();
-    iRwGroup = new (ELeave) RWindowGroup( iRwSession ) ;	
-	//TInt handle = iRwSession.GetWindowGroupHandle( groupId );
-
-    MUS_LOG1( "CMccScreen::ConstructL, window ordinal pos", iWindowOrdinalPosition )
-    MUS_LOG1( "CMccScreen::ConstructL, window ordinal priority", iWindowOrdinalPriority )
-    
-    iRwGroup->Construct( groupId, EFalse );
-	iRwGroup->SetName( KMccWindowGroupName );
-    
-    iRwGroup->SetOrdinalPosition( iWindowOrdinalPosition, iWindowOrdinalPriority );
-         
-    // Create screen device
-	iDev = new (ELeave) CWsScreenDevice( iRwSession );
-	iDev->Construct( iDeviceIndex ); 
-	
-	TInt currMode = iDev->CurrentScreenMode();
-	MUS_LOG1( "CMccScreen::ConstructL, screen device mode = %d", currMode )
-	                   
-	TPixelsTwipsAndRotation sizeAndRotation;
-    iDev->GetScreenModeSizeAndRotation( currMode, sizeAndRotation );
-	MUS_LOG2( "CMccScreen::ConstructL, screen device size  %d %d", 
-	                   sizeAndRotation.iPixelSize.iWidth, 
-	                   sizeAndRotation.iPixelSize.iHeight )
-
-	MUS_LOG1( "CMccScreen::ConstructL, screen device orientation %d", 
-	                   sizeAndRotation.iRotation )
-	
-	// Create window
-	iRw = new (ELeave) RWindow( iRwSession );
-	
-	iRw->Construct( *iRwGroup, (TUint32) this + 2 );
-    
-    MUS_LOG2( "CMccScreen::ConstructL, window pos %d %d", iPosition.iX, iPosition.iY )
-	MUS_LOG2( "CMccScreen::ConstructL, window size %d %d", iArea.iWidth, iArea.iHeight )
-
-    iRw->SetPosition( iPosition );
-	iRw->SetBackgroundColor( KRgbBlack );
-    iRw->SetSize( iArea );    
-    iRw->SetOrdinalPosition( iWindowOrdinalPosition );
-    iRw->Activate();
-    iRwSession.Flush();
-	
-	// Create direct screen access                                	
-	iDirectScreenAccess = CDirectScreenAccess::NewL( iRwSession, *iDev, *iRw, *this );   
-	
-	UpdateViewFinderArea( aViewFinderImageSize );
-	
-	MUS_LOG2( "CMccScreen::ConstructL, viewfinder pos %d %d", 
-	                   iViewFinderImageRect.iTl.iX, iViewFinderImageRect.iTl.iY )
-	MUS_LOG2( "CMccScreen::ConstructL, viewfinder size %d %d", 
-	                   iViewFinderImageRect.Width(), iViewFinderImageRect.Height() )
-	
-	MUS_LOG( "CMccScreen::ConstructL, exit" )
-	}
-    
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::StartL()
-	{
-	MUS_LOG( "CMccScreen::StartL" )	
-	
-	iAborted = EFalse;
-	
-	iDirectScreenAccess->StartL();
-	iGc = iDirectScreenAccess->Gc();	
-	iFbsDev = iDirectScreenAccess->ScreenDevice();
-	iRegion = iDirectScreenAccess->DrawingRegion();		
-
-#ifdef __MCC_CONTROLLER	
-	if ( iRegion && !iRegion->IsEmpty() )
-	    {
-        for ( TInt i = 0; i < iRegion->Count(); i++ )
-            {
-            const TRect& regionRect = (*iRegion)[ i ];
-            MUS_LOG_INT2( "CMccScreen::StartL, rect tl", regionRect.iTl.iX, regionRect.iTl.iY )
-            MUS_LOG_INT2( "CMccScreen::StartL, rect br", regionRect.iBr.iX, regionRect.iBr.iY )
-            }
-	    }
-#endif	        
-
-    iGc->SetClippingRegion( iRegion );
-    
-    // Fill with black areas which are not covered by viewfinder image.
-    // If viewfinder image has not been yet received and drawn, fill whole area.
-    //
-    iGc->SetBrushColor( KRgbBlack );
-    iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
-    
-    if ( !iFirstImageDrawn )
-        {
-        // Whole area
-        TPoint pointTl( 0, 0 );
-        TRect rect( pointTl, iArea );
-        iGc->DrawRect( rect );
-        }
-    else
-        {
-        // Upper area
-        TPoint pointTl( 0, 0 );
-        TPoint pointBr( iArea.iWidth, iViewFinderImageRect.iTl.iY );
-        TRect rect( pointTl, pointBr );
-        iGc->DrawRect( rect );
-
-        // Lower area
-        pointTl.SetXY( 0, iViewFinderImageRect.iBr.iY );
-        pointBr.SetXY( iArea.iWidth, iArea.iHeight );
-        rect.SetRect( pointTl, pointBr );
-        iGc->DrawRect( rect );
-        
-        // Left area
-        pointTl.SetXY( 0, iViewFinderImageRect.iTl.iY );
-        pointBr.SetXY( iViewFinderImageRect.iTl.iX, iViewFinderImageRect.iBr.iY );
-        rect.SetRect( pointTl, pointBr );
-        iGc->DrawRect( rect );
-        
-        // Right area
-        pointTl.SetXY( iViewFinderImageRect.iBr.iX, iViewFinderImageRect.iTl.iY );
-        pointBr.SetXY( iArea.iWidth, iViewFinderImageRect.iBr.iY );
-        rect.SetRect( pointTl, pointBr );
-        iGc->DrawRect( rect );
-        }
-        
-    if ( iAttachedFrame )
-        {
-        MUS_LOG( "CMccScreen::StartL, draw attached frame" )
-        
-        TSize viewFinderImageSize = iAttachedFrame->SizeInPixels();
-    	
-    	TPoint corner = UpdateViewFinderArea( viewFinderImageSize );
-        
-        iGc->BitBlt( corner, iAttachedFrame );
-        }
-        
-    DoScreenDeviceUpdate();
-    
-    iGc->SetBrushStyle( CGraphicsContext::ENullBrush );
-        		
-	MUS_LOG( "CMccScreen::StartL, exit" )
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::Stop()
-	{
-	MUS_LOG( "CMccScreen::Stop" )
-	iDirectScreenAccess->Cancel();
-	MUS_LOG( "CMccScreen::Stop, exit" )	
-	}
-	
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::Restart( RDirectScreenAccess::TTerminationReasons /*aReason*/ )
-	{
-	MUS_LOG( "CMccScreen::Restart" )	
-	
-	TRAP_IGNORE( StartL() );
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::AbortNow( RDirectScreenAccess::TTerminationReasons /*aReason*/ )
-	{
-	MUS_LOG( "CMccScreen::AbortNow" )	
-	iDirectScreenAccess->Cancel();
-	
-	iAborted = ETrue;
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreen::CMccScreen
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::Draw( CFbsBitmap& aFrame )
-	{
-	// When frame draw is requested, attached frame is not anymore drawn
-	DetachFrame();
-	
-	DoDraw( aFrame );
-	}
-
-// -----------------------------------------------------------------------------
-// CMccScreen::AttachFrameL
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::AttachFrameL( CFbsBitmap* aFrame )
-    {
-    MUS_LOG( "CMccScreen::AttachFrameL" )	
-    
-    __ASSERT_ALWAYS( aFrame, User::Leave( KErrArgument ) );
-    
-    DetachFrame();
-    
-    iAttachedFrame = aFrame;
-    
-    DoDraw( *iAttachedFrame );
-
-    MUS_LOG( "CMccScreen::AttachFrameL, exit" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::DetachFrame
-// -----------------------------------------------------------------------------
-//		
-void CMccScreen::DetachFrame()
-    {	
-    if ( iAttachedFrame )
-        {
-        MUS_LOG( "CMccScreen::DetachFrame, detaching" )
-        iAttachedFrame->Reset();
-        delete iAttachedFrame;
-        }
-        
-    iAttachedFrame = NULL;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMccScreen::UpdateViewFinderArea
-// -----------------------------------------------------------------------------
-//
-TPoint CMccScreen::UpdateViewFinderArea( TSize aViewFinderImageSize )
-    {
-    TPoint corner( 0, 0 );
-	if ( aViewFinderImageSize.iWidth < iArea.iWidth )
-	    {
-	    // Divide the subtraction by two (i.e. do centering)
-	    corner.iX = ( iArea.iWidth - aViewFinderImageSize.iWidth ) >> 1;
-	    }
-	    
-    if ( aViewFinderImageSize.iHeight < iArea.iHeight )
-	    {
-	    // Divide the subtraction by two (i.e. do centering)
-	    corner.iY = ( iArea.iHeight - aViewFinderImageSize.iHeight ) >> 1;
-	    }
-	    
-	iViewFinderImageRect = TRect( corner, aViewFinderImageSize );
-	
-	return corner;
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::DoDraw
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::DoDraw( CFbsBitmap& aFrame )
-    {	
-    if ( !iAborted && iGc )
-        {
-        iFirstImageDrawn = ETrue;
-        	
-       	TSize viewFinderImageSize = aFrame.SizeInPixels();
-      
-    	TPoint corner = UpdateViewFinderArea( viewFinderImageSize );
-
-        iGc->BitBlt( corner, &aFrame );
-        
-        DoScreenDeviceUpdate();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMccScreen::DoScreenDeviceUpdate
-// -----------------------------------------------------------------------------
-//
-void CMccScreen::DoScreenDeviceUpdate()
-    {
-    if ( iFbsDev )
-        {
-        iFbsDev->Update();
-        }
-    }
-    
-// End of file
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceamrcodec.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mceamrcodec.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::~CMceAmrCodec
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceAmrCodec::~CMceAmrCodec()
-    {
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::CloneL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceAudioCodec* CMceAmrCodec::CloneL() const
-    {
-    CMceAmrCodec* clone = CMceAmrCodec::NewLC( iSdpName );
-    
-    if ( iFmtpAttr )
-	    {
-        clone->iFmtpAttr = iFmtpAttr->AllocL();
-        }
-    clone->iEnableVAD = iEnableVAD;
-	clone->iSamplingFreq = iSamplingFreq;
-	clone->iPTime = iPTime;
-	clone->iMaxPTime = iMaxPTime;
-	clone->iBitrate = iBitrate;
-	clone->iAllowedBitrates = iAllowedBitrates;
-	clone->iPayloadType = iPayloadType;
-	clone->iCodecMode = iCodecMode;
-	clone->iFourCC = iFourCC;
-	clone->iFrameSize = iFrameSize;
-	
-	CleanupStack::Pop( clone );
-	
-	return clone;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::EnableVAD
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAmrCodec::EnableVAD( TBool aEnableVAD )
-    {
-    iEnableVAD = aEnableVAD;
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::SetBitrate
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAmrCodec::SetBitrate(TUint aBitrate)
-    {
-    iBitrate = aBitrate;
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::SetAllowedBitrates
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAmrCodec::SetAllowedBitrates(TUint aBitrates)
-    {
-    iAllowedBitrates = aBitrates;
-    return KErrNone;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::SetSamplingFreq
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAmrCodec::SetSamplingFreq(TUint aSamplingFreq)
-    {
-    iSamplingFreq = aSamplingFreq;
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::SetPTime
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAmrCodec::SetPTime(TUint aPTime)
-    {
-    iPTime = aPTime;
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::SetMaxPTime
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAmrCodec::SetMaxPTime(TUint aMaxPTime)
-    {
-    iMaxPTime = aMaxPTime;
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::SetPayloadType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAmrCodec::SetPayloadType(TUint8 aPayloadType)
-    {
-    iPayloadType = aPayloadType;
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::SetCodecMode
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAmrCodec::SetCodecMode(TUint aCodecMode)
-    {
-    iCodecMode = aCodecMode;
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::NewL
-// -----------------------------------------------------------------------------
-//
-CMceAmrCodec* CMceAmrCodec::NewL( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    CMceAmrCodec* self = NewLC( aSdpName );
-    CleanupStack::Pop( self );
-    return self;
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::NewL
-// -----------------------------------------------------------------------------
-//
-CMceAmrCodec* CMceAmrCodec::NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    CMceAmrCodec* self = new (ELeave) CMceAmrCodec();
-    CleanupStack::PushL( self );
-    self->ConstructL( aSdpName );
-    return self;
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::CMceAmrCodec
-// -----------------------------------------------------------------------------
-//
-CMceAmrCodec::CMceAmrCodec()
- : CMceAudioCodec()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceAmrCodec::ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    iSdpName = aSdpName;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAmrCodec::SetSdpNameL
-// -----------------------------------------------------------------------------
-//
-void CMceAmrCodec::SetSdpNameL( const TDesC8& aSdpName )
-    {
-    __ASSERT_ALWAYS( aSdpName.Length() <= KMceMaxSdpNameLength, 
-                     User::Leave( KErrArgument ) );
-    iSdpName.Copy( aSdpName );
-    }
-    
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceaudiocodec.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mceaudiocodec.h"
-#include "mcesession.h"
-#include "mcemanager.h"
-#include "mcemediastream.h"
-
-
-#define _FLAT_DATA static_cast<CMceComAudioCodec*>( iFlatData )
-#define FLAT_DATA( data ) _FLAT_DATA->data
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceAudioCodec::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceAudioCodec::InitializeL( CMceMediaStream& aParent )
-    {
-    CMceCodec::InitializeL( aParent );
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioCodec::~CMceAudioCodec
-// -----------------------------------------------------------------------------
-//
-CMceAudioCodec::~CMceAudioCodec()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioCodec::SamplingFreq
-// -----------------------------------------------------------------------------
-//
-TUint CMceAudioCodec::SamplingFreq() const
-    {
-    return iSamplingFreq;
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioCodec::VAD
-// -----------------------------------------------------------------------------
-//
-TBool CMceAudioCodec::VAD() const
-    {
-    return iEnableVAD;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioCodec::PTime
-// -----------------------------------------------------------------------------
-//
-TUint CMceAudioCodec::PTime() const        
-    {
-    return iPTime;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioCodec::MaxPTime
-// -----------------------------------------------------------------------------
-//
-TUint CMceAudioCodec::MaxPTime() const        
-    {
-    return iMaxPTime;
-    }
-            
-// -----------------------------------------------------------------------------
-// CMceAudioCodec::CMceAudioCodec
-// -----------------------------------------------------------------------------
-//
-CMceAudioCodec::CMceAudioCodec() :
-    CMceCodec()
-    {
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceaudiostream.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mceaudiostream.h"
-#include "mcemanager.h"
-#include "mceaudiocodec.h"
-#include "mcesession.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceAudioStream* CMceAudioStream::NewL()
-    {
-    CMceAudioStream* self = NewLC();
-    CleanupStack::Pop( self );
-    return self; 
-    }
-   
-// -----------------------------------------------------------------------------
-// CMceAudioStream::NewLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceAudioStream* CMceAudioStream::NewLC()
-    {
-    CMceAudioStream* self = new (ELeave) CMceAudioStream();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::~CMceAudioStream
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceAudioStream::~CMceAudioStream()
-    {
-    iCodecs.ResetAndDestroy();
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::Codecs
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<CMceAudioCodec>& CMceAudioStream::Codecs()
-    {
-    return iCodecs;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::AddCodecL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceAudioStream::AddCodecL(CMceAudioCodec* aCodec)
-    {
-    __ASSERT_ALWAYS(aCodec, User::Leave(KErrArgument));
-    iCodecs.AppendL(aCodec);
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::RemoveCodecL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceAudioStream::RemoveCodecL(CMceAudioCodec& aCodec)
-    {
-    for(int i = 0; i < iCodecs.Count(); i++ )
-        {
-        if( iCodecs[i] == &aCodec )
-            {
-            delete iCodecs[i];
-            iCodecs.Remove( i );
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::CMceAudioStream
-// -----------------------------------------------------------------------------
-//
-CMceAudioStream::CMceAudioStream()
-    :CMceMediaStream()
-    {
-    iType = KMceAudio;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceAudioStream::ConstructL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceAudioStream::InitializeL( CMceSession& aParent )
-    {
-    
-    CMceMediaStream::InitializeL( aParent );
-
-    InitializeL( &aParent.Manager() );
-            
-    for( TInt i = 0; i < iCodecs.Count(); i++ )
-        {
-        iCodecs[i]->InitializeL( *this );
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAudioStream::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceAudioStream::InitializeL( CMceManager* aManager )
-    {
-    CMceMediaStream::InitializeL( aManager );
-    if ( aManager && iCodecs.Count() == 0 )
-        {
-        const RPointerArray<const CMceAudioCodec> supportedCodes = 
-                                      aManager->SupportedAudioCodecs();
-        for( TInt i = 0; i < supportedCodes.Count(); i++ )
-            {
-            CMceAudioCodec* codec = supportedCodes[i]->CloneL();
-            CleanupStack::PushL( codec );
-            iCodecs.AppendL( codec );
-            CleanupStack::Pop( codec );
-            }
-                                      
-        }
-        
-    }
-
-
-
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceavccodec.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,286 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mceavccodec.h"
-
-// Stub constants
-const TReal KMceAvcDefaultFrameRate = 15;
-const TInt  KMceAvcDefaultFrameSize = 10000;
-const TInt  KMceAvcDefaultAllowedBitrate = KMceAvcCodecProfileIdBaseline | 
-	                                       KMceAvcCodecProfileIopConstraintSet | 
-	                                       KMceAvcBitrateLevel1;
-const TInt KMceAvcLevel1BitrateBps = 64000;
-
-const TUint KMceAvcDefaultFrameHeight = 176;
-const TUint KMceAvcDefaultFrameWidth = 144;
-
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::~CMceAvcCodec
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceAvcCodec::~CMceAvcCodec()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceAvcCodec* CMceAvcCodec::NewL( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    CMceAvcCodec* self = NewLC( aSdpName );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceAvcCodec* CMceAvcCodec::NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    CMceAvcCodec* self = new (ELeave) CMceAvcCodec();
-    CleanupStack::PushL( self );
-    self->ConstructL( aSdpName );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::SetBitrate
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAvcCodec::SetBitrate( TUint aBitrate )
-    {
-    iBitrate = aBitrate;
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::SetAllowedBitrates
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAvcCodec::SetAllowedBitrates(TUint aBitrates)
-    {
-    iAllowedBitrates = aBitrates;
-    
-    delete iConfigKey;
-    iConfigKey = NULL; 
-    
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::SetCodecMode
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAvcCodec::SetCodecMode( TUint aCodecMode )
-    {
-    if ( aCodecMode == KMceAvcModeSingleNal )
-        {
-        iCodecMode = KMceAvcModeSingleNal;
-        return KErrNone;
-        }
-    return KErrNotSupported;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::SetPayloadType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceAvcCodec::SetPayloadType(TUint8 aPayloadType)
-    {
-    iPayloadType = aPayloadType;
-    return KErrNone;
-    }        
-
-    
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::CloneL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceVideoCodec* CMceAvcCodec::CloneL() const
-    {
-    CMceAvcCodec* clone = CMceAvcCodec::NewLC( iSdpName );
-            
-    if ( iFmtpAttr )
-	    {
-        clone->iFmtpAttr = iFmtpAttr->AllocL();
-        }
-    clone->iPayloadType = iPayloadType;
-    
-	clone->iBitrate = iBitrate;
-	clone->iAllowedBitrates = iAllowedBitrates;
-    clone->iCodecMode = iCodecMode;
-	clone->iFourCC = iFourCC;
-	clone->iFrameSize = iFrameSize;
-	
-	clone->iFrameRate = iFrameRate;
-	clone->iMaxBitRate = iMaxBitRate;	
-	clone->iAllowedResolutions = iAllowedResolutions;	
-	clone->iResolutionWidth = iResolutionWidth;	
-	clone->iResolutionHeight = iResolutionHeight;	
-	clone->iAllowedFrameRates = iAllowedFrameRates;	
-	clone->iClockRate = iClockRate;
-	
-	clone->iPacketizationMode = iPacketizationMode;
-	clone->iAllowedPacketizationModes = iAllowedPacketizationModes;
-	
-	CleanupStack::Pop( clone );
-    return clone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceAvcCodec::SetMaxBitrateL( TUint aMaxBitrate )
-    {
-    delete HBufC::NewL( 1 ); // To cause leave in simulation
-    iMaxBitRate = aMaxBitrate;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceAvcCodec::SetAllowedResolutionsL( TUint aResolutions )
-    {
-    delete HBufC::NewL( 1 ); // To cause leave in simulation
-    iAllowedResolutions = aResolutions;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceAvcCodec::SetResolutionL( TSize aResolution )
-    {
-    delete HBufC::NewL( 1 ); // To cause leave in simulation
-    iResolutionWidth = aResolution.iWidth;
-    iResolutionHeight = aResolution.iHeight;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceAvcCodec::SetAllowedFrameRatesL( TUint aFrameRates )
-    {
-    delete HBufC::NewL( 1 ); // To cause leave in simulation
-    iAllowedFrameRates = aFrameRates;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceAvcCodec::SetFrameRateL( TReal aFrameRate )
-    {
-    delete HBufC::NewL( 1 ); // To cause leave in simulation
-    iFrameRate = aFrameRate;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::SetPreferredEncodingDecodingDeviceL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceAvcCodec::SetPreferredEncodingDecodingDeviceL( 
-    TUid aEncodingDecodingDevice )
-    {
-    delete HBufC::NewL( 1 ); // To cause leave in simulation
-    iEncodingDecodingDevice = aEncodingDecodingDevice;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::SetEncodingKeyL
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C void CMceAvcCodec::SetConfigKeyL( const TDesC8& aConfigKey )
-    {
-    HBufC8* configKey = aConfigKey.AllocL();
-    delete iConfigKey;
-    iConfigKey = configKey;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::SetSdpNameL
-// -----------------------------------------------------------------------------
-//
-void CMceAvcCodec::SetSdpNameL( const TDesC8& aSdpName )
-    {
-    __ASSERT_ALWAYS( aSdpName.Length() <= KMceMaxSdpNameLength, 
-                     User::Leave( KErrArgument ) );
-    delete HBufC::NewL( 1 ); // To cause leave in simulation
-    iSdpName.Copy( aSdpName );
-    }
-        
-        
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::CMceAvcCodec
-// -----------------------------------------------------------------------------
-//
-CMceAvcCodec::CMceAvcCodec()
-    :CMceVideoCodec()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceAvcCodec::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceAvcCodec::ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    iSdpName = aSdpName;
-    iCodecMode = KMceAvcModeSingleNal;
-    iClockRate = KMceAvcDefaultFrameRate;
-    iFrameRate = KMceAvcDefaultFrameRate;
-    iResolutionWidth = KMceAvcDefaultFrameWidth;
-    iResolutionHeight = KMceAvcDefaultFrameHeight;
-    iBitrate = KMceAvcLevel1BitrateBps;
-	iMaxBitRate = KMceAvcLevel1BitrateBps;
-	iAllowedBitrates = KMceAvcDefaultAllowedBitrate;
-    iFrameSize = KMceAvcDefaultFrameSize;
-    // Defaults should be defined in MCE API
-    const TUint8 KMceDefaultAvcPayloadType = 98;
-	iPayloadType = KMceDefaultAvcPayloadType;
-	
-    }
-
-
-
-    
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcecamerasource.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcecamerasource.h"
-#include "mcesession.h"
-#include "mcemediastream.h"
-#include "mcemanager.h"
-
-
-const TInt KMinDigitalZoom = 0;
-const TInt KMinContrast = -100;
-const TInt KMaxContrast = 100;
-const TInt KMinBrightness = -100;
-const TInt KMaxBrightness = 100; 
-
-
-const TInt KInitialCameraIndex = 0;
-const TInt KInitialZoomFactor = 1;
-const TInt KInitialDigitalZoomFactor = 1;
-const TInt KInitialContrast = 0;
-const TInt KInitialBrightness = 0;
-const TInt KInitialExposure = CCamera::EExposureAuto;
-const TInt KInitialWhiteBalance = CCamera::EWBAuto;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceCameraSource* CMceCameraSource::NewL( CMceManager& aManager )
-    {
-    CMceCameraSource* self = CMceCameraSource::NewLC( aManager );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceCameraSource* CMceCameraSource::NewLC( CMceManager& /*aManager*/ )
-    {
-    CMceCameraSource* self = new( ELeave )CMceCameraSource();
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceCameraSource* CMceCameraSource::NewL()
-    {
-    CMceCameraSource* self = CMceCameraSource::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceCameraSource* CMceCameraSource::NewLC()
-    {
-    CMceCameraSource* self = new( ELeave )CMceCameraSource();
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceCameraSource::~CMceCameraSource()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCameraSource::EnableL()
-    {
-    CMceMediaSource::DoEnableL();
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCameraSource::DisableL()
-    { 
-    CMceMediaSource::DoDisableL();
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	    
-EXPORT_C TInt CMceCameraSource::CamerasAvailable() const
-    {
-    return iCameraCount;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCameraSource::SetCameraIndexL( TInt aCameraIndex )	  
-    {
-    __ASSERT_ALWAYS( aCameraIndex >= 0 &&
-                     aCameraIndex < this->CamerasAvailable(),
-                     User::Leave( KErrArgument ) );
-                     
-   
-    iCameraIndex = aCameraIndex;         
-    
-    }          
-     
-       
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	     
-EXPORT_C void CMceCameraSource::GetCameraInfo( TCameraInfo& aInfo ) const
-    {
-    aInfo = iCameraInfo;
-    
-    aInfo.iMaxZoom += iCameraIndex*5;
-    aInfo.iMaxDigitalZoom += iCameraIndex*5;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C void CMceCameraSource::SetZoomFactorL( TInt aZoomFactor )
-    {
-    __ASSERT_ALWAYS( aZoomFactor >= iCameraInfo.iMinZoom &&
-                     aZoomFactor <= iCameraInfo.iMaxZoom, 
-                     User::Leave( KErrArgument ) );
-    
-    iZoomFactor = aZoomFactor;    
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CMceCameraSource::ZoomFactorL()
-    {
-    return iZoomFactor; 
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C void CMceCameraSource::SetDigitalZoomFactorL( TInt aDigitalZoomFactor )
-    {
-    __ASSERT_ALWAYS( aDigitalZoomFactor >= KMinDigitalZoom &&
-                     aDigitalZoomFactor <= iCameraInfo.iMaxDigitalZoom, 
-                     User::Leave( KErrArgument ) );
-    
-    iDigitalZoomFactor = aDigitalZoomFactor;
-        
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CMceCameraSource::DigitalZoomFactorL()
-    {
-    return iDigitalZoomFactor;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C void CMceCameraSource::SetContrastL( TInt aContrast )
-    {
-    
-    __ASSERT_ALWAYS( ( iCameraInfo.iOptionsSupported & 
-                       TCameraInfo::EContrastSupported ) ==
-                     TCameraInfo::EContrastSupported,
-                     User::Leave( KErrNotSupported ) );
-                    
-    __ASSERT_ALWAYS( (( aContrast >= KMinContrast &&
-                        aContrast <= KMaxContrast ) ||
-                        aContrast == CCamera::EContrastAuto ),
-                     User::Leave( KErrArgument ) );
-                      
-                                           
-    iContrast = aContrast;
-  
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CMceCameraSource::ContrastL()
-    {
-    return iContrast;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C void CMceCameraSource::SetBrightnessL( TInt aBrightness )
-    {
-    
-    __ASSERT_ALWAYS( ( iCameraInfo.iOptionsSupported & 
-                       TCameraInfo::EBrightnessSupported ) ==
-                     TCameraInfo::EBrightnessSupported,
-                     User::Leave( KErrNotSupported ) );
-                   
-    __ASSERT_ALWAYS( (( aBrightness >= KMinBrightness &&
-                        aBrightness <= KMaxBrightness ) ||
-                        aBrightness == CCamera::EBrightnessAuto ),
-                     User::Leave( KErrArgument ) );
-    
-    iBrightness = aBrightness;
-        
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CMceCameraSource::BrightnessL()
-    {
-    return iBrightness; 
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C void CMceCameraSource::SetExposureL( CCamera::TExposure aExposure )
-    {
-    
-    __ASSERT_ALWAYS( ( iCameraInfo.iExposureModesSupported & aExposure ) ==
-                     aExposure,
-                     User::Leave( KErrNotSupported ) );
-  
-    iExposure = aExposure;
-    
-    }
-        
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C CCamera::TExposure CMceCameraSource::ExposureL()
-    {
-    
-    
-    return static_cast<CCamera::TExposure>( iExposure );
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C void CMceCameraSource::SetWhiteBalanceL( 
-                                    CCamera::TWhiteBalance aWhiteBalance )
-    {
-    __ASSERT_ALWAYS( 
-        ( iCameraInfo.iWhiteBalanceModesSupported & aWhiteBalance ) == 
-        aWhiteBalance,
-        User::Leave( KErrNotSupported ) );
-   
-    iWhiteBalance = aWhiteBalance;   
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C CCamera::TWhiteBalance CMceCameraSource::WhiteBalanceL()
-    {
-    
-    return static_cast<CCamera::TWhiteBalance>( iWhiteBalance );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMceCameraSource::InitializeL( CMceManager* /*aManager*/ )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CMceCameraSource::CMceCameraSource()
-    :CMceMediaSource(),
-    iCameraIndex( 0 ),
-    iZoomFactor( 1 ),
-    iDigitalZoomFactor( 0 ),
-    iContrast( 0 ),
-    iBrightness( 0 ),
-    iExposure( CCamera::EExposureAuto ),
-    iWhiteBalance( CCamera::EWBAuto ),
-    iCameraCount ( 2 )
-    {
-    iType = KMceCameraSource;
-    iCameraInfo.iMinZoom = 1;
-    iCameraInfo.iMaxZoom = 3;
-    iCameraInfo.iMaxDigitalZoom = 10;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcecodec.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcecodec.h"
-#include "mcesession.h"
-#include "mcemanager.h"
-#include "mcemediastream.h"
-#include "mcestreamobserver.h"
-#include "mcedefs.h"
-
-
-
-#define _FLAT_DATA static_cast<CMceComCodec*>( iFlatData )
-#define FLAT_DATA( data ) _FLAT_DATA->data
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMceCodec::~CMceCodec
-// -----------------------------------------------------------------------------
-//
-CMceCodec::~CMceCodec()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CMceCodec::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceCodec::InitializeL( CMceMediaStream& aParent )
-    {    
-    iStream = &aParent;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceCodec::SetStateL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCodec::SetStateL( CMceCodec::TState /*aState*/ )
-    {
-    // NOT SUPPORTED YET
-    User::Leave( KErrNotSupported );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceCodec::SetStandByTimerL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCodec::SetStandByTimerL( TUint32 /*aTimerValue*/ )
-    {
-    // NOT SUPPORTED YET
-    User::Leave( KErrNotSupported );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceCodec::SetMMFPriorityL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCodec::SetMMFPriorityL( TInt aPriority )
-    {
-    iMMFPriority = aPriority;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceCodec::SetMMFPriorityPreferenceL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCodec::SetMMFPriorityPreferenceL( TInt aPriorityPreference )
-    {
-    iMMFPriorityPreference = aPriorityPreference;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCodec::SetKeepAliveTimerL( TUint8 aTimerValue )
-    {
-    iKeepAliveTimer = aTimerValue;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCodec::SetKeepAlivePayloadTypeL( TUint8 aKeepAlivePT )
-    {
-    iKeepAlivePayloadType = aKeepAlivePT;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCodec::SetKeepAliveDataL( const TDesC8& aData )
-    {
-    iKeepAliveData = aData;
-    }
-        
-
-// -----------------------------------------------------------------------------
-// CMceCodec::State
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceCodec::TState CMceCodec::State() const
-    {
-    return CMceCodec::EDisabled;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceCodec::Id
-// -----------------------------------------------------------------------------
-//
-/*
-EXPORT_C TMceMediaId CMceCodec::Id() const
-    {
-    return;
-    }
-*/  
-
-// -----------------------------------------------------------------------------
-// CMceCodec::Type
-// -----------------------------------------------------------------------------
-//   
-EXPORT_C TMceCodecType CMceCodec::Type() const
-    {
-    return iType;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceCodec::FourCC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CMceCodec::FourCC() const
-    {
-    return iFourCC;
-    }
-       
-// -----------------------------------------------------------------------------
-// CMceCodec::Bitrate
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint CMceCodec::Bitrate() const
-    {
-    return iBitrate;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceAudioCodec::AllowedBitrates
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint CMceCodec::AllowedBitrates() const
-    {
-    return iAllowedBitrates;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceCodec::FrameSize
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint CMceCodec::FrameSize() const
-    {
-    return iFrameSize;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceCodec::CodecMode
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint CMceCodec::CodecMode() const
-    {
-    return iCodecMode;
-    }    
-
-// -----------------------------------------------------------------------------
-// CMceCodec::PayloadType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint8 CMceCodec::PayloadType() const
-    {
-    return iPayloadType;
-    }
-
-    
-// -----------------------------------------------------------------------------
-// CMceCodec::SdpName
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TDesC8& CMceCodec::SdpName() const
-    {
-    return iSdpName;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CMceCodec::MMFPriority() const
-    {
-    return iMMFPriority;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CMceCodec::MMFPriorityPreference() const
-    {
-    return iMMFPriorityPreference;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint8 CMceCodec::KeepAliveTimer() const
-    {
-    return iKeepAliveTimer;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint8 CMceCodec::KeepAlivePayloadType() const
-    {
-    return iKeepAlivePayloadType;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TDesC8& CMceCodec::KeepAliveData() const
-    {
-    return iKeepAliveData;
-    }
-        
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceCodec::Preference() const
-    {
-    return iPreference;
-    }
-	
-	    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceCodec::SetPreferenceL( TInt aPreference )
-    {
-    iPreference = aPreference;
-    }
-               
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMceCodec::SetSdpNameL( const TDesC8& aSdpName )
-    {
-    iSdpName = aSdpName;
-    }
-    
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CMceCodec::CMceCodec()
-    {
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcedisplaysink.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,246 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcedisplaysink.h"
-#include "mcesession.h"
-#include "mcemediastream.h"
-#include "mcemanager.h"
-#include "mccscreen.h"
-#include "muslogger.h"
-
-#include <e32std.h>
-#include <e32cmn.h>
-
-
-#define _FLAT_DATA static_cast<CMceComDisplaySink*>( iFlatData )
-#define FLAT_DATA( data ) _FLAT_DATA->data
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceDisplaySink* CMceDisplaySink::NewL( CMceManager& aManager )
-    {
-    CMceDisplaySink* self = CMceDisplaySink::NewLC( aManager );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceDisplaySink* CMceDisplaySink::NewLC( CMceManager& /*aManager*/ )
-    {
-    CMceDisplaySink* self = new (ELeave) CMceDisplaySink();
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceDisplaySink* CMceDisplaySink::NewL()
-    {
-    CMceDisplaySink* self = CMceDisplaySink::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceDisplaySink* CMceDisplaySink::NewLC()
-    {
-    CMceDisplaySink* self = new( ELeave )CMceDisplaySink();
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceDisplaySink::~CMceDisplaySink()
-    {
-    delete iScreen;
-    iScreen = 0;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceDisplaySink::EnableL()
-    {
-    MUS_LOG("CMceDisplaySink::EnableL ->")
-    CMceMediaSink::DoEnableL();   
-    if ( !iScreen )
-        {
-        TPoint pos (0,0);
-        TSize area = iDisplayRect.Size();
-        TInt index = iDisplayIndex; 
-        TInt windowOrdinalPosition = 2;
-        TInt windowOrdinalPriority = 1;
-        TSize viewFinderImageSize = iDisplayRect.Size();
-        MUS_LOG2("CMceDisplaySink::EnableL display rect height=%d width=%d )",area.iHeight,area.iWidth)        
-        iScreen =  CMccScreen::NewL( pos,area,index,windowOrdinalPosition,windowOrdinalPriority,viewFinderImageSize);
-        }
-    
-    iScreen->StartL();
-    MUS_LOG("CMceDisplaySink::EnableL <-")
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceDisplaySink::DisableL()
-    {
-    MUS_LOG("CMceDisplaySink::DisableL ->")
-    CMceMediaSink::DoDisableL();
-    if( iScreen ) iScreen->Stop();
-    MUS_LOG("CMceDisplaySink::DisableL <-")
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceDisplaySink::DisplaysAvailable() const
-    {
-    return 1;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceDisplaySink::SetDisplayIndexL( TInt aDisplayIndex )
-    {
-    __ASSERT_ALWAYS( aDisplayIndex >= 0 &&
-                     aDisplayIndex < this->DisplaysAvailable(),
-                     User::Leave( KErrArgument ) );
-                     
-    iDisplayIndex = aDisplayIndex;
-         
-    }   
-	    
-	    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//    
-EXPORT_C void CMceDisplaySink::SetDisplay( RWindow& /*aWindow*/, 
-                                           CWindowGc& /*aGc*/ )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceDisplaySink::SetDisplayRectL( const TRect& aRect )
-    {
-    iDisplayRect = aRect;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TRect CMceDisplaySink::DisplayRectL()
-    {
-    return iDisplayRect;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceDisplaySink::SetPriorityL( TUint aPriority )
-    {
-    iDisplayPriority = aPriority; 
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint CMceDisplaySink::PriorityL()
-    {
-    return iDisplayPriority; 
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceDisplaySink::SetRotationL( TRotation aRotation )
-    {
-    iRotation = aRotation;
-    }
-		
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C CMceDisplaySink::TRotation CMceDisplaySink::RotationL()
-    {
-    return iRotation;
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMceDisplaySink::InitializeL( CMceManager* /*aManager*/ )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink::CMceDisplaySink()
-    :CMceMediaSink(),
-    iDisplayIndex( 0 ),
-    iDisplayRect( TRect( 0, 0, 0, 0 ) ),
-    iDisplayPriority( 0 ),
-    iRotation( ENone )
-    {
-    iType = KMceDisplaySink;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcefilesink.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-#include "mcefilesink.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceFileSink* CMceFileSink::NewL(
-            const TFileName& aFileName )
-    {
-    CMceFileSink* self = CMceFileSink::NewLC( aFileName );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceFileSink* CMceFileSink::NewLC(
-            const TFileName& aFileName )
-    {
-    CMceFileSink* self = new (ELeave) CMceFileSink();
-    CleanupStack::PushL( self );
-    self->ConstructL( aFileName );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceFileSink::~CMceFileSink()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceFileSink::EnableL()
-    {
-    CMceMediaSink::DoEnableL();
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceFileSink::DisableL()
-    { 
-    CMceMediaSink::DoDisableL();
-    }
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//  
-CMceFileSink::CMceFileSink()
-    {    
-    iType = KMceFileSink;    
-    }
-    
- 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//  
-void CMceFileSink::ConstructL( const TFileName& aFileName )
-    { 
-    iFileName = aFileName;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcefilesource.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,387 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-#include "mcefilesource.h"
-#include "mcevideostream.h"
-#include "mceaudiostream.h"
-#include "mcemanager.h"
-#include "mcesession.h"
-#include "utf.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceFileSource* CMceFileSource::NewL(
-            CMceManager& aManager,
-            const TFileName& aFileName )
-    {
-    CMceFileSource* self = CMceFileSource::NewLC( aManager, aFileName );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceFileSource* CMceFileSource::NewLC(
-            CMceManager& aManager,
-            const TFileName& aFileName )
-    {
-    CMceFileSource* self = new (ELeave) CMceFileSource();
-    CleanupStack::PushL( self );
-    self->ConstructL( &aManager, aFileName );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceFileSource::~CMceFileSource()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceFileSource::EnableL()
-    {
-    CMceMediaSource::DoEnableL();
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceFileSource::DisableL()
-    { 
-    CMceMediaSource::DoDisableL();
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceFileSource::UpdateL ( const TFileName& aFileName )
-    {
-    iFileName = aFileName;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//    
-EXPORT_C TInt CMceFileSource::MediaElementCountL( TMceMediaType aType ) const
-    {
-    if ( aType == KMceAudio )
-        {
-        return iAudioElementCount;
-        }
-    else if ( aType == KMceVideo )
-        {
-        return iVideoElementCount;
-        }
-    return 0;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//    
-EXPORT_C void CMceFileSource::SetCurrentMediaElementL( 
-            TMceMediaType aType, 
-            TInt aIndex )
-    {
-    __ASSERT_ALWAYS( aIndex >= 0 &&
-                     aIndex < MediaElementCountL( aType ), 
-                     User::Leave( KErrArgument ) );
-                     
-    if ( aType == KMceAudio )
-        {
-        iCurrentAudioElement = aIndex;
-        }
-    else if ( aType == KMceVideo )
-        {
-        iCurrentVideoElement = aIndex;
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C TInt CMceFileSource::CurrentMediaElement( TMceMediaType aType )
-    {
-    if ( aType == KMceAudio )
-        {
-        return iCurrentAudioElement;
-        }
-    else if ( aType == KMceVideo )
-        {
-        return iCurrentVideoElement;
-        }
-    
-    return 0;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C void CMceFileSource::SetPositionL( 
-            const TTimeIntervalMicroSeconds& aPosition )
-    {
-    __ASSERT_ALWAYS( aPosition <= DurationL() &&
-                     aPosition >= TTimeIntervalMicroSeconds( 0 ), 
-                     User::Leave( KErrArgument ) );
-    
-    iPosition = aPosition;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C TTimeIntervalMicroSeconds CMceFileSource::PositionL() const
-    {        
-    return iPosition;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C TTimeIntervalMicroSeconds CMceFileSource::DurationL() const
-    {
-    return iDuration;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C void CMceFileSource::SetFastForwardL( TBool aUseFFWD )
-    {
-    __ASSERT_ALWAYS( this->MediaElementCountL( KMceVideo ) > 0, 
-                     User::Leave( KErrNotSupported ) );
-
-
-    iFastForward = aUseFFWD;
-        
-    
-    if ( iFastForward )
-        {
-        iFastRewind = EFalse;
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C void CMceFileSource::SetFastRewindL( TBool aUseFRWD )
-    {
-    __ASSERT_ALWAYS( this->MediaElementCountL( KMceVideo ) > 0, 
-                     User::Leave( KErrNotSupported ) );
-
-    iFastRewind = aUseFRWD;
-        
-    if ( iFastRewind )
-        {
-        iFastForward = EFalse;
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C void CMceFileSource::TranscodeL( const TFileName& aFileName )
-    {
-    __ASSERT_ALWAYS( aFileName != KNullDesC, User::Leave( KErrArgument ) );
-
-    TBool transcodingNeeded = EFalse;
-    for ( TInt i = 0; i < iStreams.Count(); ++i )
-        {
-        if ( iStreams[i]->State() == CMceMediaStream::ETranscodingRequired )
-            {
-            transcodingNeeded = ETrue;
-            if ( iStreams[i]->Type() == KMceAudio )
-                {
-                CMceAudioStream* audio = 
-                                    static_cast<CMceAudioStream*>(iStreams[i]);
-                __ASSERT_ALWAYS( audio->Codecs().Count() > 0, 
-                                 User::Leave( KErrNotReady ) );
-                }
-            else
-                {
-                CMceVideoStream* video = 
-                                    static_cast<CMceVideoStream*>(iStreams[i]);
-                __ASSERT_ALWAYS( video->Codecs().Count() > 0, 
-                                 User::Leave( KErrNotReady ) );
-                }
-               
-            iStreams[i]->iState = CMceMediaStream::ETranscoding;
-            }
-        }
-    
-    __ASSERT_ALWAYS( transcodingNeeded, User::Leave( KErrNotReady ) );
-        
-    }
-
-   
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C void CMceFileSource::CancelTranscodeL()
-    {
-    TBool transcodingOngoing = EFalse;
-    
-    for ( TInt i = 0; i < iStreams.Count(); ++i )
-        {
-        if ( iStreams[i]->State() == CMceMediaStream::ETranscoding )
-            {
-            transcodingOngoing = ETrue;
-            iStreams[i]->iState = CMceMediaStream::ETranscodingRequired;
-            }
-        }
-    
-    __ASSERT_ALWAYS( transcodingOngoing, User::Leave( KErrNotReady ) );
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C TInt CMceFileSource::TranscodingProgressL() const
-    {
-    TBool transcodingOngoing = EFalse;
-    
-    if ( iFailWithCode != KErrNone )
-        {
-        TInt failCode = iFailWithCode;
-        iFailWithCode = KErrNone;
-        User::Leave( failCode );
-        }
-    
-    for ( TInt i = 0; i < iStreams.Count(); ++i )
-        {
-        if ( iStreams[i]->State() == CMceMediaStream::ETranscoding )
-            {
-            transcodingOngoing = ETrue;
-            }
-        }
-    
-    __ASSERT_ALWAYS( transcodingOngoing, User::Leave( KErrNotReady ) );
-
-    return iTranscodingPercentage; 
-    }
-        
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMceFileSource::InitializeL( CMceManager* aManager )
-    {
-    iDuration = TTimeIntervalMicroSeconds( 100000000 );
-    
-    iAudioElementCount = 1;
-    iVideoElementCount = 1;
-        
-    }
-    
-// -----------------------------------------------------------------------------
-// Factory method for inner usage
-// -----------------------------------------------------------------------------
-//
-CMceFileSource* CMceFileSource::NewL()
-    {
-    CMceFileSource* self = CMceFileSource::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Factory method for inner usage
-// -----------------------------------------------------------------------------
-//
-CMceFileSource* CMceFileSource::NewLC()
-    {
-    CMceFileSource* self = new (ELeave) CMceFileSource();
-    CleanupStack::PushL( self );
-    self->ConstructL( NULL, KNullDesC() );
-    return self;
-    }    
-    
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//  
-CMceFileSource::CMceFileSource()
-    {
-    iType = KMceFileSource;    
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//  
-void CMceFileSource::ConstructL( CMceManager* aManager, 
-                                 const TFileName& aFileName )
-    {
-    
-    iFileName = aFileName;
-    
-    if ( aManager )
-        {        
-        InitializeL( aManager );
-        }
-   
-    }
-
-
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceh263codec.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mceh263codec.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::~CMceH263Codec
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceH263Codec::~CMceH263Codec()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceH263Codec* CMceH263Codec::NewL( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    CMceH263Codec* self = NewLC( aSdpName );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceH263Codec* CMceH263Codec::NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    CMceH263Codec* self = new (ELeave) CMceH263Codec();
-    CleanupStack::PushL( self );
-    self->ConstructL( aSdpName );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::SetBitrate
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceH263Codec::SetBitrate(TUint aBitrate)
-    {
-    iBitrate = aBitrate;
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::SetAllowedBitrates
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceH263Codec::SetAllowedBitrates(TUint aBitrates)
-    {
-    iAllowedBitrates = aBitrates;
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::SetCodecMode
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceH263Codec::SetCodecMode(TUint aCodecMode)
-    {
-    iCodecMode = aCodecMode;
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::SetPayloadType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceH263Codec::SetPayloadType(TUint8 aPayloadType)
-    {
-    iPayloadType = aPayloadType;
-    return KErrNone;
-    }        
-
-    
-// -----------------------------------------------------------------------------
-// CMceH263Codec::CloneL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceVideoCodec* CMceH263Codec::CloneL() const
-    {
-    CMceH263Codec* clone = CMceH263Codec::NewLC( iSdpName );
-   
-	if ( iFmtpAttr )
-	    {
-        clone->iFmtpAttr = iFmtpAttr->AllocL();
-        }
-    clone->iPayloadType = iPayloadType;
-    
-	clone->iBitrate = iBitrate;
-	clone->iAllowedBitrates = iAllowedBitrates;
-    clone->iCodecMode = iCodecMode;
-	clone->iFourCC = iFourCC;
-	clone->iFrameSize = iFrameSize;
-	
-	clone->iFrameRate = iFrameRate;
-	clone->iMaxBitRate = iMaxBitRate;	
-	clone->iAllowedResolutions = iAllowedResolutions;	
-	clone->iResolutionWidth = iResolutionWidth;	
-	clone->iResolutionHeight = iResolutionHeight;	
-	clone->iAllowedFrameRates = iAllowedFrameRates;	
-	clone->iClockRate = iClockRate;	
-	
-	CleanupStack::Pop( clone );
-    return clone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceH263Codec::SetMaxBitrateL( TUint aMaxBitrate )
-    {
-    iMaxBitRate = aMaxBitrate;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceH263Codec::SetAllowedResolutionsL( TUint aResolutions )
-    {
-    iAllowedResolutions = aResolutions;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceH263Codec::SetResolutionL( TSize aResolution )
-    {
-    iResolutionWidth = aResolution.iWidth;
-    iResolutionHeight = aResolution.iHeight;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceH263Codec::SetAllowedFrameRatesL( TUint aFrameRates )
-    {
-    iAllowedFrameRates = aFrameRates;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceH263Codec::SetFrameRateL( TReal aFrameRate )
-    {
-    iFrameRate = aFrameRate;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::SetPreferredEncodingDecodingDeviceL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceH263Codec::SetPreferredEncodingDecodingDeviceL( 
-    TUid /*aEncodingDecodingDevice*/ )
-    {
-    User::Leave( KErrNotSupported );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::SetConfigKeyL
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C void CMceH263Codec::SetConfigKeyL( const TDesC8& /*aConfigKey*/ )
-    {
-    User::Leave( KErrNotSupported );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::SetSdpNameL
-// -----------------------------------------------------------------------------
-//
-void CMceH263Codec::SetSdpNameL( const TDesC8& aSdpName )
-    {
-    __ASSERT_ALWAYS( aSdpName.Length() <= KMceMaxSdpNameLength, 
-                     User::Leave( KErrArgument ) );
-    iSdpName.Copy( aSdpName );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::CMceH263Codec
-// -----------------------------------------------------------------------------
-//
-CMceH263Codec::CMceH263Codec()
-    :CMceVideoCodec()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceH263Codec::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceH263Codec::ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName )
-    {
-    iSdpName = aSdpName;
-    iClockRate = KMceH263ClockRate;
-    iFrameRate = KMceH263FrameRate;
-    iResolutionWidth = KMceH263FrameWidth;
-    iResolutionHeight = KMceH263FrameHeight;
-    }
-
-
-
-    
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceinsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mceinsession.h"
-#include "mcemanager.h"
-
-
-
-// CONSTANTS
-const TUint32 KMceMinAcceptable = 200;
-const TUint32 KMceMaxAcceptable = 299;
-const TUint32 KMceMinError = 300;
-const TUint32 KMceMaxError = 699;
-const TUint32 KMceRinging = 180;
-_LIT8( KMcePhraseRinging, "Ringing" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMceInSession::NewL
-// -----------------------------------------------------------------------------
-//
-CMceInSession* CMceInSession::NewL( RReadStream& /*aReadStream*/,
-            						CMceManager& aManager,
-            						TUint32 aProfileId )
-    {
-    CMceInSession* self = new (ELeave) CMceInSession( &aManager, aProfileId );    
-    CleanupStack::PushL( self );
-    self->ConstructL( KNullDesC8, KNullDesC8 );
-    CleanupStack::Pop(self);
-    return self;
-        
-    }
-
-// -----------------------------------------------------------------------------
-// CMceInSession::NewL
-// -----------------------------------------------------------------------------
-//
-
-EXPORT_C CMceInSession* CMceInSession::NewL()
-    {
-    CMceInSession* self = new (ELeave) CMceInSession( NULL, 0 );
-    CleanupStack::PushL( self );
-    self->ConstructL( KNullDesC8, KNullDesC8 );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceInSession::~CMceInSession
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceInSession::~CMceInSession()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CMceInSession::RingL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceInSession::RingL( CDesC8Array* aHeaders,
-					 		 		HBufC8* aContentType,
-					 		 		HBufC8* aContent )
-    {
-    User::LeaveIfError( 
-        ( aContentType && aContent ) || !( aContentType || aContent ) ? 
-        KErrNone : KErrArgument );
-      
-    delete aHeaders;
-    delete aContentType;
-    delete aContent;
-    
-    iRingingCalled = ETrue;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceInSession::AcceptL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceInSession::AcceptL()
-    {
-    iState = CMceSession::EAnswering;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceInSession::AcceptL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceInSession::AcceptL(  const TDesC8& /*aReason*/,
-        	           			        TUint32 /*aCode*/,
-        	           			        CDesC8Array* aHeaders,
-        					 		    HBufC8* aContentType,
-        					 		    HBufC8* aContent )
-    {
-    iState = CMceSession::EAnswering;
-    
-    delete aHeaders;
-    delete aContentType;
-    delete aContent;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceInSession::RejectL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceInSession::RejectL()
-    {
-    if ( iFailWithCode != KErrNone )
-        {
-        TInt failureCode = iFailWithCode;
-        iFailWithCode = KErrNone;
-        User::Leave( failureCode );
-        }
-        
-    iState = CMceSession::ETerminated;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceInSession::RejectL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceInSession::RejectL( const TDesC8& aReason,
-            		                  TUint32 aCode,
-            		                  CDesC8Array* aHeaders,
-					                  HBufC8* aContentType,
-					                  HBufC8* aContent )
-    {
-    
-    User::LeaveIfError( 
-        ( aContentType && aContent ) || !( aContentType || aContent ) ? 
-        KErrNone : KErrArgument );
-    User::LeaveIfError( aCode >= KMceMinError && aCode <= KMceMaxError ?
-        KErrNone : KErrArgument );
-
-    RejectL();
-
-    iReasonPhrase = aReason;
-    iReasonCode = aCode;
-
-    delete aHeaders;
-    delete aContentType;
-    delete aContent;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceInSession::CMceInSession
-// -----------------------------------------------------------------------------
-//
-CMceInSession::CMceInSession( CMceManager* aManager, TUint32 aProfileId )
-    : CMceSession( aManager, aProfileId )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceInSession::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceInSession::ConstructL( const TDesC8& aOriginator, const TDesC8& aRecipient )
-    {
-    
-    delete iOriginator;
-    iOriginator = 0;
-    iOriginator = aOriginator.AllocL();
-    
-    delete iRecipient;
-    iRecipient = 0;
-    iRecipient = aRecipient.AllocL();
-    
-    CMceSession::ConstructL();
-    
-    iState = EIncoming;
-    }
-
-// -----------------------------------------------------------------------------
-// Stub constructor
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceInSession* CMceInSession::NewL( CMceManager& aManager,
-                                             const TDesC8& aOriginator )
-    {
-    CMceInSession* self = new (ELeave) CMceInSession( &aManager, 0 );
-    CleanupStack::PushL( self );
-    self->ConstructL( aOriginator, KNullDesC8 );
-    CleanupStack::Pop( self );
-    return self;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcemanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcemanager.h"
-#include "mceinsessionobserver.h"
-#include "mcesessionobserver.h"
-#include "mcesession.h"
-#include "mcetransactiondatacontainer.h"
-#include "mceamrcodec.h"
-#include "mceh263codec.h"
-#include "mceavccodec.h"
-// Test simulator
-#include "mussessionsimulator.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceManager* CMceManager::NewL(
-                        const TUid& aAppUid, 
-						TMceTransactionDataContainer* aContainer )
-    {
-    
-    CMceManager* self = 
-        new (ELeave) CMceManager( aAppUid, aContainer );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::~CMceManager
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceManager::~CMceManager()
-    {
-    if (iContainer)
-    	{
-    	iContainer->Clear();
-    	iContainer = 0;
-    	}			
-    
-    iSessions.Reset();
-    iSessions.Close();
-    
-    iSupportedAudioCodecs.ResetAndDestroy();
-    iSupportedVideoCodecs.ResetAndDestroy();
-    
-    delete iSessionSimulator;
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::SetInSessionObserver
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetInSessionObserver( 
-                        MMceInSessionObserver* aInSessionObserver )
-    {
-    iInSessionObserver = aInSessionObserver;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::SetInEventObserver
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetInEventObserver( 
-                        MMceInEventObserver* /*aInEventObserver*/ )
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::SetInReferObserver
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetInReferObserver( 
-                        MMceInReferObserver* /*aInReferObserver*/ )
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::SetSessionObserver
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetSessionObserver( 
-                        MMceSessionObserver* aSessionObserver )
-    {
-    iSessionObserver = aSessionObserver;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::SetEventObserver
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetEventObserver( 
-                        MMceEventObserver* /*aEventObserver*/ )
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::SetReferObserver
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetReferObserver( 
-                        MMceReferObserver* /*aReferObserver*/ )
-    {
-    // NOP
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceManager::SetMediaObserver
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetMediaObserver( 
-                        MMceStreamObserver* aMediaObserver )
-    {
-    iMediaObserver = aMediaObserver;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::SetRtpObserver
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetRtpObserver( 
-                        MMceRtpObserver* aRtpObserver )
-    {
-    iRtpObserver = aRtpObserver;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::SupportedAudioCodecs
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<const CMceAudioCodec>&
-                                    CMceManager::SupportedAudioCodecs() const
-    {
-    return iSupportedAudioCodecs;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<const CMceVideoCodec>& 
-                                    CMceManager::SupportedVideoCodecs() const
-    {
-    return iSupportedVideoCodecs;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::Sessions
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<CMceSession>& CMceManager::Sessions() const
-    {
-    return iSessions;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceManager::SetDefaultHeadersL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceManager::SetDefaultHeadersL( CDesC8Array* aMethods, 
-                                               CDesC8Array* aHeaders )
-    {
-    delete aMethods;
-    delete aHeaders;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::DefaultHeadersL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CDesC8Array* CMceManager::DefaultHeadersL( const TDesC8& /*aMethod*/ ) const
-    {
-    return NULL;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::InSessionObserver
-// -----------------------------------------------------------------------------
-//
-MMceInSessionObserver* CMceManager::InSessionObserver() const
-    {
-    return iInSessionObserver;
-    }
-	   
-
-// -----------------------------------------------------------------------------
-// CMceManager::SessionObserver
-// -----------------------------------------------------------------------------
-//
-MMceSessionObserver* CMceManager::SessionObserver() const
-    {
-    return iSessionObserver;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::MediaObserver
-// -----------------------------------------------------------------------------
-//
-MMceStreamObserver* CMceManager::MediaObserver() const
-    {
-    return iMediaObserver;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::RtpObserver
-// -----------------------------------------------------------------------------
-//
-MMceRtpObserver* CMceManager::RtpObserver() const
-    {
-    return iRtpObserver;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceManager::TransactionContainer
-// -----------------------------------------------------------------------------
-//
-TMceTransactionDataContainer* CMceManager::TransactionContainer() const
-	{
-	return iContainer;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::CMceManager
-// -----------------------------------------------------------------------------
-//
-CMceManager::CMceManager( const TUid& /*aAppUid*/, 
-                        TMceTransactionDataContainer* aContainer )
-    :iContainer( aContainer )
-    {
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceManager::ConstructL()	
-    {
-    // Fake having PCMU codec
-    iSupportedAudioCodecs.AppendL( CMceAmrCodec::NewLC( KMceSDPNamePCMU() ) );
-    CleanupStack::Pop();
-    
-    iSupportedAudioCodecs.AppendL( CMceAmrCodec::NewLC( KMceSDPNameAMR() ) );
-    CleanupStack::Pop();
-    
-    // Avc codec, level default 1
-    iSupportedVideoCodecs.AppendL( CMceAvcCodec::NewLC( KMceSDPNameH264() ) );
-    CleanupStack::Pop();
-
-    // Avc codec, level default 1, no profile id or constraint set defined
-    CMceVideoCodec* avc_2nd_Level_1 = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    avc_2nd_Level_1->SetAllowedBitrates( KMceAvcBitrateLevel1 );
-    iSupportedVideoCodecs.AppendL( avc_2nd_Level_1 );
-    CleanupStack::Pop( avc_2nd_Level_1 );    
-
-    // Avc codec, level 1_3
-    CMceVideoCodec* avcLevel_1_3 = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    avcLevel_1_3->SetAllowedBitrates( KMceAvcCodecProfileIdBaseline | 
-	                                  KMceAvcCodecProfileIopConstraintSet | 
-	                                  KMceAvcBitrateLevel1_3 );
-    iSupportedVideoCodecs.AppendL( avcLevel_1_3 );
-    CleanupStack::Pop( avcLevel_1_3 );
-
-    // H263 codec
-    iSupportedVideoCodecs.AppendL( CMceH263Codec::NewLC( KMceSDPNameH2632000() ) );
-    CleanupStack::Pop();
-    
-    // Test simulator
-    iSessionSimulator = CMusTestSessionSimulator::NewL( *this );
-    }
-    
-    
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcemediasink.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcemediasink.h"
-#include "mcestreamobserver.h"
-#include "mcesession.h"
-#include "mcemanager.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaSink::~CMceMediaSink
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceMediaSink::~CMceMediaSink()
-    {
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceMediaSink::Type
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMceSinkType CMceMediaSink::Type() const
-    {
-    return iType;
-    }
-    
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaSink::IsEnabled
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CMceMediaSink::IsEnabled() const
-    {
-    return iIsEnabled;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceMediaSink::CMceMediaSink
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink::CMceMediaSink()
-    :iIsEnabled( ETrue ),
-	 iReferenceCount( 0 )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaSink::DoEnableL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaSink::DoEnableL() 
-    {
-    iIsEnabled = ETrue;
-    }
-
-
-// --------------------------------------- --------------------------------------
-// CMceMediaSink::DoDisableL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaSink::DoDisableL() 
-    {
-    iIsEnabled = EFalse;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaSink::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaSink::InitializeL( CMceMediaStream& aParent )
-    {
-    iStream = &aParent;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaSink::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaSink::InitializeL( CMceManager* /*aManager*/ )
-    {
-    // NOP
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceMediaSink::ReferenceCount
-// -----------------------------------------------------------------------------
-//
-TInt& CMceMediaSink::ReferenceCount()
-    {
-    return iReferenceCount;
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcemediasource.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcemediasource.h"
-#include "mcesession.h"
-#include "mcemanager.h"
-#include "mcestreamobserver.h"
-
-
-
-#define _FLAT_DATA static_cast<CMceComMediaSource*>( iFlatData )
-#define FLAT_DATA( data ) _FLAT_DATA->data
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaSource::~CMceMediaSource
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceMediaSource::~CMceMediaSource()
-    {
-    iStreams.Reset();
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceMediaSource::Type
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMceSourceType CMceMediaSource::Type() const
-    {
-    return iType;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceMediaSource::IsEnabled
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CMceMediaSource::IsEnabled() const
-    {
-    return iIsEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaSource::ReferenceCount
-// -----------------------------------------------------------------------------
-//
-TInt& CMceMediaSource::ReferenceCount()
-    {
-    return iReferenceCount;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaSource::CMceMediaSource
-// -----------------------------------------------------------------------------
-//
-CMceMediaSource::CMceMediaSource()
-    :iIsEnabled( ETrue )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaSource::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaSource::InitializeL( CMceMediaStream& aParent )
-    {
-    iStreams.AppendL( &aParent );
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaSource::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaSource::InitializeL( CMceManager* /*aManager*/ )
-    {
-    // NOP
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceMediaSource::DoEnableL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaSource::DoEnableL() 
-    {
-    iIsEnabled = ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaSource::DoDisableL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaSource::DoDisableL() 
-    {
-    
-    iIsEnabled = EFalse;
-       
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcemediastream.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,401 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcemediastream.h"
-#include "mcesession.h"
-#include "mcemanager.h"
-#include "mcestreamobserver.h"
-#include "mcemediasource.h"
-#include "mcemediasink.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::~CMceMediaStream
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceMediaStream::~CMceMediaStream()
-    {
-    delete iMediaSDPLines;
-    
-    if ( iSource )
-        {
-        DeleteSource();
-        }
-    
-    if ( iLinkOwner )
-	    {
-    	delete iLinkedStream;
-	    }
-
-	while( iSinks.Count() > 0 )
-	    {
-	    DeleteSink( 0 );
-	    }
-	    
-    iSinks.Reset();
-    iSinks.Close();
-   
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceMediaStream::TState CMceMediaStream::State() const
-    {
-    return iState;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceMediaStream::Type
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMceMediaType CMceMediaStream::Type() const
-    {
-    return iType;
-    }
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceMediaStream::SetMediaAttributeLinesL( 
-                                        CDesC8Array* aMediaSDPLines )
-    {
-    delete iMediaSDPLines;
-    iMediaSDPLines = aMediaSDPLines;
-    }
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C MDesC8Array* CMceMediaStream::MediaAttributeLinesL()
-    {
-    if ( iMediaSDPLines )
-        {
-        CDesC8Array* array = new ( ELeave ) CDesC8ArrayFlat( 1 );
-        CleanupStack::PushL( array );
-        for ( TInt i = 0; i < iMediaSDPLines->Count(); ++i )
-            {
-            array->AppendL( iMediaSDPLines->MdcaPoint(i) );
-            }
-        CleanupStack::Pop( array );
-        return array;
-        }
-        
-    return NULL;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceMediaStream::SetStartMediaPort
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceMediaStream::SetLocalMediaPortL( TUint aLocalMediaPort )
-    {
-    iLocalMediaPort = aLocalMediaPort;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::StartMediaPort
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint CMceMediaStream::LocalMediaPort() const        
-    {
-    return iLocalMediaPort;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::Session
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceSession* CMceMediaStream::Session() const
-    {
-    return iSession;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::EnableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceMediaStream::EnableL() 
-    {
-    iIsEnabled = ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::DisableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceMediaStream::DisableL() 
-    {
-    iIsEnabled = EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::IsEnabled
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CMceMediaStream::IsEnabled() const
-    {
-    return iIsEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::SetSourceL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceMediaStream::SetSourceL( CMceMediaSource* aSource )
-    {
-    if ( aSource )
-        {
-        aSource->ReferenceCount()++;
-        }
-    
-    if ( iSource )
-        {
-        DeleteSource();
-        }
-    iSource = aSource;
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::AddSinkL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceMediaStream::AddSinkL( CMceMediaSink* aSink )
-    {
-    __ASSERT_ALWAYS( aSink, User::Leave( KErrArgument ) );
-    iSinks.AppendL( aSink );
-    aSink->ReferenceCount()++;    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::Source
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceMediaSource* CMceMediaStream::Source() const
-    {
-    return iSource;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::Sinks
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<CMceMediaSink>& CMceMediaStream::Sinks() const
-    {
-    return iSinks;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::RemoveSinkL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceMediaStream::RemoveSinkL( CMceMediaSink& aSink )
-    {
-	for ( TInt i = 0; i < iSinks.Count(); i++ )
-	    {
-	    if ( iSinks[i] == &aSink )
-	        {
-	        DeleteSink( i );
-	        iSinks.Compress();
-	        return;
-	        }
-	    }
-	User::Leave( KErrNotFound );
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::BindL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceMediaStream::BindL( CMceMediaStream* aStream )
-    {
-   
-     __ASSERT_ALWAYS( !(! iLinkOwner  &&  
-                          iLinkedStream  ), 
-                          User::Leave( KErrArgument ) );
-    
-    if ( aStream )
-        {
-        iLinkOwner = ETrue;
-        aStream->DoBindL( this );
-        DoBindL( aStream );
-        }
-    else
-        {
-        iLinkOwner = EFalse;
-    	delete iLinkedStream;
-    	iLinkedStream = NULL;
-        }
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::BoundStreamL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceMediaStream& CMceMediaStream::BoundStreamL() const
-    {
-    __ASSERT_ALWAYS( iLinkedStream , User::Leave( KErrNotFound ) );
-    
-    return *iLinkedStream;
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::BoundStream
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CMceMediaStream::BoundStream() const
-    {
-    return iLinkedStream != NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::Binder
-// -----------------------------------------------------------------------------
-//
-TBool CMceMediaStream::Binder() const
-    {
-    return iLinkOwner;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaStream::InitializeL( CMceSession& aParent )
-    {
-    iSession = &aParent;
-    
-    if ( Binder() && BoundStream() )
-        {
-        iLinkedStream->InitializeL( aParent );
-        }
-        
-    if ( iSource )
-        {
-        iSource->InitializeL( *this );
-        }
-        
-    for( TInt i = 0; i < iSinks.Count();i++)
-        {
-        iSinks[i]->InitializeL( *this );
-        }
-
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaStream::InitializeL( CMceManager* aManager )
-    {
-    if ( Binder() && BoundStream() )
-        {
-        iLinkedStream->InitializeL( aManager );
-        }
-        
-    if ( iSource )
-        {
-        iSource->InitializeL( aManager );
-        }
-        
-    for( TInt i = 0; i < iSinks.Count();i++)
-        {
-        iSinks[i]->InitializeL( aManager );
-        }  
-    }
-    
-    
-// -----------------------------------------------------------------------------
-// CMceMediaStream::CMceMediaStream
-// -----------------------------------------------------------------------------
-//
-CMceMediaStream::CMceMediaStream()
-    :iLinkedStream( NULL ),
-     iSource( NULL ),
-     iLinkOwner( EFalse ),
-     iIsEnabled( ETrue ),
-     iState( CMceMediaStream::EUninitialized )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::DeleteSink
-// -----------------------------------------------------------------------------
-//
-void CMceMediaStream::DeleteSink( TInt aIndex )
-    {
-    
-    iSinks[ aIndex ]->ReferenceCount()--;
-    if ( iSinks[ aIndex ]->ReferenceCount() == 0 )
-        {
-        delete iSinks[ aIndex ];
-        }
-    iSinks.Remove( aIndex );
-    
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceMediaStream::DeleteSource
-// -----------------------------------------------------------------------------
-//
-void CMceMediaStream::DeleteSource()
-    {
-    iSource->ReferenceCount()--;
-    if ( iSource->ReferenceCount() == 0 )
-        {
-        delete iSource;
-        }
-    iSource = NULL;
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// CMceMediaStream::DoBindL
-// -----------------------------------------------------------------------------
-//
-void CMceMediaStream::DoBindL( CMceMediaStream* aStream )
-    {
-    if ( Session() )
-        {
-        aStream->InitializeL( *Session() );
-        }
-    delete iLinkedStream;    
-    iLinkedStream = aStream;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mceoutsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include <sipprofile.h>
-#include <e32cmn.h>
-#include "mceoutsession.h"
-#include "mcemediastream.h"
-#include "mcemanager.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceOutSession* CMceOutSession::NewL(
-                        CMceManager& aManager,
-                        CSIPProfile& aProfile,
-                        const TDesC8& aRecipient,
-						HBufC8* aOriginator )
-    {
-    // Check that profile has been registered
-    TBool profileRegistered = EFalse;   
-        
-    aProfile.GetParameter( KSIPProfileRegistered, profileRegistered  );  
-    __ASSERT_ALWAYS( profileRegistered, User::Leave( KErrCouldNotConnect ) );        
-    
-    CMceOutSession* self = new (ELeave) CMceOutSession( &aManager, 0 );
-    CleanupStack::PushL( self );
-    self->ConstructL( aRecipient, aOriginator );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceOutSession* CMceOutSession::NewL( CMceEvent& /*aEvent*/ )
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceOutSession* CMceOutSession::NewL( CMceRefer& /*aRefer*/ )
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceOutSession* CMceOutSession::NewL()
-    {
-    return new( ELeave )CMceOutSession( NULL, 0 );
-    }
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::~CMceOutSession
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceOutSession::~CMceOutSession()
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::EstablishL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceOutSession::EstablishL(
-                        TUint32 aTimeout,
-                        CDesC8Array* aHeaders, 
-                        HBufC8* aContentType,
-                        HBufC8* aContent,
-                        CDesC8Array* aContentHeaders ) 
-    {
-    User::LeaveIfError( State() == EIdle ? KErrNone : KErrNotReady );
-    User::LeaveIfError( 
-        ( aContentType && aContent ) || 
-       !( aContentType || aContent || aContentHeaders ) ? 
-        KErrNone : KErrArgument );
-    
-    if ( iFailWithCode != KErrNone )
-        {
-        TInt failCode = iFailWithCode;
-        iFailWithCode = KErrNone;
-        User::Leave( failCode );
-        }
-    
-    iTimeout = aTimeout;
-
-    //start establishing the session
-    
-    delete iHeaders;
-    iHeaders = aHeaders;
-    delete aContentType;
-    delete aContent;
-    delete aContentHeaders;
-
-	iState = CMceSession::EOffering; 
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::AddStreamL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceOutSession::AddStreamL( CMceMediaStream* aMediaStream )
-    {
-    if ( iManager )
-        {
-        //initialize stream (to get supported codecs)
-        aMediaStream->InitializeL( iManager );
-        }
-    else
-        {
-        //internalizing => no initialize yet
-        }
-    
-    CMceSession::AddStreamL( aMediaStream );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::CancelL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceOutSession::CancelL()
-    {
-    User::LeaveIfError( State() != EIdle ? KErrNone : KErrNotReady );
-    
-	iState = CMceSession::ECancelling;
-	
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::CMceOutSession
-// -----------------------------------------------------------------------------
-//
-CMceOutSession::CMceOutSession( CMceManager* aManager, TUint32 aProfileId ) 
-    : CMceSession( aManager, aProfileId )
-    {
-    //NOP
-    }
-
-// -----------------------------------------------------------------------------
-// CMceOutSession::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceOutSession::ConstructL( const TDesC8& aRecipient, HBufC8* aOriginator )
-    {
-    delete iRecipient;
-    iRecipient = NULL;
-    iRecipient = aRecipient.AllocL();
-
-    delete iOriginator;
-    iOriginator = NULL;
-    if ( aOriginator )
-        {
-        iOriginator = aOriginator->AllocL();
-        delete aOriginator;    
-        }
-        
-    CMceSession::ConstructL();    
-    iManager->iSessions.AppendL( this );
-    
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcertpsink.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcertpsink.h"
-#include "mcemediastream.h"
-#include "mcesession.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceRtpSink* CMceRtpSink::NewL()
-    {
-    CMceRtpSink* self = NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::NewLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceRtpSink* CMceRtpSink::NewLC()
-    {
-    CMceRtpSink* self = new (ELeave) CMceRtpSink();
-    CleanupStack::PushL( self );
-    self->ConstructL( EFalse );
-    return self;    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceRtpSink* CMceRtpSink::NewL( TBool aSuppressRTCP, 
-		                                 HBufC8* /*aIdentity*/ )
-    {
-    
-    CMceRtpSink* self = new (ELeave) CMceRtpSink();
-    CleanupStack::PushL( self );
-    self->ConstructL( aSuppressRTCP );
-    CleanupStack::Pop( self );
-    return self;
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::~CMceRtpSink
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceRtpSink::~CMceRtpSink()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::EnableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSink::EnableL() 
-    {
-    CMceMediaSink::DoEnableL();
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::DisableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSink::DisableL() 
-    {
-    CMceMediaSink::DoDisableL();
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::SendSRL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSink::SendSRL()
-    {
-    __ASSERT_ALWAYS( iStream &&
-                     iStream->Session() &&
-                     iStream->Session()->State() != CMceSession::EIdle &&
-                     iStream->Session()->State() != CMceSession::EIncoming,
-                     User::Leave( KErrNotReady ) );
-	// NOP
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::LastPacket
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CMceRtpSink::LastPacket() const
-    {    
-    return iLastPacket;    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::Ssrc
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CMceRtpSink::Ssrc() const
-    {    
-    return iSSRC;    
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceRtpSink::UpdateL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSink::UpdateL( TBool aSuppressRTCP, 
-		                            HBufC8* /*aIdentity*/ )
-    {    
-    iSuppressRTCP = aSuppressRTCP;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::CMceRtpSink
-// -----------------------------------------------------------------------------
-//
-CMceRtpSink::CMceRtpSink()
-   : CMceMediaSink()
-    {
-    iType = KMceRTPSink;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSink::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceRtpSink::ConstructL( TBool aSuppressRTCP )
-    {
-    iSuppressRTCP = aSuppressRTCP;
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcertpsource.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcertpsource.h"
-#include "mcesession.h"
-#include "mcemanager.h"
-#include "mcemediastream.h"
-#include "mcertpobserver.h"
-
-#define KMceTIMERDISABLED 0
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceRtpSource* CMceRtpSource::NewL(
-					   TUint aBufferLength,
-					   TUint aBufferTreshold,
-					   TUint32 aInactivityTimer,
-					   HBufC8* aIdentity )
-    {
-    CMceRtpSource* self = NewLC( aBufferLength, aBufferTreshold,
-    	 aInactivityTimer, aIdentity );
-    CleanupStack::Pop( self );
-    return self;   
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::NewLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceRtpSource* CMceRtpSource::NewLC(
-					   TUint aBufferLength,
-					   TUint aBufferTreshold,
-					   TUint32 aInactivityTimer,
-					   HBufC8* /*aIdentity*/ )
-    {
-    CMceRtpSource* self = new (ELeave) CMceRtpSource();
-    CleanupStack::PushL( self );
-    self->ConstructL( aBufferLength, aBufferTreshold, 
-                      aInactivityTimer, NULL );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::~CMceRtpSource
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceRtpSource::~CMceRtpSource()
-    {
-    delete iMediaBurstIndicator;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::EnableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSource::EnableL() 
-    {
-    CMceMediaSource::DoEnableL();
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::DisableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSource::DisableL() 
-    {
-    CMceMediaSource::DoDisableL();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::EnableInactivityTimerL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSource::EnableInactivityTimerL( TUint32 aInactivityTimer ) 
-    {
-    // Simulate MCE's check
-    if ( iStreams[0] &&
-         iStreams[0]->Session() &&
-         iStreams[0]->Session()->State() != CMceSession::EIdle &&
-         iStreams[0]->Session()->State() != CMceSession::EIncoming )
-        {
-        iInactivityTimer = aInactivityTimer;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::DisableInactivityTimer
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSource::DisableInactivityTimerL() 
-    {
-    iInactivityTimer = KMceTIMERDISABLED;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::UpdateL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSource::UpdateL ( 
-                                TUint aBufferLength,
-								TUint aBufferTreshold,
-								TUint32 aInactivityTimer,
-								HBufC8* /*aIdentity*/ )
-	{
-    iInactivityTimer = aInactivityTimer;
-    iBufferLength = aBufferLength;
-    iBufferTreshold = aBufferTreshold;
-	}
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::SendRRL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceRtpSource::SendRRL() 
-    {
-    __ASSERT_ALWAYS( iStreams[0] &&
-                     iStreams[0]->Session() &&
-                     iStreams[0]->Session()->State() != CMceSession::EIdle &&
-                     iStreams[0]->Session()->State() != CMceSession::EIncoming,
-                     User::Leave( KErrNotReady ) );
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TUint32 CMceRtpSource::Ssrc() const
-    {
-    return 0;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C const RArray<TUint>& CMceRtpSource::Ssrcs() const
-    {
-    return iSsrcs;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C void CMceRtpSource::EnableSsrcL( TUint /*aSsrc*/ )
-    {
-    }
-
-	
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//		
-EXPORT_C void CMceRtpSource::DisableSsrcL( TUint /*aSsrc*/ )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TBool CMceRtpSource::IsSsrcEnabledL( TUint /*aSsrc*/ )
-    {
-    return ETrue;
-    }
-		
-	
-// -----------------------------------------------------------------------------
-// CMceRtpSource::CMceRtpSource
-// -----------------------------------------------------------------------------
-//
-CMceRtpSource::CMceRtpSource()
-   : CMceMediaSource()
-    {
-    iType = KMceRTPSource;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceRtpSource::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceRtpSource::ConstructL( 
-                         TUint aBufferLength,
-                         TUint aBufferTreshold,
-                         TUint32 aInactivityTimer,
-                         HBufC8* aMediaBurstIndicator )
-    {
-  
-    iInactivityTimer = aInactivityTimer;
-    iBufferLength = aBufferLength;
-    iBufferTreshold = aBufferTreshold;
-    iMediaBurstIndicator = aMediaBurstIndicator;
-    
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,413 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcesession.h"
-//#include "mceinsession.h"
-#include "mcemanager.h"
-#include "mcestreambundle.h"
-#include "mcemediastream.h"
-#include "mceinsessionobserver.h"
-#include "mcesessionobserver.h"
-#include "mcestreamobserver.h"
-#include "mcertpobserver.h"
-#include "mcetransactiondatacontainer.h"
-#include "mussessionsimulator.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::~CMceSession
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceSession::~CMceSession()
-    {
-    delete iHeaders;
-    delete iSessionSDPLines;
-    
-    delete iOriginator;
-    delete iRecipient;
-    iMediaStreams.ResetAndDestroy();
-    iBundles.ResetAndDestroy();
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::State
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceSession::TState CMceSession::State() const
-    {
-    return iState;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::ConnectionActive
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CMceSession::ConnectionActive() const
-    {
-    return iIsConnectionActive;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::RemoveStreamL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::RemoveStreamL( CMceMediaStream& aMediaStream )
-    {
-    for ( TInt i = 0; i < iMediaStreams.Count(); ++i )
-        {
-        if ( &aMediaStream == iMediaStreams[i] )
-            {
-            delete iMediaStreams[i];
-            iMediaStreams.Remove( i );
-            return;
-            }
-        }
-    
-    User::Leave( KErrNotFound );
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceSession::AddStreamL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::AddStreamL( CMceMediaStream* aMediaStream )
-    {
-    User::LeaveIfError( iMediaStreams.Find( aMediaStream ) != KErrNotFound ? 
-                                            KErrArgument : KErrNone );
-    
-    aMediaStream->InitializeL( *this ); // Initialize before taking ownership
-    
-    iMediaStreams.AppendL( aMediaStream );
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::UpdateL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::UpdateL(
-             TUint32 aTimeout,
-             CDesC8Array* aHeaders, 
-             HBufC8* aContentType,
-             HBufC8* aContent,
-             CDesC8Array* aContentHeaders ) 
-    {
-    User::LeaveIfError( iState != EIdle ? KErrNone : KErrNotReady );
-    User::LeaveIfError( 
-        ( aContentType && aContent ) || 
-       !( aContentType || aContent || aContentHeaders ) ? 
-        KErrNone : KErrArgument );
-    
-    // Leave if in incoming state givem too small timeout value
-    User::LeaveIfError( !( aTimeout > 0 && State() == CMceSession::EIncoming ) ||
-        aTimeout <= SessionTimer() ? KErrNone : KErrArgument );
-    
-    InitializeL(); 
-    
-    iTimeout = aTimeout;
-    
-    delete iHeaders; 
-    iHeaders = aHeaders;
-    delete aContentType;
-    delete aContentHeaders;
-    
-    if ( iState == EIncoming )
-        {
-        iState = EReserving;
-        RestartSimulator();
-        }
-    else
-        {
-        iState = EOffering;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::InitializeL
-// -----------------------------------------------------------------------------
-//
-/*
-void CMceSession::InitializeL()
-    {
-    for(int i=0; i<iMediaStreams.Count();i++)
-        {
-        iMediaStreams[i]->InitializeL( *this );
-        }
-    }
-  */  
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::TerminateL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::TerminateL( CDesC8Array* aHeaders,
-					                   HBufC8* aContentType,
-					                   HBufC8* aContent ) 
-    {
-    __ASSERT_ALWAYS( iState != CMceSession::EIdle, User::Leave( KErrNotReady ) );
-    
-    delete iHeaders;
-    iHeaders = aHeaders;
-    delete aContentType;
-    delete aContent;
-    
-   	iState = CMceSession::ETerminating;
-   	RestartSimulator();
-   
-   	
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::Streams
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<CMceMediaStream>& CMceSession::Streams() const
-    {
-    return iMediaStreams;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::Recipient
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TDesC8& CMceSession::Recipient() const
-    {
-    return *iRecipient;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::Originator
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TDesC8& CMceSession::Originator() const
-    {
-    return *iOriginator;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::SetSessionSDPLinesL( CDesC8Array* aSessionSDPLines )
-    {
-    delete iSessionSDPLines;
-    iSessionSDPLines = aSessionSDPLines;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C MDesC8Array* CMceSession::SessionSDPLinesL()
-    {
-    if ( iSessionSDPLines )
-        {
-        CDesC8Array* array = new ( ELeave ) CDesC8ArrayFlat( 1 );
-        CleanupStack::PushL( array );
-        for ( TInt i = 0; i < iSessionSDPLines->Count(); ++i )
-            {
-            array->AppendL( iSessionSDPLines->MdcaPoint(i) );
-            }
-        CleanupStack::Pop( array );
-        return array;
-        }
-        
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CMceSession::SessionTimer() const
-    {
-    return iTimeout;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::AddBundleL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::AddBundleL( CMceStreamBundle* aBundle )
-    {
-    iBundles.AppendL( aBundle );
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::RemoveBundleL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::RemoveBundleL( CMceStreamBundle& aBundle )
-    {
-    TInt index = iBundles.Find( &aBundle );
-    User::LeaveIfError( index );
-    iBundles.Remove( index );
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::Bundles
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray< CMceStreamBundle >& CMceSession::Bundles() const
-    {
-    return iBundles;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::GetModifierL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::GetModifierL( TMceSessionModifier aModifier,
-                                         TUint& aValue ) const
-    {
-    if ( aModifier == KMcePreconditions )
-        {
-        if ( iForceInternetSignaling )
-            {
-            aValue = KMcePreconditionsNotUsed;
-            }
-        else
-            {
-            aValue = KMcePreconditionsSupported;
-            }
-        return;
-        }
-    User::Leave( KErrNotFound );
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceSession::SetModifierL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSession::SetModifierL( TMceSessionModifier aModifier, 
-                                         TUint aValue )        
-    {
-    if ( aModifier == KMcePreconditions )
-        {
-        if ( aValue == KMcePreconditionsNotUsed )
-            {
-            iForceInternetSignaling = ETrue;
-            }
-        else
-            {
-            iForceInternetSignaling = EFalse;
-            }
-        return;
-        }
-    else if ( aModifier == KMce100Rel )
-        {
-        if ( aValue >= 0 && aValue <= 2 )
-            {
-            i100RelUsage = aValue;
-            return;
-            }
-        }
-    User::LeaveIfError( KErrNotSupported );
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::Profile
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CMceSession::Profile() const
-    {
-    return iProfileId;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::CMceSession
-// -----------------------------------------------------------------------------
-//
-CMceSession::CMceSession( CMceManager* aManager, TUint32 aProfileId )
- : iProfileId( aProfileId ),
-   iManager( aManager ),
-   iState( CMceSession::EIdle),
-   iIsConnectionActive( ETrue ),
-   iForceInternetSignaling( EFalse ),
-   i100RelUsage( 1 ), // MCE default
-   iFailWithCode( KErrNone ),
-   iReasonPhrase( KNullDesC8() ),
-   iReasonCode( 0 )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceSession::Manager
-// -----------------------------------------------------------------------------
-//
-CMceManager& CMceSession::Manager() const
-    {
-    return *iManager;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceSession::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceSession::ConstructL()
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSession::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceSession::InitializeL()
-    {
-    for (int i=0; i<iMediaStreams.Count();i++)
-        {
-        iMediaStreams[i]->InitializeL( *this );
-        }
-    
-    /*    
-    for(int i=0; i<iBundles.Count();i++)
-        {
-        iBundles[i]->InitializeL( *this );
-        }
-    */
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CMceSession::RestartSimulator
-// -----------------------------------------------------------------------------
-//
-void CMceSession::RestartSimulator()
-    {
-    if( iManager->iSessionSimulator->IsRunning())
-        {
-        iManager->iSessionSimulator->Stop();
-        }
-    iManager->iSessionSimulator->StartL();    
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcespeakersink.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcespeakersink.h"
-#include "mcesession.h"
-#include "mcemediastream.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-const TInt KMceMaxVolume = 10;
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceSpeakerSink* CMceSpeakerSink::NewL()
-    {
-    CMceSpeakerSink* self = NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::NewLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceSpeakerSink* CMceSpeakerSink::NewLC()
-    {
-    CMceSpeakerSink* self = new (ELeave) CMceSpeakerSink();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::~CMceSpeakerSink
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceSpeakerSink::~CMceSpeakerSink()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::EnableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSpeakerSink::EnableL() 
-    {
-    CMceMediaSink::DoEnableL();
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::Disable
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSpeakerSink::DisableL() 
-    {
-    CMceMediaSink::DoDisableL();
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::SetVolumeL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSpeakerSink::SetVolumeL(TInt aVolume)
-	{
-	__ASSERT_ALWAYS( iStream &&
-                     iStream->Session() &&
-                     iStream->Session()->State() != CMceSession::EIdle &&
-                     iStream->Session()->State() != CMceSession::EIncoming,
-                     User::Leave( KErrNotReady ) );
-                     	
-	__ASSERT_ALWAYS( aVolume <= MaxVolumeL() &&
-	                 aVolume > 0, 
-	                 User::Leave( KErrArgument ) );
-    iVolume = aVolume; 
-	}
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::VolumeL
-// -----------------------------------------------------------------------------
-//		        
-EXPORT_C TInt CMceSpeakerSink::VolumeL() const
-	{
-	__ASSERT_ALWAYS( iStream &&
-                     iStream->Session() &&
-                     iStream->Session()->State() != CMceSession::EIdle &&
-                     iStream->Session()->State() != CMceSession::EIncoming,
-                     User::Leave( KErrNotReady ) );
-	
-	return iVolume;
-	}
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::MaxVolumeL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceSpeakerSink::MaxVolumeL() const
-	{
-	__ASSERT_ALWAYS( iStream &&
-                     iStream->Session() &&
-                     iStream->Session()->State() != CMceSession::EIdle &&
-                     iStream->Session()->State() != CMceSession::EIncoming,
-                     User::Leave( KErrNotReady ) );
-                     	
-	return iMaxVolume;
-	}
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceSpeakerSink::SetRoutingL( TInt aRoute )
-    {
-    __ASSERT_ALWAYS( iStream &&
-                     iStream->Session() &&
-                     iStream->Session()->State() != CMceSession::EIdle &&
-                     iStream->Session()->State() != CMceSession::EIncoming,
-                     User::Leave( KErrNotReady ) );
-                     
-    iAudioRouting = aRoute;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CMceSpeakerSink::RoutingL() const
-    {
-    __ASSERT_ALWAYS( iStream &&
-                     iStream->Session() &&
-                     iStream->Session()->State() != CMceSession::EIdle &&
-                     iStream->Session()->State() != CMceSession::EIncoming,
-                     User::Leave( KErrNotReady ) );
-
-    return iAudioRouting;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::CMceSpeakerSink
-// -----------------------------------------------------------------------------
-//
-CMceSpeakerSink::CMceSpeakerSink()
-    {
-    iType = KMceSpeakerSink;
-    iMaxVolume = KMceMaxVolume;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceSpeakerSink::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceSpeakerSink::ConstructL()
-    {
-    }
-    
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcestreambundle.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcestreambundle.h"
-#include "mcesession.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceStreamBundle* CMceStreamBundle::NewL( TMceStreamBundleType aType )
-    {
-    CMceStreamBundle* self = NewLC( aType );
-    CleanupStack::Pop( self );
-    return self;   
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::NewLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceStreamBundle* CMceStreamBundle::NewLC( TMceStreamBundleType aType )
-    {
-    CMceStreamBundle* self = new (ELeave) CMceStreamBundle();
-    CleanupStack::PushL( self );
-    self->ConstructL( aType );
-    return self;
-    }
-     
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::~CMceStreamBundle
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceStreamBundle::~CMceStreamBundle()
-    {
-    iStreams.Close();
-    iTempStreams.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::Type
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceStreamBundle::TMceStreamBundleType CMceStreamBundle::Type() const
-    {
-    return iBundleType;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::AddStreamL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceStreamBundle::AddStreamL( CMceMediaStream& aStream )
-    {
-    iStreams.AppendL( &aStream );
-    }
-        
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::RemoveStreamL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceStreamBundle::RemoveStreamL( CMceMediaStream& aStream )
-    {
-    TInt index = iStreams.Find( &aStream );
-    User::LeaveIfError( index );
-    iStreams.Remove( index );
-    }
-        
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::Streams
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray< CMceMediaStream >& CMceStreamBundle::Streams()
-    {
-    return iStreams;
-    }
- 
- 
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceStreamBundle::InitializeL( CMceSession& aParent )
-    {
-    iSession = &aParent;
-    }
-    
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::CMceStreamBundle
-// -----------------------------------------------------------------------------
-//
-CMceStreamBundle::CMceStreamBundle()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CMceStreamBundle::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMceStreamBundle::ConstructL( CMceStreamBundle::TMceStreamBundleType aType )
-    {
-    iBundleType = aType;
-    
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcetransactiondatacontainer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcetransactiondatacontainer.h"
-
-     
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::GetStatusCode
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMceTransactionDataContainer::TMceTransactionDataContainer() :
-	iStatusCode(0),
-	iReasonPhrase(0),
-	iHeaders(0),
-	iContentType(0),
-	iContentHeaders(0),
-	iContent(0)
-	{		
-	}
-
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::GetStatusCode
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TMceTransactionDataContainer::GetStatusCode()
-	{
-	TInt tmpStatusCode = iStatusCode;
-	iStatusCode = 0;
-	return tmpStatusCode;
-	}
-
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::GetReasonPhrase
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* TMceTransactionDataContainer::GetReasonPhrase()
-	{
-	HBufC8* tmpReasonPhrase = iReasonPhrase;
-	iReasonPhrase = 0;
-	return tmpReasonPhrase;		
-	}
-
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::GetHeaders
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CDesC8Array* TMceTransactionDataContainer::GetHeaders()
-	{
-	CDesC8Array* tmpHeaders = iHeaders;
-	iHeaders = 0;
-	return tmpHeaders;		
-	}
-
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::GetContentType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* TMceTransactionDataContainer::GetContentType()
-	{
-	HBufC8* tmpContentType = iContentType;
-	iContentType = 0;
-	return tmpContentType;		
-	}
-
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::GetHeaders
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CDesC8Array* TMceTransactionDataContainer::GetContentHeaders()
-	{
-	CDesC8Array* tmpHeaders = iContentHeaders;
-	iContentHeaders = 0;
-	return tmpHeaders;		
-	}
-
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::GetContent
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* TMceTransactionDataContainer::GetContent()
-	{
-	HBufC8* tmpContent = iContent;
-	iContent = 0;
-	return tmpContent;		
-	}
-     
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::SetStatusCode
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMceTransactionDataContainer::SetStatusCode( TInt aStatusCode)
-	{
-	iStatusCode = aStatusCode;		
-	}
-     	
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::SetReasonPhrase
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMceTransactionDataContainer::SetReasonPhrase( HBufC8* aReasonPhrase )
-	{
-	delete iReasonPhrase;
-	iReasonPhrase = aReasonPhrase;
-	}
-     	
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::SetHeaders
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMceTransactionDataContainer::SetHeaders( CDesC8Array* aHeaders )
-	{
-	delete iHeaders;
-	iHeaders = aHeaders;
-	}
-     	
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::SetContentType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMceTransactionDataContainer::SetContentType( HBufC8* aContentType )
-	{
-	delete iContentType;
-	iContentType = aContentType;
-	}
-     	
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::SetContent
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMceTransactionDataContainer::SetContent( HBufC8* aContent )
-	{
-	delete iContent;
-	iContent = aContent;			
-	}
-
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::SetContentHeaders
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMceTransactionDataContainer::SetContentHeaders( CDesC8Array* aHeaders )
-	{
-	delete iContentHeaders;
-	iContentHeaders = aHeaders;
-	}
-     	
-// -----------------------------------------------------------------------------
-// TMceTransactionDataContainer::Clear
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMceTransactionDataContainer::Clear()
-	{	
-	iStatusCode = 0;
-	delete iReasonPhrase;
-	iReasonPhrase = 0;
-	delete iHeaders;
-	iHeaders = 0;
-	delete iContentType;
-	iContentType = 0;
-	delete iContentHeaders;
-	iContentHeaders = 0;
-	delete iContent;
-	iContent = 0;	
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcevideocodec.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "mcevideocodec.h"
-
-// Avc config keys for all the .
-// Getter is not virtual so keys must be returned from base class and
-// the level values defined in mceavccodec.h are redefined.
-_LIT8( KMceStubAvcBitrateLevel1ConfigKey, "TestTextForAvcBrL1Level" );
-_LIT8( KMceStubAvcBitrateLevel1bConfigKey, "TestTextForAvcBrL1bLevel" );
-_LIT8( KMceStubAvcBitrateLevel1_1ConfigKey, "TestTextForAvcBrL1_1Level" );
-_LIT8( KMceStubAvcBitrateLevel1_2ConfigKey, "TestTextForAvcBrL1_2Level" );
-_LIT8( KMceStubAvcBitrateLevel1_3ConfigKey, "TestTextForAvcBrL1_3Level" );
-_LIT8( KMceStubAvcBitrateLevel2ConfigKey, "TestTextForAvcBrL2Level" );
-const TUint KMceStubAvcBitrateLevel1 = 0x0001;
-const TUint KMceStubAvcBitrateLevel1b = 0x0002;
-const TUint KMceStubAvcBitrateLevel1_1 = 0x0004;
-const TUint KMceStubAvcBitrateLevel1_2 = 0x0008;
-const TUint KMceStubAvcBitrateLevel1_3 = 0x0010;
-const TUint KMceStubAvcBitrateLevel2 = 0x0020;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceVideoCodec::~CMceVideoCodec
-// -----------------------------------------------------------------------------
-//
-CMceVideoCodec::~CMceVideoCodec()
-    {
-    delete iConfigKey;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceVideoCodec::AllowedFrameRates
-// -----------------------------------------------------------------------------
-//	    
-EXPORT_C TUint CMceVideoCodec::AllowedFrameRates() const
-    {
-    return iAllowedFrameRates;
-    }
-
-    
-// -----------------------------------------------------------------------------
-// CMceVideoCodec::FrameRate
-// -----------------------------------------------------------------------------
-//	    
-EXPORT_C TReal CMceVideoCodec::FrameRate() const
-    {
-    return iFrameRate;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//    
-EXPORT_C HBufC8* CMceVideoCodec::ConfigKeyL() const
-    {
-    HBufC8* configKey = NULL;
-
-    if ( iConfigKey )
-        {
-        configKey = iConfigKey->AllocL();
-        }
-
-    if ( !configKey && SdpName() == KMceSDPNameH264() )
-        {
-        if ( AllowedBitrates() & KMceStubAvcBitrateLevel1 )
-            {
-            configKey = KMceStubAvcBitrateLevel1ConfigKey().AllocL();
-            }
-        else if ( AllowedBitrates() & KMceStubAvcBitrateLevel1b )
-            {
-            configKey = KMceStubAvcBitrateLevel1bConfigKey().AllocL();
-            }
-        else if ( AllowedBitrates() & KMceStubAvcBitrateLevel1_1 )
-            {
-            configKey = KMceStubAvcBitrateLevel1_1ConfigKey().AllocL();
-            }
-        else if ( AllowedBitrates() & KMceStubAvcBitrateLevel1_2 )
-            {
-            configKey = KMceStubAvcBitrateLevel1_2ConfigKey().AllocL();
-            }
-        else if ( AllowedBitrates() & KMceStubAvcBitrateLevel1_3 )
-            {
-            configKey = KMceStubAvcBitrateLevel1_3ConfigKey().AllocL();
-            }
-        else if ( AllowedBitrates() & KMceStubAvcBitrateLevel2 )
-            {
-            configKey = KMceStubAvcBitrateLevel2ConfigKey().AllocL();
-            }
-        else
-            {
-            User::Leave( KErrNotFound );
-            }
-        }
-         
-    return configKey;
-    } 
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	   
-EXPORT_C TUint CMceVideoCodec::MaxBitRate() const
-    {
-    return iMaxBitRate;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//		
-EXPORT_C TUint CMceVideoCodec::AllowedResolutions() const
-    {
-    return iAllowedResolutions;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//	    
-EXPORT_C TSize CMceVideoCodec::Resolution() const
-    {
-    return TSize( iResolutionWidth, 
-                  iResolutionHeight );
-    }
-
-            
-// -----------------------------------------------------------------------------
-// CMceVideoCodec::CMceVideoCodec
-// -----------------------------------------------------------------------------
-//
-CMceVideoCodec::CMceVideoCodec()
-    {
-    iType = KMceVideoCodec;
-    }
- 
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcevideostream.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "mcevideostream.h"
-#include "mcevideocodec.h"
-#include "mcesession.h"
-#include "mcemanager.h"
-#include "mcefilesource.h"
-#include "mcemediasink.h"
-#include "mcecamerasource.h"
-//#include "mcertpsource.h"
-#include "mcertpsink.h"
-#include "mcedisplaysink.h"
-#include "mceh263codec.h"
-
-#define _FLAT_DATA static_cast<CMceComVideoStream*>( iFlatData )
-
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// Factory method
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceVideoStream* CMceVideoStream::NewL()
-    {
-    CMceVideoStream* self = CMceVideoStream::NewLC();
-	CleanupStack::Pop( self );
-	return self; 
-    }
-
-// -----------------------------------------------------------------------------
-// Factory method
-// Leaves instance on CleanupStack.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceVideoStream* CMceVideoStream::NewLC()
-    {
-    CMceVideoStream* self = new (ELeave) CMceVideoStream();
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceVideoStream::~CMceVideoStream()
-    {
-	iCodecs.ResetAndDestroy();
-	iSupportedVideoCodecs.ResetAndDestroy();
-    }
-
-
-// -----------------------------------------------------------------------------
-// Returns codec.
-// Returns the codecs available to the session.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<CMceVideoCodec>& CMceVideoStream::Codecs()
-    {
-    return iCodecs;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceVideoStream::AddCodecL( CMceVideoCodec* aCodec )
-    {
-    __ASSERT_ALWAYS(aCodec, User::Leave(KErrArgument));
-    iCodecs.AppendL(aCodec);
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceVideoStream::RemoveCodecL( CMceVideoCodec& aCodec )
-    {
-    for(int i = 0; i < iCodecs.Count(); i++ )
-        {
-        if( iCodecs[i] == &aCodec )
-            {
-            delete iCodecs[i];
-            iCodecs.Remove( i );
-            }
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// NOT IMPLEMENTED YET
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMceVideoStream::ReplaceCodecsL( RPointerArray<CMceVideoCodec>* /*aCodecs*/ )
-    {
-    User::Leave( KErrNotSupported );
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<const CMceVideoCodec>& 
-        CMceVideoStream::SupportedVideoCodecs() const
-    {
-	return iSupportedVideoCodecs;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceVideoStream::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceVideoStream::InitializeL( CMceSession& aParent )
-    {
-	CMceMediaStream::InitializeL( aParent );
-
-    InitializeL( &aParent.Manager() );
-            
-    for( TInt i = 0; i < iCodecs.Count(); i++ )
-        {
-        iCodecs[i]->InitializeL( *this );
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceVideoStream::InitializeL
-// -----------------------------------------------------------------------------
-//
-void CMceVideoStream::InitializeL( CMceManager* aManager )
-    {
-    CMceMediaStream::InitializeL( aManager );
-    if ( aManager && iCodecs.Count() == 0 )
-        {
-        const RPointerArray<const CMceVideoCodec> supportedCodecs = 
-                                      aManager->SupportedVideoCodecs();
-
-        TBool fileCodecAdded( EFalse );
-        for( TInt i = 0; i < supportedCodecs.Count() && !fileCodecAdded; i++ )
-            {
-            if ( iSource && iSource->Type() == KMceFileSource )
-                {
-                // Fake codec using file name     
-                CMceFileSource* fileSource =
-                                        static_cast<CMceFileSource*>(iSource);
-                TBuf8<256*2> fileName;
-                fileName.Copy( fileSource->iFileName );
-                const TDesC8& currentCodecName( supportedCodecs[i]->SdpName() ); 
-    
-                if ( ( fileName.FindF( KMceSDPNameH264() ) >= 0 &&
-                       currentCodecName.FindF( KMceSDPNameH264() ) >= 0 ||
-                     ( fileName.FindF( KMceSDPNameH263() ) >= 0 &&
-                       currentCodecName.FindF( KMceSDPNameH263() ) >= 0 ) ) )
-                    {
-                    CMceVideoCodec* codec = supportedCodecs[i]->CloneL();
-                    CleanupStack::PushL( codec );
-                    iCodecs.AppendL( codec );
-                    CleanupStack::Pop( codec );
-                    iState = EInitialized;
-                    fileCodecAdded = ETrue;
-                    }
-                else
-                    {
-                    iState = ETranscodingRequired;
-                    }
-                
-                }
-            else
-                {
-                CMceVideoCodec* codec = supportedCodecs[i]->CloneL();
-                CleanupStack::PushL( codec );
-                iCodecs.AppendL( codec );
-                CleanupStack::Pop( codec );
-                }
-            }
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMceVideoStream::IsAllowedCombination
-// -----------------------------------------------------------------------------
-//    
-TBool CMceVideoStream::IsAllowedCombination()
-    {
-    return ETrue;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Default C++ constructor.
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream::CMceVideoStream()
-    :CMceMediaStream()
-    {
-    iType = KMceVideo;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Symbian 2nd phase constructor.
-// -----------------------------------------------------------------------------
-//    
-void CMceVideoStream::ConstructL()
-    {
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mussessionsimulator.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,330 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-#include <e32base.h>
-#include <e32property.h>
-#include <MceTransactionDataContainer.h>
-#include <MceSession.h>
-#include <MceInSession.h>
-#include <MceOutSession.h>
-#include "mceinsessionobserver.h"
-#include "mcesessionobserver.h"
-#include "mussessionsimulator.h"
-#include "muslogger.h"
-#include <musmanagercommon.h>
-#include "mussessionproperties.h"
-
-
-
-TInt KDuration = 60*1;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CMceManager::NewL
-// -----------------------------------------------------------------------------
-//
-CMusTestSessionSimulator* CMusTestSessionSimulator::NewL(  CMceManager& aManager)
-    {
-    
-    CMusTestSessionSimulator* self = 
-        new (ELeave) CMusTestSessionSimulator( aManager );
-    CleanupStack::PushL( self );
-    self->ConstructL( );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::~CMceManager
-// -----------------------------------------------------------------------------
-//
-
-CMusTestSessionSimulator::CMusTestSessionSimulator( CMceManager& aManager )
-    :iManager(aManager)
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::~CMceManager
-// -----------------------------------------------------------------------------
-//
-void CMusTestSessionSimulator::ConstructL(  )
-    {
-    iTimer = CMusTestTimer::NewL(CActive::EPriorityStandard, *this);
-    SimulateReceiveSession();
-    StartL();
-    }
-
-// -----------------------------------------------------------------------------
-// Callback implementation when the timer activity happens in the CMusTestTimer class
-// -----------------------------------------------------------------------------
-//
-void CMusTestSessionSimulator::StartL()
-    {
-    TTimeIntervalMicroSeconds32 someInterVal(KDuration); //you can call After/At/Inactivity depending on what you want to do
-    iTimer->After(someInterVal);
-    }
-
-// -----------------------------------------------------------------------------
-// Callback implementation when the timer activity happens in the CMusTestTimer class
-// -----------------------------------------------------------------------------
-//
-TBool CMusTestSessionSimulator::IsRunning()
-    {
-    return iTimer->IsActive();
-    }
-
-// -----------------------------------------------------------------------------
-// Callback implementation when the timer activity happens in the CMusTestTimer class
-// -----------------------------------------------------------------------------
-//
-void CMusTestSessionSimulator::Stop(  )
-    {
-    iTimer->Cancel();
-    }
-
-// -----------------------------------------------------------------------------
-// Callback implementation when the timer activity happens in the CMusTestTimer class
-// -----------------------------------------------------------------------------
-//
-void CMusTestSessionSimulator::TimerExpired(TAny* aTimer,TInt aError)
-    {
-    if(aError == KErrNone)
-      {
-      // Timer successfully completed, handle it
-      CMusTestTimer* timer = (CMusTestTimer*)aTimer;
-      MUS_LOG("CMusTestSessionSimulator TimerExipired Change the state")
-      StateChangeL();
-      if( (iManager.iSessions[0]->iState == CMceSession::EEstablished )||
-          ( iManager.iSessions[0]->iState == CMceSession::EIncoming )
-        )
-          {
-          timer->Cancel();          
-          }
-      else
-          {
-          TTimeIntervalSeconds seconds(KDuration);
-          timer->Inactivity(seconds); //Notify inactivity after 10 seconds
-          }
-      }
-    }
-
-// -----------------------------------------------------------------------------
-// Simulates Receive Session
-// -----------------------------------------------------------------------------
-//
-void CMusTestSessionSimulator::SimulateReceiveSession()
-    {
-    MUS_LOG("CMusTestSessionSimulator::SimulateReceiveSession ->")
-    TInt usecase;
-    TInt err = RProperty::Get( NMusSessionApi::KCategoryUid, NMusSessionApi::KUseCase, usecase);  
-    if( err == KErrNone )
-        {        
-        if( usecase == MultimediaSharing::EMusReceive || usecase == MultimediaSharing::EMusReceiveTwoWayVideo )
-            {
-            MUS_LOG("CMusTestSessionSimulator::SimulateReceiveSession receive session ")
-            CMceInSession* inSession = CMceInSession::NewL();       
-            inSession->iState = CMceSession::EIncoming;
-            iManager.iSessions.AppendL( inSession );
-            ibIncoming = ETrue;
-            }
-        else
-            {
-            ibIncoming = EFalse;
-            }
-        }
-    else
-        {
-        MUS_LOG1("CMusTestSessionSimulator::SimulateReceiveSession err = %d ",err)
-        }
-    MUS_LOG("CMusTestSessionSimulator::SimulateReceiveSession <-")
-    }
-// -----------------------------------------------------------------------------
-// CMceManager::~CMceManager
-// -----------------------------------------------------------------------------
-//
-void CMusTestSessionSimulator::StateChangeL()
-    {
-    MUS_LOG("CMusTestSessionSimulator::StateChangeL ->")
-    TMceTransactionDataContainer* container = new TMceTransactionDataContainer();
-    HBufC8* resonPharase = _L8("OK").AllocL(); ;
-    TInt statusCode = 200;
-    switch( iManager.iSessions[0]->iState )
-        {        
-        case CMceSession::EIdle : // offering
-            statusCode = 180;
-            delete resonPharase;
-            resonPharase = _L8("Ringing").AllocL();    
-            iManager.iSessions[0]->iState = CMceSession::EOffering;
-            MUS_LOG("CMusTestSessionSimulator Session state : Offering 180")
-            break;
-        case CMceSession::EOffering : // estabilished
-        case CMceSession::EAnswering : // estabilished
-            delete resonPharase;
-            resonPharase = _L8("OK").AllocL();    
-            iManager.iSessions[0]->iState = CMceSession::EEstablished;
-            MUS_LOG("CMusTestSessionSimulator Session state : Answering")
-            break;
-        case CMceSession::EEstablished : // estabilished
-            delete resonPharase;
-            resonPharase = _L8("OK").AllocL();
-            MUS_LOG("CMusTestSessionSimulator Session state : Estabilished")
-            break;
-        case CMceSession::ETerminating : // estabilished            
-            delete resonPharase;
-            resonPharase = _L8("OK").AllocL();    
-            iManager.iSessions[0]->iState = CMceSession::ETerminated;
-            MUS_LOG("CMusTestSessionSimulator Session state : Terminated")
-            break;
-        case CMceSession::EIncoming : // estabilished            
-            // handled down
-            break;
-        case CMceSession::EProceeding : // estabilished 
-            iManager.iSessions[0]->iState = CMceSession::EAnswering;
-            MUS_LOG("CMusTestSessionSimulator Session state : Proceeding");
-            break;
-        case CMceSession::EReserving : // estabilished     
-            iManager.iSessions[0]->iState = CMceSession::EProceeding;       
-            MUS_LOG("CMusTestSessionSimulator Session state : Reserving")
-        default:
-            break;
-        }
-    if( iManager.iSessions[0]->iState == CMceSession::EIncoming )
-        {       
-        MUS_LOG("CMusTestSessionSimulator Session state : Incoming") 
-        if( iManager.iSessionObserver && container ) 
-            {
-            CMceInSession* session = ( CMceInSession* ) iManager.iSessions[0];
-            if( session )
-                {
-                MUS_LOG("CMusTestSessionSimulator Calling InComingSession")            
-                iManager.iInSessionObserver->IncomingSession( session , container );     
-                iManager.iSessions[0]->iState = CMceSession::EReserving; 
-                }
-            }
-        else
-            {
-            MUS_LOG("CMusTestSessionSimulator insessionobserver empty ")
-            }
-        }
-    else
-        {
-        MUS_LOG("CMusTestSessionSimulator Session state : Inform Session state") 
-        container->SetStatusCode(statusCode);
-        container->SetReasonPhrase( resonPharase ); 
-        if( iManager.iSessionObserver && container ) 
-            {
-            MUS_LOG("CMusTestSessionSimulator Calling SessionStateChanged")
-            if( iManager.iSessions.Count() > 0 )
-                {
-                CMceSession* session = iManager.iSessions[0];
-                if( session )
-                    {
-                    iManager.iSessionObserver->SessionStateChanged( *session ,container);
-                    }
-                else
-                    {
-                    MUS_LOG("CMusTestSessionSimulator session empty ")
-                    }
-                }
-            else
-                {
-                MUS_LOG("CMusTestSessionSimulator No Session found ")            
-                }
-            }
-         else
-            {
-            MUS_LOG("CMusTestSessionSimulator Invalid pointer")
-            }
-        }
-    delete container;
-    MUS_LOG("CMusTestSessionSimulator::StateChangeL <-")
-    }
-
-// -----------------------------------------------------------------------------
-// CMceManager::~CMceManager
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMusTestSessionSimulator::~CMusTestSessionSimulator()
-    {
-    Stop();
-    delete iTimer;
-    }
-
-//--------------------------------------------------------------------------------    
-// Timer implementation
-//--------------------------------------------------------------------------------
-//
-CMusTestTimer::CMusTestTimer(const TInt aPriority,MTimerNotify& aNotify)
-:CActive(aPriority),iNotify(aNotify)
-{
-}
- 
-CMusTestTimer::~CMusTestTimer()
-{   
-    Cancel();
-    iTimer.Close();
-}
- 
-CMusTestTimer* CMusTestTimer::NewL(const TInt aPriority,MTimerNotify& aNotify)
-{
-    CMusTestTimer* me = new (ELeave) CMusTestTimer(aPriority,aNotify);
-    CleanupStack::PushL(me);
-    me->ConstructL();
-    CleanupStack::Pop();
-    return me;
-}
- 
-void CMusTestTimer::ConstructL(void)
-{
-    CActiveScheduler::Add(this);
-    iTimer.CreateLocal();
-}
- 
-void CMusTestTimer::After(TTimeIntervalMicroSeconds32 aInterval)
-{
-    Cancel();
-    iTimer.After(iStatus,aInterval);
-    SetActive();
-}
- 
-void CMusTestTimer::At(const TTime& aTime)
-{
-    Cancel();
-    iTimer.At(iStatus,aTime);
-    SetActive();
-}
- 
-void CMusTestTimer::Inactivity(TTimeIntervalSeconds aSeconds)
-{
-    Cancel();
-    iTimer.Inactivity(iStatus,aSeconds);
-    SetActive();
-}
- 
-void CMusTestTimer::DoCancel()
-{
-    iTimer.Cancel();
-}
- 
-void CMusTestTimer::RunL()
-{
-    iNotify.TimerExpired(this,iStatus.Int());
-}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/staticdllentry.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#include <e32std.h>
-
-
-// Bullseye reguires following entry point
-#ifdef _BullseyeCoverage
-GLDEF_C int __stdcall __E32Dll(void*, unsigned, void*)
-	{
-	return 0;
-	}
-#else
-#ifndef EKA2
-// Starting point of the DLL (Removed in EKA2) 
-GLDEF_C TInt E32Dll(TDllReason)
-	{
-	return(KErrNone);
-	}
-#endif
-#endif // _BullseyeCoverage
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/group/sipclient.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Definition of project MceClientStub
-*
-*/
-
-
-// To get the APP_LAYER_SYSTEMINCLUDE-definition
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-TARGET              	sipclient.dll
-TARGETTYPE            dll
-UID                  	0x1000008d 0x00000112 // Experimental UID
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-SOURCE                   Csipconnection.cpp
- SOURCE                  CSIPMessageElements.cpp
- SOURCE                  CSIPRequestElements.cpp
- SOURCE                  CSIPResponseElements.cpp
- SOURCE                  Csipservertransaction.cpp
- SOURCE                  Csiptransactionbase.cpp
- SOURCE 				 				 CSipSseTestTls.cpp
-
-
-USERINCLUDE             ../inc
-
-// Default system include paths for application layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 euser.lib
-LIBRARY                 bafl.lib
-LIBRARY                 sipcodec.lib
-
-EXPORTUNFROZEN
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/CSipSseTestTls.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-#ifndef CSIPSSETESTTLS_H
-#define CSIPSSETESTTLS_H
-
-#include <e32base.h>
-#include <bamdesca.h>
-#include <stringpool.h>
-#include <sipprofileregistryobserver.h>
-
-#include <etelmm.h>
-#include <Etel3rdParty.h>
-
-class CSIPMessageElements;
-class CSIPResponseElements;
-class RStringF;
-class CSdpDocument;
-class CSsfInvitation;
-class TRequestStatus;
-class CConnMonEventBase;
-class CSIPRequestElements;
-
-//class CTelephony;
-//class MSIPProfileRegistryObserver;
-
-// STUB stuff
-
-typedef TInt TSIPProfileBehavior;
-const TSIPProfileBehavior KRegistryLeaveAtConstruct = 1;
-const TSIPProfileBehavior KSIPProfileIdFetchFails = 2;
-const TSIPProfileBehavior KSIPIapIdFetchFails = 3;
-const TSIPProfileBehavior KSIPConnectionLeaveAtConstruct = 4;
-
-class CSipSseTestTls : public CBase
-	{
-
-public:
-
-    static void OpenL();
-    
-    static void Close();
-    
-    static CSipSseTestTls* Storage();
-    
-    ~CSipSseTestTls();
-    
-    void Reset();
-    
-    TInt Set(TUint32 aKey, TInt aValue);
-    
-    TInt Get(TUint32 aKey, TInt& aValue);
-    
-    void SetError( TInt aError );
-    
-    TInt Error() const;
-    
-    void Clear();
-    
-    void SetRequestStatus( TRequestStatus& iStatus );
-    
-    TBool RegisterStatus(); 
-    
-    void SetRegisterStatus( TBool aStatus );
-    
-    TBool RegisterSent(); 
-    
-    void StoreRegistry( MSIPProfileRegistryObserver& aRegistry );
-                      
-    //RCommMon       
-    TInt ConnectionCount();
-   
-    void SetConnectionCount( TInt aCount );
-    
-    void ConnectionInfo( const TUint& aIndex, 
-                         TUint& aConnectionId, 
-                         TUint& aSubConnectionCount );
-                     
-    void SetConnectionInfo( TUint aConnectionId, 
-                            TUint aSubConnectionCount );
-                            
-    void GetUintAttribute(  const TUint aConnectionId, 
-                            const TUint aSubConnectionId, 
-                            const TUint aAttribute, 
-                            TUint& aValue, 
-                            TRequestStatus& aStatus );
-   
-    void SetUintAttribute(  const TUint aConnectionId, 
-                            const TUint aSubConnectionId, 
-                            const TUint aAttribute, 
-                            TUint aValue, 
-                            TRequestStatus& aStatus );
-                            
-    void GetIntAttribute(  const TUint aConnectionId, 
-                            const TUint aSubConnectionId, 
-                            const TUint aAttribute, 
-                            TInt& aValue, 
-                            TRequestStatus& aStatus );
-   
-    void SetIntAttribute(  const TUint aConnectionId, 
-                            const TUint aSubConnectionId, 
-                            const TUint aAttribute, 
-                            TInt aValue, 
-                            TRequestStatus& aStatus );
-                            
-    void SetEvent(const CConnMonEventBase& aConnMonEvent );
-    
-    
-    const CConnMonEventBase& Event();
-    
-    
-    void SetRegistrationStatus( RMobilePhone::TMobilePhoneRegistrationStatus aRegStatus );
-    void SetRegistrationStatus( RMobilePhone::TMobilePhoneRegistrationStatus* aRegStatus );
-    
-    void RegistrationStatus( RMobilePhone::TMobilePhoneRegistrationStatus& aReqStatus );
-   
-    void SetPhoneNetworkModeStatus( RMobilePhone::TMobilePhoneNetworkMode aStatus );
-    
-    RMobilePhone::TMobilePhoneNetworkMode& PhoneNetworkModeStatus();
-    
-    void ClientRequest( CSIPRequestElements* aRequest );
-    void ClientResponse( RStringF aMethod, CSIPResponseElements* aResponse );
-
-private:
-
-    CSipSseTestTls();
-
-public://data
-	
-    // Stubs leave/return this error
-    TInt iError;  
-    static TBool iSipRegisterStatus;
-    MSIPProfileRegistryObserver* iRegistry;
-    //RCommMon 
-    TInt iConnectionCount;
-    //ConnectionInfo
-    TUint iConnectionId; 
-    TUint iSubConnectionCount;
-    //UintAttribute
-    TUint iUintAttributeValue;
-    //UintAttribute
-    TUint iIntAttributeValue;
-    TRequestStatus iRequestStatus;
-    CConnMonEventBase* iConnMonEventBase;
-    
-    RMobilePhone::TMobilePhoneRegistrationStatus iPhoneRegistrationStatus;
-    RMobilePhone::TMobilePhoneRegistrationStatus* iPhoneRegistrationStatusPointer;
-    RMobilePhone::TMobilePhoneNetworkMode iPhoneNetworkMode;
-
-    CSIPRequestElements* iClientRequest;
-    RStringF iResponseToRequest;
-    CSIPResponseElements* iClientResponse;
-    RArray<TUint32> iKeys;
-    RArray<TInt> iValues;
-    TSIPProfileBehavior iRegistryBehavior;
-    TSIPProfileBehavior iProfileBehavior;    
-    TSIPProfileBehavior iConnectionBehavior;
-    };
-
-
-
-#endif 
-
-// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/sipconnection.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,573 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CSIPCONNECTION_H
-#define CSIPCONNECTION_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <in_sock.h>
-
-// FORWARD DECLARATIONS
-class CSIP;
-class MSIPConnectionObserver;
-class CSIPTransactionBase;
-class CSIPClientTransaction;
-class CSIPServerTransaction;
-class MSIPRegistrationContext;
-class CSIPRegistrationBinding;
-class CRegistrationState;
-class CSIPDialog;
-class CDialogState;
-class CSIPRefresh;
-class CSIPMessageElements;
-class CSIPRequestElements;
-class CSIPResponseElements;
-class CSIPClientConnectionObserver;
-class CConnectionCallback;
-class CSIPClientConnection;
-
-
-//CONSTANTS
-/** SIP minimum value for the expiration in seconds*/
-//const TUint KSIPMinExpirationValue=60;
-
-
-// CLASS DECLARATION
-
-/**
-*  Class for monitoring connection's state and sending SIP requests outside
-*  the dialog associations.Class must not be used
-*  -for sending requests to which received non-failure response creates a dialog
-*  -for sending requests that must be sent within SIP dialog
-* Note that the user can have only one instance of the class per same IAP-id
-*/
-class CSIPConnection :
-    public CBase
-	{
-    public:
-    
-        /** Connection states */
-        enum TState 
-            {
-            /** Connection initializing */
-			EInit=1,
-			/** Connection active */
-			EActive,
-			/** Connection suspended */
-			ESuspended,
-			/** Connection is inactive */
-			EInactive,
-			/** Connection is permanently unavailable */
-			EUnavailable
-            };
-
-    public:  // Constructors and destructor
-
-	    /**
-        * Two-phased constructor.
-		* @param aSip a handle to the SIP server
-		* @param aIapId IAP-id
-		* @param aObserver a observer for receiving asynchonous events on this
-        *   connection
-        * @return New object, ownership is transferred
-        */
-
-		IMPORT_C static CSIPConnection*
-            NewL(CSIP& aSIP,
-				 TUint32 aIapId,
-				 MSIPConnectionObserver& aObserver);
-
-
-	    /**
-        * Two-phased constructor.
-		* Constructs an object and adds the pointer to the cleanup stack;
-		* @param aSip a handle to the SIP server
-		* @param aIapId IAP-id
-		* @param aObserver a observer for receiving asynchonous events on this
-        *   connection
-        * @return New object, ownership is transferred
-        */
-
-		IMPORT_C static CSIPConnection*
-            NewLC(CSIP& aSIP,
-				  TUint32 aIapId,
-				  MSIPConnectionObserver& aObserver);
-
-
-		/**
-		* Destructor
-		*/
-
-		IMPORT_C ~CSIPConnection();
-
-    public: // New functions
-
-        /**
-		* Gets current state of the connection        
-        * @return current state of the connection
-        */
-
-		IMPORT_C TState State() const;
-
-        /**
-		* Creates SIP request and sends it to the given destination.
-		* The function must not be used with SIP requests that creates
-		* SIP dialog associations or must be sent within SIP dialog
-		* association.
-		* This provokes the Non-invite state machine.
-		* This function must be used if the user has created the
-		* registration binding.
-		* @pre State() == EActive.
-		* @pre aContext.IsContextActive()==ETrue
-		* @param aElements contains local and remote addresses,
-		*		 optional SIP message headers and body.
-		*        The ownership is transferred.
-		* @param aContext defines outbound proxy to be used. If the user
-		*        does not provide from-address it will be constucted using
-		*        user's AOR used during the registration.
-        * @return SIP client transaction, ownership is transferred
-        */
-
-		IMPORT_C CSIPClientTransaction*
-            SendRequestL(CSIPRequestElements* aElements,
-                         const MSIPRegistrationContext& aContext);
-
-
-        /**
-		* Creates SIP request and sends it to the given destination.
-		* The function must not be used with SIP request that creates
-		* SIP dialog associations or must be sent within SIP diallog
-		* association.
-		* This provokes the Non-invite state machine.
-		* This function must be used if the user has created the
-		* registration binding.
-		* @pre State() == EActive.
-		* @pre aContext.IsContextActive()==ETrue
-		* @param aElements contains local and remote addresses,
-		*		 optional SIP message headers and body.
-		*        The ownership is transferred.
-		* @param aContext defines outbound proxy to be used. If the user
-		*        does not provide from-address it will 
-		*        be constucted using user's AOR used during the registration.
-		* @param aRefresh defines the refresh interval for this transaction.
-        * @return SIP client transaction, ownership is transferred
-        */
-
-		IMPORT_C CSIPClientTransaction*
-            SendRequestL(CSIPRequestElements* aElements,                                        
-                         const MSIPRegistrationContext& aContext,
-						 CSIPRefresh& aRefresh); 
-
-
-        /**
-		* Creates SIP request and sends it to the given destination.
-		* The function must not be used with SIP request that creates SIP
-		* diallog associations or must be sent within SIP dialog association.
-		* This invokes the Non-invite state machine.
-		* @pre State() == EActive.
-		* @pre aElements.FromHeader() != 0
-		* @param aElements contains local and remote addresses,
-		*		 optional SIP message headers and body.
-		*        The ownership is transferred.
-        * @return SIP client transaction, ownership is transferred
-        */
-
-		IMPORT_C CSIPClientTransaction*
-            SendRequestL(CSIPRequestElements* aElements);
-        
-
-        /**
-		* Creates SIP request and sends it to the given destination.
-		* The function must not be used with SIP request that creates SIP
-		* dialog associations or must be sent within SIP dialog association.
-		* This invokes the Non-invite state machine.
-		* @pre State() == EActive.
-		* @pre aElements.FromHeader() != 0
-		* @param aElements contains local and remote addresses,
-		*		 optional SIP message headers and body.
-		*        The ownership is transferred.
-		* @param aRefresh indicates that transaction will be refreshed
-        * @return SIP client transaction, ownership is transferred
-        */
-
-		IMPORT_C CSIPClientTransaction*
-            SendRequestL(CSIPRequestElements* aElements,
-						 CSIPRefresh& aRefresh);
-
-
-        /**
-		* Creates SIP REGISTER request and sends it to the given destination.
-		* User must no define any Contact or Expires-headers
-		* in the provided elements.
-		* @pre State() == EActive
-        * @pre aElements != 0
-		* @pre aElements->Method().DesC().Length()==0
-		* @param aElements contains local and remote addresses, optional SIP
-        *        message headers and body. User must not set any expires values
-        *        to aElements. The ownership is transferred.
-        * @return SIP REGISTER client transaction, ownership is transferred
-        */
-
-		IMPORT_C CSIPClientTransaction*
-            FetchRegistrationsL(CSIPRequestElements* aElements);
-            
-        // Not in real SIP API:
-        IMPORT_C void SetState(TState aState);    
-
-		//TODO:SHOULD THIS NEW FUNCTION BE INCLUDED INTO STUB???
-		/**
-		* Gets Iap-id used for this connection
-		* @return Iap-id
-		*/
-		
-		IMPORT_C TUint32 IapId() const;
-		
-		
-		/**
-        * Gets SIP server handle
-        * @return handle to SIP server, or 0-pointer if SIP server does not
-        *	exist any more
-        */
-        IMPORT_C CSIP* SIP();
-  
-		/**
-        * Gets SIP server handle
-        * @return handle to SIP server, or 0-pointer if SIP server does not
-        *	exist any more
-        */
-        
-        IMPORT_C const CSIP* SIP() const;
-		//TODO:ENDS
-		
-        /**
-		* Incoming request outside dialog has been received.
-		*
-		* @param aTransaction Server transaction. Ownership is transferred.        
-        */
-
-        void IncomingRequestL(CSIPServerTransaction* aTransaction) const;
-
-        /**
-        * Gets the local IP address of this CSIPConnection 
-        * that is used by the SIP implementation.
-        * The user should re-new the call whenever the connection state changes
-        * to the CSIPConnection::EActive in order to verify the correctness of
-        * the previously retrieved local IP address. The local IP address might
-        * be different as a result of the connection state change.
-        * @pre State() == CSIPConnection::EActive
-        * @param aAddr on return filled with local IP address
-        * @leave a system-wide error code
-        */ 	                         
-	    IMPORT_C void GetLocalAddrL(TInetAddr& aAddr) const;
-
-        
-        /**
-		* Incoming request within dialog has been received.
-		*
-		* @param aTransaction Server transaction. Ownership is transferred.
-        * @param aDialogId Identifies the dialog to which the transaction
-        *   belongs to.
-        */
-
-        void IncomingDialogRequestL(CSIPServerTransaction* aTransaction,
-                              		TUint32 aDialogId);
-
-        void IncomingResponseL(CSIPResponseElements* aElements,
-                               TUint32 aRequestId) const;
-    
-        void IncomingRegistrationResponseL(CSIPResponseElements* aElements,
-		                       			   TUint32 aRequestId,
-					           			   TUint32 aRegistrationId) const;
-
-        void IncomingRefreshResponseL(CSIPResponseElements* aElements,
-		                       		  TUint32 aRequestId,
-							   		  TUint32 aRefreshId);
-
-
-        void ErrorOccured(TInt aError, TUint32 aRequestId) const;
-
-        void RefreshErrorOccured(TInt aError, TUint32 aRefreshId) const;
-
-	    void RegistrationErrorOccured(TInt aError,
-                          			  TUint32 aRegistrationId,
-                          			  TUint32 aRequestId) const;
-
-		void DialogErrorOccured(TInt aError,
-                          		TUint32 aDialogId,
-                          		TUint32 aRequestId) const;
-
-        void DialogErrorOccured(TInt aError,
-                          		TUint32 aDialogId,
-                          		TUint32 aRefreshId,
-                          		TUint32 aRequestId) const;
-
-        void ConnectionStateChanged(CSIPConnection::TState aState);
-
-        void InviteCompleted(TUint32 aRequestId) const;
-
-
-		/**
-        * Searches for a transaction with the matching aRequestId.
-		* @param aRequestId RequestId associated with the transaction
-		* @return Found transaction or NULL if not found. Ownership is not
-        *   transferred.
-        */
-        
-        CSIPTransactionBase* FindTransaction(TUint32 aRequestId) const;
-   
-   
-        TInt AddRegistration(CSIPRegistrationBinding* aRegistration);
-        void RemoveRegistration(const CSIPRegistrationBinding* aRegistration);
-        
-
-      /**
-        * Searches for a registration binding, using aRegistrationId and
-        * aRequestId as keys. Registration might not yet have received
-        * RegistrationId from SIP client, so the aRequestId may be needed to
-        * locate the registration binding.
-        * @param aRegistrationId RegistrationId of the registration binding
-		* @param aRequestId RequestId of a transaction associated with the
-        *   registration
-		* @return Found registration binding or NULL if not found.
-		*	Ownership is not transferred.
-        */
-        
-        CSIPRegistrationBinding* FindRegistration(TUint32 aRegistrationId,
-                             			   		  TUint32 aRequestId) const;
-
-
-        TInt AddDialog(CSIPDialog* aDialog);
-        void RemoveDialog(const CSIPDialog* aDialog);
-
-
-        /**
-        * Searches for a dialog, using aRequestId as a key.
-        * @param aRequestId RequestId of a transaction associated with the
-        *   dialog
-		* @return Found dialog or NULL if not found. Ownership is not
-        *   transferred.
-        */
-
-        CSIPDialog* FindDialogByRequestId(TUint32 aRequestId) const;
-
-
-        /**
-		* Informs CSIPConnection that the associated CSIP instance has been
-        * deleted. After this the CSIPConnection object can't be used anymore.
-		*/
-
-        void CSIPDeleted();
-
-
-        /**
-		* Obtains the initial state for registration state machine.
-        *
-        * @return Initial registration state, ownership is not transferred
-		*/
-
-        CRegistrationState* InitialRegisterStateL() const;
-
-
-        /**
-		* Obtains the initial state for dialog state machine.
-        *
-        * @return Initial dialog state, ownership is not transferred
-		*/
-
-        CDialogState* InitialDialogStateL() const;
-
-
-        /**
-        * Response related to a dialog has been received.
-		*
-        * @param aElements SIP response elements. Ownership is transferred.
-        * @param aRequestId Identifies the transaction
-        * @param aDialogId DialogId
-        * @param aRefreshId NULL if the response is not related to a refresh,
-        *   otherwise the RefreshId. Ownership is not transferred.
-		*/
-
-        void IncomingResponseToDialogL(CSIPResponseElements* aElements,
-		                               TUint32 aRequestId,
-                                       TUint32 aDialogId,
-                                       TUint32* aRefreshId);
-
-    private:
-        CSIPConnection(CSIP& aSIP,
-                       TUint32 aIapId,
-                       MSIPConnectionObserver& aObserver);
-
-        void ConstructL();
-
-
-        /**
-        * Send a SIP request.
-        *
-		* @param aElements SIP headers. Ownership is transferred.
-        * @param aRegistrationId If non-NULL, request will use the outbound
-        *   proxy and some SIP headers from the registration identified by
-        *   aRegistrationId. Ownership is not transferred.
-        * @param aRefresh If non-NULL, the request will be refreshed. Otherwise
-        *   NULL. Ownership is not transferred.
-		* @return New transaction. Ownership is transferred.
-        */
-
-        CSIPClientTransaction*
-            SendRequestL(CSIPRequestElements* aElements,
-                         TUint32* aRegistrationId,
-						 CSIPRefresh* aRefresh);
-
-
-        /**
-        * Searches for a refresh and transaction, using aRequestId and
-        * aRefreshId as keys.        
-		* @param aRequestId RequestId associated with the refreshed transaction
-        * @param aRefreshId RefreshId associated with the refresh instance
-        * @param aRefresh OUT: if refresh was found, this pointer is set to the
-        *   refresh instance. Ownership is not transferred.
-        * @param aTransaction OUT: if transaction was found, this pointer is
-        *   set to the refreshed client transaction. Ownership is not
-        *   transferred.
-		* @return ETrue if found, EFalse otherwise
-        */
-
-        TBool FindRefresh(TUint32 aRequestId,
-                          TUint32 aRefreshId,
-                          CSIPRefresh** aRefresh,
-                          CSIPClientTransaction** aTransaction) const;
-
-        /**
-        * Searches for a registration binding, using aRequestId as a key.
-		* @param aRequestId RequestId of a transaction associated with the
-        *   registration binding
-		* @return Found registration binding or NULL if not found.
-		*	Ownership is not transferred.
-        */
-
-        CSIPRegistrationBinding* FindRegistration(TUint32 aRequestId) const;
-
-        
-        /**
-        * Searches for a dialog, using aDialogId as a key.        
-        * @param aDialogId DialogId of the dialog.
-		* @return Found dialog or NULL if not found. Ownership is not
-        *   transferred.
-        */
-
-        CSIPDialog* FindDialog(TUint32 aDialogId) const;
-
-
-        /**
-        * A request has been received with a dialogId, but no matching dialog
-        * exists.
-		* If the request is NOTIFY, it is stored until a response with the same
-        * dialogId is received. Then the response is passed to dialog and after
-        * that all the stored NOTIFY are passed to the same dialog.
-        * This is needed since NOTIFY can be received before a sent SUBSCRIBE
-        * receives a response with dialogId.
-		*
-        * @param aTransaction Server transaction, ownership is transferred
-        * @param aDialogId DialogId
-		*/
-
-        void IncomingRequestBeforeDialogExistsL(
-                                    CSIPServerTransaction* aTransaction,
-                                    TUint32 aDialogId);
-
-
-        /**
-		* Extracts the oldest stored transaction for the dialog identified by
-        * aDialogId.
-        * @param aDialogId DialogId
-        * @return Server transaction or NULL if no transaction is stored for
-        *   the dialog. Ownership is transferred.
-		*/
-
-        CSIPServerTransaction* GetStoredTransaction(TUint32 aDialogId);
-
-
-        /**
-		* Checks that CSIP is available for use (not NULL). If iSIP is NULL,
-        * it means user has deleted a resource needed by CSIPConnection, and
-        * this function leaves.
-		*/
-
-        void CheckCSipL() const;       
-
-
-        /**
-		* Connection is no longer available. All registrations, dialogs,
-        * transactions and refreshes using this connection are terminated, but
-        * not deleted.
-		*/
-
-        void ConnectionLost();
-
-
-        //The used CSIP instance. CSIPConnection doesn't own the CSIP.
-        //If this pointer is NULL; it means application has deleted the
-        //CSIP instance before deleting the CSIPConnection, and this
-        //CSIPConnection is now useless.
-        CSIP* iSIP;
-
-        //IAP-id of this connection
-        TUint32 iIapId;
-
-        //Callback to upper layer
-        MSIPConnectionObserver& iObserver;
-
-        //Callback receiving events from client
-        CSIPClientConnectionObserver* iClientConnectionObserver;        
-
-        //Connection used by this CSIPConnection instance
-        CSIPClientConnection* iClientConnection;
-
-        //CSIPConnection doesn't own CSIPRegistrationBindings
-        RPointerArray<CSIPRegistrationBinding> iRegistrations;
-
-        //CSIPConnection doesn't delete the CSIPDialog objects. CSIPDialog
-        //deletes itself when its last dialog association is deleted.
-        //NOTE: When CSIPDialog has just been created and has no dialog
-        //associations yet, it must be stored in CleanupStack, otherwise it
-        //won't be freed if leave occurs!
-        RPointerArray<CSIPDialog> iDialogs;
-
-        //CSIPConnection has to know which transactions are attached to it, but
-        //it doesn't own the transactions. Transaction's ownership is passed
-        //to application.
-        RPointerArray<CSIPTransactionBase> iTransactions;
-
-        //Standalone refreshes, application owns these
-        RPointerArray<CSIPRefresh> iRefreshes;
-
-        //To avoid using callbacks to MSIPConnectionObserver from within
-        //CSIPRegistrationBinding and CSIPDialog, CConnectionCallback is passed to
-        //the methods which would need to use MSIPConnectionObserver calls.
-        //CSIPRegistrationBinding and CSIPDialog will fill CConnectionCallback with
-        //the selected callback method and its parameters, and by returning
-        //ETrue they tell to CSIPConnection that a callback has to be done.
-        CConnectionCallback* iCallbackInfo;
-        
-        
-        // Not in real SIP API
-        TState iState;
-	};
-
-#endif
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/sipmessageelements.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CSIPMESSAGEELEMENTS_H
-#define CSIPMESSAGEELEMENTS_H
-
-// INCLUDES
-#include <e32base.h>
-#include <s32strm.h>
-#include <stringpool.h>
-#include "_sipcodecdefs.h"
-
-#ifdef SWIS_UNIT_TEST
-#undef IMPORT_C
-#define IMPORT_C
-#endif
-
-// FORWARD DECLARATIONS
-class CSIPHeaderBase;
-class CSIPContentTypeHeader;
-class CSIPFromHeader;
-class CSIPToHeader;
-class CSIPCSeqHeader;
-class CSIPExtensionHeader;
-
-// CLASS DECLARATION
-
-/**
-* @publishedAll
-*
-* Class for creation and manipulation optional elements in a SIP message.
-* 
-* Class provides functions for setting and getting optional elements in a 
-* SIP message. Optional elements include user SIP message headers, 
-* content and content type.
-* Following headers are not considered to be user SIP message headers and 
-* cannot be set or retrieved using functions of this class: 
-* "Authentication-Info", "Call-Id", "CSeq", "From" 
-* "Max-Forwards", "Min-Expires", "Record-Route",
-* "Security-Verify", "Service-Route", "To", "Via", "Security-Server", 
-* "Proxy-Authorization", "Proxy-Authenticate" and "WWW-Authenticate".
-*
-*  @lib sipclient.lib
-*/
-class CSIPMessageElements : public CBase
-	{
-    public:  // Constructors and destructor    
-	    /**
-        * Two-phased constructor.
-        */
-		IMPORT_C static CSIPMessageElements* NewL();
-
-	    /**
-        * Two-phased constructor.
-        */
-		IMPORT_C static CSIPMessageElements* NewLC();
-
-        /**
-        * Destructor.
-        */
-		IMPORT_C ~CSIPMessageElements();
-
-    public: //new functions
-		/**
-		* Sets an array of user headers i.e. headers that user is allowed
-		* manipulate to a SIP message. An empty array resets the user headers.
-		* Note that the Content-Type header must be set using SetContentL. 
-		*
-		* @param aHeaders an array of SIP headers.
-        *        The ownership of objects in the array is transferred.
-		*/
-		IMPORT_C void SetUserHeadersL(RPointerArray<CSIPHeaderBase>& aHeaders);
-
-		/**
-		* Gets all user SIP headers this class contains
-		* @return SIP headers. Ownership is not transferred.
-		*/
-		IMPORT_C const RPointerArray<CSIPHeaderBase>& UserHeaders() const;
-
-		/**
-		* Sets the SIP message content and its type.
-		* A zero length content can be set by providing a pointer
-		* to a zero length HBufC8 instance (the ownership is transferred).
-		* @pre aContent != 0 && aContentType != 0
-		* @param aContent the content of a SIP message,
-		*        		  the ownership is transferred
-		* @param aContentType the SIP message content type,
-		*        			  the ownership is transferred
-		* @leave KErrArgument if aContent == 0 or
-		*						 aContentType == 0
-		*/
-		IMPORT_C void SetContentL(HBufC8* aContent,
-							      CSIPContentTypeHeader* aContentType);
-
-		/**
-		* Gets the SIP message content
-		* @return SIP message content. If content does not exist, an empty
-        *   descriptor is returned.
-		*/
-		IMPORT_C const TDesC8& Content() const;
-
-		/**
-		* Gets the content type
-		* @return Content-Type-header or a 0-pointer if not present; the ownership
-        *         is not transferred.
-		*/
-		IMPORT_C const CSIPContentTypeHeader* ContentType() const;
-
-		/*
-		* Removes the SIP message content and destroys
-        * Content-Type header as well.
-		* @return SIP message content; the ownership is transferred.
-		*/
-		IMPORT_C HBufC8* ExtractContent();
-
-    public: // New functions, for internal use
-
-	    static CSIPMessageElements* InternalizeL(RReadStream& aReadStream);
-    	void ExternalizeL(RWriteStream& aWriteStream) const;
-        TInt UserHeaderCount(RStringF aName) const;
-        const RPointerArray<CSIPHeaderBase> UserHeadersL(RStringF aName) const;
-        TInt RemoveHeaders(RStringF aName);
-        void DetachUserHeader(CSIPHeaderBase* aHeader);
-	    void AddHeaderL(CSIPHeaderBase* aHeader);
-        void SetToL(CSIPToHeader* aTo);
-        const CSIPToHeader* To() const;
-        void SetFromL (CSIPFromHeader* aFrom);
-        const CSIPFromHeader* From() const;
-        const CSIPCSeqHeader* CSeq() const;
-        void SetContent(HBufC8* aContent);
-        void DetachContent();
-
-    private:
-
-        CSIPMessageElements();
-	    void ConstructL();
-	    void DoInternalizeL(RReadStream& aReadStream);
-	    void CheckUserHeaderL(const CSIPHeaderBase* aHeader) const;
-        void ExternalizeUserHeadersL(RWriteStream& aWriteStream) const;
-        void ExternalizeL(const CSIPExtensionHeader* aHeader,
-                          RWriteStream& aWriteStream) const;
-
-	private: // Data
-	
-	    RPointerArray<CSIPHeaderBase> iUserHeaders;
-	    HBufC8* iContent;
-        CSIPFromHeader* iFromHeader;
-        CSIPToHeader* iToHeader;
-        CSIPCSeqHeader* iCSeqHeader;
-        CSIPContentTypeHeader* iContentTypeHeader;
-        TBool iHeaderLookupOpen;
-
-	private: // For testing purposes
-
-	    UNIT_TEST(CSIPMessageElementsTest)
-	};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/siprequestelements.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CSIPREQUESTELEMENTS_H
-#define CSIPREQUESTELEMENTS_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <s32strm.h>
-#include <stringpool.h>
-#include <uri8.h>
-#include "_sipcodecdefs.h"
-
-// FORWARD DECLARATIONS
-class CSIPMessageElements;
-class CSIPFromHeader;
-class CSIPToHeader;
-class CSIPCSeqHeader;
-
-// CLASS DECLARATION
-
-/**
-*  @publishedAll
-*  @released
-*
-*  Class provides functions for creation and manipulation of originator's and
-*  recipient's addresses in a SIP request. It also provide functions for
-*  manipulation of SIP method for unknown SIP requests.
-*  @lib sipclient.lib
-*/
-class CSIPRequestElements : public CBase
-    {
-    public:  // Constructors and destructor      
-        /**
-        * Two-phased constructor.
-        * If the URI is SIP URI, no SIP URI headers are allowed.
-        * @pre aRemoteURi != 0
-        * @param aRemoteUri Remote target URI that identifies a resource that
-        *        the request is addressed to. The ownership is transferred.
-        */
-        IMPORT_C static CSIPRequestElements* NewL(CUri8* aRemoteUri);
-
-        /**
-        * Two-phased constructor.
-        * If the URI is SIP URI, no SIP URI headers are allowed.
-        * @pre aRemoteURi != 0
-        * @param aRemoteUri Remote target URI that identifies a resource that
-        *        the request is addressed to. The ownership is transferred.
-        */
-        IMPORT_C static CSIPRequestElements* NewLC(CUri8* aRemoteUri);
-
-        /**
-        * Destructor.
-        */
-        IMPORT_C ~CSIPRequestElements();
-
-    public: // New functions
-        /**
-        * Sets/resets the recipient's To-header
-        * To-header must not contain tag-parameter.
-        * @pre aTo != 0
-        * @param aTo a To-header to be set, the ownership is transferred.
-        */
-        IMPORT_C void SetToHeaderL(CSIPToHeader* aTo);
-            
-        /**
-        * Gets the recipient's To-header 
-        * @return To-header or a 0-pointer if not present. Ownership is not
-        *   transferred.
-        */
-        IMPORT_C const CSIPToHeader* ToHeader() const;
-
-        /**
-        * Sets/resets the originator's From-header.
-        * From-header must not contain tag-parameter.
-        * @pre aFrom != 0
-         * @param aFrom a From-header to be set, the ownership is transferred.
-        * @leave KErrArgument if aFrom == 0 
-        */
-        IMPORT_C void SetFromHeaderL(CSIPFromHeader* aFrom);
-            
-        /**
-        * Gets the originator's From-header 
-        * @return From-header or a 0-pointer if not present. Ownership is not
-        *   transferred.
-        */
-        IMPORT_C const CSIPFromHeader* FromHeader() const;
-
-        /**
-        * Gets CSeq-header. Available for only incoming requests.
-        * @return a CSeq-header or a 0-pointer if not present. 
-        *         Ownership is not transferred.
-        */        
-        IMPORT_C const CSIPCSeqHeader* CSeqHeader() const;
-
-        /**
-        * Sets the remote URI.
-        * If the URI is a SIP URI, no SIP URI headers are allowed.
-        * @pre aRemoteUri != 0
-         * @param aRemoteUri
-        * @leave KErrArgument if aRemoteUri==0
-        */
-        IMPORT_C void SetRemoteUriL(CUri8* aRemoteUri);
-
-        /**
-        * Gets the remote target URI
-        * @return remote target URI
-        */
-        IMPORT_C const CUri8& RemoteUri() const; 
-
-        /**
-        * Sets the SIP request method
-        * @param aMethod a SIP method name.
-        * @leave KErrArgument if method name given is syntactically
-        *        incorrect
-        */
-        IMPORT_C void SetMethodL(RStringF aMethod);
-
-        /**
-        * Gets the SIP Method for a request
-        * @return a SIP method name or a an empty string if the method
-        *         is not defined
-        */
-        IMPORT_C RStringF Method() const;
-
-        /**
-        * Gets message elements (contains all SIP user headers and content)
-        * @return message elements
-        */
-        IMPORT_C const CSIPMessageElements& MessageElements() const;
-
-        /**
-        * Gets message elements (contains all SIP user headers and content)
-        * The response elements can be populated with SIP user headers
-        * and content using returned reference to the message elements.
-        * @return message elements
-        */
-        IMPORT_C CSIPMessageElements& MessageElements();
-
-    public: // New functions, for internal use
-        static CSIPRequestElements* InternalizeL (RReadStream& aReadStream);
-        void ExternalizeL (RWriteStream& aWriteStream) const;
-
-    private:
-        CSIPRequestElements();
-        void ConstructL(CUri8* aRemoteUri);
-        void DoInternalizeL(RReadStream& aReadStream);
-
-    private: // Data
-        RStringF iMethod;
-        CUri8* iRemoteURI;
-        CSIPMessageElements* iMessageElements;
-
-    private: // For testing purposes
-        UNIT_TEST(CSIPRequestElementsTest)
-  };
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/sipresponseelements.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CSIPRESPONSEELEMENTS_H
-#define CSIPRESPONSEELEMENTS_H
-
-//  INCLUDES
-
-#include <e32base.h>
-#include <s32strm.h>
-#include <stringpool.h>
-#include "_sipcodecdefs.h"
-
-// FORWARD DECLARATIONS
-class CSIPMessageElements;
-class CSIPFromHeader;
-class CSIPToHeader;
-class CSIPCSeqHeader;
-
-// CLASS DECLARATION
-
-/**
-*  @publishedAll
-*
-*  Class provides services for creating and manipulating SIP responses
-*  This class is used for creating and manipulating SIP responses including
-*  status code, reason phrase and optional elements such user headers,
-*  content and its type.
-*
-*  @lib sipclient.lib
-*/
-class CSIPResponseElements : public CBase
-	{
-    public:  // Constructors and destructor       
-	    /**
-        * Two-phased constructor.
-        * @pre aStatusCode > 100 && aStatusCode < 700
-	    * @param aStatusCode a known SIP response status code. Cannot be 100.
-		* @param aReasonPhrase a SIP response reason phrase.
-        */
-		IMPORT_C static CSIPResponseElements* NewL(TUint aStatusCode,
-		                                           RStringF aReasonPhrase);
-										
-	    /**
-        * Two-phased constructor.
-        * @pre aStatusCode > 100 && aStatusCode < 700
-	    * @param aStatusCode a known SIP response status code. Cannot be 100.
-		* @param aReasonPhrase a SIP response reason phrase.
-        */
-		IMPORT_C static CSIPResponseElements* NewLC(TUint aStatusCode,
-		                                            RStringF aReasonPhrase);
-											
-        /**
-        * Destructor.
-        */
-		IMPORT_C ~CSIPResponseElements();
-
-    public: // New functions
-		/**
-		* Sets a SIP Response extension status code. It is not possible to set
-        * value 100.
-        * @pre aStatusCode > 100 && aStatusCode < 700
-		* @param aStatusCode extension status code
-		* @leave KErrArgument if aStatusCode < 100 or aStatusCode >= 700
-		*/
-		IMPORT_C void SetStatusCodeL(TUint aStatusCode);
-
-		/**
-		* Gets the SIP Response status code
-		* @return SIP Response status code
-		*/
-		IMPORT_C TUint StatusCode() const;
-
-		/**
-		* Sets a SIP Response Reason Phrase.
-		* @param aReasonPhrase a SIP response reason phrase.
-		*/
-		IMPORT_C void SetReasonPhraseL(RStringF aReasonPhrase);
-			
-		/**
-		* Gets a SIP Response Reason Phrase.
-		* @return a SIP response reason phrase or an empty string if
-        *   the reason phrase is not defined.
-		*/
-		IMPORT_C RStringF ReasonPhrase() const;
-
-		/**
-		* Gets the originator's From-header
-		* @return a From-header or a 0-pointer if not present. Ownership is
-        *   not transferred.
-		*/
-		IMPORT_C const CSIPFromHeader* FromHeader() const;
-
-		/**
-		* Gets the recipient's To-header
-		* @return a To-header or a 0-pointer if not present. Ownership is
-        *   not transferred.
-		*/
-		IMPORT_C const CSIPToHeader* ToHeader() const;
-
-		/**
-		* Gets CSeq-header
-		* @return a CSeq-header or a 0-pointer if not present. Ownership is
-        *   not transferred.
-		*/		
-		IMPORT_C const CSIPCSeqHeader* CSeqHeader() const;
-
-		/**
-		* Gets message elements (contains all SIP user headers and content)
-		* @return message elements
-		*/
-		IMPORT_C const CSIPMessageElements& MessageElements() const;
-
-		/**
-		* Gets message elements (contains all SIP user headers and content)
-		* The response elements can be populated with SIP user headers
-		* and content using returned reference to the message elements.
-		* @return message elements
-		*/
-		IMPORT_C CSIPMessageElements& MessageElements();
-
-    public: // New functions, for internal use
-        static CSIPResponseElements* InternalizeL (RReadStream& aReadStream);
-        static CSIPResponseElements* InternalizeLC (RReadStream& aReadStream);
-        void ExternalizeL (RWriteStream& aWriteStream) const;
-
-    private:
-	    CSIPResponseElements();
-	    void ConstructL(TUint aStatusCode, RStringF aReasonPhrase);
-	    void DoInternalizeL (RReadStream& aReadStream);
-
-    private: // Data
-	    TUint iStatusCode;
-	    RStringF iReasonPhrase;
-        CSIPMessageElements* iMessageElements;
-	};
-
-#endif // end of CSIPRESPONSEELEMENTS_H
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/sipservertransaction.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CSIPSERVERTRANSACTION_H
-#define CSIPSERVERTRANSACTION_H
-
-// INCLUDES
-#include "siptransactionbase.h"
-
-// FORWARD DECLARATIONS
-class CSIPRequestElements;
-class CSIPRefresh;
-class MSIPResponseSender;
-class CSIPConnection;
-
-/**
-*  Class for managing SIP server transactions.
-*  It provides services for creating, ending
-*  and getting SIP transaction parameters.
-*  Client cannot instantiate this class.
-*  
-*  @lib sipclient
-*/
-class CSIPServerTransaction: public CSIPTransactionBase
-	{
-	public:
-
-        /**
-        * Destructor
-		*/
-
-		IMPORT_C ~CSIPServerTransaction();
-
-    public: // Not in real SIP API
-    
- 		IMPORT_C static CSIPServerTransaction* NewL( RStringF aType );
-
-        IMPORT_C void SetRequestElements(CSIPRequestElements* aElements);
-
-
-	public:
-		
-        /**
-		* Sends response and ends the transaction;
-		* The user must not send 100 Trying response. Leaves on failure.
-        * @pre aElements!=0
-        * @pre State()==ETrying || State()==EProceeding
-		* @pre CSIPConnection::State()==EActive
-		* @pre ResponseAllowed()==ETrue		
-		* @param aElements contains Status Code, optional Reason Phrase and
-        *   optional SIP message headers and body. Ownership is transferred.
-		* @leave KErrArgument if aElements == NULL
-		* @leave KErrGeneral if ResponseAllowed() == EFalse
-		*/
-
-		IMPORT_C void SendResponseL(CSIPResponseElements *aElements);
-
-
-	    /**
-		* Gets the request elements
-		* @return Request elements. Ownership is not transferred.
-		*/
-
-		IMPORT_C const CSIPRequestElements* RequestElements() const;
-
-
-        /**
-		* Checks if the response sending is allowed for this server
-        * transaction. For instance response is not allowed in ACK transaction.
-		* @return ETrue if response sending is allowed, EFalse otherwise
-		*/
-
-		IMPORT_C TBool ResponseAllowed() const;
-
-        /**
-		* Sets a new respose sender, replacing the current sender.
-		*
-        * @param aSender Response sender to be used from now on. Ownership is
-        *   	 transferred.		
-		*/
-
-        void SetResponseSender(MSIPResponseSender* aSender);
-
-
-        /**
-	    * Obtains the associated CSIPConnection instance. If connection can't
-        * be accessed anymore, this function leaves.
-        *	
-	    * @return CSIPConnection
-	    */
-
-        CSIPConnection& SIPConnectionL();
-
-
-        /**
-		* Update the MTransactionAssociation to point to aAssociation.
-		*
-        * @param aAssociation Associated object		
-		*/
-
-        void ReAssociateL(MTransactionAssociation& aAssociation);
-
-
-        /**
-		* Removes, but does not delete, request elements from
-        * aServerTransaction.
-        *
-		* @param aServerTransaction Server transaction from which response
-        *   elements are removed. Ownership is not transferred.
-		*/
-
-        static void DetachRequestElements(TAny* aServerTransaction);
-
-	public:
-
-        /**
-		* Creates a server transaction.
-		*
-        * @param aRequestId RequestId for the transaction to use
-        * @param aAssociation Object with which the transaction is associated
-        * @param aElements Request elements. Ownership is transferred.
-        * @return New object. Ownership is transferred.
-		*/
-
-		static CSIPServerTransaction*
-            NewL(TUint32 aRequestId,
-                 MTransactionAssociation& aAssociation,
-                 CSIPRequestElements* aElements);
-
-
-        /**
-		* Creates a server transaction and pushes it to cleanup stack.
-		*
-        * @param aRequestId RequestId for the transaction to use
-        * @param aAssociation Object with which the transaction is associated
-        * @param aElements Request elements. Ownership is transferred.
-        * @return New object. Ownership is transferred.
-		*/
-
-		static CSIPServerTransaction*
-            NewLC(TUint32 aRequestId,
-                  MTransactionAssociation& aAssociation,
-                  CSIPRequestElements* aElements);
-
-
-        
-	private:
-		CSIPServerTransaction( RStringF aType );
-
-
-        /**
-		* Second phase constructor.
-		*        
-        * @param aElements Request elements. Ownership is transferred.        
-		*/
-        void ConstructL(CSIPRequestElements* aElements);
-
-
-        CSIPRequestElements* iRequestElements;
-
-        //This interface is used for sending the response.
-        //CSIPServerTransaction owns iResponseSender.
-        MSIPResponseSender* iResponseSender;
-    
-    };
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/inc/siptransactionbase.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,228 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef CSIPTRANSACTIONBASE_H
-#define CSIPTRANSACTIONBASE_H
-
-//  INCLUDES
-
-#include <e32base.h>
-#include <stringpool.h>
-
-// FORWARD DECLARATIONS
-class CSIPResponseElements;
-class MTransactionAssociation;
-
-/**
-*  Base class for managing SIP transactions.
-*  It provides services for quering transaction
-*  type and its state.
-*
-*  This class is an abstract class and cannot be
-*  instantiated.
-*  @lib sipclient
-*/
-class CSIPTransactionBase: public CBase
-	{
-	public:
-		/** SIP transaction state */
-		enum TState
-			{
-			/** Trying state */
-			ETrying,
-			/** Calling state */
-			ECalling,
-			/** Proceeding state */
-			EProceeding,
-			/** Completed state */
-			ECompleted,
-			/** Confirmed state */
-			EConfirmed,
-			/** Terminated state */
-			ETerminated
-			};
-
-	public:
-
-        /**
-        * Destructor
-		*/
-
-		virtual ~CSIPTransactionBase();
-		
-		
-	public:
-        /**
-        * Gets the SIP transaction type
-        * @return SIP transaction type
-        */
-
-		IMPORT_C RStringF Type() const;
-
-
-		/**
-		* Gets SIP transaction state
-		* @return SIP transaction state
-		*/
-
-		IMPORT_C CSIPTransactionBase::TState StateL();
-
-
-		/**
-		* Checks the if the actual object
-		* is of type CSIPClientTransaction.
-		* @return ETrue if object is of type CSIPClientTransaction and
-		*         EFalse otherwise
-		*/
-
-		IMPORT_C TBool IsSIPClientTransaction() const;
-
-
-		/**
-		* Compares this object to another object also having
-		* CSIPTransactionBase base class
-		* The function has to be implemented in each of the sub-classes.
-		* @param aTransaction a CSIPTransactionBase object to compare
-		* @return ETrue if the objects are equal otherwise EFalse
-		*/
-
-        IMPORT_C TBool
-            operator==(const CSIPTransactionBase& aTransaction) const;
-
-        /**
-		* Obtains the RequestId of the transaction.
-		*
-        * @return RequestId
-		*/
-
-        TUint32 RequestId() const;
-
-
-        /**
-		* Clears the MTransactionAssociation. After this the object can't be
-        * used anymore and it is expected that user will delete it soon.
-        *
-        * @param aAssociation Object requesting the detach
-		*/
-
-        virtual void Detach(const MTransactionAssociation& aAssociation);
-
-
-        /**
-		* Changes the transaction state.
-        *
-        * @param aNextState State into which transaction moves
-		*/
-
-        void ChangeState(CSIPTransactionBase::TState aNextState);
-
-
-        /**
-        * Determines whether this transaction has an effect on the associated
-        * dialog's state.
-        *
-		* @return ETrue if transaction has an effect on the dialog's state,
-        *   EFalse otherwise.
-		*/
-
-        TBool AffectsDialogState() const;
-
-
-        /**
-		* Sets this transaction to affect the dialog state.
-		*/
-
-        void SetAffectsDialogState();
-
-
-        /**
-		* Determines whether the transaction type is a target refresh request.
-        *
-        * @param aType Type of transaction
-        * @return ETrue If the transaction is a target refresh request, EFalse
-        *   otherwise.
-		*/
-
-        static TBool IsTargetRefresh(RStringF aType);
-
-
-        /**
-		* Stores response elements. Depending on the status code, transaction
-        * may enter another state.
-        *
-        * @param aElements Response elements, ownership is transferred.
-		*/
-
-        void SetResponseElements(CSIPResponseElements* aElements);
-       
-
-    protected:
-        CSIPTransactionBase( RStringF aType, TBool aIsCliTrx );
-
-        void ConstructL();
-
-
-        /**
-		* Checks that iAssociation is available (not NULL). If iAssociation is
-        * NULL, it means user has deleted a resource needed by
-        * CSIPTransactionBase, and this function leaves.
-		*/
-
-        void CheckAssociationL() const;
-
-
-        /**
-		* Gets response elements.
-        *
-		* @return Response elements. Ownership isn't transferred.
-		*/
-
-        const CSIPResponseElements* ResponseElements() const;
-
-
-        //RequestId received from SIP client        
-        TUint32 iRequestId;
-
-        //Every transaction is associated to exactly one other object:
-        //CSIP, CSIPConnection, CSIPRegistrationBinding or CSIPDialogAssocBase
-        MTransactionAssociation* iAssociation;
-
-    public:
-    
-				RStringF iType;
-
-        //ETrue is the transaction is a client transaction, EFalse otherwise
-        TBool iIsClientTransaction;
-
-        
-        //ETrue if the transaction has an effect on the dialog state in case
-        //the transaction is associated with a dialog.
-        //EFalse otherwise.
-        TBool iAffectsDialogState;
-
-        //SIP response elements
-        CSIPResponseElements* iResponseElements;
-
-    public:
-        //Current transaction state
-        TState iState;
-        	
-        
-    };
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/CSIPMessageElements.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,418 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "SipMessageElements.h"
-#include "SipHeaderBase.h"
-#include "SipFromHeader.h"
-#include "SipContactHeader.h"
-#include "SipToHeader.h"
-#include "SipCSeqHeader.h"
-#include "SipContentTypeHeader.h"
-#include "SipExtensionHeader.h"
-#include "sipstrings.h"
-#include "SipStrConsts.h"
-
-
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPMessageElements* CSIPMessageElements::NewL()
-	{
-    CSIPMessageElements* self = CSIPMessageElements::NewLC();
-    CleanupStack::Pop (self);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::NewLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPMessageElements* CSIPMessageElements::NewLC ()
-	{
-	CSIPMessageElements* self = new(ELeave)CSIPMessageElements;
-    CleanupStack::PushL (self);
-    self->ConstructL ();
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::CSIPMessageElements
-// -----------------------------------------------------------------------------
-//
-CSIPMessageElements::CSIPMessageElements ()
- : iHeaderLookupOpen(EFalse) 
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::ConstructL()
-	{
-//	SIPHeaderLookup::OpenL();
-    iHeaderLookupOpen = ETrue;
-    iCSeqHeader = CSIPCSeqHeader::DecodeL( _L8("1 INVITE") );
-    
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::~CSIPMessageElements
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPMessageElements::~CSIPMessageElements () 
-	{
-	/*if (iHeaderLookupOpen)
-        {
-	    SIPHeaderLookup::Close();
-        }*/
-	delete iContent;
-	iUserHeaders.ResetAndDestroy();
-    delete iFromHeader;
-    delete iToHeader;
-    delete iCSeqHeader;
-    delete iContentTypeHeader;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::SetUserHeadersL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void 
-CSIPMessageElements::SetUserHeadersL (RPointerArray<CSIPHeaderBase>& aHeaders)
-	{
-    RPointerArray<CSIPHeaderBase> tmpHeaders;
-    CleanupClosePushL(tmpHeaders);
-	for (TInt i=0; i<aHeaders.Count(); i++)
-        {
-        CSIPHeaderBase* header = aHeaders[i];
-        CheckUserHeaderL (header);
-        User::LeaveIfError(tmpHeaders.Append(header));
-        }
-    CleanupStack::Pop(1); // tmpHeaders
-    iUserHeaders.ResetAndDestroy();
-    iUserHeaders = tmpHeaders;
-    aHeaders.Reset();
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::UserHeaders
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const RPointerArray<CSIPHeaderBase>& 
-CSIPMessageElements::UserHeaders() const
-	{
-	return iUserHeaders;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::SetContentL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPMessageElements::SetContentL (HBufC8* aContent,
-                                                CSIPContentTypeHeader* aType)
-	{
-	__ASSERT_ALWAYS (aContent != 0, User::Leave(KErrArgument));
-    __ASSERT_ALWAYS (aContent->Length() > 0, User::Leave(KErrArgument));
-	__ASSERT_ALWAYS (aType != 0, User::Leave(KErrArgument));
-
-    delete iContentTypeHeader;
-    iContentTypeHeader = aType;
-	delete iContent;
-	iContent = aContent;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::Content
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TDesC8& CSIPMessageElements::Content () const
-    {
-    if (iContent)
-        {
-        return *iContent;
-        }
-    return KNullDesC8;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::Content
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const CSIPContentTypeHeader* CSIPMessageElements::ContentType() const
-    {
-    return iContentTypeHeader;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::ExtractContent
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* CSIPMessageElements::ExtractContent ()
-    {
-    HBufC8* tmp = iContent;
-    iContent = 0;
-    delete iContentTypeHeader;
-    iContentTypeHeader = 0;
-    return tmp;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::InternalizeL
-// -----------------------------------------------------------------------------
-//
-CSIPMessageElements* 
-CSIPMessageElements::InternalizeL (RReadStream& aReadStream)
-	{
-	CSIPMessageElements* self = CSIPMessageElements::NewLC();
-    self->DoInternalizeL(aReadStream);
-	CleanupStack::Pop(); // self
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::DoInternalizeL
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::DoInternalizeL (RReadStream& /*aReadStream*/)
-	{
-
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::ExternalizeL
-// -----------------------------------------------------------------------------
-//
-void 
-CSIPMessageElements::ExternalizeL (RWriteStream& /*aWriteStream*/) const
-	{
-
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::UserHeaderCount
-// -----------------------------------------------------------------------------
-//
-TInt CSIPMessageElements::UserHeaderCount (RStringF aName) const
-    {
-    TInt headerCount = 0;
-	for (TInt i=0; i < iUserHeaders.Count(); i++)
-		{
-        if (iUserHeaders[i]->Name() == aName)
-            {
-            headerCount++;
-            }
-		}
-    return headerCount;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::UserHeadersL
-// -----------------------------------------------------------------------------
-//
-const RPointerArray<CSIPHeaderBase> 
-CSIPMessageElements::UserHeadersL (RStringF aName) const
-    {
-    RPointerArray<CSIPHeaderBase> headers;
-    CleanupClosePushL(headers);
-	for (TInt i=0; i < iUserHeaders.Count(); i++)
-		{
-        if (iUserHeaders[i]->Name() == aName)
-            {
-            User::LeaveIfError(headers.Append(iUserHeaders[i]));
-            }
-		}
-    CleanupStack::Pop(1); // headers
-    return headers;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::RemoveHeaders
-// -----------------------------------------------------------------------------
-//
-TInt CSIPMessageElements::RemoveHeaders (RStringF aName)
-    {
-    TInt err = KErrNotFound;
-	for (TInt i=iUserHeaders.Count()-1; i>=0; i--)
-		{
-        if (iUserHeaders[i]->Name() == aName)
-            {
-            CSIPHeaderBase* header = iUserHeaders[i];
-            iUserHeaders.Remove(i);
-            delete header;
-            err = KErrNone;
-            }
-		}
-    return err;
-    }   
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::DetachUserHeader
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::DetachUserHeader (CSIPHeaderBase* aHeader)
-    {
-	for (TInt i=0; i < iUserHeaders.Count(); i++)
-		{
-        if (iUserHeaders[i] == aHeader)
-            {
-            iUserHeaders.Remove(i);
-            }
-		}
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::AddHeaderL 
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::AddHeaderL (CSIPHeaderBase* aHeader)
-	{
-	__ASSERT_ALWAYS (aHeader != 0, User::Leave(KErrArgument));
-	
-    if (aHeader->Name() == SIPStrings::StringF(SipStrConsts::EFromHeader))
-        {
-        delete iFromHeader;
-        iFromHeader = static_cast<CSIPFromHeader*>(aHeader);
-        }
-    else if (aHeader->Name() == SIPStrings::StringF(SipStrConsts::EToHeader))
-        {
-        delete iToHeader;
-        iToHeader = static_cast<CSIPToHeader*>(aHeader);
-        }
-    else if (aHeader->Name() == SIPStrings::StringF(SipStrConsts::ECSeqHeader))
-        {
-        delete iCSeqHeader;
-        iCSeqHeader = static_cast<CSIPCSeqHeader*>(aHeader);
-        }
-    else if (aHeader->Name() == 
-             SIPStrings::StringF(SipStrConsts::EContentTypeHeader))
-        {
-        delete iContentTypeHeader;
-        iContentTypeHeader = static_cast<CSIPContentTypeHeader*>(aHeader);
-        }
-    else
-        {
-        User::LeaveIfError(iUserHeaders.Append(aHeader));
-        }
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::SetToL
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::SetToL (CSIPToHeader* aTo)
-    {
-    __ASSERT_ALWAYS (aTo != 0, User::Leave(KErrArgument));
-    __ASSERT_ALWAYS (!aTo->HasParam(SIPStrings::StringF(SipStrConsts::ETag)),
-                     User::Leave(KErrArgument));
-
-    delete iToHeader;
-    iToHeader = aTo;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::To
-// -----------------------------------------------------------------------------
-//
-const CSIPToHeader* CSIPMessageElements::To() const
-    {
-    return iToHeader;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::SetFromL
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::SetFromL (CSIPFromHeader* aFrom)
-    {
-    __ASSERT_ALWAYS (aFrom != 0, User::Leave(KErrArgument));
-    __ASSERT_ALWAYS (!aFrom->HasParam(SIPStrings::StringF(SipStrConsts::ETag)),
-                     User::Leave(KErrArgument));
-
-    delete iFromHeader;
-    iFromHeader = aFrom;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::From
-// -----------------------------------------------------------------------------
-//
-const CSIPFromHeader* CSIPMessageElements::From() const
-    {
-    return iFromHeader;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::CSeq
-// -----------------------------------------------------------------------------
-//
-const CSIPCSeqHeader* CSIPMessageElements::CSeq() const
-    {
-    return iCSeqHeader;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::SetContent
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::SetContent (HBufC8* aContent)
-    {
-    delete iContent;
-    iContent = aContent;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::DetachContent
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::DetachContent ()
-    {
-    iContent = 0;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::CheckUserHeaderL
-// -----------------------------------------------------------------------------
-//
-void CSIPMessageElements::CheckUserHeaderL (const CSIPHeaderBase* /*aHeader*/) const
-    {
- 
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::ExternalizeUserHeadersL
-// -----------------------------------------------------------------------------
-//   
-void 
-CSIPMessageElements::ExternalizeUserHeadersL (RWriteStream& /*aWriteStream*/) const
-    {
-  
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPMessageElements::ExternalizeL
-// -----------------------------------------------------------------------------
-//  
-void CSIPMessageElements::ExternalizeL (const CSIPExtensionHeader* /*aHeader*/,
-                                        RWriteStream& /*aWriteStream*/) const
-    {
- 
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/CSIPRequestElements.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "siprequestelements.h"
-#include "sipmessageelements.h"
-#include "sipfromheader.h"
-#include "siptoheader.h"
-#include "sipstrings.h"
-#include "sipstrconsts.h"
-#include "_sipcodecdefs.h"
-
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPRequestElements* CSIPRequestElements::NewL(CUri8* aRemoteUri)
-	{
-    CSIPRequestElements* self = CSIPRequestElements::NewLC(aRemoteUri);
-    CleanupStack::Pop (self);
-    return self;
-	}	
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::NewLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPRequestElements* CSIPRequestElements::NewLC(CUri8* aRemoteUri)
-	{
-	CSIPRequestElements* self = new(ELeave)CSIPRequestElements;
-    CleanupStack::PushL (self);
-    self->ConstructL (aRemoteUri);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::CSIPRequestElements
-// -----------------------------------------------------------------------------
-//
-CSIPRequestElements::CSIPRequestElements() 
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CSIPRequestElements::ConstructL(CUri8* aRemoteUri)
-	{
-	__ASSERT_ALWAYS (aRemoteUri != 0, User::Leave(KErrArgument));
-
-	iMessageElements = CSIPMessageElements::NewL();
-    SetRemoteUriL(aRemoteUri);
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::~CSIPRequestElements
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPRequestElements::~CSIPRequestElements() 
-	{
-    delete iRemoteURI;
-    iMethod.Close();
-	delete iMessageElements;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::SetToHeaderL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPRequestElements::SetToHeaderL(CSIPToHeader* aTo)
-    {
-    iMessageElements->SetToL(aTo);
-    }
-			
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::ToHeader
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const CSIPToHeader* CSIPRequestElements::ToHeader() const  
-    {
-    return iMessageElements->To();
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::SetFromHeaderL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPRequestElements::SetFromHeaderL(CSIPFromHeader* aFrom)
-    {
-    iMessageElements->SetFromL(aFrom);
-    }
-			
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::FromHeader
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const CSIPFromHeader* CSIPRequestElements::FromHeader() const
-    {
-    return iMessageElements->From();
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::CSeqHeader
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const CSIPCSeqHeader* CSIPRequestElements::CSeqHeader() const
-    {
-    return iMessageElements->CSeq();
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::SetRemoteURIL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPRequestElements::SetRemoteUriL(CUri8* aRemoteUri)
-    {
-	__ASSERT_ALWAYS (aRemoteUri != 0, User::Leave(KErrArgument));
-
-    delete iRemoteURI;
-    iRemoteURI = aRemoteUri;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::RemoteURI
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const CUri8& CSIPRequestElements::RemoteUri() const
-    {
-    return *(iRemoteURI);
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::SetMethodL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPRequestElements::SetMethodL(RStringF aMethod)
-    {
-	__ASSERT_ALWAYS (aMethod.DesC().Length() > 0, User::Leave(KErrArgument));
-
-	iMethod.Close();
-	iMethod = aMethod.Copy();
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::Method
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RStringF CSIPRequestElements::Method() const
-    {
-    return iMethod;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::MessageElements
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const CSIPMessageElements& CSIPRequestElements::MessageElements() const
-    {
-    return *iMessageElements;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::MessageElements
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPMessageElements& CSIPRequestElements::MessageElements()
-    {
-    return *iMessageElements;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::InternalizeL
-// -----------------------------------------------------------------------------
-//
-CSIPRequestElements* CSIPRequestElements::InternalizeL(RReadStream& aReadStream)
-	{
-	CSIPRequestElements* self = new(ELeave)CSIPRequestElements;
-    CleanupStack::PushL(self);
-    self->DoInternalizeL(aReadStream);
-	CleanupStack::Pop(self);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::DoInternalizeL
-// -----------------------------------------------------------------------------
-//
-void CSIPRequestElements::DoInternalizeL(RReadStream& aReadStream)
-	{
-    // For incoming requests the method is always present
-/*	TUint32 methodLength = aReadStream.ReadUint32L();
-    if (methodLength > 0)
-        {
-	    HBufC8* methodBuf = HBufC8::NewLC(methodLength);
-	    TPtr8 methodPtr(methodBuf->Des());
-	    aReadStream.ReadL(methodPtr,methodLength);
-	    iMethod = SIPStrings::Pool().OpenFStringL(methodPtr);
-	    CleanupStack::PopAndDestroy(methodBuf);
-        }
-    aReadStream.ReadUint8L(); // remote-URI always present
-    iRemoteURI = CURIContainer::InternalizeL(aReadStream);
-    iMessageElements = CSIPMessageElements::InternalizeL(aReadStream);
-*/	}
-
-// -----------------------------------------------------------------------------
-// CSIPRequestElements::ExternalizeL
-// -----------------------------------------------------------------------------
-//
-void CSIPRequestElements::ExternalizeL(RWriteStream& aWriteStream) const
-	{
-/*	TPtrC8 method(iMethod.DesC());
-    // For outgoing requests in some cases the method is filled in ServerCore
-    if (method.Length() > 0)
-        {
-        aWriteStream.WriteUint32L(method.Length());
-	    aWriteStream.WriteL(method);
-        }
-    aWriteStream.WriteUint8L(1); // remote-URI always present
-    iRemoteURI->ExternalizeL(aWriteStream);
-    iMessageElements->ExternalizeL(aWriteStream);
-*/	}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/CSIPResponseElements.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "SipResponseElements.h"
-#include "SipMessageElements.h"
-#include "sipstrings.h"
-#include "SipStrConsts.h"
-
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPResponseElements*
-CSIPResponseElements::NewL (TUint aStatusCode, RStringF aReasonPhrase)
-	{
-    CSIPResponseElements* self = 
-		CSIPResponseElements::NewLC(aStatusCode,aReasonPhrase);
-    CleanupStack::Pop (self);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::NewLC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPResponseElements*
-CSIPResponseElements::NewLC (TUint aStatusCode, RStringF aReasonPhrase)
-	{
-	CSIPResponseElements* self = new(ELeave)CSIPResponseElements;
-    CleanupStack::PushL (self);
-    self->ConstructL (aStatusCode,aReasonPhrase);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::CSIPResponseElements
-// -----------------------------------------------------------------------------
-//
-CSIPResponseElements::CSIPResponseElements ()
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CSIPResponseElements::ConstructL (TUint aStatusCode,
-									   RStringF aReasonPhrase)
-	{
-    SetStatusCodeL (aStatusCode);
-	iReasonPhrase = aReasonPhrase.Copy();
-    iMessageElements = CSIPMessageElements::NewL();
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::~CSIPResponseElements
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPResponseElements::~CSIPResponseElements () 
-	{
-    delete iMessageElements;
-    iReasonPhrase.Close();
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::SetStatusCodeL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPResponseElements::SetStatusCodeL (TUint aStatusCode)
-	{
-	iStatusCode = aStatusCode;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::StatusCode
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint CSIPResponseElements::StatusCode() const
-	{
-	return iStatusCode;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::SetReasonPhraseL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void 
-CSIPResponseElements::SetReasonPhraseL (RStringF aReasonPhrase)
-	{
-	iReasonPhrase.Close();
-	iReasonPhrase = aReasonPhrase.Copy();
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::ReasonPhrase
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RStringF CSIPResponseElements::ReasonPhrase () const
-	{
-	return iReasonPhrase;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::FromHeader
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const CSIPFromHeader* CSIPResponseElements::FromHeader () const
-    {
-    return iMessageElements->From();
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::ToHeader
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C const CSIPToHeader* CSIPResponseElements::ToHeader () const
-    {
-    return iMessageElements->To();
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::CSeqHeader
-// -----------------------------------------------------------------------------
-//		
-EXPORT_C const CSIPCSeqHeader* CSIPResponseElements::CSeqHeader() const
-    {
-    return iMessageElements->CSeq();
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::MessageElements
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const CSIPMessageElements& 
-CSIPResponseElements::MessageElements () const
-    {
-    return *iMessageElements;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::MessageElements
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPMessageElements& CSIPResponseElements::MessageElements ()
-    {
-    return *iMessageElements;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::InternalizeL
-// -----------------------------------------------------------------------------
-//
-CSIPResponseElements* 
-CSIPResponseElements::InternalizeL (RReadStream& aReadStream)
-	{
-	CSIPResponseElements* self =
-		CSIPResponseElements::InternalizeLC(aReadStream);
-	CleanupStack::Pop(); // self
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::InternalizeLC
-// -----------------------------------------------------------------------------
-//
-CSIPResponseElements* 
-CSIPResponseElements::InternalizeLC (RReadStream& aReadStream)
-	{
-	CSIPResponseElements* self = new(ELeave)CSIPResponseElements;
-    CleanupStack::PushL (self);
-    self->DoInternalizeL(aReadStream);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::DoInternalizeL
-// -----------------------------------------------------------------------------
-//
-void CSIPResponseElements::DoInternalizeL (RReadStream& aReadStream)
-	{
-	iStatusCode = aReadStream.ReadUint16L();
-	TUint32 reasonPhraseLength = aReadStream.ReadUint32L();
-	HBufC8* reasonPhraseBuf = HBufC8::NewLC(reasonPhraseLength);
-	TPtr8 reasonPhrasePtr(reasonPhraseBuf->Des());
-	aReadStream.ReadL(reasonPhrasePtr,reasonPhraseLength);
-	iReasonPhrase = SIPStrings::Pool().OpenFStringL(reasonPhrasePtr);
-	CleanupStack::PopAndDestroy(reasonPhraseBuf);
-    iMessageElements = CSIPMessageElements::InternalizeL(aReadStream);
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPResponseElements::ExternalizeL
-// -----------------------------------------------------------------------------
-//
-void CSIPResponseElements::ExternalizeL (RWriteStream& aWriteStream) const
-	{
-	aWriteStream.WriteUint16L(iStatusCode);
-	TPtrC8 reasonPhrase(iReasonPhrase.DesC());	
-	aWriteStream.WriteUint32L(reasonPhrase.Length());
-	aWriteStream.WriteL(reasonPhrase);
-    iMessageElements->ExternalizeL(aWriteStream);
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/CSipSseTestTls.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "CSipSseTestTls.h"
-#include <sipstrings.h>
-#include <SipStrConsts.h>
-#include <sipprofileregistry.h>
-#include <sipprofileregistryobserver.h>
-#include "SipResponseElements.h"
-#include "siprequestelements.h"
-#include "mussettingskeys.h"
-
-
-TBool CSipSseTestTls::iSipRegisterStatus = EFalse;
-
-
-void CSipSseTestTls::OpenL ()
-	{
-    CSipSseTestTls* self = new (ELeave) CSipSseTestTls();
-    self->ClientRequest( NULL );
-    self->ClientResponse( SIPStrings::StringF( SipStrConsts::EEmpty ), NULL );
-    Dll::SetTls( self );
-
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KActivation,
-                            MusSettingsKeys::EAlwaysActive ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KAuditoryNotification,
-                            MusSettingsKeys::EAuditoryNotificationOff ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KPopupNotification,
-                            MusSettingsKeys::EPopupNotificationOff ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KPopupNotificationType,
-                            MusSettingsKeys::ENotificationTypeQueryUser ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KEdgeDtmSupport,
-                            MusSettingsKeys::EDtmModeNotAllowed ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KForceInternetSignaling,
-                            MusSettingsKeys::EFollowProfileConfiguration ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KAutoRecord,
-                            MusSettingsKeys::EAutoRecordOn ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KSipProfileId,
-                            0  ) ); //default profile
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KUiOrientation,
-                            MusSettingsKeys::EPortrait ) );                    
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KCapabilityQuery,
-                            MusSettingsKeys::ENoOptions ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KAllowOnlyIn3GNetwork,
-                            MusSettingsKeys::EAllowedAllBearers ) );
-                            
-	}
-
-void CSipSseTestTls::Close ()
-	{
-	CSipSseTestTls* self = Storage();
-    delete self;
-    Dll::SetTls( NULL );
-	}
-
-	
-CSipSseTestTls* CSipSseTestTls::Storage()
-	{
-	return static_cast<CSipSseTestTls*>(Dll::Tls());
-	}
-
-CSipSseTestTls::CSipSseTestTls()
-    : iError( KErrNone )
-	{
-	}
-	
-CSipSseTestTls::~CSipSseTestTls()
-	{
-   	delete iClientRequest;
-	delete iClientResponse;
-	iKeys.Reset();
-    iValues.Reset();
-	}
-    
-void CSipSseTestTls::Reset()
-    {
-    Storage()->Set ( MusSettingsKeys::KActivation,
-        MusSettingsKeys::EAlwaysActive );
-    Storage()->Set ( MusSettingsKeys::KAuditoryNotification,
-        MusSettingsKeys::EAuditoryNotificationOff );
-    Storage()->Set ( MusSettingsKeys::KPopupNotification,
-        MusSettingsKeys::EPopupNotificationOff );
-    Storage()->Set ( MusSettingsKeys::KPopupNotificationType,
-        MusSettingsKeys::ENotificationTypeQueryUser );
-    Storage()->Set ( MusSettingsKeys::KEdgeDtmSupport,
-        MusSettingsKeys::EDtmModeNotAllowed );
-    Storage()->Set ( MusSettingsKeys::KForceInternetSignaling,
-        MusSettingsKeys::EFollowProfileConfiguration );
-    Storage()->Set ( MusSettingsKeys::KAutoRecord,
-        MusSettingsKeys::EAutoRecordOn );
-    Storage()->Set ( MusSettingsKeys::KSipProfileId,
-        0  ); //default profile
-    Storage()->Set ( MusSettingsKeys::KUiOrientation,
-        MusSettingsKeys::EPortrait );
-    Storage()->Set ( MusSettingsKeys::KCapabilityQuery,
-        MusSettingsKeys::ENoOptions );
-        
-   	Storage()->Set ( MusSettingsKeys::KAllowOnlyIn3GNetwork,
-	   	MusSettingsKeys::EAllowedAllBearers );       
-
-    iRegistryBehavior = 0;
-    iProfileBehavior = 0;
-    iConnectionBehavior = 0;
-    }
-    
-TInt CSipSseTestTls::Set(TUint32 aKey, TInt aValue)
-    {
-    // Setting of any other value
-    for ( TInt i = 0; i < iKeys.Count(); ++i )
-        {
-        if ( iKeys[i] == aKey )
-            {
-            iValues[i] = aValue;
-            return KErrNone;
-            }
-        }
-    
-    // No wise error handling implemented
-    TInt error = iKeys.Append( aKey );
-    if ( error == KErrNone )
-        {
-        error = iValues.Append( aValue );
-        }
-        
-    return error;
-    }
-    
-TInt CSipSseTestTls::Get(TUint32 aKey, TInt& aValue)
-    {
-    for ( TInt i = 0; i < iKeys.Count(); ++i )
-        {
-        if ( iKeys[i] == aKey )
-            {
-            aValue = iValues[i];
-            return KErrNone;
-            }
-        }
-
-    return KErrNotFound;
-    }
-    
-void CSipSseTestTls::SetError( TInt aError )
-    {
-    iError = aError;
-    }
-
-TInt CSipSseTestTls::Error() const
-    {
-    return iError;
-    }
-
-
-void CSipSseTestTls::Clear()
-    {
-    iError = KErrNone;
-    iConnectionCount = 0;
-    iSubConnectionCount = 0;
-    iUintAttributeValue = 0;
-    iConnectionId = 0; 
-    iIntAttributeValue = 0;
-    iRequestStatus = KErrNone;
-    iPhoneRegistrationStatus = RMobilePhone::ERegistrationUnknown;
-    iPhoneRegistrationStatusPointer = NULL;
-    iPhoneNetworkMode = RMobilePhone::ENetworkModeUnknown;
-    ClientRequest( NULL );
-    //iResponseToRequest = SIPStrings::StringF( SipStrConsts::EEmpty );
-    }
-
-void CSipSseTestTls::SetRequestStatus( TRequestStatus& aStatus ) 
-    {
-    iRequestStatus = aStatus;
-    }
-
-
-TBool CSipSseTestTls::RegisterStatus() 
-    {
-    
-    return iSipRegisterStatus; 
-    }
-void CSipSseTestTls::SetRegisterStatus( TBool aStatus )
-    {
-    iSipRegisterStatus = aStatus;
-    }
-TBool CSipSseTestTls::RegisterSent() 
-    {
-    if ( !iSipRegisterStatus )
-        {
-        iSipRegisterStatus = ETrue;
-        }
-    return iSipRegisterStatus; 
-    }
-    
-void CSipSseTestTls::StoreRegistry( MSIPProfileRegistryObserver& aRegistry )
-    {
-    iRegistry = &aRegistry;
-    }
-/*    
-void CSipSseTestTls::ProfileRegistryEventOccurred(TUint32 aProfileId, MSIPProfileRegistryObserver::TEvent aEvent )
-    {
-    iRegistry->ProfileRegistryEventOccurred( aProfileId,aEvent );
-    }
-	
-  
-void CSipSseTestTls::SetState( MMusAvaObserver::TAvailabilityStatus aStatus )
-    {
-    iStatus = aStatus;
-    }
- */     
-TInt CSipSseTestTls::ConnectionCount()
-    {
-    return iConnectionCount;
-    }
-void CSipSseTestTls::SetConnectionCount( TInt aCount )
-    {
-    iConnectionCount = aCount;
-    }
-    
-void CSipSseTestTls::ConnectionInfo( const TUint& aIndex, 
-                     TUint& aConnectionId, 
-                     TUint& aSubConnectionCount )
-    {
-    aConnectionId = iConnectionId;
-    aSubConnectionCount = iSubConnectionCount;
-    }
-                     
-void CSipSseTestTls::SetConnectionInfo( TUint aConnectionId, 
-                                        TUint aSubConnectionCount )
-    {
-    iConnectionId = aConnectionId;
-    iSubConnectionCount = aSubConnectionCount;
-    }
-    
-void CSipSseTestTls::GetUintAttribute(  const TUint aConnectionId, 
-                                        const TUint aSubConnectionId, 
-                                        const TUint aAttribute, 
-                                        TUint& aValue, 
-                                        TRequestStatus& aStatus )
-    {
-    aValue = iUintAttributeValue;
-    aStatus = iRequestStatus;
-    }
-void CSipSseTestTls::SetUintAttribute(  TUint aConnectionId, 
-                                        TUint aSubConnectionId, 
-                                        TUint aAttribute, 
-                                        TUint aValue, 
-                                        TRequestStatus& aStatus )
-    {
-    iUintAttributeValue = aValue;
-    iRequestStatus =  aStatus;
-    }
-    
-void CSipSseTestTls::GetIntAttribute(  const TUint aConnectionId, 
-                                        const TUint aSubConnectionId, 
-                                        const TUint aAttribute, 
-                                        TInt& aValue, 
-                                        TRequestStatus& aStatus )
-    {
-    aValue = iIntAttributeValue;
-    aStatus = iRequestStatus;
-    }
-void CSipSseTestTls::SetIntAttribute(  TUint aConnectionId, 
-                                        TUint aSubConnectionId, 
-                                        TUint aAttribute, 
-                                        TInt aValue, 
-                                        TRequestStatus& aStatus )
-    {
-    iIntAttributeValue = aValue;
-    iRequestStatus =  aStatus;
-    }
-    
-void CSipSseTestTls::SetEvent(const CConnMonEventBase& aConnMonEvent)
-    {
-    iConnMonEventBase = const_cast<CConnMonEventBase*>( &aConnMonEvent );
-    }
-    
-const CConnMonEventBase& CSipSseTestTls::Event()
-    {
-    return *iConnMonEventBase;
-    }
-    
-void CSipSseTestTls::SetRegistrationStatus( RMobilePhone::TMobilePhoneRegistrationStatus aRegStatus )
-    {
-    iPhoneRegistrationStatus = aRegStatus;
-    }
-    
-void CSipSseTestTls::SetRegistrationStatus( RMobilePhone::TMobilePhoneRegistrationStatus* aRegStatus )
-    {
-    iPhoneRegistrationStatusPointer = aRegStatus;
-    }
-
-void CSipSseTestTls::RegistrationStatus( RMobilePhone::TMobilePhoneRegistrationStatus& aReqStatus )
-    {
-    aReqStatus = iPhoneRegistrationStatus;
-    }
-    
-void CSipSseTestTls::SetPhoneNetworkModeStatus( RMobilePhone::TMobilePhoneNetworkMode aStatus )
-    {
-    iPhoneNetworkMode = aStatus;
-    }
-    
-RMobilePhone::TMobilePhoneNetworkMode& CSipSseTestTls::PhoneNetworkModeStatus()
-    {
-    return iPhoneNetworkMode;
-    }
- 
- void CSipSseTestTls::ClientRequest( CSIPRequestElements* aRequest )
-    {
-    delete iClientRequest;
-    iClientRequest = aRequest;
-    }
-	
-void CSipSseTestTls::ClientResponse( RStringF aMethod, CSIPResponseElements* aResponse )
-    {
-    iResponseToRequest = aMethod;
-    delete iClientResponse;
-    iClientResponse = aResponse;
-    }
-
-//end of file
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csipconnection.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "sipconnection.h"
-#include "sip.h"
-#include "siperr.h"
-
-CSIPConnection::CSIPConnection(CSIP& aSIP,
-                               TUint32 aIapId,
-                               MSIPConnectionObserver& aObserver)
- : iIapId(aIapId), iObserver(aObserver), iState(EActive)
-	{
-	iSIP = &aSIP;
-	}
-
-void CSIPConnection::ConstructL()
-	{
-	}
-
-
-EXPORT_C CSIPConnection* CSIPConnection::NewL(CSIP& aSIP,
-									 TUint32 aIapId,
-									 MSIPConnectionObserver& aSIPConnectionObserver)
-	{
-
-	CSIPConnection* self = new(ELeave) CSIPConnection(aSIP, aIapId, aSIPConnectionObserver);
-	CleanupStack::PushL(self);
-	self->ConstructL();
-	CleanupStack::Pop();
-	return self;
-
-	}
-
-
-EXPORT_C CSIPConnection::~CSIPConnection()
-	{
-	}
-
-EXPORT_C TUint32 CSIPConnection::IapId() const
-	{
-	return iIapId;
-	}
-	
-EXPORT_C CSIPConnection::TState CSIPConnection::State() const
-    {
-    return iState; 
-    }	
-
-EXPORT_C void CSIPConnection::SetState(TState aState)
-    {
-    iState = aState;
-    }
-    
-//TODO:Check if these new functions are needed in sip_stub
-
-// -----------------------------------------------------------------------------
-// CSIPConnection::SIP
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIP* CSIPConnection::SIP()
-	{
-	return iSIP;
-	}
- 
-// -----------------------------------------------------------------------------
-// CSIPConnection::SIP
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C const CSIP* CSIPConnection::SIP() const
-	{
-	return iSIP;
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csipservertransaction.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "sipservertransaction.h"
-#include "siprequestelements.h"
-#include "sipresponseelements.h"
-#include <sipstrings.h>
-#include <sipstrconsts.h>
-#include "CSipSseTestTls.h"
-
-
-EXPORT_C CSIPServerTransaction::~CSIPServerTransaction()
-	{
-	delete iRequestElements;
-	}
-
-
-CSIPServerTransaction::CSIPServerTransaction( RStringF aType )
- : CSIPTransactionBase( aType, EFalse )
-	{
-	}
-
-
-EXPORT_C CSIPServerTransaction* CSIPServerTransaction::NewL( RStringF aType )
-	{
-	return new(ELeave)CSIPServerTransaction( aType );
-	}
-
-
-EXPORT_C void CSIPServerTransaction::SetRequestElements(
-    CSIPRequestElements* aElements)
-    {
-    if( iRequestElements )
-    	{
-    	delete iRequestElements;
-    	}
-    
-    iRequestElements = aElements;
-    }
-
-
-EXPORT_C void CSIPServerTransaction::SendResponseL(
-    CSIPResponseElements *aElements)
-    {
-    CSipSseTestTls* tls = CSipSseTestTls::Storage();
-    if ( tls )
-        {
-        User::LeaveIfError( tls->Error() );
-       // tls->SIPSends( Type(), aElements );
-        }
-    else
-        {
-        delete aElements;
-        }
-    }
-
-
-EXPORT_C const CSIPRequestElements* CSIPServerTransaction::RequestElements() const
-    {
-    return iRequestElements;
-    }
-    
-EXPORT_C TBool CSIPServerTransaction::ResponseAllowed() const
-    {
-    if ( Type() == SIPStrings::StringF( SipStrConsts::EAck ) )
-        {
-        return EFalse;
-        }
-    else
-        {
-        return ETrue;
-        }
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csiptransactionbase.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "siptransactionbase.h"
-#include "sipresponseelements.h"
-#include "sipstrings.h"
-#include "SipStrConsts.h"
-
-CSIPTransactionBase::~CSIPTransactionBase()
-	{
-	delete iResponseElements;
-	}
-
-CSIPTransactionBase::CSIPTransactionBase( RStringF aType, TBool aIsCliTrx )
-  : iType(aType),
-    iIsClientTransaction(aIsCliTrx),
-    iState(ETrying)
-	{
-	    
-	if ( iIsClientTransaction && iType == SIPStrings::StringF( SipStrConsts::EInvite ) )
-	    {
-	    iState = ECalling;
-	    }
-	}
-
-EXPORT_C TBool CSIPTransactionBase::operator==(const CSIPTransactionBase& aTransactionBase) const
-	{
-	return (this == &aTransactionBase);
-	}
-
-EXPORT_C CSIPTransactionBase::TState CSIPTransactionBase::StateL()
-	{
-	return iState;
-	}
-
-EXPORT_C RStringF CSIPTransactionBase::Type() const 
-    {
-    return iType;
-    }
-
-EXPORT_C TBool CSIPTransactionBase::IsSIPClientTransaction() const
-    {
-    return iIsClientTransaction;
-    }
-
-void CSIPTransactionBase::ChangeState( CSIPTransactionBase::TState aNextState )
-    {
-    iState = aNextState;
-    } 
-    
-void CSIPTransactionBase::Detach(const MTransactionAssociation& /*aAssociation*/)
-    {
-    }
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/group/sipprofile.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Definition of project MceClientStub
-*
-*/
-
-
-// To get the APP_LAYER_SYSTEMINCLUDE-definition
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-TARGET              	sipprofilecli.dll
-TARGETTYPE            	dll
-UID                  	0x1000008d 0x00000113 // Experimental UID
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-SOURCE                   sipmanagedprofileregistrystub.cpp
-SOURCE                   sipmanagedprofilestub.cpp
-SOURCE                   sipprofileregistrybasestub.cpp
-SOURCE                   sipprofileregistrystub.cpp
-SOURCE                   sipprofilestub.cpp
-SOURCE                   sipstub.cpp sipprofilealrcontroller.cpp
-
-
-USERINCLUDE             ../inc
-
-// Default system include paths for application layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 euser.lib
-LIBRARY                 bafl.lib
-
-EXPORTUNFROZEN
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/inc/sipprofile.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,343 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The class providing profile data of SIP service provider
-*
-*/
-
-
-#ifndef CSIPPROFILE_H
-#define CSIPPROFILE_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <e32std.h>
-#include <badesca.h>
-#include "sipregistrationcontext.h"
-#include "sipprofiletypeinfo.h"
-
-// FORWARD DECLARATIONS
-class CSIPConcreteProfile;
-class CSIPProfileRegistry;
-class CSIPProfileRegistryBase;
-
-/** 
-* SIP Profile ID which value is type of TUint32
-*/
-const TUint32 KSIPProfileId = 1;
-
-/** 
-* SIP Provider Name which value is type of TDesC8
-*/
-const TUint32 KSIPProviderName = 2;
-
-/** 
-* Access Point ID which value is type of TUint32
-*/
-const TUint32 KSIPAccessPointId = 3;
-
-/** 
-* Signaling compression (SigComp) which value is type of TBool. 
-* ETrue indicates that SigComp is enabled
-*/
-const TUint32 KSIPSigComp = 4;
-
-/** 
-* Security Negotiation which value is type of TBool. ETrue indicates that
-* Security Negotiation is enabled
-*/
-const TUint32 KSIPSecurityNegotiation = 5;
-
-/** 
-* Auto Registration which value is type of TBool. ETrue indicates that 
-* profile is enabled for auto registration
-*/
-const TUint32 KSIPAutoRegistration = 6;
-
-/** 
-* Defined user's address-of-record which value is type of TDesC8 
-*/
-const TUint32 KSIPUserAor = 7;
-
-/** 
-* Registration which value is type of TBool. ETrue indicates that
-* profile is registered 
-*/
-const TUint32 KSIPProfileRegistered = 8;
-
-/** 
-* Uers's registered address-of-records which value is of type MDesC8Array.
-* Note that array will contain AORs only in case the profile is registered.
-*/
-const TUint32 KSIPRegisteredAors = 9;
-
-/** 
-* Negotiated security mechanism during registration procedure which value
-* is of type TDesC8.
-* Note that descriptor will contain value only in case the profile is 
-* registered.
-*/
-const TUint32 KSIPNegotiatedSecurityMechanism = 10;
-
-/** 
-* Default profile which value is type of TBool. 
-* ETrue indicates that profile is default  
-*/
-const TUint32 KSIPDefaultProfile = 11;
-
-/** 
-* "Contact" header parameters used during registration which value
-*is of type MDesC8Array. Array element contains one "Contact" header
-* parameter.
-*/
-const TUint32 KSIPContactHeaderParams = 12;
-
-/** 
-* SIP Registrar  
-*/
-const TUint32 KSIPRegistrar = 130;
-
-/** 
-* SIP Outbound Proxy
-*/
-const TUint32 KSIPOutboundProxy = 131;
-
-/** 
-* HTTP Digest user name which value is type of TDesC8 
-*/
-const TUint32 KSIPDigestUserName = 150;
-
-/** 
-* HTTP Digest realm which value is type of TDesC8
-*/
-const TUint32 KSIPDigestRealm = 151;
-
-/** 
-* SIP server's address which value is of type TDesC8
-*/
-const TUint32 KSIPServerAddress = 152;
-
-// CLASS DECLARATION
-/**
-* @publishedAll
-* @released
-*
-* Class contains profile information of particular SIP service
-* provider. Class provides functions for quering profile parameter
-* values.
-*  @lib sipprofilecli.lib
-*/
-class CSIPProfile: public CBase, public MSIPRegistrationContext
-    {    
-    public:  // Constructors and destructor
-        /**
-        * Destructor.
-        * @capability NetworkServices
-        */
-        IMPORT_C ~CSIPProfile();
-
-    public: // New functions
-        /**
-        * Gets profile type information
-        * @return profile type information
-        */
-        IMPORT_C const TSIPProfileTypeInfo& Type() const;
-
-        /** 
-        * Gets profile parameter
-        * @param aParam a parameter to get
-        * @param aVal on return will contain parameter value
-        * @return KErrNotFound if parameter was not found, KErrNone otherwise
-        */
-        IMPORT_C TInt GetParameter(TUint32 aParam, TDesC8 const *& aVal) const; 
-
-        /** 
-        * Gets profile parameter
-        * @param aParam a parameter to get
-        * @param aVal on return will contain parameter value
-        * @return KErrNotFound if parameter was not found, KErrNone otherwise
-        */
-        IMPORT_C TInt GetParameter(TUint32 aParam, TUint32& aVal) const;
-
-        /** 
-        * Gets profile parameter
-        * @param aParam a parameter to get
-        * @param aVal on return will contain parameter value
-        * @return KErrNotFound if parameter was not found, KErrNone otherwise
-        */
-        IMPORT_C TInt GetParameter(TUint32 aParam, TBool& aVal) const;
-
-        /** 
-        * Gets profile parameter
-        * @param aParam a parameter to get
-        * @param aVal on return will contain parameter value
-        * @return KErrNotFound if parameter was not found, KErrNone otherwise
-        */
-        IMPORT_C TInt GetParameter(TUint32 aParam, MDesC8Array const *& aVal) const;
-
-        /** 
-        * Gets profile parameter that is defined for a particular SIP server
-        * @param aServer a SIP server type
-        * @param aParam a parameter to get
-        * @param aVal on return will contain parameter value
-        * @return KErrNotFound if parameter was not found, KErrNone otherwise
-        */
-        IMPORT_C TInt GetParameter(TUint32 aServerType, TUint32 aParam, TDesC8 const *& aVal) const;
-
-    public: //Functions from base class
-        /**
-        * Tests if the registration context can be
-        * used for creating SIP messages/dialogs
-        * Profile can be used, when CSIPProfileRegistry::IsEnabled() == ETrue
-        * and Status() == ERegistered.
-        * @return ETrue if can be used, EFalse otherwise
-        */
-        TBool IsContextActive() const;
-
-        /**
-        * 
-        * For internal use only
-        * @return context id
-        */
-        TUint32 ContextId() const;
-        
-
-    public: //New functions
-
-        /**
-        * Two-phased constructor.
-        * @param aSIPRegistry a SIP profile client providing connection to SIP 
-        *         profile server.
-        */
-
-        static CSIPProfile* NewL(CSIPProfileRegistry* aSIPRegistry);
-
-        /**
-        * Two-phased constructor.
-        * @param aSIPRegistry a SIP profile client providing connection to SIP 
-        *         profile server.
-        * Constructs an object and adds the pointer to the cleanup stack;
-        */
-
-        static CSIPProfile* NewLC(CSIPProfileRegistry* aSIPRegistry);
-
-        /**
-        * Sets profiles enabled state
-        * @param aEnabled ETrue if enabled
-        */
-
-        void SetEnabled(TBool aEnabled);
-
-        /**
-        * Sets concrete profile that holds actual data 
-        * @param aProfile profile instance containing data
-        */
-
-        void SetConcreteProfile(CSIPConcreteProfile* aProfile);
-
-        /**
-        * Clears concrete profile that holds actual data 
-        */
-
-        void ClearConcreteProfile();
-
-        /**
-        * Gets concrete profile that holds actual data
-        * @return concrete profile holding data
-        */
-
-        CSIPConcreteProfile& ConcreteProfile();
-
-        /**
-        * Gets concrete profile that holds actual data
-        * @return concrete profile holding data
-        */
-
-        const CSIPConcreteProfile& ConcreteProfile() const;
-
-        /**
-        * Checks if the profile is enabled
-        * @return ETrue if enabled, EFalse otherwise
-        */
-
-        TBool IsEnabled() const;
-
-        /**
-        * Gets last occurred error during registration
-        * @return last occurred error code, KErrNone if no error
-        */
-        TInt LastRegistrationError() const;
-
-        /**
-        * Checks if two profiles are equal
-        * @return ETrue if equal
-        */
-        TBool operator==(const CSIPProfile& 
-                                 aProfile) const;
-
-        /**
-        * sets pointer to registry for profile
-        */
-        void SetRegistry(CSIPProfileRegistryBase* aRegistry);
-        
-        /**
-        * Clears pointer to registry from profile
-        */
-        void ClearRegistry();
-        
-    protected:
-
-        /**
-        * Constructor. 
-        */                
-        CSIPProfile(CSIPProfileRegistryBase* aRegistry);
-        
-        /**
-        * 2nd phase constructor. 
-        */                
-        void ConstructL();
-
-    protected:
-    
-        CSIPConcreteProfile* iSIPProfile;
-        CSIPProfileRegistryBase* iSIPProfileRegistry;
-
-    // Stub data
-
-    public:
-    
-        TBool iEnabled;
-        TBool iIsDefaultProfile;
-        
-        TSIPProfileTypeInfo iTypeInfo;
-        
-        // Value iTUint32Value is set to aVal when calling
-        // GetParameter(TUint32 aParam, TUint32& aVal)
-        // if iTUint32ValueError == KErrNone. 
-        // iTUint32ValueError is returned in any case
-        TUint32 iTUint32Value;
-        TInt iTUint32ValueError;
-        
-        // Value iTBoolValue is set to aVal when calling
-        // GetParameter(TUint32 aParam, TBool& aVal)
-        // if iTBoolValueError == KErrNone. 
-        // iTBoolValueError is returned in any case
-        TBool iTBoolValue;
-        TInt iTBoolValueError;
-        
-        CDesC8Array* iArray;
-        
-        //
-    };
-
-#endif // CSIPPROFILE_H
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/inc/sipprofileregistry.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The class for using SIP profiles
-*
-*/
-
-
-#ifndef CSIPPROFILEREGISTRY_H
-#define CSIPPROFILEREGISTRY_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <e32std.h>
-#include <badesca.h>
-#include "sipprofileregistrybase.h"
-
-// FORWARD DECLARATIONS
-class CSIP;
-class CSIPConnection;
-class CSIPProfile;
-class MSIPProfileRegistryObserver;
-class MSIPConnectionObserver;
-
-// STUB stuff
-
-typedef TInt TSIPProfileBehavior;
-const TSIPProfileBehavior KRegistryLeaveAtConstruct = 1;
-const TSIPProfileBehavior KSIPProfileIdFetchFails = 2;
-const TSIPProfileBehavior KSIPIapIdFetchFails = 3;
-const TSIPProfileBehavior KSIPConnectionLeaveAtConstruct = 4;
-
-class CSIPProfileBehaviorTls : public CBase
-    {
-public:
-    static void OpenL();
-    static void Close();
-	
-    static CSIPProfileBehaviorTls* Storage();
-    
-    void Reset();
-
-private:
-
-    CSIPProfileBehaviorTls();	
-    ~CSIPProfileBehaviorTls();
-
-public:
-
-    TSIPProfileBehavior iRegistryBehavior;
-    TSIPProfileBehavior iProfileBehavior;    
-    TSIPProfileBehavior iConnectionBehavior;
-    };
-	
-
-
-// CLASS DECLARATION
-/**
-*  @publishedAll
-*  @released
-*
-*  The class for retrieving SIP profiles from permanent storage.
-*  This class provides services for retreiving SIP profiles
-*  and enabling/disabling them for the usage.
-*
-*  The user can create only one instance of this class (a singleton class).
-*
-*  @lib sipprofilecli.lib
-*/
-class CSIPProfileRegistry: public CSIPProfileRegistryBase
-    {
-    public:  // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        * This constructor should be used if the client intends
-        * to use SIP services with profiles.
-        * @param aSip a SIP client providing connection to SIP stack.
-        * @param aObserver a observer for SIP profile change events.
-        */
-        IMPORT_C static CSIPProfileRegistry* NewL(
-                                        CSIP& aSip,
-                                        MSIPProfileRegistryObserver& aObserver);
-
-        /**
-        * Two-phased constructor.
-        * This constructor should be used if the client intends
-        * to use SIP services with profiles.
-        * Constructs an object and adds the pointer to the cleanup stack;
-        * @param aSip a SIP client providing connection to SIP stack.
-        * @param aObserver a observer for SIP profile change events.
-        */
-        IMPORT_C static CSIPProfileRegistry* NewLC(
-                                        CSIP& aSip,
-                                        MSIPProfileRegistryObserver& aObserver);
-
-        /**
-        * Destructor
-        */
-        IMPORT_C ~CSIPProfileRegistry();
-
-    public: // New functions
-        /**
-        * Gets handle to the SIP server
-        * @return handle to the SIP server
-        */
-        IMPORT_C CSIP& SIP() const;
-
-        /**
-        * Gets the SIP connection to be used with this SIP profile.
-        * @pre IsEnabled() == ETrue
-        * @param aProfile a sip profile
-        * @return a SIP connection to be used; the owneship is transfered
-        * @leave KErrNoMemory if out of memory
-        * @capability NetworkServices
-        */
-        IMPORT_C CSIPConnection* ConnectionL(
-                        CSIPProfile& aProfile);
-
-        /**
-        * Enables the SIP profile for use.
-        * Enabling the SIP profile will cause the SIP profile to
-        * be registered if its status was unregistered.
-        * The user must check the profile status after calling this
-        * function. In case the profile is not registered the user must
-        * wait until the it is notified about profile registration 
-        * on MSIPProfileRegistryObserver-callback interface.
-        * @param aProfile a sip profile to enable
-        * @param aObserver a observer for SIP connection events
-        * @leave KErrNotFound if non-existing profile is provided
-        * @capability NetworkServices
-        */
-        IMPORT_C void EnableL(
-                        CSIPProfile& aProfile,
-                        MSIPConnectionObserver &aObserver);
-        
-        /**
-        * Disables the usage of SIP profile
-        * @param aProfile a sip profile to disable
-        * @return KErrNone if SIP profile was successfully disabled; 
-        *         system wide error otherwise
-        * @capability NetworkServices
-        */
-        IMPORT_C TInt Disable(CSIPProfile& aProfile);
-
-        /**
-        * Tests is the SIP profile enabled for the use
-        * @param aProfile a SIP profile to be checked
-        * @return ETrue if SIP profile is enabled; EFalse otherwise
-        */
-        IMPORT_C TBool IsEnabled(const CSIPProfile& aProfile) const;
-
-    public: 
-
-        CSIPProfile* NewInstanceL();
-    
-    private:
-        
-        CSIPProfileRegistry();
-        CSIPProfileRegistry(CSIP& aSip, MSIPProfileRegistryObserver& aObserver);
-
-        void ConstructL();
-        
-    public:
-    
-       TBool iProfileDisabled;
-       mutable TBool iProfileEnabled;
-        
-    private: 
-
-        CSIP& iSip;
-        MSIPConnectionObserver* iConnectionObserver;
-        
-    };
-
-#endif // CSIPPROFILEREGISTRY_H
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipmanagedprofileregistrystub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation
-*
-*/
-
-
-//  INCLUDE FILES
-
-#include "sip.h"
-#include "sipconnection.h"
-#include "sipprofileregistry.h"
-#include "sipmanagedprofileregistry.h"
-#include "sipprofileregistryobserver.h"
-#include "sipprofile.h"
-#include "sipmanagedprofile.h"
-//#include "sipconcreteprofile.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-EXPORT_C void CSIPManagedProfileRegistry::SaveL(CSIPProfile& /*aSIPProfile*/)
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPManagedProfileRegistry* CSIPManagedProfileRegistry::NewL(
-	MSIPProfileRegistryObserver& aObserver)
-	{
-    CSIPManagedProfileRegistry* self = CSIPManagedProfileRegistry::NewLC(aObserver);
-    CleanupStack::Pop(self);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPManagedProfileRegistry* CSIPManagedProfileRegistry::NewLC(
-	MSIPProfileRegistryObserver& aObserver)
-	{
-	CSIPManagedProfileRegistry* self = new (ELeave) CSIPManagedProfileRegistry(aObserver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::~CSIPManagedProfileRegistry
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPManagedProfileRegistry::~CSIPManagedProfileRegistry()
-	{
-	
-	}
-/*
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::EnableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPManagedProfileRegistry::EnableL(CSIPProfile& aSIPProfile,
-						MSIPConnectionObserver& aObserver)
-	{
-	//__ASSERT_ALWAYS (!aSIPProfile.IsEnabled(), User::Leave (KErrArgument));
-	//aSIPProfile.ConcreteProfile().SetLastRegistrationError(KErrNone);
-	//iConnectionObserver = &aObserver;
-
-	//EnableProfileL(aSIPProfile);
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::Disable
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CSIPManagedProfileRegistry::Disable(CSIPProfile& /*aProfile)
-	{
-	TInt err = KErrNone;
-	//aProfile.ConcreteProfile().SetLastRegistrationError(KErrNone);
-	//TRAPD(err, DisableProfileL(aProfile));
-	return err;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::SIP
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIP& CSIPManagedProfileRegistry::SIP() const
-	{
-	return iSip;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::ConnectionL
-// -----------------------------------------------------------------------------
-//
-//EXPORT_C CSIPConnection* CSIPManagedProfileRegistry::ConnectionL(
-//						/*CSIPProfile& aSIPProfile)
-//	{
-	//TUint32 apId(0);
-	//__ASSERT_ALWAYS (iConnectionObserver != 0, User::Leave (KErrArgument));
-	//aSIPProfile.GetParameter(KSIPAccessPointId, apId);
-	//CSIPConnection* connection = iSip.Connection(apId);
-	//if (connection == 0)
-	//	{
-	//	connection = CSIPConnection::NewL(iSip, apId, 
-	//		*iConnectionObserver);
-	//	}
-	//return connection;
-//	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::IsEnabled
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CSIPManagedProfileRegistry::IsEnabled(const CSIPProfile& /*aSIPProfile) const
-	{
-	//return aSIPProfile.IsEnabled();
-	return ETrue;
-	}
-*/
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::CSIPManagedProfileRegistry
-// -----------------------------------------------------------------------------
-//
-CSIPManagedProfileRegistry::CSIPManagedProfileRegistry(
-	MSIPProfileRegistryObserver& aObserver)
-	: CSIPProfileRegistryBase( aObserver )
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CSIPManagedProfileRegistry::ConstructL()
-	{
-//	BaseConstructL();
-
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfileRegistry::NewInstanceL
-// -----------------------------------------------------------------------------
-//
-CSIPProfile* CSIPManagedProfileRegistry::NewInstanceL()
-	{
-    return CSIPManagedProfile::NewL(this);
-	}
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipmanagedprofilestub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation
-*
-*/
-
-
-//  INCLUDE FILES
-
-#include "sipprofile.h"
-#include "sipmanagedprofile.h"
-#include "sipprofileregistry.h"
-#include "sipmanagedprofileregistry.h"
-
-/*
-
-//#include "sipconcreteprofile.h"
-//#include "SIPProfileTypeInfo.h"
-//_LIT8(KSIPProfileExtenstionParameter, "%u");
-//const TUint KProfileBufferSize = 25;
-
-_LIT8(KSIPProfileDefAOR, "user@aa");
-        /** 
-        * Sets profile parameter
-        * @param aParam a parameter to set
-        * @param aVal values to set; an empty array resets the value
-        * @return KErrNotFound if parameter was not found, 
-        *         KErrNoMemory if out of memory          
-        *          KErrNone otherwise        
-        */
-EXPORT_C TInt CSIPManagedProfile::SetParameter( TUint32 /*aParam*/, 
-                                         const MDesC8Array& /*aVal*/ )
-    {
-    return KErrNone;
-    }
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSIPManagedProfile* CSIPManagedProfile::NewL(CSIPManagedProfileRegistry* aSIPRegistry)
-	{
-    CSIPManagedProfile* self = CSIPManagedProfile::NewLC (aSIPRegistry);
-    CleanupStack::Pop();
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSIPManagedProfile* CSIPManagedProfile::NewLC(CSIPManagedProfileRegistry* aSIPRegistry)
-	{
-	CSIPManagedProfile* self = new(ELeave)CSIPManagedProfile(aSIPRegistry);
-    CleanupStack::PushL (self);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::~CSIPManagedProfile
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPManagedProfile::~CSIPManagedProfile()
-	{
-	}
-/*
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::GetParameter
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CSIPManagedProfile::GetParameter(TUint32 aParam, TDesC8 const *& aVal ) const
-	{
-	const TDesC8& val= KSIPProfileDefAOR;
-    aVal = &val;
-	return KErrNone;
-	}	
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::GetParameter
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CSIPManagedProfile::GetParameter(TUint32 aParam, TUint32& aVal) const
-	{
-	aVal = 1;
-	return KErrNone;
-	}	
-
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::GetParameter
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CSIPManagedProfile::GetParameter(TUint32 aParam, TBool& aVal) const
-	{
-	aVal = ETrue;
-	return KErrNone;
-	}
-*/	
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::CSIPManagedProfile
-// -----------------------------------------------------------------------------
-//	
-CSIPManagedProfile::CSIPManagedProfile(CSIPManagedProfileRegistry* aRegistry) :
-    CSIPProfile( aRegistry )
-	{
-	}
-
-/*
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::IsContextActive
-// -----------------------------------------------------------------------------
-//	
-TBool CSIPManagedProfile::IsContextActive() const
-	{
-	return ETrue;
-	}
-	
-// -----------------------------------------------------------------------------
-// CSIPManagedProfile::ContextId
-// -----------------------------------------------------------------------------
-//	
-TUint32 CSIPManagedProfile::ContextId() const
-	{
-	return 1;
-	}
-*/
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipprofilealrcontroller.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation
-*
-*/
-
-
-//  INCLUDE FILES
-
-#include <sipprofilealrcontroller.h>
-
-
-// CSipProfileAlrController STUB
-CSipProfileAlrController* CSipProfileAlrController::NewL( 
-    CSIPProfileRegistryBase& aRegistry, 
-    MSipProfileAlrObserver& /*aObserver*/ )
-    {
-    return new( ELeave )CSipProfileAlrController( aRegistry );
-    }
-
-CSipProfileAlrController::~CSipProfileAlrController()
-    {
-    }
-
-void CSipProfileAlrController::AllowMigrationL(
-    TUint32 /*aProfileId*/,
-    TUint32 aIapId )
-    {
-    delete HBufC::NewL( 1 );
-    //iAllowMigrationCalled = ETrue;
-    //iLastUsedIap = aIapId;
-    }
-
-void CSipProfileAlrController::DisallowMigrationL(
-    TUint32 /*aProfileId*/,
-    TUint32 aIapId )
-    {
-    delete HBufC::NewL( 1 );
-    //iDisallowMigrationCalled = ETrue;
-    //iLastUsedIap = aIapId;
-    }
-
-void CSipProfileAlrController::RefreshIapAvailabilityL( 
-    TUint32 /*aProfileId*/ )
-    {
-    delete HBufC::NewL( 1 );
-    }
-
-CSipProfileAlrController::CSipProfileAlrController( 
-    CSIPProfileRegistryBase& aRegistry )
-    : iRegistry( aRegistry )
-    {
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipprofileregistrybasestub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,383 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation
-*
-*/
-
-
-//  INCLUDE FILES
-
-#include "sipprofile.h"
-#include "sip.h"
-#include "sipprofileregistrybase.h"
-#include "sipprofileregistryobserver.h"
-#include "sipprofileregistry.h"
-#include "sipprofileregistryobserver.h"
-#include "sipmanagedprofile.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::~CSIPProfileRegistryBase
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPProfileRegistryBase::~CSIPProfileRegistryBase()
-	{
-	
-		
-	//iProfiles.ResetAndDestroy();
-	//iProfiles.Close();
-	
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfilesL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPProfileRegistryBase::ProfilesL(
-			 RPointerArray<CSIPProfile>& aProfiles)
-	{
-	// stubs
-	CSIPProfileRegistry* reg = (CSIPProfileRegistry*) this;
-	CSIPProfile* profile = CSIPProfile::NewLC(reg);
-	
-	aProfiles.AppendL ( profile  );
-	
-	CleanupStack::Pop( profile );
-
-	
-	}
-	
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfilesL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPProfileRegistryBase::ProfilesL(
-			 const TSIPProfileTypeInfo& /*aType*/,
-			 RPointerArray<CSIPProfile>& aProfiles)
-	{
-		// stubs
-	CSIPProfileRegistry* reg = (CSIPProfileRegistry*) this;
-	
-	CSIPProfile* profile = CSIPProfile::NewLC( reg );
-	aProfiles.AppendL ( profile  );
-
-	CleanupStack::Pop( profile );
-	
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfilesL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPProfileRegistryBase::ProfilesL(
-			 const TDesC8& /*aAOR*/,
-			 RPointerArray<CSIPProfile>& aProfiles)
-	{
-	// stubs
-	ProfilesL( aProfiles );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfilesCommonL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::ProfilesCommonL(
-			 				RPointerArray<CSIPProfile>& /*aProfiles*/,
-			 				CSIPConcreteProfileHolder* /*aHolder */)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfileL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPProfile* CSIPProfileRegistryBase::ProfileL(TUint32 /*aId*/)
-    {
-	return NewInstanceL();
-	}
-
-	
-//
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::DefaultProfileL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPProfile* CSIPProfileRegistryBase::DefaultProfileL()
-	{
-	CSIPProfile* defaultProfile = NewInstanceL();
-    defaultProfile->iIsDefaultProfile = ETrue;
-	return defaultProfile;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::SupportedProfileTypesL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPProfileRegistryBase::SupportedProfileTypesL(
-					RArray<TSIPProfileTypeInfo>& /*aSupportedProfileTypes*/ )
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::LastRegistrationError
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CSIPProfileRegistryBase::LastRegistrationError(
-			 const CSIPProfile& /*aProfile*/) const
-	{
-	return KErrNone;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::CSIPProfileRegistryBase
-// -----------------------------------------------------------------------------
-//
-CSIPProfileRegistryBase::CSIPProfileRegistryBase(
-	MSIPProfileRegistryObserver& aObserver):
-	iObserver(aObserver)
-	{
-
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfileDeleted
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::ProfileDeleted(CSIPProfile& /*aProfile*/)
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::EnableProfileL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::EnableProfileL(
-	CSIPProfile& /*aProfile*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::DisableProfileL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::DisableProfileL(CSIPProfile& /*aProfile*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::UsageL
-// -----------------------------------------------------------------------------
-//
-TInt CSIPProfileRegistryBase::UsageL(const CSIPProfile& /*aProfile*/) const
-	{
-	User::Leave( KErrNotSupported );
-	return KErrNone;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::AddProfileL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::AddProfileL(CSIPProfile& /*aProfile*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::UpdateProfileL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::UpdateProfileL(CSIPProfile& /*aProfile*/)
-	{	
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::RemoveProfileL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::RemoveProfileL(CSIPProfile& /*aProfile*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::IsDefaultProfileL
-// -----------------------------------------------------------------------------
-//
-TBool CSIPProfileRegistryBase::IsDefaultProfileL(const CSIPProfile& /*aProfile*/)
-	{
-	User::Leave( KErrNotSupported );
-	return ETrue;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::RegistrationStatusChangedL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::NegotiatedSecurityMechanismL(
-	CSIPConcreteProfile& /*aProfile*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::RegisteredAORsL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::RegisteredAORsL(CSIPConcreteProfile& /*aProfile*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::SIPProfileL
-// -----------------------------------------------------------------------------
-//
-CSIPProfile* CSIPProfileRegistryBase::SIPProfileL(TUint32 aId, TInt /*aSize*/)
-	{
-	__ASSERT_ALWAYS (aId > 1, User::Leave (KErrArgument));
-	return NULL;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::StoreProfileL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::StoreProfileL(CSIPProfileCleanupItem* /*aCleanupItem*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::StoreProfileL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::StoreArrayL(
-	RPointerArray<CSIPConcreteProfile>& /*aProfiles*/,
-	RPointerArray<CSIPProfile>& /*aRetProfiles*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfileItemL
-// -----------------------------------------------------------------------------
-//
-/*
-CSIPProfileItem* CSIPProfileRegistryBase::ProfileItemL(TUint aProfileId )
-	{
-	User::Leave( KErrNotSupported );
-	return NULL;
-	}
-*/
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfileIndex
-// -----------------------------------------------------------------------------
-//
-TInt CSIPProfileRegistryBase::ProfileIndex (TUint /*profileId*/)
-	{
-	return 0;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ProfileItemByIndex
-// -----------------------------------------------------------------------------
-//
-CSIPProfileItem* CSIPProfileRegistryBase::ProfileItemByIndex(TUint /*aIndex*/)
-	{
-	return NULL;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::RegistrationStatusChangedL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::RegistrationStatusChangedL(TUint32 /*aProfileId*/,
-							  TInt /*aStatus*/,
-							  TUint32 /*aStatusId*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::UpdatedL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::UpdatedL(TUint32 /*aProfileId*/, TUint /*aSize*/)
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::AddedL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::AddedL(TUint32 /*aProfileId*/) 
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::RemovedL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::RemovedL(TUint32 /*aProfileId*/)
-	{
-	User::Leave( KErrNotSupported );
-	}	
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::ErrorOccurredL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::ErrorOccurredL(TUint32 /*aProfileId*/,
-										   TInt /*aStatus*/,
-										   TInt /*aError*/ )
-	{
-	User::Leave( KErrNotSupported );
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::BaseConstructL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::BaseConstructL()
-	{
-
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::CrashRevert
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::CrashRevert (TAny* /*aItem*/)
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistryBase::LocalCrashRevert
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistryBase::LocalCrashRevert (TAny* /*aItem*/)
-	{
-	}
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipprofileregistrystub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation
-*
-*/
-
-
-//  INCLUDE FILES
-
-#include "sip.h"
-#include "sipconnection.h"
-#include "sipprofileregistry.h"
-#include "sipprofileregistryobserver.h"
-#include "sipprofile.h"
-//#include "sipconcreteprofile.h"
-
-// STUB stuff
-
-void CSIPProfileBehaviorTls::OpenL()
-	{
-    CSIPProfileBehaviorTls* self = new (ELeave) CSIPProfileBehaviorTls();
-    Dll::SetTls( self );
-	}
-
-void CSIPProfileBehaviorTls::Close ()
-	{
-	CSIPProfileBehaviorTls* self = Storage();
-    delete self;
-    Dll::SetTls( NULL );
-	}
-
-	
-CSIPProfileBehaviorTls* CSIPProfileBehaviorTls::Storage()
-	{
-	return static_cast<CSIPProfileBehaviorTls*>(Dll::Tls());
-	}
-
-void CSIPProfileBehaviorTls::Reset()
-    {
-    iRegistryBehavior = 0;
-    iProfileBehavior = 0;
-    iConnectionBehavior = 0;
-    }
-    
-CSIPProfileBehaviorTls::CSIPProfileBehaviorTls()
-	{
-	}
-	
-CSIPProfileBehaviorTls::~CSIPProfileBehaviorTls()
-	{
-	}
-	
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPProfileRegistry* CSIPProfileRegistry::NewL(
-	CSIP& aSip,
-	MSIPProfileRegistryObserver& aObserver)
-	{
-    CSIPProfileRegistry* self = CSIPProfileRegistry::NewLC(aSip, aObserver);
-    CleanupStack::Pop(self);
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPProfileRegistry* CSIPProfileRegistry::NewLC(
-	CSIP& aSip,
-	MSIPProfileRegistryObserver& aObserver)
-	{
-	CSIPProfileRegistry* self = new (ELeave) CSIPProfileRegistry(aSip, aObserver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::~CSIPProfileRegistry
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPProfileRegistry::~CSIPProfileRegistry()
-	{
-	
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::EnableL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CSIPProfileRegistry::EnableL(CSIPProfile& /*aSIPProfile*/,
-						MSIPConnectionObserver& /*&aObserver*/)
-	{
-	//__ASSERT_ALWAYS (!aSIPProfile.IsEnabled(), User::Leave (KErrArgument));
-	//aSIPProfile.ConcreteProfile().SetLastRegistrationError(KErrNone);
-	//iConnectionObserver = &aObserver;
-
-	//EnableProfileL(aSIPProfile);
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::Disable
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CSIPProfileRegistry::Disable(CSIPProfile& /*aProfile*/)
-	{
-	TInt err = KErrNone;
-	iProfileDisabled = ETrue;
-	//aProfile.ConcreteProfile().SetLastRegistrationError(KErrNone);
-	//TRAPD(err, DisableProfileL(aProfile));
-	return err;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::SIP
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIP& CSIPProfileRegistry::SIP() const
-	{
-	return iSip;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::ConnectionL
-// -----------------------------------------------------------------------------
-//
-//EXPORT_C CSIPConnection* CSIPProfileRegistry::ConnectionL(
-//						/*CSIPProfile& aSIPProfile*/)
-//	{
-	//TUint32 apId(0);
-	//__ASSERT_ALWAYS (iConnectionObserver != 0, User::Leave (KErrArgument));
-	//aSIPProfile.GetParameter(KSIPAccessPointId, apId);
-	//CSIPConnection* connection = iSip.Connection(apId);
-	//if (connection == 0)
-	//	{
-	//	connection = CSIPConnection::NewL(iSip, apId, 
-	//		*iConnectionObserver);
-	//	}
-	//return connection;
-//	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::IsEnabled
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CSIPProfileRegistry::IsEnabled(const CSIPProfile& /*aSIPProfile*/) const
-	{
-	//iProfileEnabled = ETrue;
-	return ETrue;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::CSIPProfileRegistry
-// -----------------------------------------------------------------------------
-//
-CSIPProfileRegistry::CSIPProfileRegistry(
-	CSIP& aSip,
-	MSIPProfileRegistryObserver& aObserver):
-	CSIPProfileRegistryBase(aObserver), iSip(aSip)
-	{
-	
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileRegistry::ConstructL()
-	{
-	CSIPProfileBehaviorTls* tls = CSIPProfileBehaviorTls::Storage();
-	if ( tls )
-	    {
-	    if ( tls->iRegistryBehavior == KRegistryLeaveAtConstruct )
-	        {
-	        User::Leave( KErrGeneral );
-	        }
-	    }
-	BaseConstructL();
-
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfileRegistry::NewInstanceL
-// -----------------------------------------------------------------------------
-//
-CSIPProfile* CSIPProfileRegistry::NewInstanceL()
-	{
-    return CSIPProfile::NewL(this);
-	}
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipprofilestub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation
-*
-*/
-
-
-//  INCLUDE FILES
-
-#include "sipprofile.h"
-//#include "sipmanagedprofile.h"
-#include "sipprofileregistry.h"
-//#include "sipconcreteprofile.h"
-//#include "SIPProfileTypeInfo.h"
-//_LIT8(KSIPProfileExtenstionParameter, "%u");
-//const TUint KProfileBufferSize = 25;
-
-_LIT8(KSIPProfileDefAOR, "user@aa");
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSIPProfile* CSIPProfile::NewL(CSIPProfileRegistry* aSIPRegistry)
-	{
-    CSIPProfile* self = CSIPProfile::NewLC (aSIPRegistry);
-    CleanupStack::Pop();
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSIPProfile* CSIPProfile::NewLC(CSIPProfileRegistry* aSIPRegistry)
-	{
-	CSIPProfile* self = new(ELeave)CSIPProfile(aSIPRegistry);
-    CleanupStack::PushL (self);
-    self->ConstructL ();
-    return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::~CSIPProfile
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CSIPProfile::~CSIPProfile()
-	{
-	delete iArray;
-	}
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TSIPProfileTypeInfo& CSIPProfile::Type() const
-    {
-    return iTypeInfo;
-    }
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::GetParameter
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CSIPProfile::GetParameter( TUint32 /*aParam*/, 
-                                         TDesC8 const *& aVal ) const
-	{
-	const TDesC8& val= KSIPProfileDefAOR;
-    aVal = &val;
-	return KErrNone;
-	}	
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::GetParameter
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CSIPProfile::GetParameter(TUint32 aParam, TUint32& aVal) const
-	{
-	CSIPProfileBehaviorTls* tls = CSIPProfileBehaviorTls::Storage();
-	if ( tls )
-	    {
-	    if ( tls->iProfileBehavior == KSIPProfileIdFetchFails && 
-	         aParam == KSIPProfileId )
-	        {
-	        return KErrNotFound;
-	        }
-	    else if ( tls->iProfileBehavior == KSIPIapIdFetchFails && 
-	              aParam == KSIPAccessPointId )
-	        {
-	        return KErrNotFound;
-	        }
-	    }
-	    
-    if ( iTUint32ValueError == KErrNone )
-	    {
-	    aVal = iTUint32Value;
-	    }
-	return iTUint32ValueError;
-	}	
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::GetParameter
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CSIPProfile::GetParameter(TUint32 aParam, TBool& aVal) const
-	{
-	if ( iTBoolValueError == KErrNone )
-	    {
-	    if ( aParam == KSIPDefaultProfile )
-	        {
-	        aVal = iIsDefaultProfile;
-	        }
-	    else
-	        {
-	        aVal = iTBoolValue;
-	        }
-	    }
-	    
-	return iTBoolValueError;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::GetParameter
-// -----------------------------------------------------------------------------
-//	
-EXPORT_C TInt CSIPProfile::GetParameter( TUint32 /*aParam*/, 
-                                         MDesC8Array const *& aVal) const
-    {
-    if ( iArray )
-        {
-        aVal = iArray;
-        }
-    else
-        {
-        aVal = NULL;
-        }
-    return KErrNone;
-    }
-
-	
-// -----------------------------------------------------------------------------
-// CSIPProfile::CSIPProfile
-// -----------------------------------------------------------------------------
-//	
-CSIPProfile::CSIPProfile(CSIPProfileRegistryBase* aRegistry):
-	iSIPProfileRegistry(aRegistry), 
-	iEnabled(EFalse),
-	iTUint32Value( 1 ),
-    iTUint32ValueError( KErrNone ),
-    iTBoolValue( ETrue ),
-    iTBoolValueError( KErrNone ),
-    iIsDefaultProfile( EFalse )
-	{
-	iTypeInfo.iSIPProfileClass = TSIPProfileTypeInfo::EInternet;
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::ConstructL
-// -----------------------------------------------------------------------------
-//	
-void CSIPProfile::ConstructL()
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CSIPProfile::IsContextActive
-// -----------------------------------------------------------------------------
-//	
-TBool CSIPProfile::IsContextActive() const
-	{
-	return ETrue;
-	}
-	
-// -----------------------------------------------------------------------------
-// CSIPProfile::ContextId
-// -----------------------------------------------------------------------------
-//	
-TUint32 CSIPProfile::ContextId() const
-	{
-	return 1;
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipprofilestub/src/sipstub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation
-*
-*/
-
-
-//  INCLUDE FILES
-
-#include <sip.h>
-
-
-
-EXPORT_C CSIP* CSIP::NewL(const TUid& /*aUid*/,
-                           MSIPObserver& /*aObserver*/)
-    {
-    return new ( ELeave ) CSIP;
-    }
-
-
-EXPORT_C CSIP* CSIP::NewLC(const TUid& /*aUid*/,
-                            MSIPObserver& /*aObserver*/)
-    {
-    CSIP* sip = new ( ELeave ) CSIP;
-    CleanupStack::PushL( sip );
-    return sip;
-    }
-
-
-EXPORT_C CSIP::~CSIP()
-    {
-    }
-
-
-
-EXPORT_C CDesC8Array* CSIP::SupportedSecurityMechanismsL() const
-    {
-    return NULL;
-    }
-
-
-EXPORT_C TBool CSIP::IsSigCompSupportedL() const
-    {
-    return EFalse;
-    }
-
-
-EXPORT_C HBufC8* CSIP::NegotiatedSecurityMechanismL(const TDesC8& /*aHop*/)
-    {
-    return NULL;
-    }
-
-
-EXPORT_C CSIPConnection* CSIP::Connection(TUint32 /*aIapId*/) const
-    {
-    return NULL;
-    }
-
-
-CSIPImplementation& CSIP::Implementation()
-    {
-    return *iImplementation;
-    }
-
-
-CSIP::CSIP()
-    {
-    }
-
-void CSIP::ConstructL(const TUid& /*aUid*/, MSIPObserver& /*aObserver*/)
-    {
-    }
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/lcapplication.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-//USER
-#include "lcapplication.h"
-#include "mustestdirector.h"
-#include <musmanagercommon.h>
-
-//SYSTEM
-#include <QDebug.h>
-#include <Qstring>
-
-LcHbApplication* LcHbApplication::self = 0;
-
-
-// -----------------------------------------------------------------------------
-// LcHbApplication::LcHbApplication
-// -----------------------------------------------------------------------------
-//
-LcHbApplication::LcHbApplication(int &argc, char *argv[], QString useCase) :
-    HbApplication(argc, argv)
-{    
-	  qDebug() << "LcHbApplication::LcHbApplication() ->";
-    self = this;
-    iTestDirector =  CMusTestDirector::NewL();
-    setUseCase( useCase );    
-    qDebug() << "LcHbApplication::LcHbApplication() -<";
-}
-
-// -----------------------------------------------------------------------------
-// LcHbApplication::~LcHbApplication
-// -----------------------------------------------------------------------------
-//
-LcHbApplication::~LcHbApplication()
-{
-    self = 0;
-}
-
-
-// -----------------------------------------------------------------------------
-// LcHbApplication::quit
-// -----------------------------------------------------------------------------
-//
-void LcHbApplication::quit()
-{
-    qDebug() << "LcHbApplication::quit()";
-    if (self) {
-        emit self->handleQuit();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LcHbApplication::quit
-// -----------------------------------------------------------------------------
-//
-void LcHbApplication::setUseCase( QString useCase )
-{
-    qDebug() << "LcHbApplication::setUseCase()";
-    if( useCase == "0") // live
-    {
-    	  qDebug() << "LcHbApplication::LiveUseCase()";
-        iTestDirector->ConfigureLiveSharing();
-    }
-    else if( useCase == "1") // clip
-    {
-        if (self) emit self->handleQuit();
-    }
-    else if( useCase == "2") // stil
-    {
-        if (self) emit self->handleQuit();
-    }
-    else if( useCase == "3") // EMusReceive
-    {
-        qDebug() << "LcHbApplication::ReceiveUseCase()";
-        iTestDirector->ConfigureReceiveSharing();
-    }
-    else if( useCase == "4") // EMusContinue
-    {
-        if (self) emit self->handleQuit();
-    }
-    else if( useCase == "5") // EMusTwoWayVideo
-    {
-        if (self) emit self->handleQuit();
-    }
-    else if( useCase == "6") // EMusReceiveTwoWayVideo
-    {
-        if (self) emit self->handleQuit();
-    }
-    else
-    {
-        if (self) emit self->handleQuit();
-    }
-}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/lcapplication.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCAPPLICATION_H
-#define LCAPPLICATION_H
-
-#include <hbapplication.h>
-#include <QString.h>
-
-class CMusTestDirector;
-
-class LcHbApplication : public HbApplication
-{
-    Q_OBJECT
-    friend class UT_LcApplication;
-    
-public:
-    
-    LcHbApplication(int &argc, char *argv[],QString useCase);
-    ~LcHbApplication();
-    
-signals:
-    
-    void handleQuit();
-
-public slots:
-
-    //from QCoreApplication
-    static void quit();        
-
-private:
-	  void setUseCase( QString useCase );
-
-private: //data
-    
-    static LcHbApplication* self;
-    CMusTestDirector* iTestDirector;
-};
-
-
-#endif //LCAPPLICATION_H
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/main.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-//USER
-#include "lcapplication.h"
-
-//SYSTEM
-#include <lcviewmanager.h>
-#include <QObject.h>
-
-int main(int argc, char *argv[])
-{
-    int err=-1;
-    QString useCase = "0"; // live case
-    QString engineName("MultimediaSharing");
-    QString applicationName("Video Sharing");
-    if (argc >= 2)
-    {
-    	  useCase  = QString::fromUtf8( argv[2] );
-    }
-    LcHbApplication app(argc,argv,useCase);    
-    LcViewManager viewManager(engineName,applicationName);
-    QObject::connect( &app, SIGNAL( handleQuit() ), 
-                 &viewManager, SLOT( terminateSession() ),
-                 Qt::QueuedConnection );
-        
-    err = app.exec();
-    return err;
-}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/moc_lcapplication.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/****************************************************************************
-** Meta object code from reading C++ file 'lcapplication.h'
-**
-** Created: Mon 14. Sep 11:48:03 2009
-**      by: The Qt Meta Object Compiler version 61 (Qt 4.5.0-garden)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "lcapplication.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'lcapplication.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 61
-#error "This file was generated using the moc from 4.5.0-garden. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_LcHbApplication[] = {
-
- // content:
-       2,       // revision
-       0,       // classname
-       0,    0, // classinfo
-       2,   12, // methods
-       0,    0, // properties
-       0,    0, // enums/sets
-       0,    0, // constructors
-
- // signals: signature, parameters, type, tag, flags
-      17,   16,   16,   16, 0x05,
-
- // slots: signature, parameters, type, tag, flags
-      30,   16,   16,   16, 0x0a,
-
-       0        // eod
-};
-
-static const char qt_meta_stringdata_LcHbApplication[] = {
-    "LcHbApplication\0\0handleQuit()\0quit()\0"
-};
-
-const QMetaObject LcHbApplication::staticMetaObject = {
-    { &HbApplication::staticMetaObject, qt_meta_stringdata_LcHbApplication,
-      qt_meta_data_LcHbApplication, 0 }
-};
-
-const QMetaObject *LcHbApplication::metaObject() const
-{
-    return &staticMetaObject;
-}
-
-void *LcHbApplication::qt_metacast(const char *_clname)
-{
-    if (!_clname) return 0;
-    if (!strcmp(_clname, qt_meta_stringdata_LcHbApplication))
-        return static_cast<void*>(const_cast< LcHbApplication*>(this));
-    return HbApplication::qt_metacast(_clname);
-}
-
-int LcHbApplication::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
-    _id = HbApplication::qt_metacall(_c, _id, _a);
-    if (_id < 0)
-        return _id;
-    if (_c == QMetaObject::InvokeMetaMethod) {
-        switch (_id) {
-        case 0: handleQuit(); break;
-        case 1: quit(); break;
-        default: ;
-        }
-        _id -= 2;
-    }
-    return _id;
-}
-
-// SIGNAL 0
-void LcHbApplication::handleQuit()
-{
-    QMetaObject::activate(this, &staticMetaObject, 0, 0);
-}
-QT_END_MOC_NAMESPACE
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/must.loc	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-// ============================================================================
-// * Generated by qmake (2.01a) (Qt 4.5.0-garden) on: Mon 14. Sep 11:50:02 2009
-// * This file is generated by qmake and should not be modified by the
-// * user.
-// ============================================================================
-
-#ifdef LANGUAGE_SC
-#define STRING_r_short_caption "must"
-#define STRING_r_caption "must"
-#else
-#define STRING_r_short_caption "must"
-#define STRING_r_caption "must"
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/must.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#                                                                    
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).   
-# All rights reserved.                                                
-# This component and the accompanying materials are made available    
-# under the terms of "Eclipse Public License v1.0"    
-# which accompanies this distribution, and is available               
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".   
-#                                                                     
-# Initial Contributors:                                               
-# Nokia Corporation - initial contribution.                           
-#                                                                     
-# Contributors:                                                       
-#                                                                     
-# Description:                                                        
-#                                                                     
-#
-
-TEMPLATE = app
-TARGET = must
-CONFIG += hb
-
-# Input
-HEADERS +=  lcapplication.h
-HEADERS +=  mustestdirector.h
-INCLUDEPATH +=  ..\..\..\..\..\inc\
-
-SOURCES += main.cpp 
-SOURCES += lcapplication.cpp
-SOURCES += mustestdirector.cpp
-
-symbian: {
-    TARGET.UID2 = 0x1000008d
-    TARGET.UID3 = 0x1028238D  
-    TARGET.CAPABILITY = CAP_APPLICATION NetworkControl SwEvent Location MultimediaDD
-    LIBS += -llivecommsui -lcentralrepository
-}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/must.rss	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-// ============================================================================
-// * Generated by qmake (2.01a) (Qt 4.5.0-garden) on: Mon 14. Sep 15:39:08 2009
-// * This file is generated by qmake and should not be modified by the
-// * user.
-// ============================================================================
-
-#include <appinfo.rh>
-#include "must.loc"
-
-RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
-	{
-	short_caption = STRING_r_short_caption;
-	caption_and_icon =
-	CAPTION_AND_ICON_INFO
-		{
-		caption = STRING_r_caption;
-		number_of_icons = 0;
-		icon_file = "";
-		};
-	}
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/must_reg.rss	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-// ============================================================================
-// * Generated by qmake (2.01a) (Qt 4.5.0-garden) on: Mon 14. Sep 15:39:08 2009
-// * This file is generated by qmake and should not be modified by the
-// * user.
-// ============================================================================
-
-#include <must.rsg>
-#include <appinfo.rh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x1028238D
-
-RESOURCE APP_REGISTRATION_INFO
-	{
-	app_file="must";
-	localisable_resource_file="\\resource\\apps\\must";
-
-	}
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/mustestdirector.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,373 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "mustestdirector.h"
-#include <musmanagercommon.h>
-#include "mussessionproperties.h"
-#include "musresourceproperties.h"
-#include "mussesseioninformationapi.h"
-#include "mussettingskeys.h"
-#include "mussettings.inl"
-
-#include <e32property.h>
-#include <e32base.h>
-#include <e32err.h>
-#include <QDebug>
-
-_LIT(KTestTelNumber,"+358504869612");
-_LIT( KTestCallProvider,"MultimediaSharing" );
-_LIT( KTestRemoteSipAddress,"sip:siva@musworld.com" );
-_LIT( KTestRemoteSipAddressProposal,"sip:wondering@nokia.com,sip:package@gone.com" );
-_LIT( KTestContactName,"Michel Jackson" );
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusTestDirector::CMusTestDirector() 
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-CMusTestDirector* CMusTestDirector::NewL()
-    {
-    CMusTestDirector* self = new( ELeave )CMusTestDirector();
-    self->ConstructL();
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void CMusTestDirector::ConstructL()
-    {
-    DefinePropertiesL();
-    }
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-CMusTestDirector::~CMusTestDirector() 
-    {
-    DeleteProperties();
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void CMusTestDirector::ConfigureLiveSharing( ) 
-    {
-    SetUseCase( MultimediaSharing::EMusLiveVideo );
-    
-    TInt error = RProperty::Set( NMusResourceApi::KCategoryUid, NMusSessionInformationApi::KMusTelNumber, KTestTelNumber);    
-    MUS_LOG1("mus: [TEST]     return value = %d",error )
-    
-    error = RProperty::Set( NMusResourceApi::KCategoryUid, NMusSessionInformationApi::KMusCallDirection, NMusSessionInformationApi::ECallOrginated);    
-    MUS_LOG1("mus: [TEST]     return value = %d",error )
-    
-    error = RProperty::Set( NMusResourceApi::KCategoryUid, NMusSessionInformationApi::KMUSCallProvider, KTestCallProvider);    
-    MUS_LOG1("mus: [TEST]     return value = %d",error )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void CMusTestDirector::ConfigureReceiveSharing( ) 
-    {
-    SetUseCase( MultimediaSharing::EMusReceive );
-    
-    TInt error = RProperty::Set( NMusResourceApi::KCategoryUid, NMusSessionInformationApi::KMusTelNumber, KTestTelNumber);    
-    MUS_LOG1("mus: [TEST]     return value = %d",error )
-    
-    error = RProperty::Set( NMusResourceApi::KCategoryUid, NMusSessionInformationApi::KMusCallDirection, NMusSessionInformationApi::ECallOrginated);    
-    MUS_LOG1("mus: [TEST]     return value = %d",error )
-    
-    error = RProperty::Set( NMusResourceApi::KCategoryUid, NMusSessionInformationApi::KMUSCallProvider, KTestCallProvider);    
-    MUS_LOG1("mus: [TEST]     return value = %d",error )
-    }
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void CMusTestDirector::SetUseCase( MultimediaSharing::TMusUseCase aUseCase ) 
-    {
-    TInt err = RProperty::Set( NMusSessionApi::KCategoryUid, NMusSessionApi::KUseCase, ( TInt )aUseCase);   
-    }
-
-// -----------------------------------------------------------------------------
-// CMusAoPlugin::DefineResourcePropertiesL()
-// Note : Ignore Define Errors . Because if define fails for sure Set
-//        will fail too . But there are some cases in Define Error should
-//        be ignored like KErrAlreadyExists , KErrPersmissionDenied.So It
-//        could be better if we dont care Define Error but care about Set Err.
-// -----------------------------------------------------------------------------
-//
-void CMusTestDirector::DefinePropertiesL()
-    {
-    MUS_LOG( "mus: [TEST]  -> CMusAoPlugin::DefineResourceProperties") ;
-    // define resource properties
-    // they need to be defined here to make them exist always
-    // Read from cenrep key about the availability of camera and keypad
-    // if the availability is dynamic then define a key else no.
-    MusSettingsKeys::TAvailability camera = MusSettingsKeys::EAvailabilityStatic;
-    MusSettingsKeys::TAvailability keypad = MusSettingsKeys::EAvailabilityStatic ;
-    MultimediaSharingSettings::ResourceAvailability(camera,keypad);         
-    if( camera == MusSettingsKeys::EAvailabilityDynamic )
-        {
-        DefinePropertyL(NMusResourceApi::KCameraAvailability,
-                        RProperty::EInt,( TInt ) NMusResourceApi::ENotAvailable);
-        }   
-    if( keypad == MusSettingsKeys::EAvailabilityDynamic )
-        {       
-        DefinePropertyL(NMusResourceApi::KKeypadAvailability,
-                        RProperty::EInt,( TInt ) NMusResourceApi::ENotAvailable);       
-        }               
-    DefinePropertyL(NMusResourceApi::KCameraInformation,
-                    RProperty::EInt,( TInt ) NMusResourceApi::EUsePrimaryCamera);   
-    DefinePropertyL(NMusSessionInformationApi::KMusCallEvent,
-                    RProperty::EInt,( TInt ) NMusSessionInformationApi::ENoCall); 
-    DefinePropertyL(NMusSessionInformationApi::KMusCallCount,RProperty::EInt,0); 
-    
-    DefinePropertyL(NMusSessionInformationApi::KMusTelNumber,
-                    RProperty::EText,KTestTelNumber); 
-    DefinePropertyL(NMusSessionInformationApi::KMUSForbidden,
-                 RProperty::EInt,( TInt ) NMusSessionInformationApi::EMUSAllowed); 
-    DefinePropertyL(NMusSessionInformationApi::KMusCallDirection,
-                RProperty::EInt,( TInt ) NMusSessionInformationApi::ENoDirection);  
-    
-    DefinePropertyL(NMusSessionInformationApi::KMUSCallProvider,
-                        RProperty::EText,KTestCallProvider);
-
-    DefineSessionPropertyL(NMusSessionApi::KUseCase,
-                            RProperty::EInt,MultimediaSharing::EMusLiveVideo);
-
-    DefineSessionPropertyL(NMusSessionApi::KStatus,
-                            RProperty::EInt,MultimediaSharing::EMultimediaSharingAvailable);
-
-    DefineSessionPropertyL(NMusSessionApi::KTelNumber,
-                            RProperty::EText,KTestTelNumber);
-
-    DefineSessionPropertyL(NMusSessionApi::KRemoteSipAddress,
-                            RProperty::EText,KTestRemoteSipAddress);
-    
-    DefineSessionPropertyL(NMusSessionApi::KRemoteSipAddressProposal,
-                                RProperty::EText,KTestRemoteSipAddressProposal);
-    
-    DefineSessionPropertyL(NMusSessionApi::KContactId,
-                                    RProperty::EInt,1);
-    
-    DefineSessionPropertyL(NMusSessionApi::KContactName,
-                                        RProperty::EText,KTestContactName);
-    
-    DefineSessionPropertyL(NMusSessionApi::KSipProfileId,
-                                            RProperty::EInt,1);
-    
-    CRepository* repository = CRepository::NewL(MusSettingsKeys::KRepositoryUid);
-    TInt uid = 0;
-    TBool exist = (repository->Get(MusSettingsKeys::KEncodingDevice,uid) == KErrNone);
-    if( !exist )
-        {
-        TInt uid = 1234;
-        repository->Create(MusSettingsKeys::KEncodingDevice,uid);
-        TUint32 modifiedKeyCount(0);
-        User::LeaveIfError(repository->CommitTransaction(modifiedKeyCount));
-        }
-   delete repository;
-   
-    MUS_LOG( "mus: [TEST]  <- CMusAoPlugin::DefineResourceProperties" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMusAoPlugin::DefineProperty()
-// -----------------------------------------------------------------------------
-//
-void CMusTestDirector::DefineSessionPropertyL(TInt aKey,RProperty::TType aType,TInt aVal)
-    {
-    MUS_LOG( "mus: [TEST]  -> CMusTestDirector::DefineSessionPropertyL( intValue )" )
-    
-    TInt error = RProperty::Define( NMusSessionApi::KCategoryUid,
-                                     aKey,
-                                     aType );
-    MUS_LOG2( "mus: [TEST]     Key=%d defining tried, return=%d", aKey, error )
-    
-    if ( error == KErrNone )
-        {
-        error = RProperty::Set( NMusSessionApi::KCategoryUid, aKey, aVal );
-        MUS_LOG2( "mus: [TEST]     RProperty value %d set, return = %d",
-                  aVal, error )
-        User::LeaveIfError( error );
-        }
-    else
-        {
-        MUS_LOG( "mus: [TEST]     Defining failed, do not set value" )
-        }
-    
-    MUS_LOG( "mus: [TEST]  <- CMusTestDirector::DefineSessionPropertyL( intValue )" )
-    }
-
-// -----------------------------------------------------------------------------
-// CTESTPlugin::DefineProperty()
-// -----------------------------------------------------------------------------
-//
-void CMusTestDirector::DefineSessionPropertyL( TInt aKey,
-                                    RProperty::TType aType,
-                                    const TDesC& aVal )
-    {
-    MUS_LOG( "mus: [TEST]  -> CTESTPlugin::DefineSessionPropertyL( DesCValue )" )
-    
-    TInt error = RProperty::Define( NMusSessionApi::KCategoryUid,
-                                     aKey,
-                                     aType );
-    MUS_LOG2( "mus: [TEST]     Key=%d defining tried, return=%d", aKey, error )  
-    
-    if ( error == KErrNone )
-        {
-        error = RProperty::Set( NMusSessionApi::KCategoryUid, aKey, aVal);
-        MUS_LOG_TDESC( "mus: [TEST]     Tried to set RProperty value: ", aVal )
-        MUS_LOG1("mus: [TEST]     return value = %d",error )
-        User::LeaveIfError( error );         
-        }
-    else
-        {
-        MUS_LOG( "mus: [TEST]     Defining failed, do not set value" )
-        }
-    
-    MUS_LOG( "mus: [TEST]  <- CTESTPlugin::DefineSessionPropertyL( DesCValue )" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMusAoPlugin::DefineProperty()
-// -----------------------------------------------------------------------------
-//
-void CMusTestDirector::DefinePropertyL(TInt aKey,RProperty::TType aType,TInt aVal)
-    {
-    MUS_LOG( "mus: [TEST]  -> CMusAoPlugin::DefinePropertyL( intValue )" )
-    
-    TInt error = RProperty::Define( NMusResourceApi::KCategoryUid,
-                                     aKey,
-                                     aType );
-    MUS_LOG2( "mus: [TEST]     Key=%d defining tried, return=%d", aKey, error )
-    
-    if ( error == KErrNone )
-        {
-        error = RProperty::Set( NMusResourceApi::KCategoryUid, aKey, aVal );
-        MUS_LOG2( "mus: [TEST]     RProperty value %d set, return = %d",
-                  aVal, error )
-        User::LeaveIfError( error );
-        }
-    else
-        {
-        MUS_LOG( "mus: [TEST]     Defining failed, do not set value" )
-        }
-    
-    MUS_LOG( "mus: [TEST]  <- CTESTPlugin::DefinePropertyL( intValue )" )
-    }
-
-// -----------------------------------------------------------------------------
-// CTESTPlugin::DefineProperty()
-// -----------------------------------------------------------------------------
-//
-void CMusTestDirector::DefinePropertyL( TInt aKey,
-                                    RProperty::TType aType,
-                                    const TDesC& aVal )
-    {
-    MUS_LOG( "mus: [TEST]  -> CTESTPlugin::DefinePropertyL( DesCValue )" )
-    
-    TInt error = RProperty::Define( NMusResourceApi::KCategoryUid,
-                                     aKey,
-                                     aType );
-    MUS_LOG2( "mus: [TEST]     Key=%d defining tried, return=%d", aKey, error )  
-    
-    if ( error == KErrNone )
-        {
-        error = RProperty::Set( NMusResourceApi::KCategoryUid, aKey, aVal);
-        MUS_LOG_TDESC( "mus: [TEST]     Tried to set RProperty value: ", aVal )
-        MUS_LOG1("mus: [TEST]     return value = %d",error )
-        User::LeaveIfError( error );         
-        }
-    else
-        {
-        MUS_LOG( "mus: [TEST]     Defining failed, do not set value" )
-        }
-    
-    MUS_LOG( "mus: [TEST]  <- CTESTPlugin::DefinePropertyL( DesCValue )" )
-    }
-
-// -----------------------------------------------------------------------------
-// CTESTPlugin::DeleteSessionProperties()
-// -----------------------------------------------------------------------------
-//
-void CMusTestDirector::DeleteSessionProperties()
-    {
-    TInt retVal = RProperty::Delete( NMusSessionApi::KCategoryUid,NMusSessionApi::KStatus);
-    retVal = RProperty::Delete( NMusSessionApi::KCategoryUid,NMusSessionApi::KRemoteSipAddress);
-    retVal = RProperty::Delete( NMusSessionApi::KCategoryUid,NMusSessionApi::KRemoteSipAddressProposal); 
-    retVal = RProperty::Delete( NMusSessionApi::KCategoryUid,NMusSessionApi::KContactId); 
-    retVal = RProperty::Delete( NMusSessionApi::KCategoryUid,NMusSessionApi::KContactName);
-    }
-// -----------------------------------------------------------------------------
-// CTESTPlugin::DeleteResourceProperties()
-// Note : There is no need of caring the return value in deleting
-//        This will be called when AO Plugin destroyed which is rare to happen
-//        Any unwanted deletion of AO Plugin should leave some PS Keys open.
-//        But this is OK if we ignore KErrAlreadyExists while defining next time.
-// -----------------------------------------------------------------------------
-//
-void CMusTestDirector::DeleteProperties()
-    {
-    MUS_LOG( "mus: [TEST]  -> CTESTPlugin::DeleteResourcePropertiesL" )
-    // Delete resource properties
-    // they need to be defined here to make them exist always
-    DeleteProperty(NMusResourceApi::KCameraAvailability);
-    DeleteProperty(NMusResourceApi::KKeypadAvailability);    
-    DeleteProperty(NMusResourceApi::KCameraInformation);
-    DeleteProperty(NMusSessionInformationApi::KMusCallEvent);
-    DeleteProperty(NMusSessionInformationApi::KMusCallCount);
-    DeleteProperty(NMusSessionInformationApi::KMusTelNumber);
-    DeleteProperty(NMusSessionInformationApi::KMUSCallProvider);
-    DeleteProperty(NMusSessionInformationApi::KMUSForbidden);
-    DeleteProperty(NMusSessionInformationApi::KMusCallDirection);
-    MUS_LOG( "mus: [TEST]  <- CTESTPlugin::DeleteResourcePropertiesL" )
-    }
-
-// -----------------------------------------------------------------------------
-// CTESTPlugin::DeleteProperty()
-// -----------------------------------------------------------------------------
-//
-void CMusTestDirector::DeleteProperty(TInt aKey)
-    {
-    TInt retVal = RProperty::Delete( NMusResourceApi::KCategoryUid,aKey); 
-    MUS_LOG2( "mus: [TEST]     RProperty::Delete Type=%d return=%d",\
-                                                           aKey, retVal )                           
-    }
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/app/mustestdirector.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CMUSTESTDIRECTOR_H
-#define CMUSTESTDIRECTOR_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <e32property.h>
-#include <musmanagercommon.h>
-
-
-class CMusTestDirector :  public CBase
-	{
-    public:
-        CMusTestDirector();
-        static CMusTestDirector* NewL();
-        ~CMusTestDirector();
-    public:
-        void SetUseCase( MultimediaSharing::TMusUseCase aUseCase );
-        void ConfigureLiveSharing() ;
-        void ConfigureReceiveSharing();
-    private:
-        void DeleteProperty(TInt aKey);
-        void DeleteProperties();
-        void DefinePropertyL( TInt aKey,
-                RProperty::TType aType,
-                const TDesC& aVal );
-        void DefinePropertyL(TInt aKey,RProperty::TType aType,TInt aVal);
-        void DefinePropertiesL();
-        void DeleteSessionProperties();
-        void DefineSessionPropertyL(TInt aKey,RProperty::TType aType,TInt aVal);
-        void DefineSessionPropertyL( TInt aKey,RProperty::TType aType,const TDesC& aVal );
-        void ConstructL();
-    };
-
-#endif // CMUSTESTDIRECTOR_H
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-PRJ_MMPFILES
-../Stubs/mceclientstub/group/mceclient.mmp
-../Stubs/sipclientstub/group/sipclient.mmp
-../Stubs/sipprofilestub/group/sipprofile.mmp
-../../../../mmshengine/group/musengineplugin.mmp
-../app/must_0x1028238D.mmp
-gnumakefile ../app/Makefile_0x1028238D.mk
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/group/install.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-echo Installing mustester application ...
-echo Backup the original dlls ...
-move \epoc32\release\winscw\udeb\mceclient.dll \epoc32\release\winscw\udeb\mcelclient.dll.orig
-move \epoc32\release\winscw\udeb\sipclient.dll \epoc32\release\winscw\udeb\sipclient.dll.orig
-move \epoc32\release\winscw\udeb\sipprofilecli.dll \epoc32\release\winscw\udeb\sipprofilecli.dll.orig
-echo Building mustester ...
-call cd ..\..\..\
-call qmake mmshlcui.pro
-call bldmake bldfiles
-call abld reallyclean winscw udeb
-call abld build winscw udeb
-call cd tsrc\mustester\group
-call bldmake bldfiles
-call abld reallyclean winscw udeb
-call abld build winscw udeb
-echo Starting emulator...
-echo Goto eshell and execute "must.exe -r usecase_no"
-echo     usecase_no = MultimediaSharing::TMusUsecase defined in musmanagercommon.h
-call \epoc32\release\winscw\udeb\epoc.exe
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/group/install_armv5.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-echo Installing mustester application ...
-echo Backup the original dlls ...
-move \epoc32\release\winscw\udeb\mceclient.dll \epoc32\release\winscw\udeb\mcelclient.dll.orig
-move \epoc32\release\winscw\udeb\sipclient.dll \epoc32\release\winscw\udeb\sipclient.dll.orig
-move \epoc32\release\winscw\udeb\sipprofilecli.dll \epoc32\release\winscw\udeb\sipprofilecli.dll.orig
-echo Building mustester ...
-call bldmake bldfiles
-call abld reallyclean winscw udeb
-call abld build winscw udeb
-echo Starting emulator.Goto eshell and execute must.exe -r usecase_no
-echo     usecase_no = MultimediaSharing::TMusUsecase defined in musmanagercommon.h
-call \epoc32\release\winscw\udeb\epoc.exe
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/group/uninstall.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-move \epoc32\release\winscw\udeb\mcelclient.dll.orig \epoc32\release\winscw\udeb\mceclient.dll
-move \epoc32\release\winscw\udeb\sipclient.dll.orig \epoc32\release\winscw\udeb\sipclient.dll
-move \epoc32\release\winscw\udeb\sipprofilecli.dll.orig \epoc32\release\winscw\udeb\sipprofilecli.dll 
-
-call abld reallyclean winscw udeb
-call abld clean winscw udeb
-del \epoc32\release\winscw\udeb\must.exe
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/group/uninstall_armv5.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-move \epoc32\release\winscw\udeb\mcelclient.dll.orig \epoc32\release\winscw\udeb\mceclient.dll
-move \epoc32\release\winscw\udeb\sipclient.dll.orig \epoc32\release\winscw\udeb\sipclient.dll
-move \epoc32\release\winscw\udeb\sipprofilecli.dll.orig \epoc32\release\winscw\udeb\sipprofilecli.dll 
-
-call abld reallyclean winscw udeb
-call abld clean winscw udeb
-del \epoc32\release\winscw\udeb\must.exe
\ No newline at end of file
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/install/must_armv5_udeb.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-; must_armv5_udeb.pkg generated by qmake at Mon 14. Sep 11:50:02 2009
-; This file is generated by qmake and should not be modified by the user
-;
-
-; Language
-&EN
-
-; SIS header: name, uid, version
-#{"must"},(0x1028238D),1,0,0
-
-; Localised Vendor name
-%{"Nokia, Qt Software"}
-
-; Unique Vendor name
-:"Nokia, Qt Software"
-
-; Dependencies
-[0x101F7961],0,0,0,{"S60ProductID"}
-[0x102032BE],0,0,0,{"S60ProductID"}
-[0x102752AE],0,0,0,{"S60ProductID"}
-[0x1028315F],0,0,0,{"S60ProductID"}
-(0x2001E61C), 4, 5, 0, {"QtLibs pre-release"}
-
-; Executable and default resource files
-"\epoc32\release\armv5\udeb\must.exe"    - "!:\sys\bin\must.exe"
-"\epoc32\data\z\resource\apps\must.rsc"    - "!:\resource\apps\must.rsc"
-"\epoc32\data\z\private\10003a3f\import\apps\must_reg.rsc"    - "!:\private\10003a3f\import\apps\must_reg.rsc"
-"\epoc32\release\armv5\udeb\sipclient.dll"    - "!:\sys\bin\sipclient.dll"
-"\epoc32\release\armv5\udeb\mceclient.dll"    - "!:\sys\bin\mceclient.dll"
-"\epoc32\release\armv5\udeb\sipprofilecli.dll"    - "!:\sys\bin\sipprofilecli.dll"
-"\epoc32\release\armv5\udeb\musengineplugin.dll"    - "!:\sys\bin\musengineplugin.dll"
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/install/must_armv5_urel.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-; must_armv5_urel.pkg generated by qmake at Mon 14. Sep 11:50:02 2009
-; This file is generated by qmake and should not be modified by the user
-;
-
-; Language
-&EN
-
-; SIS header: name, uid, version
-#{"must"},(0x1028238D),1,0,0
-
-; Localised Vendor name
-%{"Nokia, Qt Software"}
-
-; Unique Vendor name
-:"Nokia, Qt Software"
-
-; Dependencies
-[0x101F7961],0,0,0,{"S60ProductID"}
-[0x102032BE],0,0,0,{"S60ProductID"}
-[0x102752AE],0,0,0,{"S60ProductID"}
-[0x1028315F],0,0,0,{"S60ProductID"}
-(0x2001E61C), 4, 5, 0, {"QtLibs pre-release"}
-
-; Executable and default resource files
-"\epoc32\release\armv5\urel\must.exe"    - "!:\sys\bin\must.exe"
-"\epoc32\data\z\resource\apps\must.rsc"    - "!:\resource\apps\must.rsc"
-"\epoc32\data\z\private\10003a3f\import\apps\must_reg.rsc"    - "!:\private\10003a3f\import\apps\must_reg.rsc"
-"\epoc32\release\armv5\urel\sipclient.dll"    - "!:\sys\bin\sipclient.dll"
-"\epoc32\release\armv5\urel\mceclient.dll"    - "!:\sys\bin\mceclient.dll"
-"\epoc32\release\armv5\urel\sipprofilecli.dll"    - "!:\sys\bin\sipprofilecli.dll"
-"\epoc32\release\armv5\urel\musengineplugin.dll"    - "!:\sys\bin\musengineplugin.dll"
-
--- a/mmsharing/livecommsui/lcui/tsrc/mustester/install/sis_udeb.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:
-rem
-
-makesis must_armv5_udeb.pkg must.sis
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpad.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*!
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Dialpad popup
-*
-*/
-
-#ifndef DIALPAD_H
-#define DIALPAD_H
-
-#include <hbwidget.h>
-
-#include <QTime>
-#include <QTimeLine>
-
-class HbLineEdit;
-
-const int DialpadButtonCount = 13;
-
-class Dialpad : public HbWidget
-{
-    Q_OBJECT
-
-public:
-    explicit Dialpad();
-    explicit Dialpad(const HbMainWindow& mainWindow);
-    
-    virtual ~Dialpad();
-    
-    HbLineEdit& editor() const;
-    
-    bool isOpen() const {return mIsOpen;}
-    
-public slots:
-  
-    void setTapOutsideDismiss( bool enable );
-    
-    void openDialpad() { mIsOpen = true; }
-
-    void closeDialpad() { mIsOpen = false; }
-
-    void setCallButtonEnabled(bool enabled);
-    
-signals:
-    void aboutToClose();
-
-public:
-    HbLineEdit* mLineEdit; 
-    bool mIsCallButtonEnabled;
-    bool mIsOpen;
-    bool mIsTabOutsideDismissEnabled;
-};
-
-#endif // DIALPAD_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpad_stub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <hblineedit.h>
-#include "dialpad.h"
-
-Dialpad::Dialpad()
-{
-    mLineEdit = new HbLineEdit();
-    setVisible(false);
-    mIsCallButtonEnabled = true;
-    mIsOpen = false;
-}
-
-Dialpad::Dialpad(const HbMainWindow& mainWindow)
-{
-    Q_UNUSED(mainWindow);
-    mLineEdit = new HbLineEdit();
-    setVisible(false);
-    mIsCallButtonEnabled = true;
-    mIsOpen = false;    
-}
-
-Dialpad::~Dialpad()
-{
-    delete mLineEdit;
-}
-
-HbLineEdit& Dialpad::editor() const
-{
-    return *mLineEdit;
-}
-
-void Dialpad::setCallButtonEnabled(bool enabled)
-{
-    mIsCallButtonEnabled = enabled;
-}
-
-void Dialpad::setTapOutsideDismiss( bool enable )
-{
-    mIsTabOutsideDismissEnabled = enable ;
-}
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpadvtkeyhandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*!
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Dialpad key handler.
-*
-*/
-
-#ifndef DIALPADVTKEYHANDLER_H
-#define DIALPADVTKEYHANDLER_H
-
-#include <QObject>
-
-class Dialpad;
-class HbMainWindow;
-
-/*!
-    DialpadVtKeyHandler
-    Class provides key handling for dialpad component.
-
-    @code
-    Dialpad *dialpad = new Dialpad();
-    DialpadVtKeyHandler *keyhandler = new DialpadVtKeyHandler(dialpad, this);
-    @endcode
-    
-*/
-class DialpadVtKeyHandler : public QObject
-{
-    Q_OBJECT
-
-public:
-    explicit DialpadVtKeyHandler(Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent = 0);
-    virtual ~DialpadVtKeyHandler();
-
-private:
-    HbMainWindow& mMainWindow;
-    Dialpad* mDialPad; // not owned
-    
-public: // helper    	
-	  void contentChanged( QString chrs );
-	  
-};
-
-#endif // DIALPADVTKEYHANDLER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpadvtkeyhandler_stub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*!
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Dialpad key handler.
-*
-*/
-
-#include <dialpadvtkeyhandler.h>
-#include <hbmainwindow.h>
-#include <dialpad.h>
-
-#define EMERGENCY_NUMBER "112"
-
-DialpadVtKeyHandler::DialpadVtKeyHandler(Dialpad *dialPad, HbMainWindow& mainWindow, QObject * parent)
-	: mMainWindow( mainWindow ),
-      mDialPad( dialPad )
-{
-	 Q_UNUSED(parent);
-}
-
-DialpadVtKeyHandler::~DialpadVtKeyHandler()
-{
-	
-}
-
-void DialpadVtKeyHandler::contentChanged( QString chrs )
-{
-	if( mDialPad ){
-		if( chrs == EMERGENCY_NUMBER ){
-			mDialPad->setCallButtonEnabled(true);
-		}else{
-			mDialPad->setCallButtonEnabled(false);
-		}
-	}		
-}
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbabstractbutton.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  HbAbstractButton class definition
-*
-*/
-
-
-#ifndef HBABSTRACTBUTTON_H
-#define HBABSTRACTBUTTON_H
-
-#include <hbglobal.h>
-#include <hbwidget.h>
-#include <hbnamespace.h>
-
-class HbAbstractButton : public HbWidget
-{
-public:
-    explicit HbAbstractButton( QGraphicsItem *parent = 0 );
-    virtual ~HbAbstractButton();
-
-
-signals:
-    void clicked( bool checked = false );
-};
-
-#endif // HBABSTRACTBUTTON_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbaction.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBACTION_H
-#define HBACTION_H
-
-#include <QAction>
-#include <hbnamespace.h>
-#include <hbglobal.h>
-#include <hbicon.h>
-
-
-class HbAction : public QAction
-{
-public:
-    explicit HbAction(QObject *parent = 0);
-    explicit HbAction(const QString &text, QObject *parent = 0);
-    explicit HbAction(Hb::NavigationAction action, QObject* parent = 0);
-    virtual ~HbAction();
-
-    using QAction::setIcon;
-    using QAction::icon;
-    void setIcon(const HbIcon &icon);
-    HbIcon icon() const;
-    
-private: // Data added for the unit testing stub
-    HbIcon mIcon;   
-};
-
-#endif // HBACTION_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbdialog.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBDIALOG_H
-#define HBDIALOG_H
-
-#include <hbglobal.h>
-#include <hbwidget.h>
-
-
-class HbAction;
-
-
-class HbDialog : public HbWidget
-{
-public:
-
-    enum DefaultTimeout
-    {
-        NoTimeout,
-        ConfirmationNoteTimeout,
-        StandardTimeout,
-        ContextMenuTimeout,
-    };
-
-    enum DismissPolicy
-    {
-        NoDismiss   = 0,
-        TapInside   = 1,
-        TapOutside  = 2,
-        TapAnywhere = TapInside | TapOutside
-    };
-
-    explicit HbDialog(QGraphicsItem *parent = 0);
-    virtual  ~HbDialog();
-
-    int timeout() const;
-    void setTimeout(int timeout);
-    void setTimeout(HbDialog::DefaultTimeout timeout);
-    void setHeadingWidget(QGraphicsWidget *headingWidget);
-    void setContentWidget(QGraphicsWidget *contentWidget);
-    Hb::SceneItems unfadedItems() const;
-    void setUnfadedItems(Hb::SceneItems unfadedItems);
-    HbDialog::DismissPolicy dismissPolicy() const;
-    void setDismissPolicy(HbDialog::DismissPolicy dismissPolicy);
-    enum { Type = Hb::ItemType_Popup };
-
-protected:
-
-    QVariant itemChange ( GraphicsItemChange change, const QVariant & value );
-    
-private: // Data added for the unit testing stub
-	
-	Hb::SceneItems mUnfadedItems;
-	DismissPolicy mDismissPolicy;
-        int mTimeout;
-};
-
-
-#endif // HBDIALOG_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbdocumentloader.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBDOCUMENTLOADER_H
-#define HBDOCUMENTLOADER_H
-
-#include <hbglobal.h>
-#include <QString>
-#include <QObjectList>
-
-class QObject;
-class QGraphicsWidget;
-class HbLabel;
-class HbAction;
-class HbPushButton;
-
-class HbDocumentLoader
-{
-public:
-    HbDocumentLoader();
-    virtual ~HbDocumentLoader();
-
-    QObjectList load( const QString &fileName, const QString &section , bool *ok = 0 );
-    QObjectList load( const QString &fileName, bool *ok = 0 );
-    QGraphicsWidget *findWidget(const QString &name);
-    QObject *findObject(const QString &name) const;
-    bool setObjectTree( QObjectList roots );
-    void reset();
-    
-protected:
-    virtual QObject *createObject(const QString& type, const QString &name);
-    
-public: // Data added for the unit testing stub
-    HbLabel* mLabel;
-    HbAction* mAction;
-    HbPushButton* mPushButton;
-    QList<QGraphicsWidget*> mWidgets;
-    bool mReturnSendVideo;
-    QString mLayoutSection;
-
-    QList<HbAction*> mActions;
-
-    friend class UT_LcView;
-    friend class UT_LcUiComponentRepository;
-    
-};
-
-#endif // HBDOCUMENTLOADER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbeffect.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HBEFFECT_H
-#define HBEFFECT_H
-
-#include <QRect>
-#include <hbglobal.h>
-#include <hbnamespace.h>
-
-QT_BEGIN_NAMESPACE
-class QGraphicsItem;
-class QVariant;
-QT_END_NAMESPACE
-
-class HbEffect
-{
-
-public:
-
-    struct EffectStatus {
-        QGraphicsItem *item;
-        QString effectEvent;
-        Hb::EffectEvent reason;
-        QVariant userData;
-    };
-
-    static bool start(QGraphicsItem *item, 
-                            const QString &itemType, 
-                            const QString &effectEvent,
-                            QObject *receiver = 0,
-                            const char *member = 0,
-                            const QVariant &userData = QVariant());
-
-    static bool add(const QString &itemType, const QString &filePath, const QString &effectEvent = QString() );
-
-    static bool effectRunning(QGraphicsItem *item, const QString &effectEvent = QString());
-
-    static bool mRunning;
-    
-private:
-    HbEffect();
-};
-
-#endif // HBEFFECT_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbframedrawer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (developer.feedback@nokia.com)
-**
-** This file is part of the HbCore module of the UI Extensions for Mobile.
-**
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at developer.feedback@nokia.com.
-**
-****************************************************************************/
-
-#ifndef HBFRAMEDRAWER_H
-#define HBFRAMEDRAWER_H
-
-
-class HbFrameDrawer
-{
-public:
-
-    enum FrameType
-    {
-        Undefined = 0,
-        OnePiece,
-        ThreePiecesHorizontal,
-        ThreePiecesVertical,
-        NinePieces
-    };
-
-    HbFrameDrawer(const QString &frameGraphicsName, FrameType type, bool cacheFlag = true);
-
-    ~HbFrameDrawer();
-
-};
-
-#endif // HBFRAMEDRAWER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbgesture.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Defines a gesture that can be added to a gesture filter.
-*
-*/
-
-
-#ifndef HB_GESTURE_H
-#define HB_GESTURE_H
-
-#include <QObject>
-#include <QPointF>
-
-class HbGesture;
-class HbGesturePrivate;
-
-class HbGesture : public QObject
-{
-
-public:
-
-    /**
-    * Direction of the gesture.
-    */
-    enum Direction
-    {
-        /* empty gesture */
-        none=0,
-        /** Left */
-        left= 0x0000001,
-        /** Right */
-        right= 0x0000002,
-        /** Up */
-        up= 0x0000004,
-        /** Down */
-        down= 0x0000008,
-        /** Pan */
-        pan= 0x0000010,
-        /** Longpress */
-        longpress= 0x0000020
-    };
-
-    /*
-    * Defines that the default minimum pixel distance should be used for the gesture.
-    * The actual amount of pixels might vary based on the screen resolution.
-    */
-    static const int HbGestureDefaultMinDistance = -1;
-
-public:
-
-    explicit HbGesture( Direction direction,
-    int minDistance = HbGestureDefaultMinDistance,
-    QObject *parent = 0 );
-
-    virtual ~HbGesture();
-
-signals:
-
-    void longPress( QPointF delta );
-
-};
-
-#endif // HB_GESTURE_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbgesturefilter.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Gesture filter for implementing touch gesture actions.
-*
-*/
-
-
-#ifndef HB_GESTURE_FILTER_H
-#define HB_GESTURE_FILTER_H
-
-#include <hbwidget.h>
-
-#include <QObject>
-#include <qnamespace.h>
-#include <QGraphicsItem>
-
-class HbGesture;
-class HbGestureFilterPrivate;
-class HbGestureSceneFilterPrivate;
-class HbLongPressVisualizer;
-
-
-class HbGestureSceneFilter : public HbWidget
-{
-public:
-    explicit HbGestureSceneFilter(Qt::MouseButton button = Qt::LeftButton, QGraphicsItem *parent = 0 );
-    ~HbGestureSceneFilter();
-    void addGesture( HbGesture *gesture );
- 
- public:
- 
- // Stub stuff 
-    QList<HbGesture*> gestures;
-};
-
-#endif // HB_GESTURE_FILTER_H
-
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbicon.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBICON_H
-#define HBICON_H
-
-#include <hbglobal.h>
-
-
-class HbIcon
-{
-public:
-    HbIcon(const QString &iconName);
-    ~HbIcon();
-    
-    bool operator==(const HbIcon &other) const;
-    
-private: // Data added for the unit testing stub
-    QString mName;    
-};
-
-#endif // HBICON_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbinstance.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBINSTANCE_H
-#define HBINSTANCE_H
-
-#include <hbglobal.h>
-#include <hbmainwindow.h>
-#include <hbtheme.h>
-#include <QList.h>
-
-class QGraphicsScene;
-
-#define hbInstance (HbInstance::instance())
-
-class HbInstance
-{
-public:
-    static HbInstance *instance();
-    QList<HbMainWindow *> allMainWindows() const;
-
-    Qt::Orientation orientation() const;
-    void setOrientation(Qt::Orientation orientation);
-    
-    QGraphicsScene* scene() const;
-
-private:
-    HbInstance();
-    ~HbInstance();
-    
-private: // Data added for the unit testing stub
-    QList<HbMainWindow *> mAllMainWindows;
-    QGraphicsScene* mScene;
-    Qt::Orientation mOrientation;
-};
-
-#endif // HBINSTANCE_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hblabel.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBLABEL_H
-#define HBLABEL_H
-
-#include <hbglobal.h>
-#include <hbnamespace.h>
-#include <hbwidget.h>
-
-class QGraphicsItem;
-
-
-class HbLabel : public HbWidget 
-{
-public:
-    explicit HbLabel (QGraphicsItem *parent = 0);
-    explicit HbLabel (const QString &displayText, QGraphicsItem *parent = 0);
-    ~HbLabel ();
-
-    virtual void setGeometry(const QRectF &rect);
-    enum { Type = Hb::ItemType_Label };
-
-    void setIcon( const HbIcon &icon );
-    void clear();
-
-public slots:
-    void setPlainText(const QString &text);
-};
-
-#endif // HBLABEL_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hblineedit.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (developer.feedback@nokia.com)
-**
-** This file is part of the HbWidgets module of the UI Extensions for Mobile.
-**
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at developer.feedback@nokia.com.
-**
-****************************************************************************/
-
-#ifndef HBLINEEDIT_H
-#define HBLINEEDIT_H
-
-#include <QString>
-#include <QGraphicsItem>
-#include <QObject>
-
-class HbLineEdit : public QObject
-{    
-public:
-    explicit HbLineEdit(QGraphicsItem *parent = 0);
-    explicit HbLineEdit(const QString &text, QGraphicsItem *parent = 0);
-    virtual ~HbLineEdit();
-    void setText(const QString &text);
-    QString text() const;
-private:
-    QString mText;
-    
-signals:
-    void editingFinished();
-    void textChanged(const QString &text);
-    void selectionChanged();
-    
-    // signals from the base class
-   void contentsChanged();
-};
-
-//Q_DECLARE_METATYPE(HbLineEdit::EchoMode)
-
-#endif // HBLINEEDIT_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbmainwindow.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-
-#ifndef HBMAINWINDOW_H
-#define HBMAINWINDOW_H
-
-#include <QGraphicsView>
-#include <hbglobal.h>
-#include <hbnamespace.h>
-
-class QGraphicsWidget;
-class QWindowSurface 
-    {
-    };
-class HbAction;
-class HbView;
-
-
-class HbMainWindow : public QGraphicsView
-{
-public:
-    explicit HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone);
-    ~HbMainWindow();
-
-    HbView *addView(QGraphicsWidget *widget = 0);
-    QGraphicsWidget *removeView(int index);
-    void removeView(QGraphicsWidget *widget);
-    HbView *currentView() const;
-    void setCurrentView(HbView *view, bool animate = false);
-    int viewCount() const;
-    void setOrientation(Qt::Orientation orientation, bool animate = true);
-    Qt::Orientation orientation() const;
-    void show(){};
-    QList<HbView *> views() const;
-    QRectF sceneRect() const;
-
-    //Overiding function for stub
-    QWindowSurface *windowSurface() const;
-    
-private: // Data added for the unit testing stub
-    HbView* mCurrentView; // Not owned
-    int mViewCount;
-    Qt::Orientation mOrientation;
-    QList<HbView*> mTestViews;
-
-public :     
-    QWindowSurface *mSurface;
-};
-
-#endif // HBMAINWINDOW_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbmenu.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBMENU_H
-#define HBMENU_H
-
-#include <hbdialog.h>
-
-
-class HbMenu : public HbDialog
-{
-public:
-
-    explicit HbMenu(QGraphicsItem *parent = 0);
-    ~HbMenu();
-
-    using HbDialog::addAction;
-    HbAction *addAction(const QString &text);
-
-    bool isEmpty() const;
-
-    enum { Type = Hb::ItemType_Menu };
-
-public slots:
-    void open(QObject* receiver = 0, const char* member = 0);
-    
-private: // Data added for the unit testing stub
-    bool mIsEmpty;     
-};
-
-#endif // HBMENU_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbmessagebox.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-
-#ifndef HBMESSAGEBOX_H
-#define HBMESSAGEBOX_H
-
-#include <hbglobal.h>
-#include <hbdialog.h>
-#include <hbicon.h>
-
-class HbMessageBoxPrivate;
-class HbStyleOptionMessageBox;
-
-class HB_WIDGETS_EXPORT HbMessageBox : public HbDialog
-{
-
-public:
-    enum MessageBoxType {
-        MessageTypeInformation,
-        MessageTypeQuestion,
-        MessageTypeWarning
-    };
-
-   enum StandardButton {
-        NoButton           = 0x00000000,
-        Ok                 = 0x00000400,
-        Save               = 0x00000800,
-        Open               = 0x00001000,
-        Yes                = 0x00002000,
-        Continue           = 0x00004000,
-        Delete             = 0x00008000,
-        No                 = 0x00010000,
-        Retry              = 0x00020000,
-        Close              = 0x00040000,
-        Cancel             = 0x00080000,
-        Help               = 0x00100000,
-        Apply              = 0x00200000,
-        Reset              = 0x00400000
-    };   
-
-    Q_DECLARE_FLAGS(StandardButtons, StandardButton)
-
-    explicit HbMessageBox(MessageBoxType type=MessageTypeInformation,QGraphicsItem *parent = 0);
-    explicit HbMessageBox(const QString &text,MessageBoxType type =MessageTypeInformation, QGraphicsItem *parent = 0);
-    virtual ~HbMessageBox();
-
-    void setText(const QString &text);
-    QString text() const;
-
-    void setIcon(const HbIcon &icon);
-    HbIcon icon() const;
-
-    void setIconAlignment(Qt::Alignment align);
-    Qt::Alignment iconAlignment() const;
-
-    enum { Type = Hb::ItemType_MessageBox };
-    int type() const { return Type; }
-
-    void setStandardButtons(int buttons);
-    int standardButtons() const;
-
-public:
-    static bool launchQuestionMessageBox(const QString &questionText,
-                                         const QString &primaryButtonText = tr("Yes"),
-                                         const QString &secondaryButtonText = tr("No"),
-                                         QGraphicsWidget *headWidget = 0,
-                                         QGraphicsScene *scene = 0,
-                                         QGraphicsItem *parent = 0 );
-
-    static void launchInformationMessageBox(const QString &informationText,
-                                            QGraphicsWidget *headWidget = 0,
-                                            QGraphicsScene *scene = 0,
-                                            QGraphicsItem *parent = 0 );
-
-    static void launchWarningMessageBox(const QString &warningText,
-                                        QGraphicsWidget *headWidget = 0,
-                                        QGraphicsScene *scene = 0,
-                                        QGraphicsItem *parent = 0 );
-
-public slots:
-    void updatePrimitives();
-
-protected:
-    HbMessageBox(HbMessageBoxPrivate &dd, QGraphicsItem *parent);
-    void initStyleOption(HbStyleOptionMessageBox *option) const;
-    void keyPressEvent(QKeyEvent *event);
-};
-
-#endif // HB_MESSAGEBOX_H
-
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbprogressdialog.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBPROGRESSDIALOG_H
-#define HBPROGRESSDIALOG_H
-
-#include <hbdialog.h>
-
-class HbProgressDialog : public HbDialog
-{
-public:
-
-    enum ProgressDialogType { ProgressNote,WaitNote };
-    explicit HbProgressDialog(QGraphicsItem *parent = 0);
-
-    enum { Type = Hb::ItemType_ProgressDialog };
-        
-    void setText(const QString &text);
-
-protected:
-    QVariant itemChange(GraphicsItemChange change, const QVariant& value);
-};
-
-#endif // HBPROGRESSDIALOG_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbpushbutton.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  HbPushButton class definition
-*
-*/
-
-
-#ifndef HBPUSHBUTTON_H
-#define HBPUSHBUTTON_H
-
-#include <hbabstractbutton.h>
-#include <hbglobal.h>
-
-class HbFrameDrawer;
-
-class HbPushButton : public HbAbstractButton
-{
-
-public:
-    explicit HbPushButton( QGraphicsItem *parent = 0 );
-    explicit HbPushButton( const QString &text, QGraphicsItem *parent = 0 );
-    virtual ~HbPushButton( );
-    void setFrameBackground( HbFrameDrawer *backgroundFrameDrawer );
-};
-
-#endif // HBPUSHBUTTON_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbstub_helper.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef HBSTUB_HELPER_H
-#define HBSTUB_HELPER_H
-
-/**
-* Helper class to control logsdbconnector stub behavior
-*
-*/ 
-class HbStubHelper 
-{
-    public:
-        static void reset();
-        static void setGestureState(int state);
-        static void setGestureStyleHint(int style);
-        static bool isTitleBarVisible();
-        static bool isStatusBarVisible();
-};
-
-#endif
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbstubs.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1313 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-// Orbit classes
-#include <hbinstance.h>
-#include <hbmainwindow.h>
-#include <hbwidget.h>
-#include <hbdialog.h>
-#include <hbmenu.h>
-#include <hbaction.h>
-#include <hblabel.h>
-#include <hbicon.h>
-#include <hbmessagebox.h>
-#include <hbprogressdialog.h>
-#include <hbpushbutton.h>
-#include <hbabstractbutton.h>
-#include <hbaction.h>
-#include <hbframedrawer.h>
-
-#include <hbtoolbar.h>
-#include <hbview.h>
-#include <hbdocumentloader.h>
-#include <hbtransparentwindow.h>
-#include <hbgesture.h>
-#include <hbgesturefilter.h>
-#include <hbeffect.h>
-#include <hblineedit.h>
-#include <QCoreApplication>
-#include <QGesture>
-#include <QWidget.h>
-#include <hbtapgesture.h>
-
-// Helper Class
-#include "hbstub_helper.h"
-
-// LC UI
-#include "lcuidefs.h"
-
-
-
-// Static data that simulates HbInstance and HbMainWindow
-static HbInstance* hbInstanceSingleton = 0;
-
-// Static data for hbeffects
-bool HbEffect::mRunning;
-    
-// No Gesture default state.    
-Qt::GestureState testState = Qt::NoGesture;
-
-HbTapGesture::TapStyleHint testStyleHint = HbTapGesture::Tap;
-
-// Title Bar and Status Bar Flags
-bool titlebarVisible = true;
-bool statusBarVisible = true;
-
-// -----------------------------------------------------------------------------
-// QCoreApplication::quit
-// -----------------------------------------------------------------------------
-// 
-void QCoreApplication::quit()
-{
-}
-
-// -----------------------------------------------------------------------------
-// QCoreApplication::exit
-// -----------------------------------------------------------------------------
-//
-void QCoreApplication::exit(int /*retcode*/)
-{
-}
-
-
-// HbInstance
-
-// -----------------------------------------------------------------------------
-// HbInstance::instance
-// -----------------------------------------------------------------------------
-//
-HbInstance* HbInstance::instance()
-{
-	if (!hbInstanceSingleton)
-		hbInstanceSingleton = new HbInstance;
-	return hbInstanceSingleton;
-}
-
-// -----------------------------------------------------------------------------
-// HbInstance::allMainWindows
-// -----------------------------------------------------------------------------
-//
-QList<HbMainWindow *> HbInstance::allMainWindows() const
-{
-    return mAllMainWindows;
-}
-
-
-// -----------------------------------------------------------------------------
-// HbInstance::HbInstance
-// -----------------------------------------------------------------------------
-//
-HbInstance::HbInstance()
-{
-    HbMainWindow *mainWindow = new HbMainWindow;
-    mAllMainWindows.append(mainWindow);
-    mScene = new QGraphicsScene;
-}
-
-// -----------------------------------------------------------------------------
-// HbInstance::~HbInstance
-// -----------------------------------------------------------------------------
-//
-HbInstance::~HbInstance()
-{
-    mAllMainWindows.clear();
-    delete mScene;
-}
-
-// -----------------------------------------------------------------------------
-// HbInstance::HbInstance
-// -----------------------------------------------------------------------------
-//
-Qt::Orientation HbInstance::orientation() const
-{
-    return mOrientation;
-}
-
-// -----------------------------------------------------------------------------
-// HbInstance::HbInstance
-// -----------------------------------------------------------------------------
-//
-void HbInstance::setOrientation(Qt::Orientation orientation)
-{
-    mOrientation = orientation;
-}
-
-// -----------------------------------------------------------------------------
-// HbInstance::HbInstance
-// -----------------------------------------------------------------------------
-//
-QGraphicsScene* HbInstance::scene() const
-{
-    return mScene;
-}
-
-// HbMainWindow
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::HbMainWindow
-// -----------------------------------------------------------------------------
-//
-HbMainWindow::HbMainWindow(QWidget *parent,Hb::WindowFlags windowFlags)
-: QGraphicsView(parent), mCurrentView(0), mViewCount(0)
-{
-    Q_UNUSED(windowFlags)
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::~HbMainWindow
-// -----------------------------------------------------------------------------
-//
-HbMainWindow::~HbMainWindow()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::addView
-// -----------------------------------------------------------------------------
-//
-HbView* HbMainWindow::addView(QGraphicsWidget *widget)
-{
-    Q_UNUSED(widget)
-    mTestViews.append(static_cast<HbView*>( widget ) );
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::removeView
-// -----------------------------------------------------------------------------
-//
-QGraphicsWidget* HbMainWindow::removeView(int index)
-{
-    Q_UNUSED(index)
-    if ( index >= 0 && index < mTestViews.count() ){
-        return mTestViews.takeAt(index);
-    }
-    return mCurrentView;
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::removeView
-// -----------------------------------------------------------------------------
-//
-void HbMainWindow::removeView(QGraphicsWidget *widget)
-{
-    for(int i = 0; i < mTestViews.count(); i++ ){
-        if ( mTestViews.at(i) == widget ){
-            mTestViews.takeAt(i);
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::currentView
-// -----------------------------------------------------------------------------
-//
-HbView* HbMainWindow::currentView() const
-{
-    return mCurrentView;
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::setCurrentView
-// -----------------------------------------------------------------------------
-//
-void HbMainWindow::setCurrentView(HbView *view, bool animate)
-{
-	mCurrentView = view;
-    Q_UNUSED(animate)
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::viewCount
-// -----------------------------------------------------------------------------
-//
-int HbMainWindow::viewCount() const
-{
-    return mTestViews.count();
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::viewCount
-// -----------------------------------------------------------------------------
-//
-void HbMainWindow::setOrientation(Qt::Orientation orientation, bool animate)
-{
-    Q_UNUSED(animate);
-    mOrientation = orientation;
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::viewCount
-// -----------------------------------------------------------------------------
-//
-Qt::Orientation HbMainWindow::orientation() const
-{
-    return mOrientation;
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::views
-// -----------------------------------------------------------------------------
-//
-QList<HbView *> HbMainWindow::views() const
-{
-    return mTestViews;
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::sceneRect
-// -----------------------------------------------------------------------------
-//
-QRectF HbMainWindow::sceneRect() const
-{
-    return QRectF( 0, 0, 360, 640 );
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::windowSurface
-// -----------------------------------------------------------------------------
-//
-QWindowSurface* HbMainWindow::windowSurface() const
-{
-    return mSurface;
-}
-
-
-
-
-// HbWidget
-
-// -----------------------------------------------------------------------------
-// HbWidget::HbWidget
-// -----------------------------------------------------------------------------
-//
-HbWidget::HbWidget(QGraphicsItem *parent, Qt::WindowFlags wFlags)
-: QGraphicsWidget(parent,wFlags)
-{
-    
-}
-
-// -----------------------------------------------------------------------------
-// HbWidget::~HbWidget
-// -----------------------------------------------------------------------------
-//
-HbWidget::~HbWidget()
-{
-    
-}
-
-// -----------------------------------------------------------------------------
-// HbWidget::clearActions
-// -----------------------------------------------------------------------------
-//
-void HbWidget::clearActions()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbWidget::itemChange
-// -----------------------------------------------------------------------------
-//
-QVariant HbWidget::itemChange(GraphicsItemChange change, const QVariant& value)
-{
-    Q_UNUSED(change)
-    return QVariant(value);
-}
-
-// -----------------------------------------------------------------------------
-// HbWidget::mainWindow
-// -----------------------------------------------------------------------------
-//
-HbMainWindow* HbWidget::mainWindow() const
-{   
-   
-}
-
-// HbDialog
-
-// -----------------------------------------------------------------------------
-// HbDialog::HbDialog
-// -----------------------------------------------------------------------------
-//
-HbDialog::HbDialog(QGraphicsItem *parent) : HbWidget(parent)
-{
-	resize(10,10); // Just some values for height and width
-    mDismissPolicy = NoDismiss;
-    mUnfadedItems = Hb::NoItem;
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::~HbDialog
-// -----------------------------------------------------------------------------
-//
-HbDialog::~HbDialog()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::timeout
-// -----------------------------------------------------------------------------
-//
-int HbDialog::timeout() const
-{
-    return mTimeout;
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setTimeout
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setTimeout(int timeout)
-{
-    mTimeout = timeout;
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setTimeout
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setTimeout(HbDialog::DefaultTimeout timeout)
-{
-    // Timeout Values from the current implementation of orbit.
-    switch (timeout)
-        {
-        case HbDialog::NoTimeout:
-        mTimeout = 0;
-        break;
-        case HbDialog::ConfirmationNoteTimeout:
-        mTimeout = 1500;
-        break;
-        case HbDialog::StandardTimeout:
-        mTimeout = 3000;
-        break;
-        case HbDialog::ContextMenuTimeout:
-        mTimeout = 6000;
-        break;
-        }
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setHeadingWidget
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setHeadingWidget(QGraphicsWidget *headingWidget)
-{
-    Q_UNUSED(headingWidget)    
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setContentWidget
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setContentWidget(QGraphicsWidget *contentWidget)
-{
-    Q_UNUSED(contentWidget)    
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::unfadedItems
-// -----------------------------------------------------------------------------
-//
-Hb::SceneItems HbDialog::unfadedItems() const
-{
-    return mUnfadedItems;
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setUnfadedItems
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setUnfadedItems(Hb::SceneItems unfadedItems)
-{
-	mUnfadedItems = unfadedItems;
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::dismissPolicy
-// -----------------------------------------------------------------------------
-//
-HbDialog::DismissPolicy HbDialog::dismissPolicy() const
-{
-    return mDismissPolicy;
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setDismissPolicy
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setDismissPolicy(HbDialog::DismissPolicy dismissPolicy)
-{
-    mDismissPolicy = dismissPolicy;
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::itemChange
-// -----------------------------------------------------------------------------
-//
-QVariant HbDialog::itemChange(GraphicsItemChange change, const QVariant& value)
-{
-    Q_UNUSED(change)
-    return QVariant(value);
-}
-
-
-// HbMenu
-
-// -----------------------------------------------------------------------------
-// HbMenu::HbMenu
-// -----------------------------------------------------------------------------
-//
-HbMenu::HbMenu(QGraphicsItem *parent) : HbDialog(parent)
-{
-    mIsEmpty = true;
-}
-
-// -----------------------------------------------------------------------------
-// HbMenu::~HbMenu
-// -----------------------------------------------------------------------------
-//
-HbMenu::~HbMenu()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbMenu::open
-// -----------------------------------------------------------------------------
-//
-void HbMenu::open(QObject* receiver, const char* member)
-{
-    Q_UNUSED(receiver);
-    Q_UNUSED(member);
-}
-
-// -----------------------------------------------------------------------------
-// HbMenu::addAction
-// -----------------------------------------------------------------------------
-//
-HbAction* HbMenu::addAction(const QString &text)
-{
-    Q_UNUSED(text)
-    mIsEmpty = false;
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// HbMenu::isEmpty
-// -----------------------------------------------------------------------------
-//
-bool HbMenu::isEmpty() const
-{
-	return mIsEmpty;
-}
-
-
-// HbAction
-
-// -----------------------------------------------------------------------------
-// HbAction::HbAction
-// -----------------------------------------------------------------------------
-//
-HbAction::HbAction(QObject *parent) 
-: QAction(parent), mIcon(QString())
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbAction::HbAction
-// -----------------------------------------------------------------------------
-//
-HbAction::HbAction(const QString &text, QObject *parent) 
-: QAction(text,parent), mIcon(QString())
-{    
-}
-
-// -----------------------------------------------------------------------------
-// HbAction::~HbAction
-// -----------------------------------------------------------------------------
-//
-HbAction::~HbAction()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbAction::setIcon
-// -----------------------------------------------------------------------------
-//
-void HbAction::setIcon(const HbIcon &icon) 
-{
-    mIcon = icon;
-}
-
-// -----------------------------------------------------------------------------
-// HbAction::icon
-// -----------------------------------------------------------------------------
-//
-HbIcon HbAction::icon() const
-{
-    return mIcon;
-}
-
-// -----------------------------------------------------------------------------
-// HbAction::HbAction
-// -----------------------------------------------------------------------------
-//
-HbAction::HbAction(Hb::NavigationAction action, QObject* parent)
-    : QAction ( parent ),mIcon(QString())
-{
-    Q_UNUSED(action);
-}
-
-// HbLabel
-
-// -----------------------------------------------------------------------------
-// HbLabel::HbLabel
-// -----------------------------------------------------------------------------
-//
-HbLabel::HbLabel(QGraphicsItem *parent) : HbWidget(parent)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbLabel::HbLabel
-// -----------------------------------------------------------------------------
-//
-HbLabel::HbLabel(const QString &displayText, QGraphicsItem *parent) 
-: HbWidget(parent)
-{
-    Q_UNUSED(displayText)
-}
-
-// -----------------------------------------------------------------------------
-// HbLabel::~HbLabel
-// -----------------------------------------------------------------------------
-//
-HbLabel::~HbLabel()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbLabel::setGeometry
-// -----------------------------------------------------------------------------
-//
-void HbLabel::setGeometry(const QRectF &rect)
-{
-    Q_UNUSED(rect)
-}
-
-// -----------------------------------------------------------------------------
-// HbLabel::clear
-// -----------------------------------------------------------------------------
-//
-void HbLabel::clear()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbLabel::setPlainText
-// -----------------------------------------------------------------------------
-//
-void HbLabel::setPlainText(const QString &text)
-{
-    Q_UNUSED(text)
-}
-
-// -----------------------------------------------------------------------------
-// HbLabel::setText
-// -----------------------------------------------------------------------------
-//
-void HbLabel::setIcon(const HbIcon &icon)
-{
-    Q_UNUSED(icon)
-}
-
-
-// HbIcon
-
-// -----------------------------------------------------------------------------
-// HbIcon::HbIcon
-// -----------------------------------------------------------------------------
-//
-HbIcon::HbIcon(const QString &iconName)
-{
-    mName = iconName;
-}
-
-// -----------------------------------------------------------------------------
-// HbIcon::~HbIcon
-// -----------------------------------------------------------------------------
-//
-HbIcon::~HbIcon()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbIcon::operator==
-// -----------------------------------------------------------------------------
-//
-bool HbIcon::operator==(const HbIcon &other) const
-{
-	return (other.mName == mName);
-}
-
-
-// HbProgressDialog
-
-// -----------------------------------------------------------------------------
-// HbProgressDialog::HbProgressDialog
-// -----------------------------------------------------------------------------
-//
-HbProgressDialog::HbProgressDialog(QGraphicsItem *parent) : HbDialog(parent)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbProgressDialog::itemChange
-// -----------------------------------------------------------------------------
-//
-QVariant HbProgressDialog::itemChange(GraphicsItemChange change, const QVariant& value)
-{
-    Q_UNUSED(change)
-    return QVariant(value);
-}
-
-// -----------------------------------------------------------------------------
-// HbProgressDialog::setText
-// -----------------------------------------------------------------------------
-//
-void HbProgressDialog::setText(const QString &text)
-{
-    Q_UNUSED(text)
-}
-
-// -----------------------------------------------------------------------------
-// HbToolBar::HbToolBar
-// -----------------------------------------------------------------------------
-//
-HbToolBar::HbToolBar(QGraphicsItem *parent) : HbWidget(parent)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbToolBar::~HbToolBar
-// -----------------------------------------------------------------------------
-//
-HbToolBar::~HbToolBar()
-{
-}
-
-
-// HbView
-
-// -----------------------------------------------------------------------------
-// HbView::HbView
-// -----------------------------------------------------------------------------
-//
-HbView::HbView(QGraphicsItem *parent) : HbWidget(parent)
-{
-    mMenu = new HbMenu(this);
-    mToolBar = new HbToolBar(this);
-    mDockWidgetVisible = true;
-}
-
-// -----------------------------------------------------------------------------
-// HbView::~HbView
-// -----------------------------------------------------------------------------
-//
-HbView::~HbView()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbView::menu
-// -----------------------------------------------------------------------------
-//
-HbMenu* HbView::menu() const
-{
-    return mMenu;
-}
-
-// -----------------------------------------------------------------------------
-// HbView::toolBar
-// -----------------------------------------------------------------------------
-//
-HbToolBar* HbView::toolBar() const
-{
-    return mToolBar;
-}
-
-// -----------------------------------------------------------------------------
-// HbView::setTitle
-// -----------------------------------------------------------------------------
-//
-void HbView::setTitle(const QString &title)
-{
-    Q_UNUSED(title)
-}
-
-// -----------------------------------------------------------------------------
-// HbView::showItems
-// -----------------------------------------------------------------------------
-//
-void HbView::showItems(Hb::SceneItems items)
-{
-    if ( items == Hb::DockWidgetItem ) {
-        mDockWidgetVisible = true;
-    } 
-}
-
-// -----------------------------------------------------------------------------
-// HbView::hideItems
-// -----------------------------------------------------------------------------
-//
-void HbView::hideItems(Hb::SceneItems items)
-{
-    if ( items == Hb::DockWidgetItem ) {
-        mDockWidgetVisible = false;
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// HbView::isItemVisible
-// -----------------------------------------------------------------------------
-//
-bool HbView::isItemVisible(Hb::SceneItem items)  const
-{
-    if ( items == Hb::DockWidgetItem ) {
-        return mDockWidgetVisible;
-    }
-    return false;
-}
-
-// -----------------------------------------------------------------------------
-// HbView::setTitleBarVisible
-// -----------------------------------------------------------------------------
-//
-void HbView::setTitleBarVisible(bool visible)
-{
-    titlebarVisible = visible;
-}
-
-
-// -----------------------------------------------------------------------------
-// HbView::setStatusBarVisible
-// -----------------------------------------------------------------------------
-//
-void HbView::setStatusBarVisible(bool visible)
-{
-    statusBarVisible = visible;
-}
-
-
-// -----------------------------------------------------------------------------
-// HbView::setContentFullScreen
-// -----------------------------------------------------------------------------
-//
-void HbView::setContentFullScreen(bool /*enable*/)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbView::navigationAction
-// -----------------------------------------------------------------------------
-//
-HbAction *HbView::navigationAction() const
-{
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// HbView::setNavigationAction
-// -----------------------------------------------------------------------------
-//
-void HbView::setNavigationAction(HbAction *action)
-{
-    Q_UNUSED(action);
-}
-
-// HbDocumentLoader
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::HbDocumentLoader
-// -----------------------------------------------------------------------------
-//
-HbDocumentLoader::HbDocumentLoader()
-{
-    mLabel = new HbLabel;
-    mAction = new HbAction;
-    mReturnSendVideo = true;
-    mPushButton = new HbPushButton();
-    
-}
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::~HbDocumentLoader
-// -----------------------------------------------------------------------------
-//
-HbDocumentLoader::~HbDocumentLoader()
-{
-    delete mAction;
-    delete mLabel;
-    delete mPushButton;
-}
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::load
-// -----------------------------------------------------------------------------
-//
-QObjectList HbDocumentLoader::load( const QString &fileName, 
-        const QString &section , bool *ok )
-{
-    Q_UNUSED(fileName)
-    if ( section == lcLayoutLandscapeDefaultId ||
-         section == lcLayoutLandscapeSwappedId ||
-         section == lcLayoutFullscreenId ||
-         section == lcLayoutLandscapeDialpadId ) {
-        mLayoutSection = section;
-        *ok = true;
-    } else {
-        *ok = false;
-    }
-    return QObjectList();  
-}
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::load
-// -----------------------------------------------------------------------------
-//
-QObjectList HbDocumentLoader::load(const QString &fileName, bool *ok)
-{
-	*ok = true;
-    Q_UNUSED(fileName)
-    return QObjectList();
-}
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::findWidget
-// -----------------------------------------------------------------------------
-//
-QGraphicsWidget* HbDocumentLoader::findWidget(const QString &name)
-{
-        if ( !mReturnSendVideo && name == lcWidgetSendVideoId ) {
-            return 0;
-        }
-	foreach(QGraphicsWidget* widget, mWidgets) {
-		if (widget->objectName() == name)
-			return widget;
-	}
-	if (name == lcLabelRecipientId ||
-	    name == lcLabelDurationId ||
-	    name == lcIconContactId ||	    
-	    name == lcWidgetSendVideoId2 ||
-	    name == lcWidgetRecvVideoId2 ) {
-		return mLabel;
-	}
-	QString dummy = "";
-	QGraphicsWidget* createdWidget = 
-		static_cast<QGraphicsWidget*>(createObject(dummy,name));
-    if (createdWidget) {
-        createdWidget->setPos(QPointF(10,20));
-        mWidgets.append(createdWidget);
-    }
-    return createdWidget;
-}
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::findObject
-// -----------------------------------------------------------------------------
-//
-QObject* HbDocumentLoader::findObject(const QString &name) const
-{
-	if (name == lcActMuteId ||
-	    name == lcActSpeakerId ) {
-		return mAction;
-	}
-	if( name == lcButtonEndCall ){
-        return mPushButton;
-	}
-        foreach(HbAction* action, mActions) {
-                if (action->objectName() == name)
-                        return action;
-        }
-
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::setObjectTree
-// -----------------------------------------------------------------------------
-//
-bool HbDocumentLoader::setObjectTree( QObjectList roots )
-{
-    Q_UNUSED(roots)
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::reset
-// -----------------------------------------------------------------------------
-//
-void HbDocumentLoader::reset()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbDocumentLoader::createObject
-// -----------------------------------------------------------------------------
-//
-QObject* HbDocumentLoader::createObject(
-    const QString& type, 
-    const QString& name)
-{
-    Q_UNUSED(type)
-    Q_UNUSED(name)
-    return 0;
-}
-
-
-// HbTransparentWindow
-
-// -----------------------------------------------------------------------------
-// HbTransparentWindow::HbTransparentWindow
-// -----------------------------------------------------------------------------
-//
-HbTransparentWindow::HbTransparentWindow(QGraphicsItem *parent)
-{
-    Q_UNUSED(parent)
-}
-
-// -----------------------------------------------------------------------------
-// HbTransparentWindow::~HbTransparentWindow
-// -----------------------------------------------------------------------------
-//
-HbTransparentWindow::~HbTransparentWindow()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbGesture::HbGesture
-// -----------------------------------------------------------------------------
-//
-HbGesture::HbGesture( Direction direction, int minDistance, QObject *parent )
-    : QObject(parent)
-{
-    Q_UNUSED(direction)
-    Q_UNUSED(minDistance)
-}
-
-// -----------------------------------------------------------------------------
-// HbGesture::~HbGesture
-// -----------------------------------------------------------------------------
-//
-HbGesture::~HbGesture()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbGesturSeceneFilter::HbGestureSceneFilter
-// -----------------------------------------------------------------------------
-//
-HbGestureSceneFilter::HbGestureSceneFilter( Qt::MouseButton button, QGraphicsItem *parent ) 
-    : HbWidget(parent)
-{
-    Q_UNUSED(button)
-}
-
-// -----------------------------------------------------------------------------
-// HbGestureSceneFilter::~HbGestureSceneFilter
-// -----------------------------------------------------------------------------
-//
-HbGestureSceneFilter::~HbGestureSceneFilter()
-{
-    qDeleteAll(gestures);
-    gestures.clear();
-}
-
-// -----------------------------------------------------------------------------
-// HbGestureSceneFilter::addGesture
-// -----------------------------------------------------------------------------
-//
-void HbGestureSceneFilter::addGesture( HbGesture *gesture )
-{
-    gestures.append(gesture);
-}
-
-
-// -----------------------------------------------------------------------------
-// HbEffect::HbEffect
-// -----------------------------------------------------------------------------
-//
-HbEffect::HbEffect(  )
-{
-    mRunning = false;
-}
-
-// -----------------------------------------------------------------------------
-// HbEffect::start
-// -----------------------------------------------------------------------------
-//
-bool HbEffect::start( QGraphicsItem *item, 
-                            const QString &itemType, 
-                            const QString &effectEvent,
-                            QObject *receiver,
-                            const char *member,
-                            const QVariant &userData )
-{
-    Q_UNUSED(item)
-    Q_UNUSED(itemType)
-    Q_UNUSED(effectEvent)
-    Q_UNUSED(receiver)
-    Q_UNUSED(member)
-    Q_UNUSED(userData)
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-// HbEffect::add
-// -----------------------------------------------------------------------------
-//
-bool HbEffect::add( const QString &itemType, const QString &filePath, const QString &effectEvent )
-{
-    Q_UNUSED(itemType)
-    Q_UNUSED(filePath)
-    Q_UNUSED(effectEvent)
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-// HbEffect::effectRunning
-// -----------------------------------------------------------------------------
-//
-bool HbEffect::effectRunning(QGraphicsItem *item, const QString &effectEvent )
-{
-    Q_UNUSED(item)
-    Q_UNUSED(effectEvent)
-    return mRunning;
-}
-
-
-// -----------------------------------------------------------------------------
-// HbPushButton::HbPushButton
-// -----------------------------------------------------------------------------
-//
-HbPushButton::HbPushButton(QGraphicsItem *parent) : HbAbstractButton(parent)
-{
-}
-
-
-// -----------------------------------------------------------------------------
-// HbPushButton::HbPushButton
-// -----------------------------------------------------------------------------
-//
-HbPushButton::HbPushButton(const QString &text, QGraphicsItem *parent)
-    : HbAbstractButton(parent)
-{
-    Q_UNUSED(text)
-}
-
-
-
-// -----------------------------------------------------------------------------
-// HbPushButton::~HbPushButton
-// -----------------------------------------------------------------------------
-//
-HbPushButton::~HbPushButton()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbPushButton::setFrameBackground
-// -----------------------------------------------------------------------------
-//
-void HbPushButton::setFrameBackground( HbFrameDrawer *backgroundFrameDrawer )
-{
-    delete backgroundFrameDrawer;
-}
-
-// -----------------------------------------------------------------------------
-// HbAbstractButton::HbAbstractButton
-// -----------------------------------------------------------------------------
-//
-HbAbstractButton::HbAbstractButton(QGraphicsItem *parent) : HbWidget(parent)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbAbstractButton::~HbAbstractButton
-// -----------------------------------------------------------------------------
-//
-HbAbstractButton::~HbAbstractButton()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbFrameDrawer::HbFrameDrawer
-// -----------------------------------------------------------------------------
-//
-HbFrameDrawer::HbFrameDrawer(const QString &frameGraphicsName, FrameType type, bool cacheFlag)
-{
-    Q_UNUSED(frameGraphicsName);
-    Q_UNUSED(type);
-    Q_UNUSED(cacheFlag);
-}
-
-// -----------------------------------------------------------------------------
-// HbFrameDrawer::~HbFrameDrawer
-// -----------------------------------------------------------------------------
-//
-HbFrameDrawer::~HbFrameDrawer()
-{
-    
-}
-
-// -----------------------------------------------------------------------------
-// HbLineEdit::HbLineEdit
-// -----------------------------------------------------------------------------
-//
-HbLineEdit::HbLineEdit(QGraphicsItem *parent)
-{
-    Q_UNUSED(parent);
-}
-
-// -----------------------------------------------------------------------------
-// HbLineEdit::HbLineEdit
-// -----------------------------------------------------------------------------
-//
-HbLineEdit::HbLineEdit(const QString &text, QGraphicsItem *parent)
-{
-    Q_UNUSED(parent);
-    mText = text;
-}
-
-// -----------------------------------------------------------------------------
-// HbLineEdit::~HbLineEdit
-// -----------------------------------------------------------------------------
-//
-HbLineEdit::~HbLineEdit()
-{
-    
-}
-
-// -----------------------------------------------------------------------------
-// HbLineEdit::setText
-// -----------------------------------------------------------------------------
-//
-void HbLineEdit::setText(const QString &text)
-{
-    mText = text;
-}
-
-// -----------------------------------------------------------------------------
-// HbLineEdit::text
-// -----------------------------------------------------------------------------
-//
-QString HbLineEdit::text() const
-{
-    return mText;
-}
-
-// -----------------------------------------------------------------------------
-// QGesture
-// -----------------------------------------------------------------------------
-//
-
-Qt::GestureState QGesture::state() const
-{
-    return testState;
-}
-
-
-// -----------------------------------------------------------------------------
-// HbTapGesture::HbTapGesture
-// -----------------------------------------------------------------------------
-//
-
-HbTapGesture::HbTapGesture(QObject *paren) 
-{
-    Q_UNUSED(paren);
-}
-
-
-// -----------------------------------------------------------------------------
-// HbTapGesture::~HbTapGesture
-// -----------------------------------------------------------------------------
-//
-
-HbTapGesture::~HbTapGesture()
-{
-}
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-HbTapGesture::TapStyleHint HbTapGesture::tapStyleHint() const
-{
-    return testStyleHint;
-}
-
-// -----------------------------------------------------------------------------
-// HbMessageBox::setStandardButtons
-// -----------------------------------------------------------------------------
-//
-void HbMessageBox::setStandardButtons(int buttons)
-{
-    Q_UNUSED(buttons);
-}
-
-// -----------------------------------------------------------------------------
-// HbMessageBox::standardButtons
-// -----------------------------------------------------------------------------
-//
-int HbMessageBox::standardButtons() const
-{
-   return HbMessageBox::NoButton;
-}
-
-// -----------------------------------------------------------------------------
-// Stub Helper
-// -----------------------------------------------------------------------------
-//
-void HbStubHelper::setGestureState(int state)
-{
-    testState = static_cast<Qt::GestureState> (state);
-}
-
-
-void HbStubHelper::setGestureStyleHint(int style) 
-{
-    testStyleHint = static_cast<HbTapGesture::TapStyleHint> (style);
-}
-
-void HbStubHelper::reset()
-{
-    testState = Qt::NoGesture;
-}
-
-bool HbStubHelper::isTitleBarVisible()
-{
-    return titlebarVisible;
-}
-
-bool HbStubHelper::isStatusBarVisible()
-{
-    return statusBarVisible;
-}
-
-
-// end of file
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbtapgesture.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (developer.feedback@nokia.com)
-**
-** This file is part of the HbCore module of the UI Extensions for Mobile.
-**
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at developer.feedback@nokia.com.
-**
-****************************************************************************/
-#ifndef HBTAPGESTURE_H
-#define HBTAPGESTURE_H
-
-#include <hbglobal.h>
-#include <QGesture>
-
-
-class HbTapGesture : public QTapGesture
-{
-    Q_OBJECT
-
-public:
-    enum TapStyleHint {
-        Tap,
-        TapAndHold
-    };
-
-    explicit HbTapGesture(QObject *parent = 0);
-    virtual ~HbTapGesture();
-
-    TapStyleHint tapStyleHint() const;
-};
-
-#endif // HBTAPGESTURE_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbtoolbar.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBTOOLBAR_H
-#define HBTOOLBAR_H
-
-#include <hbglobal.h>
-#include <hbnamespace.h>
-#include <hbwidget.h>
-
-
-class HbToolBar : public HbWidget
-{
-public:
-    explicit HbToolBar(QGraphicsItem *parent = 0);
-    virtual ~HbToolBar();
-
-    enum { Type = Hb::ItemType_ToolBar };
-};
-
-#endif // HBTOOLBAR_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbtransparentwindow.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBTRANSPARENTWINDOW_H
-#define HBTRANSPARENTWINDOW_H
-
-#include <hbglobal.h>
-#include <hbwidget.h>
-
-
-class HbTransparentWindow : public HbWidget
-{
-public:
-
-    explicit HbTransparentWindow(QGraphicsItem *parent = 0);
-    ~HbTransparentWindow();
-    
-    enum { Type = Hb::ItemType_TransparentWindow };
-};
-
-#endif // HBTRANSPARENTWINDOW_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbview.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBVIEW_H
-#define HBVIEW_H
-
-#include <hbwidget.h>
-#include <hbglobal.h>
-#include <hbnamespace.h>
-
-class HbMenu;
-class HbToolBar;
-class HbAction;
-
-class HbView : public HbWidget
-{
-public:
-    explicit HbView(QGraphicsItem *parent = 0);
-    virtual ~HbView();
-
-    HbMenu *menu() const;
-    HbToolBar *toolBar() const;
-    
-    void showItems(Hb::SceneItems items);
-    void hideItems(Hb::SceneItems items);
-    bool isItemVisible(Hb::SceneItem item)  const;
-    void setTitleBarVisible(bool visible);
-    void setStatusBarVisible(bool visible);
-    
-    void setContentFullScreen(bool enable = true);
-    HbAction *navigationAction() const;
-    void setNavigationAction(HbAction *action);
-
-signals:
-     void contentFullScreenChanged();
-     
-public slots:
-    void setTitle(const QString &title);
-    
-private: // Data added for the unit testing stub
-    HbMenu* mMenu;
-    HbToolBar* mToolBar;
-    bool mDockWidgetVisible;
-};
-
-#endif // HBVIEW_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbwidget.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-
-#ifndef HBWIDGET_H
-#define HBWIDGET_H
-
-#include <hbglobal.h>
-#include <hbstyle.h>
-#include <hbnamespace.h>
-#include <QGraphicsWidget.h>
-
-class HbEvent;
-
-
-class HbWidget : public QGraphicsWidget
-{
-public:
-    explicit HbWidget( QGraphicsItem *parent=0, Qt::WindowFlags wFlags=0 );
-    virtual ~HbWidget();
-    void clearActions();
-    HbMainWindow *mainWindow() const;
-
-protected:
-    QVariant itemChange ( GraphicsItemChange change, const QVariant & value );
-
-protected:
-    /* unit test storage */
-    HbMainWindow* mMainWindow;
-};
-
-#endif // HBWIDGET_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lceffecthandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef UT_LCEFFECTHANDLER_H
-#define UT_LCEFFECTHANDLER_H
-
-#include <QObject>
-
-class LcEffectHandler;
-class LcUiEngine;
-class LcVideoWidget;
-class HbMainWindow;
-
-class UT_LcEffectHandler : public QObject
-{
-    Q_OBJECT
-     
-private slots:
-
-/*
- * In addition, there are four private slots that are not treated as testfunctions. 
- * They will be executed by the testing framework and can be used to initialize and clean up 
- * either the entire test or the current test function.
- * 
- * initTestCase() will be called before the first testfunction is executed.
- * cleanupTestCase() will be called after the last testfunction was executed.
- * init() will be called before each testfunction is executed.
- * cleanup() will be called after every testfunction.
-*/
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-
-private slots: //test methods
-     
-    void testConstructor();
-    void testSwap();
-    void testShowSendWindow();
-    void testHideSendWindow();    
-    void testShowReceiveWindow();
-    void testHideReceiveWindow();    
-    void testEffectComplete();
-    void testStartEffect();
-
-    void testSetVisibility();
-    void testSetDissappearEffect();
-    void testIsSharedVideoAtTop();
-    void testVideosSideBySide();
-    void testHandleSwapCompletion();
-    void testIsSwapInProgress();
-
-private: // Helpers
-    void clearWidgets();
-    void setWidgets();
-private:
- 
-    HbMainWindow* mMainWindow;   
-    LcUiEngine* mEngine;
-    LcEffectHandler* mEffectHandler;
-    LcVideoWidget* mSharedVideo;
-    LcVideoWidget* mSharedVideoOverlay;
-    LcVideoWidget* mReceivedVideo;
-    LcVideoWidget* mReceivedVideoOverlay;
-};
-
-
-#endif //UT_LCEFFECTHANDLER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcuicomponentrepository.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef UT_LCUICOMPONENTREPOSITORY_H
-#define UT_LCUICOMPONENTREPOSITORY_H
-
-#include <QObject>
-
-class LcUiEngine;
-class LcUiComponentRepository;
-class HbMainWindow;
-
-
-class UT_LcUiComponentRepository : public QObject
-{
-    Q_OBJECT
-     
-private slots:
-
-/*
- * In addition, there are four private slots that are not treated as testfunctions. 
- * They will be executed by the testing framework and can be used to initialize and clean 
- * up either the entire test or the current test function.
- * 
- * initTestCase() will be called before the first testfunction is executed.
- * cleanupTestCase() will be called after the last testfunction was executed.
- * init() will be called before each testfunction is executed.
- * cleanup() will be called after every testfunction.
-*/
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-
-private slots: //test methods
-     
-    void testConstructor();
-    void testIdleView();
-    void testReceiveView();
-    void testTwowayView();
-    void testSendView();
-    void testAllInOneView();
-    void testReceiveOnlyView();
-    void testAcceptQuery();
-    void testInvitingNote();
-    void testWaitingNote();
-    void testRecipientQuery();
-    void testShareOwnVideoQuery();
-    void testSharedVideoContextMenu();
-    void testLoadView_FileNotFound();
-    void testConnect();
-    void testLoadLayout();
-    
-private:
- 
-    LcUiEngine* mEngine;
-    LcUiComponentRepository* mRepository;
-};
-
-
-#endif //UT_LCUICOMPONENTREPOSITORY_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcuidefs.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef UT_LCUIDEFS_H_
-#define UT_LCUIDEFS_H_
-
-#include <QStringList>
-
-class HbView;
-
-const char lcutNoCall[] = "NOCALL";
-const char lcutStub_LcUiEngine_start[] = "LcUiEngine::start";
-const char lcutStub_LcUiEngine_setOrientation[] = "LcUiEngine::setOrientation";
-const char lcutStub_LcUiEngine_setContentAreas[] = "LcUiEngine::setContentAreas";
-const char lcutStub_LcUiEngine_mute[] = "LcUiEngine::mute";
-const char lcutStub_LcUiEngine_zoom[] = "LcUiEngine::zoom";
-const char lcutStub_LcUiEngine_enableCamera[] = "LcUiEngine::enableCamera";
-const char lcutStub_LcUiEngine_disableCamera[] = "LcUiEngine::disableCamera";
-const char lcutStub_LcUiEngine_toggleCamera[] = "LcUiEngine::toggleCamera";
-const char lcutStub_LcUiEngine_speaker[] = "LcUiEngine::speaker";
-const char lcutStub_LcUiEngine_stop[] = "LcUiEngine::stop";
-const char lcutStub_LcUiEngine_updateSession[] = "LcUiEngine::updateSession";
-
-
-const char lcEngineName[] = "engineName";
-const char lcDisplayName[] = "displayName";
-
-static QStringList* lcutStub_LcUiEngine_calledMethods = 0;
-static int lcutStub_LcUiEngine_failure = 0;
-static int lcutStub_LcUiEngine_layout = -1;
-
-static bool lcutStub_LcUiEngine_cameraMain = false;
-static bool lcutStub_LcUiEngine_muted = false;
-static bool lcutStub_LcUiEngine_speakerOn = false;
-static bool lcutStub_LcUiEngine_localplaying = true;
-static bool lcutStub_LcUiEngine_remoteplaying = true;
-static bool lcutStub_LcUiEngine_windowState_minimized = false;
-static bool lcutStub_LcUiEngine_isImageShared = false;
-
-extern QStringList& lcutStub_LcUiEngine_calledMethodsInstance();
-extern bool lcutStub_LcUiEngine_expectCall( const QString& call, int callNdx = 0);
-extern void lcutStub_LcUiEngine_reset();
-extern void lcutStub_LcUiEngine_setFailure( int failure );
-extern void lcutStub_LcUiEngine_setLayout( int layout );
-extern void lcutStub_LcUiEngine_setCameraMain( bool val );
-extern void lcutStub_LcUiEngine_setMuted( bool val );
-extern void lcutStub_LcUiEngine_setSpeaker( bool val );
-extern void lcutStub_LcUiEngine_setLocalPlaying( bool val );
-extern void lcutStub_LcUiEngine_setRemotePlaying( bool val );
-extern HbView* lcutStub_LcUiEngine_getCurrentView();
-extern QChar lcutStub_LcUiEngine_getDialToneChar();
-
-// End of file
-
-
-
-
-#endif /* UT_LCUIDEFS_H_ */
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcvideowidget.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef UT_LCVIDEOWIDGET_H
-#define UT_LCVIDEOWIDGET_H
-
-#include <QObject>
-
-class LcVideoWidget;
-
-class UT_LcVideoWidget : public QObject
-{
-    Q_OBJECT
-     
-private slots:
-
-/*
- * In addition, there are four private slots that are not treated as testfunctions. 
- * They will be executed by the testing framework and can be used to initialize and clean up 
- * either the entire test or the current test function.
- * 
- * initTestCase() will be called before the first testfunction is executed.
- * cleanupTestCase() will be called after the last testfunction was executed.
- * init() will be called before each testfunction is executed.
- * cleanup() will be called after every testfunction.
-*/
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-
-private slots: //test methods
-     
-    void testConstructor();
-    void testSetShowVideo();
-    void testPaint();
-    
-private:
- 
-    LcVideoWidget* mVideoWidget;
-    LcVideoWidget* mVideoWidget2;
-};
-
-
-#endif //UT_LCVIDEOWIDGET_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcview.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef UT_LCVIEW_H
-#define UT_LCVIEW_H
-
-#include <QObject>
-
-class LcView;
-class LcUiEngine;
-class HbLabel;
-class LcUiComponentRepository;
-class HbAction;
-class HbPushButton;
-class HbMainWindow;
-
-class UT_LcView : public QObject
-{
-    Q_OBJECT
-     
-private slots:
-
-/*
- * In addition, there are four private slots that are not treated as testfunctions. 
- * They will be executed by the testing framework and can be used to initialize and clean up 
- * either the entire test or the current test function.
- * 
- * initTestCase() will be called before the first testfunction is executed.
- * cleanupTestCase() will be called after the last testfunction was executed.
- * init() will be called before each testfunction is executed.
- * cleanup() will be called after every testfunction.
-*/
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-
-private slots: //test methods
-     
-    void testConstructor();
-    void testActivated();
-    void testInit();
-    void testDeactivated();
-    void testEndVideoSession();
-    void testMute();
-    void testChangeCamera();    
-    void testSwitchToVoiceCall();
-    void testDisableCameraWhenOnFullScreenMode();
-    void testDisableCameraWhenNotOnFullScreenMode();
-    void testSpeaker();
-    void testSwap();
-    void testNotSupported();
-    void testSetCameraActionToMain();
-    void testSetCameraActionToSecondary();
-    void testSetMuteActionToUnmute();
-    void testSetMuteActionToMute();
-    void testSetSpeakerActionToHandset();
-    void testSetSpeakerActionToSpeaker();
-    void testSetCameraActionToEnable();
-    void testSetCameraActionToDisable();
-    void testDisableControls();
-    void testEnableControls();
-    void testUpdateVideoRects();
-    void testCurrentLayout();    
-    void testGestureEvent();
-    void testContextMenu();
-    void testGestureLongPress();
-    void testGestureShortPress();    
-    void testShareImage();    
-    void testUpdateSwapLayout();
-    void testMenuAboutToShow();    
-    void testTranslateRectForOrientation();
-    void testTranslatePointForOrientation();    
-    void testOpenDialpad();
-    void testDialpadOpened();
-    void testDialpadClosed();
-    void testDialpadEditorTextChanged();
-    void testBack();
-    void testAddOptionsMenuActions();
-    void testToFullScreen();
-    void testWatchInactivity();
-    void testTimerEvent();
-    void testIsVideoPositionedCorrectly();
-    void testIsPositioned();
-
-private:
- 
-    HbMainWindow* mMainWindow;   
-    LcView* mView;
-    LcUiEngine* mEngine;
-    HbLabel* mRecipient;
-    LcUiComponentRepository* mRepository;    
-    HbPushButton* mEndCallButton;
-};
-
-
-#endif //UT_LCVIEW_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcviewmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef UT_LCVIEWMANAGER_H
-#define UT_LCVIEWMANAGER_H
-
-#include <QObject>
-class LcViewManager;
-class HbMainWindow;
-class LcViewManagerPrivate;
-
-class UT_LcUiViewManager : public QObject
-{
-     Q_OBJECT
-     
-    
-private slots:
-
-/*
- * In addition, there are four private slots that are not treated as testfunctions. 
- * They will be executed by the testing framework and can be used to initialize and clean 
- * up either the entire test or the current test function.
- * 
- * initTestCase() will be called before the first testfunction is executed.
- * cleanupTestCase() will be called after the last testfunction was executed.
- * init() will be called before each testfunction is executed.
- * cleanup() will be called after every testfunction.
-*/
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-private slots: //test methods
-     
-    void testConstructor();
-    void testChangeView();
-    void testTerminateSession();
-    void testPrepareOrientationChange();
-    void testMainWindowEvent();
-
-private:
- 
-    LcViewManager* mViewManagerDecorator;
-    LcViewManagerPrivate* mViewManager;
-    
-};
-
-
-#endif //UT_LCVIEWMANAGER_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/lcuiengine_stub/symbian/stub_lcuiengine_p.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,404 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "lcuiengine_p.h"
-#include "ut_lcuidefs.h"
-#include "lcuidefs.h"
-#include <hbview.h>
-
-HbView* lcutStub_LcUiEngine_currentView = 0;
-QChar lcStub_LcUiEngine_dialtone('0');
-
-LcUiEnginePrivate::LcUiEnginePrivate(  LcUiEngine& uiEngine,
-                                        const QString &engineName,
-                                        const QString &applicationDisplayName )
-    : mUiEngine ( uiEngine ),
-      mEngineName( engineName.toUtf8() ),
-      mSessionTitle( applicationDisplayName )
-
-{
-    mViewLayout = Lc_NoViewLayout;
-	mLiveCommsEngine = 0;
-    mCloseTimer = 0;
-    mInvitingNote = 0;
-    mWaitingNote = 0;
-    mAcceptQuery = 0;
-    mRecipientQuery = 0;
-    mFullScreen = false;
-}
-
-LcUiEnginePrivate::~LcUiEnginePrivate()
-{
-}
-
-void LcUiEnginePrivate::start()
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_start );
-}
-
-void LcUiEnginePrivate::setContentAreas( const QRectF& /*sharedContent*/,
-                                  const QRectF& /*receivedContent*/ )
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_setContentAreas );
-
-}
-
-bool LcUiEnginePrivate::setOrientation( Qt::Orientation /*orientation*/ )
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_setOrientation );
-    return true;
-}
-
-void LcUiEnginePrivate::zoom( int /*value*/ )
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_zoom );
-
-}
-
-void LcUiEnginePrivate::stop()
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_stop );
-    
-}
-
-void LcUiEnginePrivate::updateSession()
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_updateSession );
-    
-}
-
-bool LcUiEnginePrivate::isLocalPlayerPlaying() const
-{
-    return lcutStub_LcUiEngine_localplaying;
-}
-
-bool LcUiEnginePrivate::isRemotePlayerPlaying() const
-{
-    return lcutStub_LcUiEngine_remoteplaying;
-}
-
-const QString& LcUiEnginePrivate::sessionTitle() const
-{
-    return mSessionTitle;
-}
-const QString& LcUiEnginePrivate::recipient() const
-{
-    return mRecipient;
-}
-
-const QString& LcUiEnginePrivate::phoneNumber() const
-{
-    return mPhoneNumber;
-}
-
-LcViewLayoutHint LcUiEnginePrivate::viewLayout() const
-{
-    return (LcViewLayoutHint)lcutStub_LcUiEngine_layout;
-}
-
-void LcUiEnginePrivate::setUiComponents(HbProgressDialog* invitingNote,
-                                 HbProgressDialog* waitingNote,
-                                 HbDialog* acceptQuery,
-                                 HbDialog* recipientQuery,
-                                 HbDialog* sharedVideoQuery)
-{
-    mInvitingNote = invitingNote;
-    mWaitingNote = waitingNote;
-    mAcceptQuery = acceptQuery;
-    mRecipientQuery = recipientQuery;
-    mShareOwnVideoQuery = sharedVideoQuery;
-    
-}
-
-void LcUiEnginePrivate::startReceiving()
-{
-    
-}
-
-void LcUiEnginePrivate::stopForcefully()
-{
-
-}
-
-void LcUiEnginePrivate::emitViewLayoutChanged()
-{
-    
-}
-
-bool LcUiEnginePrivate::usingVideoTelephoneEngine()
-{
-    return mEngineName == "Videotelephony";
-}
-
-void LcUiEnginePrivate::setMainCamera(const bool aMainCamera)
-{
-    mMainCamera = aMainCamera;    
-}
-
-bool LcUiEnginePrivate::mainCamera() const
-{
-    return mMainCamera;
-}
-
-bool LcUiEnginePrivate::isMuted() const
-{
-    return lcutStub_LcUiEngine_muted;
-}
-
-bool LcUiEnginePrivate::isSpeakerOn() const
-{
-    return lcutStub_LcUiEngine_speakerOn;
-}
-
-void LcUiEnginePrivate::toggleMute()
-{
-    lcutStub_LcUiEngine_muted = !lcutStub_LcUiEngine_muted;
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_mute );
-}
-
-void LcUiEnginePrivate::toggleCamera()
-{
-    lcutStub_LcUiEngine_cameraMain = !lcutStub_LcUiEngine_cameraMain;
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_toggleCamera );
-}
-
-void LcUiEnginePrivate::toggleDisableCamera()
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_disableCamera );
-}
-
-void LcUiEnginePrivate::toggleSpeaker()
-{
-    lcutStub_LcUiEngine_speakerOn = !lcutStub_LcUiEngine_speakerOn;
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_speaker );
-}
-
-int LcUiEnginePrivate::zoomValues( LcControlValues& values ) const
-{
-    values.mMaxValue = 3;
-    values.mMinValue = 1;
-    values.mValue = 2;
-    return 0;
-}
-
-void LcUiEnginePrivate::timerEvent(QTimerEvent */*event*/)
-{
-}
-
-void LcUiEnginePrivate::StateChanged( MLcSession& /*aSession*/ )
-{
-    
-}
-
-void LcUiEnginePrivate::StateChanged( MLcVideoPlayer& /*aPlayer*/ )
-{
-    
-}
-
-void LcUiEnginePrivate::Updated( MLcSession& /*aSession*/ )
-{
-    
-}
-
-void LcUiEnginePrivate::Updated( MLcVideoPlayer& /*aPlayer*/ )
-{
-    
-}
-
-
-void LcUiEnginePrivate::Failed( MLcSession& /*aSession*/, TInt /*aError*/ )
-{
-    
-}
-
-void LcUiEnginePrivate::Failed( MLcVideoPlayer& /*aPlayer*/, TInt /*aError*/ )
-{
-    
-}
-
-void LcUiEnginePrivate::SessionTimeChanged( MLcSession& /*aSession*/, 
-                                     const TTimeIntervalSeconds& /*aSeconds*/ )
-{
-    
-}
-
-TBool LcUiEnginePrivate::SelectRecipient( MDesCArray& /*aRecipientAddresses*/, 
-                                   TDes& /*aSelectedRecipientAddress*/ )        
-{
-    return true;
-}
-
-TBool LcUiEnginePrivate::InputRecipient( TDes& /*aRecipientAddress*/ )
-{
-    return true;
-    
-}
-
-void LcUiEnginePrivate::HandleForegroundStatus( TBool /*aForeground*/ )
-{
-    
-}
-
-void LcUiEnginePrivate::BlockUi( TBool /*aBlocked*/ )
-{
-
-}
-
-
-bool LcUiEnginePrivate::fullScreenMode()
-{
-    return mFullScreen;
-}
-
-
-void LcUiEnginePrivate::setFullScreenMode(bool aMode)
-{
-    mFullScreen = aMode;
-}
-
-bool LcUiEnginePrivate::isMinimized()const
-{
-    return lcutStub_LcUiEngine_windowState_minimized;
-}
-
-void LcUiEnginePrivate::minimize()
-{
-    lcutStub_LcUiEngine_windowState_minimized = true;
-}
-
-void LcUiEnginePrivate::maximize()
-{
-    lcutStub_LcUiEngine_windowState_minimized = false;
-}
-
-void LcUiEnginePrivate::setCurrentView(HbView* view)
-{
-    lcutStub_LcUiEngine_currentView = view;
-}
-
-void LcUiEnginePrivate::handleEngineForegroundStatus()
-{
-}
- 
-bool LcUiEnginePrivate::SendDialTone(const QChar aKey )
-{
-    lcStub_LcUiEngine_dialtone = aKey;
-    return true;
-}
-
-//stub control
-
-bool lcutStub_LcUiEngine_expectCall( const QString& call, int callNdx )
-{
-    if ( callNdx >= lcutStub_LcUiEngine_calledMethodsInstance().count() ) {
-        return call == lcutNoCall;
-    }
-    return lcutStub_LcUiEngine_calledMethodsInstance().count() > 0 ?
-            lcutStub_LcUiEngine_calledMethodsInstance()[callNdx] == call :
-           call == lcutNoCall;
-}
-
-    
-void lcutStub_LcUiEngine_reset()
-{
-    delete lcutStub_LcUiEngine_calledMethods;
-    lcutStub_LcUiEngine_calledMethods = 0;
-    lcutStub_LcUiEngine_failure = 0;
-    lcutStub_LcUiEngine_layout = -1;
-    lcutStub_LcUiEngine_cameraMain = false;
-    lcutStub_LcUiEngine_muted = false;
-    lcutStub_LcUiEngine_speakerOn = false;
-    lcutStub_LcUiEngine_localplaying = true;
-    lcutStub_LcUiEngine_remoteplaying = true;
-    lcutStub_LcUiEngine_currentView = 0;
-    lcStub_LcUiEngine_dialtone = '0';
-}
-
-void lcutStub_LcUiEngine_setFailure( int failure )
-{
-    lcutStub_LcUiEngine_failure = failure;
-}
-
-void lcutStub_LcUiEngine_setLayout( int layout )
-{
-    lcutStub_LcUiEngine_layout = layout;
-}
-
-QStringList& lcutStub_LcUiEngine_calledMethodsInstance()
-{
-    if ( !lcutStub_LcUiEngine_calledMethods ) {
-        lcutStub_LcUiEngine_calledMethods = new QStringList();
-    }
-    return *lcutStub_LcUiEngine_calledMethods;
-}
-
-void lcutStub_LcUiEngine_setCameraMain( bool val )
-{
-    lcutStub_LcUiEngine_cameraMain = val;
-}
-
-void lcutStub_LcUiEngine_setMuted( bool val )
-{
-    lcutStub_LcUiEngine_muted = val;
-}
-
-void lcutStub_LcUiEngine_setSpeaker( bool val )
-{
-    lcutStub_LcUiEngine_speakerOn = val;
-}
-
-void lcutStub_LcUiEngine_setLocalPlaying( bool val )
-{
-    lcutStub_LcUiEngine_localplaying = val;
-}
-
-void lcutStub_LcUiEngine_setRemotePlaying( bool val )
-{
-    lcutStub_LcUiEngine_remoteplaying = val;
-}
-
-HbView* lcutStub_LcUiEngine_getCurrentView()
-{
-    return lcutStub_LcUiEngine_currentView;
-}
-
-
-QChar lcutStub_LcUiEngine_getDialToneChar()
-{
-    return lcStub_LcUiEngine_dialtone;
-}
-
-
-void LcUiEnginePrivate::stopLocalVideo()
-{
-    lcutStub_LcUiEngine_localplaying = false;
-}
-
-void LcUiEnginePrivate::startLocalVideo()
-{
-    lcutStub_LcUiEngine_localplaying = true;
-}
-
-void LcUiEnginePrivate::volumeLevelChanged(const XQSettingsKey& /*aKey*/, const QVariant& /*aValue*/)
-{
-}
-
-// End of file
-
-
-
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/lcuiengine_stub/win32/stub_lcuiengine_p.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,279 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "lcuiengine_p.h"
-#include "ut_lcuidefs.h"
-#include "lcuidefs.h"
-
-LcUiEnginePrivate::LcUiEnginePrivate(  LcUiEngine& uiEngine,
-                                        const QString &engineName,
-                                        const QString &applicationDisplayName )
-    : mUiEngine ( uiEngine ),
-      mEngineName( engineName.toUtf8() ),
-      mSessionTitle( applicationDisplayName )
-
-{
-    mViewLayout = Lc_NoViewLayout;
-    mCloseTimer = 0;
-    mInvitingNote = 0;
-    mWaitingNote = 0;
-    mAcceptQuery = 0;
-    mRecipientQuery = 0;
-    mFullScreen = false;
-}
-
-LcUiEnginePrivate::~LcUiEnginePrivate()
-{
-}
-
-void LcUiEnginePrivate::start()
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_start );
-}
-
-void LcUiEnginePrivate::setContentAreas( const QRectF& /*sharedContent*/,
-                                  const QRectF& /*receivedContent*/ )
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_setContentAreas );
-
-}
-
-bool LcUiEnginePrivate::setOrientation( Qt::Orientation /*orientation*/ )
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_setOrientation );
-    return true;
-}
-
-void LcUiEnginePrivate::zoom( int /*value*/ )
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_zoom );
-
-}
-
-void LcUiEnginePrivate::stop()
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_stop );
-    
-}
-
-void LcUiEnginePrivate::updateSession()
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_updateSession );
-    
-}
-
-bool LcUiEnginePrivate::isLocalPlayerPlaying() const
-{
-    return lcutStub_LcUiEngine_localplaying;
-}
-
-bool LcUiEnginePrivate::isRemotePlayerPlaying() const
-{
-    return lcutStub_LcUiEngine_remoteplaying;
-}
-
-const QString& LcUiEnginePrivate::sessionTitle() const
-{
-    return mSessionTitle;
-}
-const QString& LcUiEnginePrivate::recipient() const
-{
-    return mRecipient;
-}
-
-const QString& LcUiEnginePrivate::phoneNumber() const
-{
-    return mPhoneNumber;
-}
-
-LcViewLayoutHint LcUiEnginePrivate::viewLayout() const
-{
-    return (LcViewLayoutHint)lcutStub_LcUiEngine_layout;
-}
-
-void LcUiEnginePrivate::setUiComponents(HbDialog* invitingNote,
-                                 HbDialog* waitingNote,
-                                 HbDialog* acceptQuery,
-                                 HbDialog* recipientQuery)
-{
-    mInvitingNote = invitingNote;
-    mWaitingNote = waitingNote;
-    mAcceptQuery = acceptQuery;
-    mRecipientQuery = recipientQuery;
-    
-}
-
-void LcUiEnginePrivate::setMainCamera(const bool aMainCamera)
-{
-    mMainCamera = aMainCamera;
-}
-
-bool LcUiEnginePrivate::mainCamera() const
-{
-    return mMainCamera;
-}
-
-bool LcUiEnginePrivate::isMuted() const
-{
-    return lcutStub_LcUiEngine_muted;
-}
-
-bool LcUiEnginePrivate::isSpeakerOn() const
-{
-    return lcutStub_LcUiEngine_speakerOn;
-}
-
-void LcUiEnginePrivate::toggleMute()
-{
-    lcutStub_LcUiEngine_muted = !lcutStub_LcUiEngine_muted;
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_mute );
-}
-
-void LcUiEnginePrivate::toggleCamera()
-{
-    lcutStub_LcUiEngine_cameraMain = !lcutStub_LcUiEngine_cameraMain;
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_toggleCamera );
-}
-
-void LcUiEnginePrivate::toggleDisableCamera()
-{
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_disableCamera );
-}
-
-void LcUiEnginePrivate::toggleSpeaker()
-{
-    lcutStub_LcUiEngine_speakerOn = !lcutStub_LcUiEngine_speakerOn;
-    lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_speaker );
-}
-
-int LcUiEnginePrivate::zoomValues( LcControlValues& values ) const
-{
-    values.mMaxValue = 3;
-    values.mMinValue = 1;
-    values.mValue = 2;
-    return 0;
-}
-
-bool LcUiEnginePrivate::fullScreenMode()
-{
-    return mFullScreen;
-}
-
-
-void LcUiEnginePrivate::setFullScreenMode(bool aMode)
-{
-    mFullScreen = aMode;
-}
-
-bool LcUiEnginePrivate::isMinimized()const
-{
-    return lcutStub_LcUiEngine_windowState_minimized;
-}
-
-void LcUiEnginePrivate::minimize()
-{
-    lcutStub_LcUiEngine_windowState_minimized = true;
-}
-
-void LcUiEnginePrivate::maximize()
-{
-    lcutStub_LcUiEngine_windowState_minimized = false;
-}
-
-void LcUiEnginePrivate::shareImage(const QString& /*fileName*/)
-{
-    lcutStub_LcUiEngine_isImageShared = true;
-}
-
-void LcUiEnginePrivate::shareCamera()
-{
-    lcutStub_LcUiEngine_isImageShared = false;
-}
-
-
-//stub control
-
-bool lcutStub_LcUiEngine_expectCall( const QString& call, int callNdx )
-{
-    if ( callNdx >= lcutStub_LcUiEngine_calledMethodsInstance().count() ) {
-        return call == lcutNoCall;
-    }
-    return lcutStub_LcUiEngine_calledMethodsInstance().count() > 0 ?
-            lcutStub_LcUiEngine_calledMethodsInstance()[callNdx] == call :
-           call == lcutNoCall;
-}
-
-    
-void lcutStub_LcUiEngine_reset()
-{
-    delete lcutStub_LcUiEngine_calledMethods;
-    lcutStub_LcUiEngine_calledMethods = 0;
-    lcutStub_LcUiEngine_failure = 0;
-    lcutStub_LcUiEngine_layout = -1;
-    lcutStub_LcUiEngine_cameraMain = false;
-    lcutStub_LcUiEngine_muted = false;
-    lcutStub_LcUiEngine_speakerOn = false;
-    lcutStub_LcUiEngine_localplaying = true;
-    lcutStub_LcUiEngine_remoteplaying = true;
-}
-
-void lcutStub_LcUiEngine_setFailure( int failure )
-{
-    lcutStub_LcUiEngine_failure = failure;
-}
-
-void lcutStub_LcUiEngine_setLayout( int layout )
-{
-    lcutStub_LcUiEngine_layout = layout;
-}
-
-QStringList& lcutStub_LcUiEngine_calledMethodsInstance()
-{
-    if ( !lcutStub_LcUiEngine_calledMethods ) {
-        lcutStub_LcUiEngine_calledMethods = new QStringList();
-    }
-    return *lcutStub_LcUiEngine_calledMethods;
-}
-
-void lcutStub_LcUiEngine_setCameraMain( bool val )
-{
-    lcutStub_LcUiEngine_cameraMain = val;
-}
-
-void lcutStub_LcUiEngine_setMuted( bool val )
-{
-    lcutStub_LcUiEngine_layout = val;
-}
-
-void lcutStub_LcUiEngine_setSpeaker( bool val )
-{
-    lcutStub_LcUiEngine_speakerOn = val;
-}
-
-void lcutStub_LcUiEngine_setLocalPlaying( bool val )
-{
-    lcutStub_LcUiEngine_localplaying = val;
-}
-
-void lcutStub_LcUiEngine_setRemotePlaying( bool val )
-{
-    lcutStub_LcUiEngine_remoteplaying = val;
-}
-
-
-// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/runtest.cmd	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-call qmake
-call bldmake clean
-call bldmake bldfiles
-call abld reallyclean winscw udeb
-call abld export
-call abld build winscw udeb
-call \epoc32\release\winscw\udeb\ut_lcui.exe
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/main.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "ut_lcviewmanager.h"
-#include "ut_lcuicomponentrepository.h"
-#include "ut_lcview.h"
-#include "ut_lceffecthandler.h"
-#include "ut_lcvideowidget.h"
-#include "testresultxmlparser.h"
-#include <qapplication.h>
-#include <QtTest/QtTest>
-#include <stdio.h>
-
-#include <QFile>
-#include <QTextStream>
-
-#define UT_ARGS( args, file )\
-    QStringList args( "ut_lcui");\
-    args << "-silent" << "-xml" << "-o" << file
-
-int main(int argc, char *argv[]) 
-{
-    bool promptOnExit(true);
-    for (int i=0; i<argc; i++) {
-        if (QString(argv[i]) == "-noprompt")
-            promptOnExit = false;
-    }
-    printf("Running tests...\n");
-    QApplication app(argc, argv);
-    TestResultXmlParser parser;
-    
-    UT_LcUiViewManager ut_lcViewManager;
-    QString resultFileName = "c:/ut_lcui_LcViewManager.xml";
-    UT_ARGS( args_lcViewManager, resultFileName );
-    QTest::qExec( &ut_lcViewManager, args_lcViewManager );
-    parser.parseAndPrintResults(resultFileName);
-    
-    UT_LcUiComponentRepository ut_lcUiComponentRepository;
-    resultFileName = "c:/ut_lcui_LcUiComponentRepository.xml";
-    UT_ARGS( args_lcUiComponentRepository, resultFileName );
-    QTest::qExec( &ut_lcUiComponentRepository, args_lcUiComponentRepository );
-    parser.parseAndPrintResults(resultFileName);
- 
-    UT_LcView ut_lcView;
-    resultFileName = "c:/ut_lcui_LcView.xml";
-    UT_ARGS( args_lcView, resultFileName ); 
-    QTest::qExec( &ut_lcView, args_lcView );
-    parser.parseAndPrintResults(resultFileName);
-    
-    UT_LcEffectHandler ut_effectHandler;
-    resultFileName = "c:/ut_lcui_LcEffectHandler.xml";
-    UT_ARGS( args_lcEffectHandler, resultFileName ); 
-    QTest::qExec( &ut_effectHandler, args_lcEffectHandler );
-    parser.parseAndPrintResults(resultFileName);
-    
-    UT_LcVideoWidget ut_videoWidget;
-    resultFileName = "c:/ut_lcui_LcVideoWidget.xml";
-    UT_ARGS( args_lcVideoWidget, resultFileName ); 
-    QTest::qExec( &ut_videoWidget, args_lcVideoWidget );
-    parser.parseAndPrintResults(resultFileName);
-  
-    if (promptOnExit) {
-        printf("Press any key...\n");
-        getchar(); 
-    }
-    return 0;
-}
-
-
-
- 
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lceffecthandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,469 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "ut_lceffecthandler.h"
-#include "ut_lcuidefs.h"
-#include "lceffecthandler.h"
-#include "lcuiengine.h"
-#include "lcuidefs.h"
-#include "lcvideowidget.h"
-#include <QtTest/QtTest>
-#include <hbmainwindow.h>
-#include <hbinstance.h>
-
-#define UT_SET_ORIENTATION(orient) \
-HbInstance::instance()->allMainWindows().at(0)->setOrientation(orient);
-
-void UT_LcEffectHandler::initTestCase()
-{
-    lcutStub_LcUiEngine_reset();
-    //must have main window, even if it not used
-    mMainWindow = new HbMainWindow();
-}
-
-void UT_LcEffectHandler::cleanupTestCase()
-{
-    lcutStub_LcUiEngine_reset();
-    delete mMainWindow;
-}
-
-
-void UT_LcEffectHandler::init()
-{
-    mEngine = new LcUiEngine( lcEngineName, lcDisplayName );
-
-    mSharedVideo = new LcVideoWidget();
-    mSharedVideoOverlay = new LcVideoWidget(0,false);
-    mReceivedVideo = new LcVideoWidget();
-    mReceivedVideoOverlay = new LcVideoWidget(0,false);
-    mEffectHandler = new LcEffectHandler(
-            *mEngine,mSharedVideo,mSharedVideoOverlay,
-            mReceivedVideo,mReceivedVideoOverlay);
-    
-}
-
-void UT_LcEffectHandler::cleanup()
-{
-    lcutStub_LcUiEngine_reset();
-    delete mEffectHandler;
-    delete mEngine;
-    delete mSharedVideo;
-    delete mSharedVideoOverlay;
-    delete mReceivedVideoOverlay;
-    delete mReceivedVideo;
-}
-
-void UT_LcEffectHandler::testConstructor()
-{
-    QVERIFY( mEffectHandler );
-}
-
-void UT_LcEffectHandler::testSwap()
-{
-    clearWidgets();
-    QSignalSpy spy( mEffectHandler, SIGNAL(loadSwapLayout()) );
-    QVERIFY( !mEffectHandler->mSharedVideo );
-    QVERIFY( !mEffectHandler->mReceivedVideo );
-    QVERIFY( !mEffectHandler->mSwapInProgress );
-    QCOMPARE( spy.count(), 0 );
-
-    mEffectHandler->swap();
-    setWidgets();
-
-    QVERIFY( mEffectHandler->mSwapInProgress );
-    QCOMPARE( spy.count(), 1 );
-
-    HbWidget* sharedVideoWidget = mEffectHandler->mSharedVideo;
-    HbWidget* receivedVideoWidget = mEffectHandler->mReceivedVideo;
-    HbWidget* sharedVideoWidget2 = mEffectHandler->mSharedVideoOverlay;
-    HbWidget* receivedVideoWidget2 = mEffectHandler->mReceivedVideoOverlay;
-    QRectF sharedOrig = mEffectHandler->mSharedVideo->geometry();
-    QRectF recvOrig = mEffectHandler->mReceivedVideo->geometry();
-    
-    // Swapping not started because other widget missing
-    mEffectHandler->mSwapSharedCompleted = true;
-    mEffectHandler->mSwapReceivedCompleted = true;
-    mEffectHandler->mSharedVideo = 0;
-    mEffectHandler->swap();
-    QCOMPARE( sharedVideoWidget->geometry(), sharedOrig );
-    QCOMPARE( receivedVideoWidget->geometry(), recvOrig );
-    QCOMPARE( mEffectHandler->mSwapSharedCompleted, true );
-    QCOMPARE( mEffectHandler->mSwapReceivedCompleted, true );
-    
-    // Swapping not started because other widget missing
-    mEffectHandler->mSharedVideo = sharedVideoWidget;
-    mEffectHandler->mReceivedVideo = 0;
-    mEffectHandler->swap();
-    QCOMPARE( sharedVideoWidget->geometry(), sharedOrig );
-    QCOMPARE( receivedVideoWidget->geometry(), recvOrig );
-    QCOMPARE( mEffectHandler->mSwapSharedCompleted, true );
-    QCOMPARE( mEffectHandler->mSwapReceivedCompleted, true );
-    
-    // Swapping started, however geometry is change only once swapping completes
-    mEffectHandler->mSharedVideo = sharedVideoWidget;
-    mEffectHandler->mReceivedVideo = receivedVideoWidget;
-    mEffectHandler->swap();
-    
-    QCOMPARE( sharedVideoWidget->geometry(), sharedOrig );
-    QCOMPARE( receivedVideoWidget->geometry(), recvOrig );
-    QCOMPARE( mEffectHandler->mSwapSharedCompleted, false );
-    QCOMPARE( mEffectHandler->mSwapReceivedCompleted, false );
-    
-    // Swapping started, however geometry is change only once swapping completes
-    mEffectHandler->mSwapSharedCompleted = true;
-    mEffectHandler->mSwapReceivedCompleted = true;
-    mEffectHandler->swap();
-    QCOMPARE( sharedVideoWidget->geometry(), sharedOrig );
-    QCOMPARE( receivedVideoWidget->geometry(), recvOrig );
-    QCOMPARE( mEffectHandler->mSwapSharedCompleted, false );
-    QCOMPARE( mEffectHandler->mSwapReceivedCompleted, false );
-}
-
-void UT_LcEffectHandler::testShowSendWindow()
-{
-    // Shared video widget does not exist
-    setWidgets();
-    HbWidget* sharedVideoWidget = mEffectHandler->mSharedVideo;
-    QVERIFY( sharedVideoWidget != 0 );
-    sharedVideoWidget->hide();
-    QVERIFY( !sharedVideoWidget->isVisible() );
-    mEffectHandler->mSharedVideo = 0;
-    mEffectHandler->showSendWindow();
-    QVERIFY( !sharedVideoWidget->isVisible() );
-
-    // Shared video widget exists, effects running, dont show
-    HbEffect::mRunning = true;
-    mEffectHandler->mSharedVideo = sharedVideoWidget;
-    mEffectHandler->showSendWindow();
-    QVERIFY( !mEffectHandler->mSharedVideo->isVisible() );
-
-    // Shared video widget exists, show
-    HbEffect::mRunning = false;
-    mEffectHandler->mSharedVideo = sharedVideoWidget;
-    mEffectHandler->showSendWindow();
-    QVERIFY( mEffectHandler->mSharedVideo->isVisible() );
-}
-
-void UT_LcEffectHandler::testHideSendWindow()
-{
- // Shared video widget does not exist
-    setWidgets();
-    HbWidget* sharedVideoWidget = mEffectHandler->mSharedVideo;
-    QVERIFY( sharedVideoWidget != 0 );
-    mEffectHandler->mSharedVideo = 0;
-    mEffectHandler->hideSendWindow();
-
-    // Shared video widget exists, show
-    mEffectHandler->mSharedVideo = sharedVideoWidget;
-    mEffectHandler->showSendWindow();
-    QVERIFY( mEffectHandler->mSharedVideo->isVisible() );
-    
-    // Shared video widget exists, hide
-    mEffectHandler->hideSendWindow();
-    QVERIFY( !mEffectHandler->mSharedVideo->isVisible() );     
-}
-
-void UT_LcEffectHandler::testShowReceiveWindow()
-{
-    // Shared video widget does not exist
-    setWidgets();
-    HbWidget* receivedVideoWidget = mEffectHandler->mReceivedVideo;
-    QVERIFY( receivedVideoWidget != 0 );
-    receivedVideoWidget->hide();
-    QVERIFY( !receivedVideoWidget->isVisible() );
-    mEffectHandler->mReceivedVideo = 0;
-    mEffectHandler->showReceiveWindow();
-    QVERIFY( !receivedVideoWidget->isVisible() );
-    
-    // Received video widget exists, show
-    mEffectHandler->mReceivedVideo = receivedVideoWidget;
-    mEffectHandler->showReceiveWindow();
-    QVERIFY( mEffectHandler->mReceivedVideo->isVisible() );
-}
-
-void UT_LcEffectHandler::testHideReceiveWindow()
-{
-    // Shared video widget does not exist
-    setWidgets();
-    HbWidget* receivedVideoWidget = mEffectHandler->mReceivedVideo;
-    QVERIFY( receivedVideoWidget != 0 );
-    mEffectHandler->mReceivedVideo = 0;
-    mEffectHandler->hideReceiveWindow();
-
-    
-    // Received video widget exists, show
-    mEffectHandler->mReceivedVideo = receivedVideoWidget;
-    mEffectHandler->showReceiveWindow();
-    QVERIFY( mEffectHandler->mReceivedVideo->isVisible() );
-    
-    // Receive video widget exists, hide
-    mEffectHandler->hideReceiveWindow();
-    QVERIFY( !mEffectHandler->mReceivedVideo->isVisible() );    
-}
-
-
-// windowFlipComplete
-// windowDisappearToFlipComplete
-// windowDisappearComplete
-// windowAppearComplete
-// WindowSwapSharedComplete
-// WindowSwapReceivedComplete
-
-void UT_LcEffectHandler::testEffectComplete()
-{
-    clearWidgets();
-    
-    // Video widgets does not exist
-    HbEffect::EffectStatus status;
-    mEffectHandler->windowAppearComplete( status );
-    mEffectHandler->windowDisappearComplete( status );
-    mEffectHandler->windowDisappearToFlipComplete( status );
-    mEffectHandler->windowFlipComplete( status );
-
-    setWidgets();
-
-    HbWidget* sharedVideoWidget = mEffectHandler->mSharedVideo;
-    HbWidget* receivedVideoWidget = mEffectHandler->mReceivedVideo;
-    sharedVideoWidget->hide();
-    receivedVideoWidget->hide();
-
-    mEffectHandler->showSendWindow();
-    mEffectHandler->windowAppearComplete( status );
-    QVERIFY( sharedVideoWidget->isVisible() );
-
-    mEffectHandler->windowDisappearComplete( status );
-    QVERIFY( sharedVideoWidget->isVisible() );
-
-    mEffectHandler->windowDisappearToFlipComplete( status );
-    QVERIFY( !sharedVideoWidget->isVisible() );
-
-        lcutStub_LcUiEngine_setLocalPlaying( false );
-    mEffectHandler->windowFlipComplete( status );
-    QVERIFY( !sharedVideoWidget->isVisible() );
-
-        lcutStub_LcUiEngine_setLocalPlaying( true );
-    mEffectHandler->windowFlipComplete( status );
-    QVERIFY( sharedVideoWidget->isVisible() );
-
-    sharedVideoWidget->hide();
-    receivedVideoWidget->hide();
-        lcutStub_LcUiEngine_setLocalPlaying( true );
-    mEffectHandler->windowFlipComplete( status );
-    QVERIFY( sharedVideoWidget->isVisible() );
-
-    // Swapping, real video widgets are set visible only after
-    // both swap effects have completeded swapping completes and completion
-    // is also signal
-
-    // Geomerty changes are handled by the view using DoCML's
-    // when swapping completes and completion is also signal
-
-    QRectF pos1 = QRectF(5,100, 200, 200);
-    QRectF pos2 = QRectF(5,300, 400, 400);
-    mEffectHandler->mSharedVideo->setGeometry(pos1);
-    mEffectHandler->mReceivedVideo->setGeometry(pos2);
-    QSignalSpy spy( mEffectHandler, SIGNAL(swapCompleted()) );
-    sharedVideoWidget->hide();
-    receivedVideoWidget->hide();
-        lcutStub_LcUiEngine_setLocalPlaying( true );
-    mEffectHandler->windowSwapSharedComplete( status );
-    QVERIFY( !sharedVideoWidget->isVisible() );
-    QCOMPARE( spy.count(), 0 );
-
-    sharedVideoWidget->hide();
-    receivedVideoWidget->hide();
-        lcutStub_LcUiEngine_setRemotePlaying( true );
-    mEffectHandler->windowSwapReceivedComplete( status );
-    QVERIFY( receivedVideoWidget->isVisible() );
-    QVERIFY( sharedVideoWidget->isVisible() );
-    QCOMPARE( spy.count(), 1 );
-
-    // Players are disabled so even when swap completes, widgets are not set
-    // visible
-    sharedVideoWidget->hide();
-    receivedVideoWidget->hide();
-        lcutStub_LcUiEngine_setLocalPlaying( false );
-    mEffectHandler->windowSwapSharedComplete( status );
-    QVERIFY( !sharedVideoWidget->isVisible() );
-    
-    sharedVideoWidget->hide();
-    receivedVideoWidget->hide();
-        lcutStub_LcUiEngine_setRemotePlaying( false );
-    mEffectHandler->windowSwapReceivedComplete( status );
-    QVERIFY( !receivedVideoWidget->isVisible() );
-    QVERIFY( !sharedVideoWidget->isVisible() );
-}
-
-void UT_LcEffectHandler::testStartEffect()
-{
-    clearWidgets();
-    
-    const char *effectId = "myeffect";
-    const char *callBack = "mycallback";
-    
-    QVERIFY( !mEffectHandler->mSharedVideo );
-    QVERIFY( !mEffectHandler->mSharedVideoOverlay );
-    mEffectHandler->startEffect( mEffectHandler->mSharedVideoOverlay,effectId, callBack);
-    
-    setWidgets();
-    
-    QVERIFY( mEffectHandler->mSharedVideo );
-    QVERIFY( mEffectHandler->mSharedVideoOverlay );
-    
-    HbWidget* sharedVideoWidget = mEffectHandler->mSharedVideo;
-    HbWidget* sharedVideoWidget2 = mEffectHandler->mSharedVideoOverlay;
-    QRectF sharedOrig = mEffectHandler->mSharedVideo->geometry();
-    
-    mEffectHandler->mSharedVideo = 0;
-    mEffectHandler->startEffect( mEffectHandler->mSharedVideoOverlay,effectId, callBack);
-    
-    mEffectHandler->mSharedVideo = sharedVideoWidget;
-    mEffectHandler->mSharedVideoOverlay = 0;
-    mEffectHandler->startEffect( mEffectHandler->mSharedVideoOverlay,effectId, callBack);
-    
-    mEffectHandler->mSharedVideo = sharedVideoWidget;
-    mEffectHandler->mSharedVideoOverlay = sharedVideoWidget2;
-    mEffectHandler->startEffect( mEffectHandler->mSharedVideoOverlay,effectId, callBack);
-    
-    QCOMPARE( sharedVideoWidget->geometry(), sharedVideoWidget2->geometry() );
-}
-
-void UT_LcEffectHandler::testSetVisibility()
-{
-    setWidgets();
-
-    QVERIFY( mEffectHandler->mSharedVideo );
-    HbWidget* sharedVideoWidget = mEffectHandler->mSharedVideo;
-    sharedVideoWidget->setVisible(false);
-
-    //If Effects are not running than we can set the visibility of widget
-    mEffectHandler->setVisibility(sharedVideoWidget,true);
-    // TODO: setvisibility temporarily NOP
-    /*QVERIFY( mEffectHandler->mSharedVideo->isVisible() );
-
-    //If Effects are running we can not set the visibility of widget.
-    HbEffect::mRunning = true;
-    mEffectHandler->setVisibility(sharedVideoWidget,false);
-    QVERIFY( mEffectHandler->mSharedVideo->isVisible() );*/
-}
-
-void UT_LcEffectHandler::testSetDissappearEffect()
-{
-    QCOMPARE( mEffectHandler->mEffectCallBack,
-        QString::fromAscii(lcEffectWinDefaultCallback ));
-    mEffectHandler->setDissappearEffect(LcEffectHandler::DissappearToFlip );
-    QCOMPARE( mEffectHandler->mEffectCallBack,
-        QString::fromAscii("windowDisappearToFlipComplete" ));
-    mEffectHandler->setDissappearEffect(LcEffectHandler::NormalDissappear );
-    QCOMPARE( mEffectHandler->mEffectCallBack,
-        QString::fromAscii("windowDisappearComplete" ));
-}
-
-void UT_LcEffectHandler::testIsSharedVideoAtTop()
-{
-    setWidgets();
-
-    QRectF pos1 = QRectF(5,100, 200, 200);
-    QRectF pos2 = QRectF(5,300, 400, 400);
-    mEffectHandler->mSharedVideo->setGeometry(pos1);
-    mEffectHandler->mReceivedVideo->setGeometry(pos2);
-
-    QVERIFY( mEffectHandler->isSharedVideoAtTop() );
-
-    mEffectHandler->mSharedVideo->setGeometry(pos2);
-    mEffectHandler->mReceivedVideo->setGeometry(pos1);
-    QVERIFY( !mEffectHandler->isSharedVideoAtTop() );
-
-}
-
-void UT_LcEffectHandler::testVideosSideBySide()
-{
-    setWidgets();
-    QRectF pos1 = QRectF(5,100, 200, 200);
-    QRectF pos2 = QRectF(5,300, 400, 400);
-    QRectF pos3 = QRectF(5,100, 400, 400);
-
-    mEffectHandler->mSharedVideo->setGeometry(pos1);
-    mEffectHandler->mReceivedVideo->setGeometry(pos2);
-
-    QVERIFY( !mEffectHandler->videosSideBySide() );
-    mEffectHandler->mReceivedVideo->setGeometry(pos3);
-    QVERIFY( mEffectHandler->videosSideBySide() );
-}
-
-void UT_LcEffectHandler::testHandleSwapCompletion()
-{
-    QSignalSpy spy( mEffectHandler, SIGNAL(swapCompleted()) );
-    mEffectHandler->mSwapInProgress = true;
-    mEffectHandler->mSwapSharedCompleted = false;
-    mEffectHandler->mSwapReceivedCompleted = false;
-
-    // Test1: Swap is not completed.
-    mEffectHandler->handleSwapCompletion();
-    QVERIFY( mEffectHandler->mSwapInProgress );
-    QCOMPARE( spy.count(), 0 );
-
-    // Test2: Swap is partially completed.
-    mEffectHandler->mSwapSharedCompleted = true;
-    mEffectHandler->handleSwapCompletion();
-    QVERIFY( mEffectHandler->mSwapInProgress );
-    QCOMPARE( spy.count(), 0 );
-
-    // Test 3. Swap Completed completely.
-    mEffectHandler->mSwapSharedCompleted = true;
-    mEffectHandler->mSwapReceivedCompleted = true;
-    mEffectHandler->handleSwapCompletion();
-    QVERIFY( !mEffectHandler->mSwapInProgress );
-    QCOMPARE( spy.count(), 1 );
-
-    //Test 4. Local & Remote are player are availble.
-    lcutStub_LcUiEngine_setLocalPlaying( true );
-    lcutStub_LcUiEngine_setRemotePlaying( true );
-
-    mEffectHandler->handleSwapCompletion();
-    QVERIFY( mEffectHandler->mSharedVideo->isVisible() );
-    QVERIFY( mEffectHandler->mReceivedVideo->isVisible() );
-}
-
-void UT_LcEffectHandler::testIsSwapInProgress()
-{
-    QVERIFY( !mEffectHandler->isSwapInProgress() );
-    mEffectHandler->swap();
-    QVERIFY( mEffectHandler->isSwapInProgress() );
-}
-
-
-// Helper Utility Function for the Unit Test.
-void UT_LcEffectHandler::clearWidgets()
-{
-    mEffectHandler->mReceivedVideo = 0;
-    mEffectHandler->mReceivedVideoOverlay = 0;
-    mEffectHandler->mSharedVideo = 0;
-    mEffectHandler->mSharedVideoOverlay = 0;
-}
-
-void UT_LcEffectHandler::setWidgets()
-{
-    mEffectHandler->mReceivedVideo = mReceivedVideo;
-    mEffectHandler->mReceivedVideoOverlay = mReceivedVideoOverlay;
-    mEffectHandler->mSharedVideo = mSharedVideo;
-    mEffectHandler->mSharedVideoOverlay = mSharedVideoOverlay;
-}
-
-
-
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcuicomponentrepository.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,322 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "ut_lcuicomponentrepository.h"
-#include "ut_lcuidefs.h"
-#include "lcuicomponentrepository.h"
-#include "lcuidefs.h"
-#include "lcview.h"
-#include "lcuiengine.h"
-#include <QtTest/QtTest>
-#include <QObjectList>
-#include <hbmainwindow.h>
-#include <QAction>
-#include <QString>
-#include <hbmenu.h>
-#include <hbtoolbar.h>
-#include <hbdialog.h>
-#include <hbaction.h>
-#include <hbinstance.h>
-#include <hbprogressdialog.h>
-
-#define UT_SET_ORIENTATION(orient) \
-HbInstance::instance()->allMainWindows().at(0)->setOrientation(orient);
-
-void UT_LcUiComponentRepository::initTestCase()
-{
-}
-
-void UT_LcUiComponentRepository::cleanupTestCase()
-{
-}
-
-
-void UT_LcUiComponentRepository::init()
-{
-    mEngine = new LcUiEngine( lcEngineName, lcDisplayName );
-    mRepository = new LcUiComponentRepository( *mEngine );
-}
-
-void UT_LcUiComponentRepository::cleanup()
-{
-    delete mRepository;
-    delete mEngine;
-}
-
-void UT_LcUiComponentRepository::testConstructor()
-{
-    QVERIFY( mRepository );
-    QVERIFY( !mRepository->mIdleView );
-    QVERIFY( !mRepository->mReceiveView );
-    QVERIFY( !mRepository->mReceiveOnlyView );
-    QVERIFY( !mRepository->mTwowayView );
-    QVERIFY( !mRepository->mSendView );
-    QVERIFY( !mRepository->mAllInOneView );
-    QVERIFY( !mRepository->mAcceptQuery );
-    QVERIFY( !mRepository->mInvitingNote );
-    QVERIFY( !mRepository->mWaitingNote );
-    QVERIFY( !mRepository->mRecipientQuery );
-    
-}
-
-void UT_LcUiComponentRepository::testIdleView()
-{
-    // View not yet loaded
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    QVERIFY( !mRepository->mIdleView );
-    LcView* view = mRepository->idleView();
-    QVERIFY( mRepository->mIdleView );
-    QCOMPARE( view->objectName(), QString( lcViewIdleId ) );
-            
-    // View loaded
-    LcView* view2 = mRepository->idleView();
-    QVERIFY( view == view2 );
-}
-
-void UT_LcUiComponentRepository::testReceiveView()
-{
-    // View not yet loaded
-    // Landscape layout
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    QVERIFY( !mRepository->mReceiveView );
-    LcView* view = mRepository->receiveView();
-    QVERIFY( mRepository->mReceiveView );
-    QCOMPARE( view->objectName(), QString( lcViewReceiveId ) );
-    
-    // View loaded
-    LcView* view2 = mRepository->receiveView();
-    QVERIFY( view == view2 );
-}
-
-
-void UT_LcUiComponentRepository::testReceiveOnlyView()
-{
-    // View not yet loaded
-    QVERIFY( !mRepository->mReceiveOnlyView );
-    LcView* view = mRepository->receiveOnlyView();
-    QVERIFY( mRepository->mReceiveOnlyView );
-    QCOMPARE( view->objectName(), QString( lcViewReceiveOnlyId ) );
-    
-    // View loaded
-    LcView* view2 = mRepository->receiveOnlyView();
-    QVERIFY( view == view2 ); 
-}
-
-
-void UT_LcUiComponentRepository::testTwowayView()
-{
-    // View not yet loaded
-    QVERIFY( !mRepository->mTwowayView );
-    LcView* view = mRepository->twowayView();
-    QVERIFY( mRepository->mTwowayView );
-    QCOMPARE( view->objectName(), QString( lcViewTwowayId ) );
-    
-    // View loaded
-    LcView* view2 = mRepository->twowayView();
-    QVERIFY( view == view2 ); 
-}
-
-void UT_LcUiComponentRepository::testSendView()
-{ 
-    // View not yet loaded
-    QVERIFY( !mRepository->mSendView );
-    LcView* view = mRepository->sendView();
-    QVERIFY( mRepository->mSendView );
-    QCOMPARE( view->objectName(), QString( lcViewSendId ) );
-    
-    // View loaded
-    LcView* view2 = mRepository->sendView();
-    QVERIFY( view == view2 );
-}
-
-void UT_LcUiComponentRepository::testAllInOneView()
-{  
-    // View not yet loaded
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    QVERIFY( !mRepository->mAllInOneView );    
-    LcView* view = mRepository->allInOneView();
-    QVERIFY( mRepository->mAllInOneView );
-    QCOMPARE( view->objectName(), QString( lcViewAllInOneId ) );    
-    QCOMPARE(  mRepository->mLayoutSection, QString( lcLayoutLandscapeDefaultId ) );
-    // View loaded
-    LcView* view2 = mRepository->allInOneView();
-    QVERIFY( view == view2 );
-}
-
-void UT_LcUiComponentRepository::testAcceptQuery()
-{
-    // Query created and returned
-    QVERIFY( !mRepository->mAcceptQuery );
-    HbDialog* query = mRepository->acceptQuery();
-    QVERIFY( query );
-    QCOMPARE( query, mRepository->mAcceptQuery );
-    QVERIFY( !query->isVisible() );
-
-    // Existing query returned
-    HbDialog* query2 = mRepository->acceptQuery();
-    QVERIFY( query2 );
-    QVERIFY( query2 == query ); 
-}
-
-void UT_LcUiComponentRepository::testInvitingNote()
-{
-    // Note created and returned
-    QVERIFY( !mRepository->mInvitingNote );
-    HbDialog* note = mRepository->invitingNote();
-    QVERIFY( note );
-    QVERIFY( note == mRepository->mInvitingNote );
-    QVERIFY( !note->isVisible() );
-
-    // Existing note returned
-    HbDialog* note2 = mRepository->invitingNote();
-    QVERIFY( note2 );
-    QVERIFY( note2 == note );  
-}
-
-void UT_LcUiComponentRepository::testWaitingNote()
-{
-    // Note created and returned
-    QVERIFY( !mRepository->mWaitingNote );
-    HbDialog* note = mRepository->waitingNote();
-    QVERIFY( note );
-    QVERIFY( note == mRepository->mWaitingNote );
-    QVERIFY( !note->isVisible() );
-
-    // Existing note returned
-    HbDialog* note2 = mRepository->waitingNote();
-    QVERIFY( note2 );
-    QVERIFY( note2 == note );
-}
-
-void UT_LcUiComponentRepository::testRecipientQuery()
-{
-    // Query created and returned
-    QVERIFY( !mRepository->mRecipientQuery );
-    HbDialog* query = mRepository->recipientQuery();
-    QVERIFY( mRepository->mRecipientQuery );
-    QCOMPARE( query, mRepository->mRecipientQuery );
-    QVERIFY( !query->isVisible() );
-
-    // Existing query returned
-    HbDialog* query2 = mRepository->recipientQuery();
-    QVERIFY( query2 == query );
-}
-
-void UT_LcUiComponentRepository::testShareOwnVideoQuery()
-{
-    // Query created and returned
-    QVERIFY( !mRepository->mShareOwnVideoQuery );
-    HbDialog* query = mRepository->shareOwnVideoQuery();
-    QVERIFY( mRepository->mShareOwnVideoQuery );
-    QCOMPARE( query, (HbDialog*)mRepository->mShareOwnVideoQuery );
-    QVERIFY( !query->isVisible() );
-
-    // Existing query returned
-    HbDialog* query2 = mRepository->shareOwnVideoQuery();
-    QVERIFY( query2 );
-    QVERIFY( query2 == query ); 
-}
-
-void UT_LcUiComponentRepository::testSharedVideoContextMenu()
-{
-    HbMenu* menu = new HbMenu();
-    QVERIFY( menu->isEmpty() );
-
-    QVERIFY( !mRepository->mAllInOneView );    
-    LcView* view = mRepository->allInOneView();
-    QVERIFY( mRepository->mAllInOneView );
-    QCOMPARE( view->objectName(), QString( lcViewAllInOneId ) );
-
-    HbAction changeCamera( lcActChangeCameraId );
-    HbAction disableCam( lcActMenuDisableCameraId );
-    HbAction enableCam( lcActEnableCameraId );
-    HbAction changeCam( lcActMenuChangeCameraId );
-
-    mRepository->mActions.append( &changeCamera );
-    mRepository->mActions.append( &disableCam );
-    mRepository->mActions.append( &enableCam );
-    mRepository->mActions.append( &changeCam );
-    
-    mRepository->sharedVideoContextMenuActions( menu, *view );
-    //TODO: stub implementation of void QGraphicsWidget::addAction(QAction *action);
-    //QVERIFY( !menu->isEmpty() );    
-}
-
-
-void UT_LcUiComponentRepository::testLoadView_FileNotFound()
-{
-    QObjectList viewR;
-    const QString vid( "view");
-    const QString file( "file not found" );
-    QVERIFY( !mRepository->loadView( viewR, vid, file ) );
-}
-
-void UT_LcUiComponentRepository::testConnect()
-{
-    LcView* view = mRepository->idleView();
-    QVERIFY( view );
-    HbAction action;
-    
-    // Existing action
-    action.setObjectName( QString( lcActMuteId ) );
-    QVERIFY( mRepository->connect( action, *view ) );
-    
-    // Action not found
-    action.setObjectName( QString( "Action not defined" ) );
-    QVERIFY( !mRepository->connect( action, *view ) );    
-}
-
-
-void UT_LcUiComponentRepository::testLoadLayout()
-{   
-    bool ok( false );
-    
-    // View not yet loaded
-    QVERIFY( mRepository->mLastLoadedView.length() == 0 );
-    ok = mRepository->loadLayout( lcLayoutLandscapeDefaultId );
-    QVERIFY( !ok );
-    
-    // View is loaded
-    mRepository->mLastLoadedView = lcIdleViewFile;
-    ok = mRepository->loadLayout( lcLayoutLandscapeDefaultId );
-    QVERIFY( ok );
-    
-    // Changing layout
-    ok = mRepository->loadLayout( lcLayoutLandscapeSwappedId );
-    QVERIFY( ok );
-    ok = mRepository->loadLayout( lcLayoutFullscreenId );
-    QVERIFY( ok );
-    
-    // Loading non-existing section
-    ok = mRepository->loadLayout( QString("dummy_layout") );
-    QVERIFY( !ok );
-    
-    // Check for current and previously loaded layout name    
-    mRepository->mLastLoadedView = lcIdleViewFile;
-    ok = mRepository->loadLayout( lcLayoutLandscapeDefaultId );
-    QVERIFY( ok );
-    QVERIFY( mRepository->layout() == lcLayoutLandscapeDefaultId );    
-    ok = mRepository->loadLayout( lcLayoutLandscapeDialpadId );
-    QVERIFY( ok );
-    QVERIFY( mRepository->layout() == lcLayoutLandscapeDialpadId );
-    QVERIFY( mRepository->previousLayout() == lcLayoutLandscapeDefaultId );
-    ok = mRepository->loadLayout( mRepository->previousLayout() );
-    QVERIFY( ok );
-    QVERIFY( mRepository->layout() == lcLayoutLandscapeDefaultId );
-    QVERIFY( mRepository->previousLayout() == lcLayoutLandscapeDialpadId );
-        
-}
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcvideowidget.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "ut_lcvideowidget.h"
-#include "ut_lcuidefs.h"
-#include "lcvideowidget.h"
-#include <QtTest/QtTest>
-#include <hbmainwindow.h>
-#include <QPainter>
-#include <QStyleOptionGraphicsItem>
-
-void UT_LcVideoWidget::initTestCase()
-{
-}
-
-void UT_LcVideoWidget::cleanupTestCase()
-{
-}
-
-
-void UT_LcVideoWidget::init()
-{
-     mVideoWidget = new LcVideoWidget();
-     mVideoWidget2 = new LcVideoWidget(0,false);
-}
-
-void UT_LcVideoWidget::cleanup()
-{
-    delete mVideoWidget;
-    delete mVideoWidget2;
-}
-
-void UT_LcVideoWidget::testConstructor()
-{
-    QVERIFY( mVideoWidget );
-    QVERIFY( mVideoWidget->isShowingVideo() );
-    QVERIFY( mVideoWidget2 );
-    QVERIFY( !mVideoWidget2->isShowingVideo() );
-}
-
-void UT_LcVideoWidget::testSetShowVideo()
-{
-    QVERIFY( mVideoWidget->isShowingVideo() );
-    mVideoWidget->setShowVideo(false);
-    QVERIFY( !mVideoWidget->isShowingVideo() );
-    mVideoWidget->setShowVideo(true);
-    QVERIFY( mVideoWidget->isShowingVideo() );
-}
-
-void UT_LcVideoWidget::testPaint()
-{
-    QPainter painter;
-    QStyleOptionGraphicsItem style;
-    mVideoWidget->setPos(QPointF(10,100));
-    mVideoWidget->paint(&painter,&style,0);
-    mVideoWidget2->paint(&painter,&style,0);
-}
-
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcview.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,911 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "ut_lcview.h"
-#include "ut_lcuidefs.h"
-#include "lcview.h"
-#include "lcuiengine.h"         
-#include "lcuicomponentrepository.h"
-#include "lcuidefs.h"
-#include "lcvideowidget.h"
-#include "lceffecthandler.h"
-#include <QtTest/QtTest>
-#include <hbmainwindow.h>
-#include <hblabel.h>
-#include <hbmessagebox.h>
-#include <hbaction.h>
-#include <hbtoolbar.h>
-#include <hbmenu.h>
-#include <hbinstance.h>
-#include <hblineedit.h>
-#include <hbpushbutton.h>
-#include <hbtransparentwindow.h>
-#include <qgraphicssceneevent.h>
-#include <qgraphicsitem.h>
-#include <QGesture.h>
-#include <dialpad.h>
-#include <dialpadvtkeyhandler.h>
-#include <HbTapGesture.h>
-
-// Stub Helper
-#include <hbstub_helper.h>
-
-#define UT_SET_ORIENTATION(orient) \
-HbInstance::instance()->allMainWindows().at(0)->setOrientation(orient);
-
-void UT_LcView::initTestCase()
-{
-    lcutStub_LcUiEngine_reset();
-    //must have main window, even if it not used
-    mMainWindow = new HbMainWindow();
-}
-
-void UT_LcView::cleanupTestCase()
-{
-    lcutStub_LcUiEngine_reset();
-    delete mMainWindow;
-}
-
-
-void UT_LcView::init()
-{
-    lcutStub_LcUiEngine_reset();
-    mRecipient = new HbLabel();
-    mEndCallButton = new HbPushButton();
-    mEngine = new LcUiEngine( lcEngineName, lcDisplayName );
-    mRepository = new LcUiComponentRepository( *mEngine );
-    mView = new LcView( *mEngine, *mRepository );
-    mView->mRecipient = mRecipient;
-    mView->mEndCallButton = mEndCallButton;
-    mView->mChangeCameraAction = new HbAction();
-    mView->mMuteAction = new HbAction();
-    mView->mSpeakerAction = new HbAction();
-    mView->mDisableCameraAction = new HbAction();   
-    mView->mDisableCameraMenuAction = new HbAction(); 
-}
-
-void UT_LcView::cleanup()
-{
-    lcutStub_LcUiEngine_reset();
-    delete mRecipient;
-    delete mView;
-    delete mEngine;
-    delete mRepository;    
-    delete mEndCallButton;
-}
-
-void UT_LcView::testConstructor()
-{
-    QVERIFY( mView );
-}
-
-void UT_LcView::testActivated()
-{
-    mView->init();
-    lcutStub_LcUiEngine_reset();
-    QVERIFY( lcutStub_LcUiEngine_getCurrentView() == 0 );
-    mView->activated();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_getCurrentView() == mView );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    
-    lcutStub_LcUiEngine_reset();
-    mView->activated();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    
-    lcutStub_LcUiEngine_reset();
-    lcutStub_LcUiEngine_setCameraMain( true);
-    lcutStub_LcUiEngine_setMuted( true);
-    lcutStub_LcUiEngine_setSpeaker( true );
-    
-    mView->activated();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    
-    // normal scenario
-    lcutStub_LcUiEngine_reset();
-    mView->mChangeCameraAction = new HbAction();
-    mView->mMuteAction = new HbAction();
-    mView->mSpeakerAction = new HbAction();
-    mView->mDisableCameraAction = new HbAction();   
-     
-    mView->mEngine.setMainCamera( true );
-    lcutStub_LcUiEngine_setMuted( true);
-    lcutStub_LcUiEngine_setSpeaker( true );
-    lcutStub_LcUiEngine_setLocalPlaying( true );
-    mView->activated();
-    QVERIFY( mView->mChangeCameraAction );
-    QVERIFY( mView->mChangeCameraAction->icon() ==  HbIcon( lcIconNameSecondaryCamera ) );
-    QVERIFY( mView->mMuteAction );
-    QVERIFY( mView->mMuteAction->icon() ==  HbIcon( lcIconNameUnmuteMic ) );
-    QVERIFY( mView->mSpeakerAction );
-    QVERIFY( mView->mSpeakerAction->icon() ==  HbIcon( lcIconNameHandset ) );
-    QVERIFY( mView->mDisableCameraAction );
-    QVERIFY( mView->mDisableCameraAction->icon() ==  HbIcon( lcIconNameDisableCamera ) );
-    
-    // dude trust me , ofcourse not everything normal everytime
-    mView->mEngine.setMainCamera( false );    
-    lcutStub_LcUiEngine_setMuted( false );
-    lcutStub_LcUiEngine_setSpeaker( false );
-    lcutStub_LcUiEngine_setLocalPlaying( false );
-    mView->activated();
-    QVERIFY( mView->mChangeCameraAction );
-    QVERIFY( mView->mChangeCameraAction->icon() ==  HbIcon( lcIconNameMainCamera ) );
-    QVERIFY( mView->mMuteAction );
-    QVERIFY( mView->mMuteAction->icon() ==  HbIcon( lcIconNameMuteMic ) );
-    QVERIFY( mView->mSpeakerAction );
-    QVERIFY( mView->mSpeakerAction->icon() ==  HbIcon( lcIconNameLoudspeaker ) ); 
-    QVERIFY( mView->mDisableCameraAction );
-    QVERIFY( mView->mDisableCameraAction->icon() ==  HbIcon( lcIconNameEnableCamera ) );
-}
-
-void UT_LcView::testInit()
-{
-    mRepository->mReturnSendVideo = false;
-    mView->init();
-    QVERIFY( mView->mRecipient );
-    QVERIFY( !mView->mSharedVideoWidget );
-    QVERIFY( mView->mDialpad );
-    QVERIFY( mView->mDialpadVtKeyHandler );
-    
-    mRepository->mReturnSendVideo = true;
-    mView->init();
-    QVERIFY( mView->mRecipient );
-    QVERIFY( mView->mSharedVideoWidget );
-    QVERIFY( mView->menu());
-    QVERIFY( mView->mDialpad );
-    QVERIFY( mView->mDialpadVtKeyHandler );
-    
-    // emergency call     
-    mView->mDialpadVtKeyHandler->contentChanged("112");
-    QVERIFY( mView->mDialpad->mIsCallButtonEnabled );
-    mView->mDialpadVtKeyHandler->contentChanged("100");
-    QVERIFY( !mView->mDialpad->mIsCallButtonEnabled );
-}
-
-void UT_LcView::testDeactivated()
-{
-    mView->deactivated();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas ) );
-}
-
-void UT_LcView::testSetCameraActionToMain()
-{
-    mView->setCameraActionToMain();
-    QVERIFY( mView->mChangeCameraAction->text().isEmpty() );
-    QCOMPARE( mView->mChangeCameraAction->icon(), HbIcon(lcIconNameMainCamera) );
-}
-
-void UT_LcView::testSetCameraActionToSecondary()
-{
-    mView->setCameraActionToSecondary();
-    QVERIFY( mView->mChangeCameraAction->text().isEmpty() );
-    QCOMPARE( mView->mChangeCameraAction->icon(), HbIcon(lcIconNameSecondaryCamera) );
-}
-
-void UT_LcView::testSetMuteActionToUnmute()
-{
-    mView->setMuteActionToUnmute();
-    QVERIFY( mView->mMuteAction->text().isEmpty() );
-    QCOMPARE (mView->mMuteAction->icon(), HbIcon(lcIconNameUnmuteMic));
-}
-
-void UT_LcView::testSetMuteActionToMute()
-{
-    mView->setMuteActionToMute();
-    QVERIFY( mView->mMuteAction->text().isEmpty() );
-    QCOMPARE (mView->mMuteAction->icon(), HbIcon(lcIconNameMuteMic));
-}
-
-void UT_LcView::testSetSpeakerActionToHandset()
-{
-    mView->setSpeakerActionToHandset();
-    QVERIFY( mView->mSpeakerAction->text().isEmpty() );
-    QCOMPARE( mView->mSpeakerAction->icon(), HbIcon(lcIconNameHandset) );
-}
-
-void UT_LcView::testSetSpeakerActionToSpeaker()
-{
-    mView->setSpeakerActionToSpeaker();
-    QVERIFY( mView->mSpeakerAction->text().isEmpty() );
-    QCOMPARE( mView->mSpeakerAction->icon(), HbIcon(lcIconNameLoudspeaker) );
-}
-
-void UT_LcView::testSetCameraActionToEnable()
-{
-    mView->setCameraActionToEnable();
-    QVERIFY( mView->mDisableCameraAction->text().isEmpty() );
-    QCOMPARE( mView->mDisableCameraAction->icon(), HbIcon(lcIconNameEnableCamera) );
-    QCOMPARE( mView->mDisableCameraMenuAction->text(), hbTrId( "txt_vt_menu_enable_camera" ) );   
-}
-
-void UT_LcView::testSetCameraActionToDisable()
-{    
-    mView->setCameraActionToDisable();
-    QVERIFY( mView->mDisableCameraAction->text().isEmpty() );
-    QCOMPARE( mView->mDisableCameraAction->icon(), HbIcon(lcIconNameDisableCamera) );
-    QCOMPARE( mView->mDisableCameraMenuAction->text(), hbTrId( "txt_vt_menu_disable_camera" ) );   
-}
-
-
-void UT_LcView::testDisableControls()
-{
-    mView->disableControls();
-    QVERIFY( !mView->menu()->isEnabled() );
-    QVERIFY( !mView->toolBar()->isEnabled() );
-}
-
-void UT_LcView::testEnableControls()
-{
-    mView->menu()->setEnabled( false );
-    mView->toolBar()->setEnabled( false );
-    
-    mView->enableControls();
-    QVERIFY( mView->menu()->isEnabled() );
-    QVERIFY( mView->toolBar()->isEnabled() );
-}
-
-
-void UT_LcView::testEndVideoSession()
-{
-    mView->endVideoSession();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_stop ) );   
-}
-
-void UT_LcView::testMute()
-{    
-    mView->mute();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_mute ) );
-    QVERIFY( !mView->timerId );
-    QVERIFY( !mEngine->fullScreenMode());
-}
-
-void UT_LcView::testChangeCamera()
-{
-    mView->init();    
-    mView->changeCamera();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_toggleCamera ) );    
-    QVERIFY( !mEngine->fullScreenMode() );
-}
-
-void UT_LcView::testSwitchToVoiceCall()
-{
-    mView->switchToVoiceCall();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_stop ) );
-}
-
-void UT_LcView::testDisableCameraWhenOnFullScreenMode()
-{
-    mView->init();
-    mEngine->setFullScreenMode(true);
-    mView->disableCamera();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_disableCamera ) );    
-    QVERIFY( mEngine->fullScreenMode() );
-}
-
-void UT_LcView::testDisableCameraWhenNotOnFullScreenMode()
-{
-    mView->init();
-    mEngine->setFullScreenMode(false);
-    mView->disableCamera();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_disableCamera ) );    
-    QVERIFY( !mEngine->fullScreenMode() );
-}
-
-void UT_LcView::testSpeaker()
-{   
-    mView->init();   
-    mView->speaker();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_speaker ) );    
-    QVERIFY( !mEngine->fullScreenMode() );
-}
-
-void UT_LcView::testSwap()
-{
-    QVERIFY( !mView->mSharedVideoWidget );
-    QVERIFY( !mView->mReceivedVideoWidget );
-    mView->swap();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutNoCall ) );
-    
-    lcutStub_LcUiEngine_reset();
-    mView->init();
-    mView->swap();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutNoCall ) );
-}
-
-void UT_LcView::testNotSupported()
-{
-    HbMainWindow mainWin;
-    QVERIFY( mView->mNotSupportedNote );
-    QVERIFY( !mView->mNotSupportedNote->isVisible() );
-    mView->notSupported();
-    QVERIFY( mView->mNotSupportedNote->isVisible() );
-}
-
-void UT_LcView::testUpdateVideoRects()
-{
-    mView->init();
-    LcVideoWidget* sharedVideoWidget = mView->mSharedVideoWidget;
-    LcVideoWidget* receivedVideoWidget = mView->mReceivedVideoWidget;
-
-    mView->mSharedVideoWidget = 0;
-    mView->mReceivedVideoWidget = 0;
-    mView->updateVideoRects();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-
-    mView->mSharedVideoWidget = sharedVideoWidget;
-    mView->mReceivedVideoWidget = 0;
-    mView->updateVideoRects();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-
-    mView->mSharedVideoWidget = 0;
-    mView->mReceivedVideoWidget = receivedVideoWidget;
-    mView->updateVideoRects();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-
-    mView->mSharedVideoWidget = sharedVideoWidget;
-    mView->mReceivedVideoWidget = receivedVideoWidget;
-    sharedVideoWidget->hide();
-    receivedVideoWidget->hide();
-    lcutStub_LcUiEngine_setLocalPlaying( false );
-    lcutStub_LcUiEngine_setRemotePlaying( false );
-    mView->updateVideoRects();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    QVERIFY( !sharedVideoWidget->isVisible() );
-    QVERIFY( !receivedVideoWidget->isVisible() );
-
-    sharedVideoWidget->hide();
-    receivedVideoWidget->hide();
-    lcutStub_LcUiEngine_setLocalPlaying( true );
-    lcutStub_LcUiEngine_setRemotePlaying( true );
-    mView->updateVideoRects();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    
-    //Test: Shared video widgets and received video wigts are positioned at (0,0)
-    //It does not update.
-    lcutStub_LcUiEngine_reset();
-    mView->isViewReady = false;
-    mView->mSharedVideoWidget = sharedVideoWidget;
-    mView->mSharedVideoWidget->setPos(QPointF(0,0));
-    mView->mReceivedVideoWidget = receivedVideoWidget;
-    mView->mReceivedVideoWidget->setPos(QPointF(0,0));
-    mView->updateVideoRects();
-    QVERIFY( !lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( !lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( !lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    
-    
-    //Test2: Shared video widgets positioned at (0,0) and other widgets is null
-    //It does not update.
-    lcutStub_LcUiEngine_reset();
-    mView->mSharedVideoWidget = sharedVideoWidget;
-    mView->mSharedVideoWidget->setPos(QPointF(0,0));
-    mView->mReceivedVideoWidget = 0;
-    mView->isViewReady = false;
-    mView->updateVideoRects();
-    QVERIFY( !lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( !lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( !lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-
-    //Test3: Shared video widgets positioned correctly  and other widgets is null
-    //It update.
-    lcutStub_LcUiEngine_reset();
-    mView->mSharedVideoWidget = sharedVideoWidget;
-    mView->mSharedVideoWidget->setPos(QPointF(10,10));
-    mView->mReceivedVideoWidget = 0;
-    mView->isViewReady = false;
-    mView->updateVideoRects();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-}
-
-void UT_LcView::testCurrentLayout()
-{
-    mView->init();
-    QString layout;
-
-    //1. Landscape layout
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    layout = mView->currentLayout();
-    QVERIFY( layout == lcLayoutLandscapeDefaultId );    
-
-    //2. Landscape swapped layout    
-    // Shared window x coordinate is higher than Received windows x coordinate.
-
-    QRectF pos1 = QRectF(100,300, 400, 400);
-    QRectF pos2 = QRectF(5,100, 200, 200);
-
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    mView->mEffectHandler->mSwapInProgress = true;
-    mView->mSharedVideoWidget->setGeometry(pos1);
-    mView->mReceivedVideoWidget->setGeometry(pos2);
-
-    layout = mView->currentLayout();
-    QVERIFY( layout == lcLayoutLandscapeSwappedId );
-
-    //3. If it's already swapped, change to the normal landscape mode
-    mView->mSharedVideoWidget->setGeometry(pos2);
-    mView->mReceivedVideoWidget->setGeometry(pos1);
-    layout = mView->currentLayout();
-    QVERIFY( layout == lcLayoutLandscapeDefaultId );
-}
-
-
-void UT_LcView::testToFullScreen()
-{
-    QString layout;
-    UT_SET_ORIENTATION( Qt::Horizontal );
-
-    // Test1: to full screen
-    mView->init();
-    mView->menu()->setVisible( false );
-    mView->toFullScreen( true );
-    QVERIFY( mEngine->fullScreenMode() );
-    // Use the helper function do not invent new one 
-    QVERIFY( !HbStubHelper::isTitleBarVisible() );
-    QVERIFY( !HbStubHelper::isStatusBarVisible() );
-    QVERIFY( !mView->toolBar()->isVisible() );    
-    QVERIFY( !mView->mEndCallButton->isVisible() );
-    QVERIFY( !mView->mDuration->isVisible() );
-    QVERIFY( !mView->mRecipient->isVisible() );    
-    
-    // Test2 : not in full screen
-    mView->init();
-    mView->menu()->setVisible( false );
-    mView->toFullScreen( false );
-    QVERIFY( !mEngine->fullScreenMode() );
-    QVERIFY( HbStubHelper::isTitleBarVisible() );
-    QVERIFY( HbStubHelper::isStatusBarVisible() );
-    QVERIFY( mView->toolBar()->isVisible() );    
-    QVERIFY( mView->mEndCallButton->isVisible() );
-    QVERIFY( mView->mDuration->isVisible() );
-    QVERIFY( mView->mRecipient->isVisible() );
-    int tId = mView->timerId;
-    mView->watchInactivity();    
-    QVERIFY( mView->timerId != tId );
-    
-    // Test3 : menu visible
-    mView->init();
-    mView->menu()->setVisible( false );
-    mView->toFullScreen( false );
-    mView->menu()->setVisible( true );
-    mView->toFullScreen( true );
-    QVERIFY( !mEngine->fullScreenMode() );
-    QVERIFY( HbStubHelper::isTitleBarVisible() );
-    QVERIFY( HbStubHelper::isStatusBarVisible() );
-    QVERIFY( mView->toolBar()->isVisible() );    
-    QVERIFY( mView->mEndCallButton->isVisible() );
-    QVERIFY( mView->mDuration->isVisible() );
-    QVERIFY( mView->mRecipient->isVisible() );    
-    tId = mView->timerId;
-    mView->watchInactivity();    
-    QVERIFY( mView->timerId != tId );
-    
-    // Test3 : dialpad visible
-    mView->init();
-    delete mView->mDialpad;
-    mView->mDialpad = new Dialpad();
-    mView->toFullScreen( true );
-    QVERIFY( !mEngine->fullScreenMode() );
-    QVERIFY( HbStubHelper::isTitleBarVisible() );
-    QVERIFY( HbStubHelper::isStatusBarVisible() );
-    QVERIFY( mView->toolBar()->isVisible() );    
-    QVERIFY( mView->mEndCallButton->isVisible() );
-    QVERIFY( mView->mDuration->isVisible() );
-    QVERIFY( mView->mRecipient->isVisible() );    
-    tId = mView->timerId;
-    mView->watchInactivity();    
-    QVERIFY( mView->timerId == tId );
-}
-
-void UT_LcView::testGestureEvent()
-{
-    mView->init();
-    mView->menu()->setVisible(false);    
-    UT_SET_ORIENTATION( Qt::Horizontal );
-
-    mView->mSharedVideoWidget->setGeometry(QRectF(5,50, 100, 100));
-    mView->mReceivedVideoWidget->setGeometry(QRectF(5,200, 200, 400));
-    QList<QGesture*> list;
-
-    // Test1: Short tap Event toggle the full screen mode
-    mEngine->setFullScreenMode(true);
-    QPointF sharedVideoPos(10,60);
-    QTapGesture *tapGesture = new QTapGesture();
-    tapGesture->setPosition(sharedVideoPos);
-    HbStubHelper::setGestureStyleHint(HbTapGesture::Tap);
-    HbStubHelper::setGestureState(Qt::GestureFinished);
-    list.append(tapGesture);
-    QGestureEvent event1(list);
-    mView->gestureEvent(&event1);
-    QVERIFY( !mEngine->fullScreenMode());
-    list.clear();
-    
-    // Test2: Long tap event does not affect full screen mode.
-    QTapGesture *tapGesture2 = new QTapGesture();
-    QPointF receivedVideoPos(10,210);
-    tapGesture2->setPosition(receivedVideoPos);
-    HbStubHelper::setGestureState(Qt::GestureUpdated);
-    HbStubHelper::setGestureStyleHint(HbTapGesture::TapAndHold);
-    list.append(tapGesture2);
-    QGestureEvent event3(list);
-    mEngine->setFullScreenMode(true);
-    mView->gestureEvent(&event3);
-    // Ensure it does not affect full screen mode.
-    QVERIFY( mEngine->fullScreenMode());
-    
-    //Test3: Not Handled States.
-    HbStubHelper::setGestureState(Qt::GestureStarted);
-    mEngine->setFullScreenMode(true);
-    mView->gestureEvent(&event3);
-    // Ensure its not handled everything remains same
-    QVERIFY( mEngine->fullScreenMode());
-    list.clear();
-    
-    //Test4: Not Handled Event
-    QSwipeGesture *swipeGesture = new QSwipeGesture();
-    list.append(swipeGesture);
-    QGestureEvent event4(list);
-    mEngine->setFullScreenMode(true);
-    mView->gestureEvent(&event4);
-    // Ensure it does not affect full screen mode.
-    QVERIFY( mEngine->fullScreenMode());
-}
-
-void UT_LcView::testContextMenu()
-{
-    QVERIFY( !mView->mItemContextMenu );    
-    mView->createContextMenu();
-    QVERIFY( mView->mItemContextMenu );
-    QVERIFY( mView->mItemContextMenu->isEmpty() );
-}
-
-void UT_LcView::testGestureLongPress()
-{
-    QVERIFY( !mView->mItemContextMenu );
-    QPointF coordsNoHit(10,10);    
-    mView->gestureLongPress( coordsNoHit );
-    QVERIFY( !mView->mItemContextMenu );
-    
-    mView->init();
-    HbTransparentWindow* sharedVideoWidget = mView->mSharedVideoWidget;
-    QVERIFY( sharedVideoWidget != NULL );
-    mView->mSharedVideoWidget->setGeometry(QRectF(5,100, 200, 200));
-    
-    QPointF coordsHitSharedVideo(20,150);    
-    mView->gestureLongPress( coordsHitSharedVideo );
-    QVERIFY( mView->mItemContextMenu );
-    
-    delete mView->mItemContextMenu;
-    mView->mItemContextMenu = 0;
-    
-    QPointF coordsNoHit2(10,400);    
-    mView->gestureLongPress( coordsNoHit2 );
-    QVERIFY( !mView->mItemContextMenu );
-
-    HbTransparentWindow* receivedVideoWidget = mView->mReceivedVideoWidget;
-    QVERIFY( receivedVideoWidget != NULL );
-    mView->mReceivedVideoWidget->setGeometry(QRectF(5,350, 200, 200));
-
-    QPointF coordsHitRecievedVideo(10,400);    
-    mView->gestureLongPress( coordsHitRecievedVideo );
-    QVERIFY( !mView->mItemContextMenu );
-}
-
-
-void UT_LcView::testGestureShortPress()
-{
-    mView->init();
-    mView->menu()->setVisible(false);
-    mView->mSharedVideoWidget->setGeometry(QRectF(5,50, 100, 100));
-    mView->mReceivedVideoWidget->setGeometry(QRectF(5,200, 200, 400));
- 
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    mEngine->setFullScreenMode(true);
-    mView->gestureShortPress();
-    QVERIFY( !mEngine->fullScreenMode());
-    
-    // toggled
-    mView->gestureShortPress();
-    QVERIFY( mEngine->fullScreenMode());
-}
-
-
-void UT_LcView::testTimerEvent()
-{
-    mView->init();
-    // timer time out
-    QTimerEvent* event = new QTimerEvent( mView->timerId );
-    mView->menu()->setVisible(false);
-    mView->timerEvent( event );
-    QVERIFY( mEngine->fullScreenMode());
-    QVERIFY( !HbStubHelper::isTitleBarVisible() );
-    QVERIFY( !HbStubHelper::isStatusBarVisible() );
-    QVERIFY( !mView->toolBar()->isVisible() );    
-    QVERIFY( !mView->mEndCallButton->isVisible());
-    QVERIFY( !mView->mDuration->isVisible());
-    QVERIFY( !mView->mRecipient->isVisible());    
-    delete event;
-    
-    // not a timer we want
-    mView->toFullScreen( false );
-    event = new QTimerEvent( 22222 ); // some number
-    mView->timerEvent( event );
-    QVERIFY( !mEngine->fullScreenMode() );
-    QVERIFY( HbStubHelper::isTitleBarVisible() );
-    QVERIFY( HbStubHelper::isStatusBarVisible() );
-    QVERIFY( mView->toolBar()->isVisible() );    
-    QVERIFY( mView->mEndCallButton->isVisible());
-    QVERIFY( mView->mDuration->isVisible());
-    QVERIFY( mView->mRecipient->isVisible());
-    delete event;
-}
-
-void UT_LcView::testShareImage()
-{
-    QVERIFY( !lcutStub_LcUiEngine_isImageShared );
-    mView->shareImage();
-    //QVERIFY( lcutStub_LcUiEngine_isImageShared() );
-}
-
-void UT_LcView::testUpdateSwapLayout()
-{    
-    mView->init();
-    mView->menu()->setVisible(false);
-    mView->mEndCallButton = mEndCallButton;
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    mEngine->setFullScreenMode(true);
-    mView->updateSwapLayout();
-    QVERIFY( mEngine->fullScreenMode());
-    QVERIFY( !HbStubHelper::isTitleBarVisible() );
-    QVERIFY( !HbStubHelper::isStatusBarVisible() );
-    QVERIFY( !mView->isItemVisible(Hb::DockWidgetItem ) );
-    QVERIFY( !mView->mEndCallButton->isVisible());
-    QVERIFY( !mView->mDuration->isVisible());
-    QVERIFY( !mView->mRecipient->isVisible());    
-}
-
-void UT_LcView::testMenuAboutToShow()
-{
-    mView->init();
-    mView->menu()->setVisible(false);
-    mView->toFullScreen( true );
-    mView->menuAboutToShow();
-    QVERIFY( !mEngine->fullScreenMode());
-    QVERIFY( HbStubHelper::isTitleBarVisible() );
-    QVERIFY( HbStubHelper::isStatusBarVisible() );
-    QVERIFY( mView->toolBar()->isVisible() );    
-    QVERIFY( mView->mEndCallButton->isVisible());
-    QVERIFY( mView->mDuration->isVisible());
-    QVERIFY( mView->mRecipient->isVisible());
-    int tId = mView->timerId;
-    mView->watchInactivity();    
-    QVERIFY( mView->timerId != tId );
-
-}
-
-void UT_LcView::testTranslateRectForOrientation()
-{
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    QRectF origRect( 10, 10, 100, 200 );
-    QRectF modRect = mView->translateRectForOrientation(origRect);
-    QVERIFY( modRect.height() == origRect.width() );
-    QVERIFY( modRect.width() == origRect.height() );
-}
-
-void UT_LcView::testTranslatePointForOrientation()
-{
-    UT_SET_ORIENTATION( Qt::Horizontal );
-    QPointF origPoint( 10, 20 );
-    QPointF modPoint = mView->translatePointForOrientation(origPoint);
-    QVERIFY( origPoint != modPoint );
-}
-
-void  UT_LcView::testOpenDialpad()
-{
-    delete mView;
-    mView = mRepository->twowayView();
-    HbMainWindow& window = *(HbInstance::instance()->allMainWindows().at(0));  
-    QPointF pos = window.pos();
-    window.setOrientation(Qt::Horizontal);
-    
-    // init
-    mView->mRepository.mLayoutSection = lcLayoutLandscapeDefaultId;
-    mView->menu()->setVisible(true);
-    
-    mView->openDialpad();
-    
-    QVERIFY(mView->mDialpad->isOpen());   
-    QVERIFY(!mView->mDialpad->mIsCallButtonEnabled);
-    QVERIFY(mView->mRepository.mLayoutSection == lcLayoutLandscapeDialpadId);    
-    QVERIFY( HbStubHelper::isTitleBarVisible() );
-    QVERIFY( HbStubHelper::isStatusBarVisible() );
-    QCOMPARE(mView->menu()->actions().size(), 0);    
-    QVERIFY(!mView->mEngine.fullScreenMode());
-}
-
-void  UT_LcView::testDialpadOpened()
-{
-    // no implementation
-}
-
-void  UT_LcView::testDialpadClosed()
-{
-    delete mView;
-    mView = mRepository->twowayView();
-    
-    // test : no fullscreen,landscape , open and close dialpad scenario     
-    HbMainWindow& window = *(HbInstance::instance()->allMainWindows().at(0));  
-    window.setOrientation( Qt::Horizontal );
-    mView->openDialpad();    
-    
-    // Enter some dummy text
-    mView->mDialpad->editor().setText( QString("1") );
-    mView->dialpadClosed();
-    // Ensure text is cleared.
-    
-    QCOMPARE(mView->mDialpad->editor().text(), QString::fromAscii(""));
-    QVERIFY(!mView->mDialpad->editor().text().length());
-    
-    // check that layout has changed
-    QVERIFY(mView->mRepository.layout()!= lcLayoutLandscapeDialpadId);
-    QVERIFY( HbStubHelper::isTitleBarVisible() );
-    QVERIFY( HbStubHelper::isStatusBarVisible() );
-    QVERIFY(mView->toolBar()->isVisible());
-    QVERIFY(mView->mEndCallButton->isVisible());
-    QVERIFY(mView->mRecipient->isVisible());
-    QVERIFY(mView->mDuration->isVisible());    
-    QVERIFY(mView->menu()->isVisible());    
-    QVERIFY(!mView->mEngine.fullScreenMode());
-    
-    // test : swapped,fullscreen,landscape,open and close dialpad scenario
-    mView->mRepository.loadLayout( lcLayoutLandscapeSwappedId );    
-    mView->openDialpad();
-    mView->dialpadClosed();
-    // check for swapped view appears
-    QVERIFY( mView->mRepository.layout()== lcLayoutLandscapeSwappedId );   
-    // check titlebar invisible
-    QVERIFY( HbStubHelper::isTitleBarVisible() );
-    QVERIFY( HbStubHelper::isStatusBarVisible() );
-    // check toolbar invisible
-    QVERIFY( mView->toolBar()->isVisible() );    
-    QVERIFY(!mView->mEngine.fullScreenMode());
-
-}
-
-
-void  UT_LcView::testDialpadEditorTextChanged()
-{   
-    delete mView;
-    mView = mRepository->twowayView();
-    
-    mView->openDialpad();
-    //text editor is one character long
-    QVERIFY( lcutStub_LcUiEngine_getDialToneChar() == '0');
-    mView->mDialpad->editor().setText( QString("1") );
-    mView->dialpadEditorTextChanged();
-    QVERIFY( lcutStub_LcUiEngine_getDialToneChar() == '1' );
-
-    // We transmit dial tone character sepretly.
-    mView->mDialpad->editor().setText( QString("12345") );
-    mView->dialpadEditorTextChanged();
-    QVERIFY( lcutStub_LcUiEngine_getDialToneChar() == '5' );
-}
-
-void  UT_LcView::testBack()
-{       
-    delete mView;
-    mView = mRepository->twowayView();    
-    mView->openDialpad();
-    mView->back();
-    QVERIFY( !mView->mDialpad->isOpen() );    
-}
-
-void UT_LcView::testAddOptionsMenuActions()
-{
-    delete mView;
-    mView = mRepository->twowayView();
-    
-    mView->addOptionsMenuActions();
-    //TODO: stub implementation of void QGraphicsWidget::addAction(QAction *action);
-    //QCOMPARE(mView->menu()->actions().size(), 2);
-}
-
-void UT_LcView::testWatchInactivity()
-{       
-    mView->init();
-    
-    // test : in fullscreen mode already, dont start timer again
-    int tid = mView->timerId ;
-    mView->mEngine.setFullScreenMode( true );    
-    mView->watchInactivity();
-    QVERIFY( tid==mView->timerId );
-  
-    // test : not in full screen but dialpad view. dont start timer
-    mView->mEngine.setFullScreenMode( false );
-    QVERIFY( mView->mDialpad );
-    mView->openDialpad();
-    mView->watchInactivity();
-    QVERIFY( tid==mView->timerId );    
-    
-    // test : not in full screen and no dialpad , start timer
-    mView->mEngine.setFullScreenMode( false );
-    QVERIFY( mView->mDialpad );
-    mView->mDialpad->closeDialpad();
-    mView->watchInactivity();
-    QVERIFY( tid!=mView->timerId );
-    
-}
-
-
-
-void UT_LcView::testIsVideoPositionedCorrectly()
-{
-    //Test1: Null video Widget returns true
-    mRepository->mReturnSendVideo = false;
-    mView->init();
-    QVERIFY( !mView->mSharedVideoWidget );
-    QVERIFY(mView->isVideoPositionedCorrectly(mView->mSharedVideoWidget));
-    
-    //Test2: Valid Video widgets with correct position returns true:
-    mRepository->mReturnSendVideo = true;
-    mView->init();
-    QVERIFY( mView->mSharedVideoWidget );
-    QVERIFY( mView->isVideoPositionedCorrectly(mView->mSharedVideoWidget ));
-    
-    //Test3: Vaild video widgets withi co-ordinates returns false.
-    mView->mSharedVideoWidget->setPos(QPointF(0,0));
-    QVERIFY( mView->mSharedVideoWidget );
-    QVERIFY( !mView->isVideoPositionedCorrectly(mView->mSharedVideoWidget ));
-}
-
-
-void UT_LcView::testIsPositioned()
-{   
-    //Test: isViewReady is true and proper co-ordinates        
-    mRepository->mReturnSendVideo = true;
-    mView->init();
-    QVERIFY( !mView->isViewReady );        
-    QVERIFY( mView->mSharedVideoWidget );
-    QVERIFY( mView->isVideoPositionedCorrectly(mView->mSharedVideoWidget ));
-    mView->isPositioned();
-    QVERIFY( mView->isViewReady );
-    
-    //Test: isViewReady is false and its first time and co ordinates are 0,0
-    mView->isViewReady = false;    
-    mView->mSharedVideoWidget->setPos(QPointF(0,0));
-    QVERIFY( mView->mSharedVideoWidget );
-    QVERIFY( !mView->isVideoPositionedCorrectly(mView->mSharedVideoWidget ));
-    mView->isPositioned();
-    QVERIFY( !mView->isViewReady );
-}
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcviewmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <QtTest/QtTest>
-#include <hbmainwindow.h>
-#include <hbview.h>
-#include <hbactivitymanager.h>
-#include <HbApplication>
-#include "ut_lcviewmanager.h"         
-#include "lcviewmanager.h" 
-#include "lcviewmanager_p.h" 
-#include "ut_lcuidefs.h"
-#include "lcuiengine.h"
-#include "lcuidefs.h"
-
-// Simulate completion of queued view change
-#define LC_VIEW_CHANGE_COMPLETE( startup ) \
-mViewManager->activateCurrentView( startup );
-
-void UT_LcUiViewManager::initTestCase()
-{
-    lcutStub_LcUiEngine_reset();
-
-}
-
-void UT_LcUiViewManager::cleanupTestCase()
-{
-    lcutStub_LcUiEngine_reset();
-
-}
-
-void UT_LcUiViewManager::init()
-{
-    lcutStub_LcUiEngine_reset();
-    
-    mViewManagerDecorator = new LcViewManager( lcEngineName, lcDisplayName ); 
-    mViewManager = mViewManagerDecorator->d_ptr; 
-}
-
-void UT_LcUiViewManager::cleanup()
-{
-    lcutStub_LcUiEngine_reset();
-    delete mViewManagerDecorator;
-}
-
-void UT_LcUiViewManager::testConstructor()
-{
-    QVERIFY( mViewManager );
-    QVERIFY( mViewManager->mRepository );
-    QVERIFY( mViewManager->mEngine );
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 1 );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutNoCall ) );
-    
-}
-
-void UT_LcUiViewManager::testChangeView()
-{
-    QVERIFY( mViewManager );
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 1 );
-    
-    mViewManager->changeView();
-    LC_VIEW_CHANGE_COMPLETE( false )
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 1 );
-    QVERIFY( mViewManager->mMainWindow.currentView()->objectName() == lcViewIdleId );
-    
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    lcutStub_LcUiEngine_reset();
-    
-    LC_VIEW_CHANGE_COMPLETE( true )
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 1 );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_start ) );
-    lcutStub_LcUiEngine_reset();
-
-    lcutStub_LcUiEngine_setLayout( Lc_ReceivedViewLayout );
-    mViewManager->changeView();
-    LC_VIEW_CHANGE_COMPLETE( false )
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 2 );
-    QVERIFY( mViewManager->mMainWindow.currentView()->objectName() == lcViewReceiveId );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    lcutStub_LcUiEngine_reset();
-    
-    lcutStub_LcUiEngine_setLayout( Lc_SharedViewLayout );
-    mViewManager->changeView();
-    LC_VIEW_CHANGE_COMPLETE( false )
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 3 );
-    QVERIFY( mViewManager->mMainWindow.currentView()->objectName() == lcViewSendId );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    lcutStub_LcUiEngine_reset();
-
-    lcutStub_LcUiEngine_setLayout( Lc_TwowayViewLayout );
-    mViewManager->changeView();
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 4 );
-    QVERIFY( mViewManager->mMainWindow.currentView()->objectName() == lcViewTwowayId );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas ) );
-    lcutStub_LcUiEngine_reset();
-
-    lcutStub_LcUiEngine_setLayout( Lc_ReceivedOnlyViewLayout );
-    mViewManager->changeView();
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 5 );
-    QVERIFY( mViewManager->mMainWindow.currentView()->objectName() == lcViewReceiveOnlyId );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas ) );
-    lcutStub_LcUiEngine_reset();
-    
-    lcutStub_LcUiEngine_setLayout( Lc_AllInOneViewLayout );
-    mViewManager->changeView();
-    LC_VIEW_CHANGE_COMPLETE( false )
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 6 );
-    QVERIFY( mViewManager->mMainWindow.currentView()->objectName() == lcViewAllInOneId );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    lcutStub_LcUiEngine_reset();
-    
-    lcutStub_LcUiEngine_setLayout( (LcViewLayoutHint)777 );
-    mViewManager->changeView();
-    LC_VIEW_CHANGE_COMPLETE( false )
-    QVERIFY( mViewManager->mMainWindow.viewCount() == 6 );
-    QVERIFY( mViewManager->mMainWindow.currentView()->objectName() == lcViewIdleId );    
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_updateSession, 0 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setOrientation, 1 ) );
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_setContentAreas, 2 ) );
-    lcutStub_LcUiEngine_reset();
-    
-}
-
-void UT_LcUiViewManager::testTerminateSession()
-{
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutNoCall ) );
-    mViewManager->terminateSession();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_stop ) );
-    
-    
-    lcutStub_LcUiEngine_reset();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutNoCall ) );
-    mViewManagerDecorator->terminateSession();
-    QVERIFY( lcutStub_LcUiEngine_expectCall( lcutStub_LcUiEngine_stop ) );
-}
-
-void UT_LcUiViewManager::testPrepareOrientationChange()
-{
-    mViewManager->prepareOrientationChange();
-}
-
-void UT_LcUiViewManager::testMainWindowEvent()
-{
-     QSignalSpy spy( &mViewManager->mMainWindow, SIGNAL(appFocusGained()) );
-     // Not interesting event
-     QEvent event(QEvent::MaxUser);
-     mViewManager->mMainWindow.eventFilter(0, &event);
-     QVERIFY( spy.count() == 0 );
-     
-     // Focus in event
-     QEvent event2(QEvent::ApplicationActivate);
-     mViewManager->mMainWindow.eventFilter(0, &event2);
-     QVERIFY( spy.count() == 1 );
-      
-     // test: Complete focus lost
-     QSignalSpy spy2( &mViewManager->mMainWindow, SIGNAL(appFocusLost()) );
-     // Focus in event
-     QEvent event3(QEvent::ApplicationDeactivate);
-     mViewManager->mMainWindow.mSurface = 0;
-     mViewManager->mMainWindow.eventFilter(0, &event3);
-     QVERIFY( spy2.count() == 1 );
-     
-     // test: partial focus lost i.e. in case of golbal popup.
-     QSignalSpy spy3( &mViewManager->mMainWindow, SIGNAL(appFocusLost()) );
-     // Partial focus in event i.e. Global popup
-     QEvent event4(QEvent::ApplicationDeactivate);
-     QWindowSurface surf;
-     mViewManager->mMainWindow.mSurface = &surf;
-     mViewManager->mMainWindow.eventFilter(0, &event4);
-     QVERIFY( spy3.count() == 0 );
-}
-
-// end of file
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/ut_lcui.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-#                                                                    
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).   
-# All rights reserved.                                                
-# This component and the accompanying materials are made available    
-# under the terms of "Eclipse Public License v1.0"    
-# which accompanies this distribution, and is available               
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".   
-#                                                                     
-# Initial Contributors:                                               
-# Nokia Corporation - initial contribution.                           
-#                                                                     
-# Contributors:                                                       
-#                                                                     
-# Description:                                                        
-#                                                                     
-#
-
-TEMPLATE = app
-TARGET = 
-
-QT += testlib xml
-CONFIG += hb qtestlib dll
-
-MUS_DIR = ../../../../..
-LCUI_DIR = ../..
-LCUIENGINE_DIR = ../../../lcuiengine
-
-RESOURCES += $$LCUI_DIR/livecommsui.qrc
-
-DEFINES += UNIT_TESTING
-DEFINES += QT_NO_DEBUG_OUTPUT
-
-DEPENDPATH += .
-INCLUDEPATH = hbstubs $$INCLUDEPATH
-INCLUDEPATH += .
-INCLUDEPATH += $$LCUI_DIR/inc
-INCLUDEPATH += $$MUS_DIR/tsrc/qtestutils/inc
-INCLUDEPATH += $$MUS_DIR/mmsharinguis_plat/live_comms_plugin_api/inc
-INCLUDEPATH += /epoc32/include/ecom
-INCLUDEPATH += /epoc32/include/platform/app
-
-# Input
-HEADERS += inc/ut_lcviewmanager.h
-HEADERS += $$LCUI_DIR/inc/lcviewmanager.h
-HEADERS += $$LCUI_DIR/inc/lcviewmanager_p.h
-HEADERS += inc/ut_lcuicomponentrepository.h
-HEADERS += $$LCUI_DIR/inc/lcuicomponentrepository.h
-HEADERS += inc/ut_lcview.h
-HEADERS += $$LCUI_DIR/inc/lcview.h
-HEADERS += inc/ut_lceffecthandler.h
-HEADERS += $$LCUI_DIR/inc/lceffecthandler.h
-HEADERS += inc/ut_lcvideowidget.h
-HEADERS += $$LCUI_DIR/inc/lcvideowidget.h
-HEADERS += $$LCUIENGINE_DIR/inc/lcuiengine.h
-HEADERS += ./hbstubs/dialpad.h
-HEADERS += ./hbstubs/dialpadvtkeyhandler.h
-HEADERS += ./hbstubs/hblineedit.h
-
-SOURCES += src/main.cpp
-SOURCES += hbstubs/hbstubs.cpp
-SOURCES += hbstubs/dialpad_stub.cpp
-SOURCES += hbstubs/dialpadvtkeyhandler_stub.cpp
-SOURCES += src/ut_lcviewmanager.cpp
-SOURCES += $$LCUI_DIR/src/lcviewmanager.cpp
-SOURCES += $$LCUI_DIR/src/lcviewmanager_p.cpp
-SOURCES += src/ut_lcuicomponentrepository.cpp
-SOURCES += $$LCUI_DIR/src/lcuicomponentrepository.cpp
-SOURCES += src/ut_lcview.cpp
-SOURCES += $$LCUI_DIR/src/lcview.cpp
-SOURCES += src/ut_lceffecthandler.cpp
-SOURCES += $$LCUI_DIR/src/lceffecthandler.cpp
-SOURCES += src/ut_lcvideowidget.cpp
-SOURCES += $$LCUI_DIR/src/lcvideowidget.cpp
-SOURCES += $$LCUIENGINE_DIR/src/lcuiengine.cpp
-SOURCES += $$MUS_DIR/tsrc/qtestutils/src/testresultxmlparser.cpp
-
-
-symbian: {
-    DEFINES += BUILD_SYMBIAN
-
-    INCLUDEPATH += $$LCUIENGINE_DIR/inc
-
-    SOURCES += lcuiengine_stub/symbian/stub_lcuiengine_p.cpp
-    HEADERS += $$LCUIENGINE_DIR/inc/lcuiengine_p.h
-    
-    LIBS += -lecom -lflogger -lws32 -lbafl
-    
-    TARGET.CAPABILITY = ALL -TCB
-    TARGET.EPOCALLOWDLLDATA = 1
-    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
-}
-
-win32: {
-    INCLUDEPATH += $$LCUI_DIR/mmshlcuiengine/win32
-    INCLUDEPATH += inc
-    INCLUDEPATH += $$LCUIENGINE_DIR/tsrc/win32
-    INCLUDEPATH += $$LCUIENGINE_DIR/inc
-
-    SOURCES += lcuiengine_stub/win32/stub_lcuiengine_p.cpp
-    HEADERS += $$LCUIENGINE_DIR/tsrc/win32/lcuiengine_p.h
-}
--- a/mmsharing/livecommsui/lcuiengine/inc/lcactivitymanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef LCACTIVITYMANAGER_H
-#define LCACTIVITYMANAGER_H
-
-//  INCLUDES
-#include <QObject>
-
-// FORWARD DECLARATION
-
-// CLASS DECLARATION
-
-/**
- * 
- */
-class LcActivityManager : public QObject
-{
-    friend class UT_LcActivityManager;
-    Q_OBJECT
-
-public:  
-
-    explicit LcActivityManager();
-    ~LcActivityManager();
-        
-public slots:
-
-    void enableActivitySimulation(bool enable);
-    
-public:
-    
-    bool isActivitySimulationEnabled();
-    
-    
-private:
-    
-    int initInactivityTimeout();
-    void stopTimer();
-    void restartTimer();
-    
-    //from QObject
-    void timerEvent(QTimerEvent *event);
-
-private:
-
-    int mTimerId;
-    int mInactivityTimeout;
-    
-};
-
-#endif      // LCACTIVITYMANAGER_H
-
-
-// End of File
--- a/mmsharing/livecommsui/lcuiengine/inc/lcuiengine.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCUIENGINE_H
-#define LCUIENGINE_H
-
-//USER
-
-//SYSTEM
-#include <QObject>
-#include <QString>
-#include <QTime>
-
-class QTimer;
-class HbProgressDialog;
-class HbDialog;
-class QRectF;
-class LcUiEnginePrivate;
-class HbView;
-
-const char lcEngSignalNameMuted[] = "muted";
-const char lcEngSignalNameUnmuted[] = "unmuted";
-const char lcEngSignalNameSpeakerEnabled[] = "speakerEnabled";
-const char lcEngSignalNameSpeakerDisabled[] = "speakerDisabled";
-const char lcEngSignalNameCameraChangedToMain[] = "cameraChangedToMain";
-const char lcEngSignalNameCameraChangedToSecondary[] = "cameraChangedToSecondary";
-const char lcEngSignalNameCameraEnabled[] = "cameraEnabled";
-const char lcEngSignalNameCameraDisabled[] = "cameraDisabled";
-
-
-/*
- * Supported views
- */
-enum LcViewLayoutHint {
-    Lc_NoViewLayout = -1,
-    Lc_IdleViewLayout,
-    Lc_SharedViewLayout,
-    Lc_ReceivedViewLayout,
-    Lc_ReceivedOnlyViewLayout,
-    Lc_TwowayViewLayout,
-    Lc_AllInOneViewLayout
-};
-
-
-/*
- * Struct of values for control
- */
-class LcControlValues {
-public:
-  int mMaxValue;
-  int mMinValue;
-  int mValue;
-};
-
-/*
- * Live Comms UI Engine 
- */
-class LcUiEngine : public QObject
-{
-    Q_OBJECT
-    friend class UT_LcUiEngine;
-
-public:
-    //constructor
-    explicit LcUiEngine(const QString &engineName,
-                        const QString &applicationDisplayName);
-    //destructor
-    ~LcUiEngine();
-    
-signals:
-  
-    //signaled when engine is stopped
-    void stopped();
-    //signaled when layout is changed
-    void layoutChanged();
-    //signaled when camera changes to main
-    void cameraChangedToMain();
-    //signaled when camera changes to secondary
-    void cameraChangedToSecondary();
-    //signaled when mic is muted
-    void muted();
-    //signaled when mic is unmuted
-    void unmuted();
-    //signaled when speaker is enabled
-    void speakerEnabled();
-    //signaled when speaker is disabled
-    void speakerDisabled();
-    //signaled when camera is disabled
-    void cameraDisabled();
-    //signaled when camera is enabled
-    void cameraEnabled();
-    //signaled when engine is blocked, 
-    //no calls expected until signaled unblocked    
-    void blocked();
-    //signaled when engine is free 
-    void unblocked();
-    //signaled continuously while session is up and running
-    //carries current session duration
-    void sessionDurationChanged(const QString &duration);
-    void recipientChanged(const QString &recipient);
-    void phoneNumberChanged(const QString &number);    
-    //signaled when player state changed
-    void localPlayerPlaying();
-    void remotePlayerPlaying();
-    void localPlayerPreparing();
-    void remotePlayerPreparing();
-    void localPlayerBuffering();
-    void remotePlayerBuffering();
-    void localPlayerPaused();
-    void remotePlayerPaused();
-    void localPlayerUnavailable();
-    void remotePlayerUnavailable();
-    void volumeChanged(int aVolumeLevel);
-    
-    
-public slots:
-
-    void zoom( int value );
-    void stop();
-    void minimize();
-    void maximize();   
-        
-public: // API
-    
-    void start();
-    const QString& sessionTitle() const;
-    const QString& recipient() const;
-    const QString& phoneNumber() const;
-    LcViewLayoutHint viewLayout() const;
-    void setContentAreas(const QRectF& sharedContent,
-                         const QRectF& receivedContent);
-    bool setOrientation(Qt::Orientation orientation);
-    void setUiComponents(HbProgressDialog* invitingNote,
-                         HbProgressDialog* waitingNote,
-                         HbDialog* acceptQuery,
-                         HbDialog* recipientQuery,
-                         HbDialog* shareOwnVideoQuery);
-    void toggleMute();
-    bool isMuted() const;
-    void toggleSpeaker();
-    bool isSpeakerOn() const;
-    int zoomValues(LcControlValues& values) const;
-    void toggleDisableCamera();
-    void setMainCamera(const bool aMainCamera);
-    bool mainCamera() const;
-    void toggleCamera();
-    bool fullScreenMode();
-    void setFullScreenMode(bool aMode);
-    void updateSession();
-    bool isLocalPlayerPlaying() const;
-    bool isRemotePlayerPlaying() const;
-    bool isMinimized()const;
-    bool isMaximized()const{return !isMinimized();}; 
-    void shareImage(const QString&);
-    void shareCamera();
-    void setCurrentView(HbView* view);
-    bool SendDialTone( const QChar aKey );
-
-private:
-
-    LcUiEnginePrivate* d;
-
-friend class LcUiEnginePrivate; // access to signals
-};
-
-#endif // LCUIENGINE_H
-
-
-// End of file
--- a/mmsharing/livecommsui/lcuiengine/inc/lcuiengine_p.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCUIENGINEPRIVATE_H
-#define LCUIENGINEPRIVATE_H
-
-//USER
-#include "lcsessionobserver.h"
-#include "lcuiprovider.h"
-
-//SYSTEM
-#include <QObject>
-#include <QString>
-#include <QTime>
-#include <XQSettingsKey>
-#include <XQSettingsManager>
-#include <QVariant>
-#include <lcuiengine.h>
-#include <lcengine.h>
-
-
-class MLcSession;
-class MLcAudioControl;
-class MLcZoomControl;
-class HbDialog;
-class HbMessageBox;
-class QTimer;
-class QRectF;
-class LcUiEngine;
-class HbView;
-class LcActivityManager;
-
-/*
- * Live Comms UI Engine 
- */
-class LcUiEnginePrivate : public QObject, 
-                   public MLcSessionObserver,
-                   public MLcUiProvider
-{
-    Q_OBJECT
-    friend class UT_LcUiEngine;
-
-public:
-    
-    explicit LcUiEnginePrivate(LcUiEngine& uiEngine,
-                               const QString &engineName,
-                               const QString &applicationDisplayName);
-    ~LcUiEnginePrivate();
-    
-public slots:
-
-    void zoom( int value );
-    void stop();
-    void stopLocalVideo();
-    void startLocalVideo();
-        
-public: // API
-    
-    void start();
-    const QString& sessionTitle() const;
-    const QString& recipient() const;
-    const QString& phoneNumber() const;
-    LcViewLayoutHint viewLayout() const;
-    void setContentAreas(const QRectF& sharedContent,
-                         const QRectF& receivedContent);
-    bool setOrientation(Qt::Orientation orientation );
-    void setUiComponents(HbProgressDialog* invitingNote,
-                         HbProgressDialog* waitingNote,
-                         HbDialog* acceptQuery,
-                         HbDialog* recipientQuery,
-                         HbDialog* shareOwnVideoQuery );
-    void toggleMute();
-    bool isMuted() const;
-    void toggleSpeaker();
-    bool isSpeakerOn() const;
-    int zoomValues( LcControlValues& values ) const;
-    void toggleDisableCamera();
-    void setMainCamera(const bool aMainCamera);
-    bool mainCamera() const;
-    void toggleCamera();
-    bool fullScreenMode();
-    void setFullScreenMode(bool aMode);
-    void updateSession();
-    bool isLocalPlayerPlaying() const;
-    bool isRemotePlayerPlaying() const;
-    bool isMinimized()const;
-    void minimize();
-    void maximize();
-    void shareImage(const QString&){};
-    void shareCamera(){};
-    void setCurrentView(HbView* view);
-    bool SendDialTone(const QChar aKey );
-    
-protected: // From QObject
-    
-    void timerEvent(QTimerEvent *event);
-
-private slots:
-    
-    void startReceiving();
-    void stopForcefully();
-    void handleEngineForegroundStatus();
-    void volumeLevelChanged(const XQSettingsKey& aKey, const QVariant& aValue);
-    
-private: // From MLcSessionObserver
-    
-    void StateChanged( MLcSession& aSession );
-    void StateChanged( MLcVideoPlayer& aPlayer );
-    void Updated( MLcSession& aSession );
-    void Updated( MLcVideoPlayer& aPlayer );
-    void Failed( MLcSession& aSession, TInt aError );
-    void Failed( MLcVideoPlayer& aPlayer, TInt aError );
-    void SessionTimeChanged( MLcSession& aSession, const TTimeIntervalSeconds& aSeconds );
-
-private: // From MLcUiProvider
-
-    TBool SelectRecipient( MDesCArray& aRecipientAddresses, TDes& aSelectedRecipientAddress );        
-    TBool InputRecipient( TDes& aRecipientAddress );
-    void HandleForegroundStatus( TBool aForeground );
-    void BlockUi( TBool aBlocked );    
-
-private: // New functions
-    
-    LcViewLayoutHint setViewLayout();
-    void emitViewLayoutChanged();
-    void startLiveContent();
-    void startPlayback(); 
-    void startRemoteVideo();
-    void startCloseTimer();
-    void cancelCloseTimer();
-    void hideNotes( bool hideWaitingNote );
-    void completeAction( const char* actionMethod );
-    void setPendingAction( const char* actionMethod );
-    void completePendingAction();
-    bool usingVideoTelephoneEngine();
-    MLcSession& session() const;
-    MLcVideoPlayer* visibleLocalPlayer() const;
-    MLcVideoPlayer* visibleRemotePlayer() const;
-    MLcAudioControl* audioControl() const;
-    MLcZoomControl* zoomControl() const;
-    bool featureSupported( CLcEngine::TLcFeature feature );
-    void startSessionDurationTimer();
-    void stopSessionDurationTimer();
-    void fillRemoteInfo(bool informChanges);
-    void startStopGuardTimer();
-    void showSendVideoQueryWhenNecessary();
-
-    void subscribeVolumeEvents();
-    void unSubscribeVolumeEvents();
-    void doUpdate( MLcVideoPlayer& aPlayer );
-    void doUpdate( MLcSession& aSession );
-    
-private: // New functions wrapping the leaving functions in LC plug-in API
-    
-    int establishSession();
-    int terminateSession();
-    int setWindowRect( MLcVideoPlayer* player, TRect rect );
-    int enableWindow( MLcVideoPlayer* player, bool enable );
-    int play( MLcVideoPlayer* player );
-    int pause( MLcVideoPlayer* player );
-    int enableSpeaker( bool enable );
-    int muteMic( bool mute );
-
-private: // Data
-    
-    QByteArray mEngineName;
-    QString mSessionTitle;
-    QString mRecipient;
-    QString mPhoneNumber;
-    LcViewLayoutHint mViewLayout;
-    CLcEngine* mLiveCommsEngine;
-    QTimer* mCloseTimer;
-    HbProgressDialog* mInvitingNote; // Not owned
-    HbProgressDialog* mWaitingNote; // Not owned
-    HbDialog* mAcceptQuery; // Not owned
-    HbDialog* mRecipientQuery; // Not owned
-    HbDialog* mShareOwnVideoQuery; // Not Owned
-    QString mPendingAction;
-    bool mBlocked;
-    bool mFullScreen;
-    int mSessionDurationTimerId;
-    QTime mSessionDurationStartTime;
-    bool mMainCamera;
-    LcUiEngine& mUiEngine;
-    bool mIsMinimized;
-    bool mFirstForegroundSwitch;
-    HbView* mCurrentView; // Not owned
-    TRect mLocalRect;
-    TRect mRemoteRect;
-    LcActivityManager* mActivityManager;
-    
-    XQSettingsManager* mSettingsMgr;
-    XQSettingsKey* mEarVolumeKey; 
-    XQSettingsKey* mLoudSpeakerKey; 
-    
-friend class LcUiEngine;    
-};
-
-#endif // LCUIENGINEPRIVATE_H
-
-
-// End of file
--- a/mmsharing/livecommsui/lcuiengine/src/lcactivitymanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//  INCLUDES
-#include <e32base.h>
-#include <centralrepository.h>
-#include <hwrmlightdomaincrkeys.h>
-#include <QtCore>
-#include "lcactivitymanager.h"
-#include "lclogger.h"
-
-
-const int lcDefaultInactivityTimeout = 5; //timeout in seconds, used if fetching 
-                                          //value from cenrep fails
-const int lcInvalidTimerId = -1;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LcActivityManager::LcActivityManager() : 
-    mTimerId(lcInvalidTimerId)
-{
-    if (initInactivityTimeout() != 0) {
-        mInactivityTimeout = lcDefaultInactivityTimeout;
-    }    
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LcActivityManager::~LcActivityManager()
-{
-    stopTimer();
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcActivityManager::enableActivitySimulation(bool enable)
-{
-    if (enable) {
-        restartTimer();
-    } else {
-        stopTimer();
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-bool LcActivityManager::isActivitySimulationEnabled()
-{
-    return (mTimerId != lcInvalidTimerId);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-int LcActivityManager::initInactivityTimeout()
-{
-    CRepository* repository = 0;
-    TRAPD(err, repository = CRepository::NewL(KCRUidLightSettings));
-    if (err == KErrNone) {
-        // Let's fetching display light timeout value (in seconds )
-        TInt displayTimeOut(0);
-        err = repository->Get(KDisplayLightsTimeout, displayTimeOut);
-        if (displayTimeOut > 2) {
-            //taking away 2 seconds just in case, to ensure we keep
-            //simulating user activity frequently enough
-            displayTimeOut -= 2;
-        }
-        mInactivityTimeout = displayTimeOut;
-    }
-    delete repository;
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcActivityManager::stopTimer()
-{
-    if (mTimerId != lcInvalidTimerId) {
-        killTimer(mTimerId);
-        mTimerId = lcInvalidTimerId;
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcActivityManager::restartTimer()
-{
-    stopTimer();
-
-    int timeLeftInSeconds = mInactivityTimeout - User::InactivityTime().Int();
-    if ( timeLeftInSeconds < 1 ) {
-        User::ResetInactivityTime();
-        timeLeftInSeconds = mInactivityTimeout;
-    }
-    
-    LC_QDEBUG_2( "livecomms [UI] -> LcActivityManager::startTimer(), interval: ", timeLeftInSeconds);
-    
-    mTimerId = startTimer(timeLeftInSeconds*1000);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcActivityManager::timerEvent(QTimerEvent* event)
-{
-    if (event->timerId() == mTimerId) {
-        LC_QDEBUG( "livecomms [UI] -> LcActivityManager::timerEvent()" );
-        restartTimer(); 
-    }
-}
--- a/mmsharing/livecommsui/lcuiengine/src/lcuiengine.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,382 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcuiengine_p.h"
-#include "lcuiengine.h"
-#include "lclogger.h"
-
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::LcUiEngine
-// -----------------------------------------------------------------------------
-//
-LcUiEngine::LcUiEngine( const QString& engineName,
-                        const QString& applicationDisplayName )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::LcUiEngine()" )
-    d = new LcUiEnginePrivate( *this,engineName,applicationDisplayName );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::LcUiEngine()" )   
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::~LcUiEngine
-// -----------------------------------------------------------------------------
-//
-LcUiEngine::~LcUiEngine()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::~LcUiEngine()" )
-    delete d;
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::~LcUiEngine()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::zoom
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::zoom( int value )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::zoom()" )
-    d->zoom(value);
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::zoom()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::stop
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::stop()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::stop()" )    
-    d->stop();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::stop()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::start
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::start()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::start()" )    
-    d->start();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::start()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::sessionTitle
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEngine::sessionTitle() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::sessionTitle()" )
-    return d->sessionTitle();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::recipient
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEngine::recipient() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::recipient()" )
-    return d->recipient();    
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::phoneNumber
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEngine::phoneNumber() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::phoneNumber()" )
-    return d->phoneNumber();    
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::viewLayout
-// -----------------------------------------------------------------------------
-//
-LcViewLayoutHint LcUiEngine::viewLayout() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::viewLayout()" )
-    return d->viewLayout();    
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::setContentAreas
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::setContentAreas( const QRectF& sharedContent,
-                                  const QRectF& receivedContent )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::setContentAreas()" )
-    d->setContentAreas( sharedContent,receivedContent );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::setContentAreas()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::setOrientation
-// -----------------------------------------------------------------------------
-//
-bool LcUiEngine::setOrientation( Qt::Orientation orientation )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::setOrientation()" )
-    bool ret = d->setOrientation( orientation );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::setOrientation()" )
-    return ret;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::setUiComponents
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::setUiComponents( HbProgressDialog* invitingNote,
-                                  HbProgressDialog* waitingNote,
-                                  HbDialog* acceptQuery,
-                                  HbDialog* recipientQuery,
-                                  HbDialog* shareOwnVideoQuery )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::setUiComponents()" )
-    d->setUiComponents( invitingNote,waitingNote,acceptQuery,recipientQuery,
-                                                          shareOwnVideoQuery );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::setUiComponents()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::toggleMute
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::toggleMute()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::toggleMute()" )
-    d->toggleMute();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::toggleMute()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::isMuted
-// -----------------------------------------------------------------------------
-//
-bool LcUiEngine::isMuted() const
-{    
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::isMuted()" )
-    return d->isMuted();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::toggleSpeaker
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::toggleSpeaker()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::toggleSpeaker()" )    
-    d->toggleSpeaker();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::toggleSpeaker()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::isSpeakerOn
-// -----------------------------------------------------------------------------
-//
-bool LcUiEngine::isSpeakerOn() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::isSpeakerOn()" )
-    return d->isSpeakerOn();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::zoomValues
-// -----------------------------------------------------------------------------
-//
-int LcUiEngine::zoomValues( LcControlValues& values ) const
-{    
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::zoomValues()" )
-    return d->zoomValues(values);
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::toggleEnableCamera
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::toggleDisableCamera()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::toggleDisableCamera()" )
-    d->toggleDisableCamera();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::toggleDisableCamera()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::setCameraMain
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::setMainCamera(const bool aMainCamera)
-{
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiEngine::setCameraMain()", aMainCamera )
-    d->setMainCamera( aMainCamera );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::setCameraMain()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::cameraIndex
-// -----------------------------------------------------------------------------
-//
-bool LcUiEngine::mainCamera() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::mainCamera()" )
-    return d->mainCamera();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::toggleCamera
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::toggleCamera()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::toggleCamera()" )
-    d->toggleCamera();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::toggleCamera()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::fullScreenMode
-// -----------------------------------------------------------------------------
-//
-bool LcUiEngine::fullScreenMode()
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::fullScreenMode()" )
-    return d->fullScreenMode();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::setFullScreenMode
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::setFullScreenMode(bool aMode)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::setFullScreenMode()" )
-    d->setFullScreenMode( aMode );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::setFullScreenMode()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::updateSession
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::updateSession()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngine::updateSession()" )
-    d->updateSession();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngine::updateSession()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::isLocalPlayerPlaying
-// -----------------------------------------------------------------------------
-//
-bool LcUiEngine::isLocalPlayerPlaying() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::isLocalPlayerPlaying()" )
-    return d->isLocalPlayerPlaying();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::isRemotePlayerPlaying
-// -----------------------------------------------------------------------------
-//
-bool LcUiEngine::isRemotePlayerPlaying() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::isRemotePlayerPlaying()" )
-    return d->isRemotePlayerPlaying();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::isMinimized
-// -----------------------------------------------------------------------------
-//
-bool LcUiEngine::isMinimized() const
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::isMinimized()" )
-    return d->isMinimized();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::minimize
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::minimize()
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::minimize()" )
-    // TODO : Remove this function when XqServiceUtil taken into use compleatly 
-    d->minimize();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::maximize
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::maximize()
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::maximize()" )
-    // TODO : Remove this function when XqServiceUtil taken into use compleatly
-    d->maximize();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::shareImage
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::shareImage(const QString& fileName)
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::shareImage()" )
-    d->shareImage(fileName);
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::shareCamera
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::shareCamera()
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::shareCamera()" )
-    d->shareCamera();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::setCurrentView
-// -----------------------------------------------------------------------------
-//
-void LcUiEngine::setCurrentView(HbView* view)
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::setCurrentView()" )
-    d->setCurrentView(view);
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiEngine::SendDialTone
-// -----------------------------------------------------------------------------
-//
-
-bool LcUiEngine::SendDialTone( const QChar aKey )
-{
-    return d->SendDialTone(aKey);
-}
-
-
-// End of File
--- a/mmsharing/livecommsui/lcuiengine/src/lcuiengine_p.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1547 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcuiengine_p.h"
-#include "lcuidefs.h"
-#include "lclogger.h"
-#include "lcactivitymanager.h"
-
-//SYSTEM
-#include <w32std.h>
-#include <e32err.h>
-#include <bacline.h>
-#include <coecntrl.h>
-#include <apgtask.h>
-#include <eikenv.h>
-
-#include <QTimer>
-#include <QChar>
-#include <hbdialog.h>
-#include <hbaction.h>
-#include <hblabel.h>
-#include <hblineedit.h>
-#include <hbinstance.h>
-#include <xqserviceutil.h>
-#include <QApplication>
-#include <hbview.h>
-#include <hbmessagebox.h>
-#include <hbprogressdialog.h>
-
-#include <lcvideoplayer.h>
-#include <lcwindow.h>
-#include <lcaudiocontrol.h>
-#include <lcsession.h>
-#include <lczoomcontrol.h>
-#include <lccameracontrol.h>
-#include <xqsettingsmanager.h>
-#include <xqsettingskey.h>
-#include <settingsinternalcrkeys.h>
-#include <telincallvolcntrlcrkeys.h>
-
-#define LC_VTPLUGIN_NAME "Videotelephony";
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::LcUiEnginePrivate
-// -----------------------------------------------------------------------------
-//
-LcUiEnginePrivate::LcUiEnginePrivate(LcUiEngine& uiEngine,
-                                     const QString& engineName,
-                                     const QString& applicationDisplayName)
-    : mEngineName( engineName.toUtf8() ),
-      mSessionTitle( applicationDisplayName ),
-      mViewLayout( Lc_IdleViewLayout ),
-      mLiveCommsEngine( 0 ),
-      mCloseTimer(0),
-      mInvitingNote(0),
-      mWaitingNote(0),
-      mAcceptQuery(0),
-      mRecipientQuery(0),
-      mShareOwnVideoQuery(0),
-      mBlocked(false),
-      mFullScreen(false),
-      mSessionDurationTimerId(0),
-      mMainCamera(true),
-      mUiEngine( uiEngine ),
-      mIsMinimized(false),
-      mFirstForegroundSwitch(true),
-      mCurrentView(0),
-      mActivityManager(0),
-      mSettingsMgr(0),
-      mEarVolumeKey(0),
-      mLoudSpeakerKey(0) 
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::LcUiEnginePrivate()" )
-        
-    mPendingAction.clear();
-    
-    TPtrC8 name( reinterpret_cast< const TUint8* >( mEngineName.constData() ) );
-    // TODO: 
-    // Replace the TRAPs with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    TRAPD( err, mLiveCommsEngine = CLcEngine::NewL( name ) );
-    if ( err != KErrNone ) {
-        // Cannot proceed with the execution, exit the application
-        LC_QDEBUG_2( "livecomms [UI] <- LcUiEnginePrivate::LcUiEnginePrivate(), failed:", err )
-        qApp->exit(err);
-		return;
-    }
-    
-    mLiveCommsEngine->Session().SetLcSessionObserver( this );
-    mLiveCommsEngine->Session().SetLcUiProvider( this );
-    
-    fillRemoteInfo( false );
-        
-    if ( usingVideoTelephoneEngine() ) {
-        mViewLayout = Lc_AllInOneViewLayout;
-    }
-        
-    LC_QDEBUG( "livecomms [UI] Setting window for plug-in" )
-    CCoeControl* coeControl = 
-        reinterpret_cast<CCoeControl*>( 
-            HbInstance::instance()->allMainWindows().at(0)->winId());
-    if ( coeControl ) {
-        TInt windowPtr = reinterpret_cast<TInt>(coeControl->DrawableWindow());
-        // Return value ignored as plugin may not be interested about window
-        mLiveCommsEngine->Session().SetParameter(0,windowPtr);
-    }
-
-    mActivityManager = new LcActivityManager;
-    
-    mSettingsMgr = new XQSettingsManager(this);
-    mEarVolumeKey = new XQSettingsKey(XQSettingsKey::TargetCentralRepository, 
-            KCRUidInCallVolume.iUid, KTelIncallEarVolume);
-    mLoudSpeakerKey = new XQSettingsKey(XQSettingsKey::TargetCentralRepository, 
-            KCRUidInCallVolume.iUid,KTelIncallLoudspeakerVolume);
-    
-    subscribeVolumeEvents();
-      
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::LcUiEnginePrivate()" )   
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::~LcUiEnginePrivate
-// -----------------------------------------------------------------------------
-//
-LcUiEnginePrivate::~LcUiEnginePrivate()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::~LcUiEnginePrivate()" )
-
-    unSubscribeVolumeEvents();
-    delete mEarVolumeKey;
-    delete mLoudSpeakerKey;
-
-    delete mLiveCommsEngine;
-    delete mCloseTimer;
-    delete mActivityManager;
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::~LcUiEnginePrivate()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::zoom
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::zoom( int value )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::zoom()" )
-
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    MLcZoomControl* zoom = zoomControl();
-    if ( zoom ) {
-        TRAP_IGNORE( zoom->SetLcZoomValueL( value ) ); 
-    }
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::zoom()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::stop
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::stop()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::stop()" )
-    
-    mActivityManager->enableActivitySimulation(false);
-
-    stopSessionDurationTimer();
-    cancelCloseTimer();
-    hideNotes( true );    
-    
-    // Start guard timer already before terminate call just in case
-    // something goes horribly wrong in termination
-    startStopGuardTimer();
-    
-    int err = terminateSession();
-    LC_QDEBUG_2( "livecomms [UI] terminateSession error = ",  err )
-    // if there is an error in terminating session 
-    // or session state is already closed , stop ui
-    // else wait for session state events.
-    if( err || session().LcSessionState() ==  MLcSession::EClosed ){
-        LC_QDEBUG( "livecomms [UI] closing ui... ")
-        emit mUiEngine.stopped();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::stop()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::start
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::start()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::start()" )
-    
-    mActivityManager->enableActivitySimulation(true);
-    
-    if ( session().LcSessionState() != MLcSession::EReceived ) {
-        startLiveContent();
-    } else {
-        //wait callback
-        LC_QDEBUG( "livecomms [UI] MT start waiting callback" )
-    }
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::start()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::sessionTitle
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEnginePrivate::sessionTitle() const
-{
-    return mSessionTitle;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::recipient
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEnginePrivate::recipient() const
-{
-    return ( mRecipient.isEmpty() ) ? mPhoneNumber : mRecipient;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::phoneNumber
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEnginePrivate::phoneNumber() const
-{
-    return mPhoneNumber;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::viewLayout
-// -----------------------------------------------------------------------------
-//
-LcViewLayoutHint LcUiEnginePrivate::viewLayout() const
-{
-    return mViewLayout;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setContentAreas
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setContentAreas( const QRectF& sharedContent,
-                                  const QRectF& receivedContent )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::setContentAreas()" )
-    LC_QDEBUG_2( "livecomms [UI] shared window: ",  sharedContent )
-    LC_QDEBUG_2( "livecomms [UI] received window: ",  receivedContent )
-    
-    mLocalRect = TRect();
-    mRemoteRect = TRect();
-    
-    if ( sharedContent.height() != 0 ) {
-        mLocalRect.SetRect( sharedContent.topLeft().x(), 
-                           sharedContent.topLeft().y(),
-                           sharedContent.bottomRight().x(),
-                           sharedContent.bottomRight().y() );
-    }
-    
-    if ( receivedContent.height() != 0 ) {
-        mRemoteRect.SetRect( receivedContent.topLeft().x(), 
-                           receivedContent.topLeft().y(),
-                           receivedContent.bottomRight().x(),
-                           receivedContent.bottomRight().y() );
-    }
-    
-    setWindowRect( session().LocalVideoPlayer(), mLocalRect );
-    setWindowRect( session().RemoteVideoPlayer(), mRemoteRect );
-  
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setContentAreas()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setOrientation
-// Currently the only supported orientation is landscape.
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::setOrientation( Qt::Orientation orientation )
-{
-    bool ok( false );
-    TInt error1( KErrNone );
-    TInt error2( KErrNone );
-    MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
-    MLcVideoPlayer* remotePlayer = session().RemoteVideoPlayer();
-  
-    Q_UNUSED(orientation);
-    
-    if ( localPlayer && localPlayer->LcWindow() ) {
-        TRAP(error1, localPlayer->LcWindow()->SetLcWindowOrientationL( MLcWindow::ELandscape ) );
-    }
-    if ( remotePlayer && remotePlayer->LcWindow() ) {
-        TRAP(error2, remotePlayer->LcWindow()->SetLcWindowOrientationL( MLcWindow::ELandscape ));
-    }
-  
-    if ( (error1 == KErrNone) && (error2 == KErrNone) ) {
-        ok = true;
-    }
-        
-    return ok;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setUiComponents
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setUiComponents(
-        HbProgressDialog* invitingNote,
-        HbProgressDialog* waitingNote,
-        HbDialog* acceptQuery,
-        HbDialog* recipientQuery,
-        HbDialog* shareOwnVideoQuery )
-{
-    mInvitingNote = invitingNote;
-    mWaitingNote = waitingNote;
-    mAcceptQuery = acceptQuery;
-    mRecipientQuery = recipientQuery;
-    mShareOwnVideoQuery = shareOwnVideoQuery;
-    
-    if (mAcceptQuery && (mAcceptQuery->actions().size() == 2)) {
-        connect(mAcceptQuery->actions().at(0), SIGNAL(triggered()), 
-                this, SLOT(startReceiving()) );
-        connect(mAcceptQuery->actions().at(1), SIGNAL(triggered()), 
-                this, SLOT(stop()) );
-    }
-
-    if (mInvitingNote && (mInvitingNote->actions().size() == 1)) {
-        connect(mInvitingNote->actions().at(0), SIGNAL(triggered()), 
-                this, SLOT(stop()) );
-    }
-    if (mWaitingNote && (mWaitingNote->actions().size() == 1)) {
-        connect(mWaitingNote->actions().at(0), SIGNAL(triggered()), 
-                this, SLOT(stop()) );
-    }   
-    if(mShareOwnVideoQuery && (mShareOwnVideoQuery->actions().size() == 2)) {
-        connect(mShareOwnVideoQuery->actions().at(0), SIGNAL(triggered()), 
-                this, SLOT(startLocalVideo()) );
-        connect(mShareOwnVideoQuery->actions().at(1), SIGNAL(triggered()), 
-                this, SLOT(stopLocalVideo()) );
-    
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::toggleMute
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::toggleMute()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::toggleMute()" )
-    
-    bool mute( !isMuted() );
-    muteMic( mute );
-    
-    // Muting / unmuting the microphone is an asynchronous operation.
-    // Assuming here that the operation will eventually succeed.  
-    if ( mute ) {
-        completeAction( lcEngSignalNameMuted );
-    } else {
-        completeAction( lcEngSignalNameUnmuted );
-    }       
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::toggleMute()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isMuted
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isMuted() const
-{
-    bool micMuted( false );
-    MLcAudioControl* audio = audioControl();
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    if ( audio ) {
-        TRAP_IGNORE( micMuted = audio->IsLcMicMutedL() );
-    }
-    return micMuted;      
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::toggleSpeaker
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::toggleSpeaker()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::toggleSpeaker()" )
-    
-    bool enable( !isSpeakerOn() );
-    enableSpeaker( enable );        
-
-    // Enabling / disabling the speaker is an asynchronous operation.
-    // Assuming here that the operation will eventually succeed.    
-    if ( enable ) {
-        completeAction( lcEngSignalNameSpeakerEnabled );
-    } else {
-        completeAction( lcEngSignalNameSpeakerDisabled );
-    }       
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::toggleSpeaker()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isSpeakerOn
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isSpeakerOn() const
-{
-    return audioControl()->IsLcLoudspeakerEnabled();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::zoomValues
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::zoomValues( LcControlValues& values ) const
-{
-    int err( -1 );
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    MLcZoomControl* zoom = zoomControl();
-    if ( zoom ) {
-        TRAP( err,
-              values.mMaxValue = zoom->MaxLcZoomL();
-              values.mMinValue = zoom->MinLcZoomL();
-              values.mValue = zoom->LcZoomValueL(); );
-    }
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::toggleEnableCamera
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::toggleDisableCamera()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::toggleDisableCamera()" )
-    MLcVideoPlayer* player = visibleLocalPlayer();
-    if( player ) {
-        pause( session().LocalVideoPlayer() );
-        completeAction( lcEngSignalNameCameraDisabled );
-    } else {
-        play( session().LocalVideoPlayer() );
-        completeAction( lcEngSignalNameCameraEnabled );
-    }
-    emitViewLayoutChanged();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::toggleDisableCamera()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setCameraMain
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setMainCamera(const bool aMainCamera)
-{
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiEnginePrivate::setCameraMain()", aMainCamera )
-    mMainCamera = aMainCamera;
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setCameraMain()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::cameraIndex
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::mainCamera() const
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::mainCamera()" )
-    LC_QDEBUG_2( "livecomms [UI] <- LcUiEnginePrivate::mainCamera()", mMainCamera )
-    return mMainCamera;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::toggleCamera
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::toggleCamera()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::toggleCamera()" )
- 
-    MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
-    
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    if ( localPlayer && localPlayer->LcCameraControl() ) {
-        TRAP_IGNORE( localPlayer->LcCameraControl()->ToggleLcCameraL() );
-    }
-
-    setMainCamera( !mMainCamera );
-    
-    // Enabling / disabling the camera is an asynchronous operation.
-    // Assuming here that the operation will eventually succeed.  
-    if ( mMainCamera ) {
-        completeAction( lcEngSignalNameCameraChangedToMain );
-    } else {
-        completeAction( lcEngSignalNameCameraChangedToSecondary );
-    }
-        
-    LC_QDEBUG_2( "livecomms [UI] <- LcUiEnginePrivate::toggleCamera(), mainCamera:", mMainCamera )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::fullScreenMode
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::fullScreenMode()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::fullScreenMode()" )
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::fullScreenMode()" )
-    return mFullScreen;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setFullScreenMode
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setFullScreenMode(bool aMode)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::setFullScreenMode()" )
-    mFullScreen = aMode;
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setFullScreenMode()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::updateSession
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::updateSession()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::updateSession()" )
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    TRAP_IGNORE( session().UpdateLcSessionL() );
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::updateSession()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isLocalPlayerPlaying
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isLocalPlayerPlaying() const
-{
-    MLcVideoPlayer* player = session().LocalVideoPlayer();
-    return ( player && 
-             player->LcVideoPlayerState() == MLcVideoPlayer::EPlaying );
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isRemotePlayerPlaying
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isRemotePlayerPlaying() const
-{
-    MLcVideoPlayer* player = session().RemoteVideoPlayer();
-    return ( player && 
-             player->LcVideoPlayerState() == MLcVideoPlayer::EPlaying );
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::timerEvent
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::timerEvent(QTimerEvent *event)
-{
-    if ( event->timerId() == mSessionDurationTimerId ) {
-        QTime curr(0, 0, 0, 0);
-        curr = curr.addSecs( 
-                mSessionDurationStartTime.secsTo( QTime::currentTime() ) );
-        emit mUiEngine.sessionDurationChanged(curr.toString());
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::startReceiving
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::startReceiving()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startReceiving()" )
-    
-    if ( mAcceptQuery ) {
-        mAcceptQuery->hide();
-    }
-    
-    establishSession();
-    
-    if ( mWaitingNote && featureSupported( CLcEngine::ELcShowWaitingNote ) ) {
-        mWaitingNote->show();
-    }
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startReceiving()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::stopForcefully
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::stopForcefully()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::stopForcefully()" )
-    
-    // This is only way to force exit in case CActiveScheduler is blocked
-    // by engine plugin.
-    User::Exit(0);
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::stopForcefully()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::StateChanged
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::StateChanged( MLcSession& aSession )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::StateChanged( session )" )
-    doUpdate( aSession );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::StateChanged( session )" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::StateChanged
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::StateChanged( MLcVideoPlayer& aPlayer )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::StateChanged( player )" )    
-    emitViewLayoutChanged();
-    doUpdate( aPlayer );    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::StateChanged( player )" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::Updated
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::Updated( MLcSession& aSession )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::Updated( session )" )
-    emitViewLayoutChanged();
-    doUpdate( aSession );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::Updated( session )" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::Updated
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::Updated( MLcVideoPlayer& aPlayer )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::Updated( player )" )
-    emitViewLayoutChanged();
-    doUpdate( aPlayer );    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::Updated( player )" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::Failed
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::Failed( MLcSession& /*aSession*/, TInt /*aError*/ )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::Failed( session )" )
-    stop();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::Failed( session )" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::Failed
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::Failed( MLcVideoPlayer& /*aPlayer*/, TInt /*aError*/ )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::Failed( player )" )
-    stop();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::Failed( player )" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::SessionTimeChanged
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::SessionTimeChanged( MLcSession& /*aSession*/,
-                        const TTimeIntervalSeconds& /*aSeconds*/ )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::SessionTimeChanged()" )
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::SessionTimeChanged()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::SelectRecipient
-// -----------------------------------------------------------------------------
-//
-TBool LcUiEnginePrivate::SelectRecipient( MDesCArray& aRecipientAddresses, 
-                                  TDes& aSelectedRecipientAddress )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::SelectRecipient()" )
-    aSelectedRecipientAddress = aRecipientAddresses.MdcaPoint(0);
-    mRecipient = DESC_TO_QSTRING( aSelectedRecipientAddress );
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::SelectRecipient()" )
-    return ETrue;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::SelectRecipient
-// -----------------------------------------------------------------------------
-//
-TBool LcUiEnginePrivate::InputRecipient( TDes& aRecipientAddress )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::InputRecipient()" )
-    
-    TBool answered( EFalse );
-    
-    if ( mRecipientQuery ) {
-        mRecipient = DESC_TO_QSTRING( aRecipientAddress );
-        HbLineEdit* lineEdit = new HbLineEdit( mRecipient );
-        mRecipientQuery->setContentWidget( lineEdit );
-        mRecipientQuery->open();
-        TPtrC16 textPtr( 
-            reinterpret_cast< const TUint16* >( mRecipient.utf16() ) );
-        aRecipientAddress.Copy( textPtr );
-        answered = ETrue;
-    }
-
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::InputRecipient()" )
-    return answered;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::HandleForegroundStatus
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::HandleForegroundStatus( TBool aForeground )
-{
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiEnginePrivate::HandleForegroundStatus(), fg:", 
-                 aForeground )
-    
-    mActivityManager->enableActivitySimulation(aForeground);
-    
-    if ( aForeground && !HbInstance::instance()->allMainWindows().isEmpty() ){
-        HbInstance::instance()->allMainWindows().at(0)->show();
-    }
-    XQServiceUtil::toBackground(!aForeground);
-
-    mIsMinimized = !aForeground;
-    
-    handleEngineForegroundStatus();
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::HandleForegroundStatus()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::BlockUi
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::BlockUi( TBool aBlocked )
-{
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiEnginePrivate::BlockUi, blocked:", aBlocked )
-    mBlocked = aBlocked;
-    
-    if ( mBlocked ){
-        emit mUiEngine.blocked();
-    }
-    else{
-        emit mUiEngine.unblocked();
-        completePendingAction();
-    }   
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::BlockUi()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setViewLayout
-// -----------------------------------------------------------------------------
-//
-LcViewLayoutHint LcUiEnginePrivate::setViewLayout()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::setViewLayout()" )
-    
-    LcViewLayoutHint hint = (LcViewLayoutHint)Lc_NoViewLayout;
-    
-    MLcVideoPlayer* localPlayer = visibleLocalPlayer();
-    MLcVideoPlayer* remotePlayer = visibleRemotePlayer();
-    
-    if ( usingVideoTelephoneEngine() ) {
-        hint = Lc_AllInOneViewLayout;
-        LC_QDEBUG( "livecomms [UI] use Lc_AllInOneViewLayout" )
-    } else if ( localPlayer && remotePlayer ) {
-        hint = Lc_TwowayViewLayout;
-        LC_QDEBUG( "livecomms [UI] use Lc_TwowayViewLayout" )
-    } else if ( localPlayer ) {
-        hint = Lc_SharedViewLayout;
-        LC_QDEBUG( "livecomms [UI] use Lc_SharedViewLayout" )
-    } else if ( remotePlayer && !session().LocalVideoPlayer() ) {
-        hint = Lc_ReceivedOnlyViewLayout;
-        LC_QDEBUG( "livecomms [UI] use Lc_ReceivedOnlyViewLayout" )
-    } else if ( remotePlayer ) {
-        hint = Lc_ReceivedViewLayout;
-        LC_QDEBUG( "livecomms [UI] use Lc_ReceivedViewLayout" )
-    } else {
-        hint = Lc_IdleViewLayout;
-        LC_QDEBUG( "livecomms [UI] ! no players ! use Lc_IdleViewLayout" )
-    }
-    
-    mViewLayout = hint;
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setViewLayout()" )
-    
-    return viewLayout();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::emitViewLayoutChanged
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::emitViewLayoutChanged()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::emitViewLayoutChanged()" )
-
-    LcViewLayoutHint oldLayout = viewLayout();
-    LcViewLayoutHint layout = setViewLayout();
-    
-    if ( layout != oldLayout ) {
-        LC_QDEBUG( "livecomms [UI] layout has changed. signal" )
-        emit mUiEngine.layoutChanged();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::emitViewLayoutChanged()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::startLiveContent
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::startLiveContent()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startLiveContent()" )
-    
-    if ( mInvitingNote && featureSupported( CLcEngine::ELcShowInvitingNote ) ) {
-        mInvitingNote->show();
-    }
-    enableSpeaker( true );
-    establishSession();
-        
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startLiveContent()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::startPlayback
-// Utility style function to start both local and remote players if available.
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::startPlayback()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startPlayback()" )
-    startLocalVideo();
-    startRemoteVideo();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startPlayback()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::startRemoteVideo
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::startRemoteVideo()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startRemotePlayback()" )
-    MLcVideoPlayer* remotePlayer = session().RemoteVideoPlayer();
-    if ( remotePlayer ) {
-        LC_QDEBUG( "livecomms [UI] enable remote player window" )
-        enableWindow( remotePlayer, true );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startRemotePlayback()" )
-}
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::startCloseTimer
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::startCloseTimer()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startCloseTimer()" )
-    delete mCloseTimer;
-    mCloseTimer = 0;
-    mCloseTimer = new QTimer(this);
-    mCloseTimer->setSingleShot(true);
-    connect(mCloseTimer, SIGNAL(timeout()), this, SLOT(stop()));
-    mCloseTimer->start(60000);
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startCloseTimer()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::cancelCloseTimer
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::cancelCloseTimer()
-{
-    if ( mCloseTimer && mCloseTimer->isActive()) {
-        mCloseTimer->stop();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::hideNotes
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::hideNotes( bool hideWaitingNote )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::hideNotes()" )
-    if ( mAcceptQuery ) {
-        mAcceptQuery->hide();
-    }
-    if ( mWaitingNote && hideWaitingNote ) {
-        mWaitingNote->hide();
-    }
-    if ( mInvitingNote ) {
-        mInvitingNote->hide();
-    }
-    if ( mRecipientQuery ) {
-        mRecipientQuery->hide();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::hideNotes()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::completeAction
-// Completes method passed as argument. If engine is in blocked state
-// action completion will be delayed until unblock occurs.
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::completeAction( const char* actionMethod )
-{
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiEnginePrivate::completeAction :", actionMethod )
-    if ( mBlocked ) {
-        LC_QDEBUG( "livecomms [UI]  Blocked, invoke later" )
-        // store action and invoke it once unblocked
-        setPendingAction( actionMethod );     
-    }
-    else {
-        QMetaObject::invokeMethod( &mUiEngine, actionMethod );
-    }     
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::completeAction" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setPendingAction
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setPendingAction( const char* actionMethod )
-{
-    mPendingAction = actionMethod;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::completePendingAction
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::completePendingAction()
-{
-    if ( !mPendingAction.isEmpty() ) {
-        completeAction( mPendingAction.toAscii().constData() );
-        mPendingAction.clear();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::videoTelephoneLayout
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::usingVideoTelephoneEngine()
-{
-    return mEngineName == LC_VTPLUGIN_NAME;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::session
-// -----------------------------------------------------------------------------
-//
-MLcSession& LcUiEnginePrivate::session() const
-{
-    return mLiveCommsEngine->Session();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::visibleLocalPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* LcUiEnginePrivate::visibleLocalPlayer() const
-{
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
-    if ( localPlayer ) {
-        bool playing( true );
-        TRAP_IGNORE( playing = localPlayer->LcIsPlayingL() );
-        if ( !playing ) {
-            localPlayer = 0;
-        }
-    }
-    return localPlayer;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::visibleRemotePlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* LcUiEnginePrivate::visibleRemotePlayer() const
-{
-    MLcVideoPlayer* remotePlayer = session().RemoteVideoPlayer();
-    if ( remotePlayer && 
-         remotePlayer->LcVideoPlayerState() == MLcVideoPlayer::EPaused ) {
-        remotePlayer = 0;
-    }
-    return remotePlayer;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::audioControl
-// -----------------------------------------------------------------------------
-//
-MLcAudioControl* LcUiEnginePrivate::audioControl() const
-{
-    MLcAudioControl* audioControl( 0 );
-    if ( session().LocalVideoPlayer() ) {
-        audioControl = session().LocalVideoPlayer()->LcAudioControl();
-    }
-    if ( !audioControl && session().RemoteVideoPlayer() ) {
-        audioControl = session().RemoteVideoPlayer()->LcAudioControl();
-    }
-    return audioControl;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::zoomControl
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* LcUiEnginePrivate::zoomControl() const
-{
-    MLcZoomControl* zoomControl( 0 );
-    if ( session().LocalVideoPlayer() ) {
-        zoomControl = session().LocalVideoPlayer()->LcZoomControl();
-    }
-    return zoomControl;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isFeatureSupported
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::featureSupported( CLcEngine::TLcFeature feature )
-{
-    bool isSupported( false );
-    if ( mLiveCommsEngine ) {
-        isSupported = mLiveCommsEngine->IsFeatureSupported( feature );
-    }
-    return isSupported;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::startSessionDurationTimer
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::startSessionDurationTimer()
-{
-    const int sessionDurationTimerIntervalInMs = 1000;
-    if ( !mSessionDurationTimerId ){
-        mSessionDurationTimerId = startTimer( sessionDurationTimerIntervalInMs );
-        LC_QDEBUG_2( "livecomms [UI] -> duration timer id:", mSessionDurationTimerId )
-        mSessionDurationStartTime = QTime::currentTime();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::stopSessionDurationTimer
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::stopSessionDurationTimer()
-{
-    if ( mSessionDurationTimerId ){
-        killTimer( mSessionDurationTimerId );
-        mSessionDurationTimerId = 0;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::establishSession
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::establishSession()
-{
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    TRAPD( err, mLiveCommsEngine->Session().EstablishLcSessionL() );
-    if ( !err ) {
-        startCloseTimer();
-    }
-    LC_QDEBUG_2( "livecomms [UI] LcUiEnginePrivate::establishSession, err", err )
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::terminateSession
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::terminateSession()
-{
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    TRAPD( err, mLiveCommsEngine->Session().TerminateLcSessionL() );
-    LC_QDEBUG_2( "livecomms [UI] LcUiEnginePrivate::terminateSession, err", err )
-    return err;    
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setWindowRect
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::setWindowRect( MLcVideoPlayer* player, TRect rect )
-{
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    int err( -1 );
-    if ( player &&
-         player->LcWindow() &&
-         player->LcWindow()->LcWindowRect() != rect ) {
-        TRAP( err, player->LcWindow()->SetLcWindowRectL( rect ) );
-    }
-    LC_QDEBUG_2( "livecomms [UI] LcUiEnginePrivate::setWindowRect, err", err )
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::enableWindow
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::enableWindow( MLcVideoPlayer* player, bool enable )
-{
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    int err( -1 );
-    if ( player && 
-         player->LcWindow() ) {
-        TRAP( err, player->LcWindow()->EnableLcWindowL( enable ) );
-    }
-    LC_QDEBUG_2( "livecomms [UI] LcUiEnginePrivate::enableWindow, err", err )
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::play
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::play( MLcVideoPlayer* player )
-{
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    int err( -1 );
-    if ( player ) {
-        TRAP( err, player->LcPlayL() );
-    }
-    LC_QDEBUG_2( "livecomms [UI] LcUiEnginePrivate::play, err", err )
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::pause
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::pause( MLcVideoPlayer* player )
-{
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    int err( -1 );
-    if ( player ) {
-        TRAP( err, player->LcPauseL() );
-    }
-    LC_QDEBUG_2( "livecomms [UI] LcUiEnginePrivate::pause, err", err )
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::enableSpeaker
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::enableSpeaker( bool enable )
-{
-    int err( -1 );
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    MLcAudioControl* audio = audioControl();
-    if ( audio ) {
-        TRAP( err, audio->EnableLcLoudspeakerL( enable ) );
-    }
-    LC_QDEBUG_2( "livecomms [UI] LcUiEnginePrivate::enableSpeaker, err", err )
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::muteMic
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::muteMic( bool mute )
-{
-    int err( -1 );
-    // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
-    MLcAudioControl* audio = audioControl();
-    if ( audio ) {
-        TRAP( err, audio->MuteLcMicL( mute ) );
-    }
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::fillRemoteInfo
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::fillRemoteInfo(bool informChanges)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::fillRemoteInfo()" )
-    
-    QString phoneNum = DESC_TO_QSTRING( session().RemoteDetails() );
-    if ( phoneNum != mPhoneNumber) {
-        LC_QDEBUG_2( "remote number:", phoneNum )
-        mPhoneNumber = phoneNum;
-        if ( informChanges ) {
-            emit mUiEngine.phoneNumberChanged(mPhoneNumber);
-        }
-    }  
-    // If no recipient even at opened state and no phonenum, use unknown recipient
-    QString recipient = DESC_TO_QSTRING( session().RemoteDisplayName() );
-    if ( recipient.isEmpty() ){
-        recipient = mPhoneNumber;
-    }
-    if ( session().LcSessionState() == MLcSession::EOpen && recipient.isEmpty() ) {
-        recipient = hbTrId("txt_vt_custom_unknown_number");
-    }
-    if ( recipient != mRecipient ){
-        LC_QDEBUG_2( "remote name:", recipient )
-        mRecipient = recipient;
-        if ( informChanges ) {
-            emit mUiEngine.recipientChanged(mRecipient);
-        }
-    } 
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::fillRemoteInfo()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isMinimized
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isMinimized() const
-{
-    return mIsMinimized;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::minimize
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::minimize()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::minimize()" )
-    
-    if ( !isMinimized() ){
-        TRect emptyRect;
-        setWindowRect( session().LocalVideoPlayer(), emptyRect );
-        setWindowRect( session().RemoteVideoPlayer(), emptyRect );
-        HandleForegroundStatus(EFalse);
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::minimize()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::maximize
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::maximize()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::maximize()" )  
-    if ( isMinimized() ){
-        setWindowRect( session().LocalVideoPlayer(), mLocalRect );
-        setWindowRect( session().RemoteVideoPlayer(), mRemoteRect );
-        HandleForegroundStatus(ETrue);
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::maximize()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setCurrentView
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setCurrentView(HbView* view)
-{
-    LC_QDEBUG( "livecomms [UI] <-> LcUiEnginePrivate::setCurrentView()" )  
-    mCurrentView = view;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::startStopGuardTimer
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::startStopGuardTimer()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startStopGuardTimer()" ) 
-    const int stoppingGuardTimerInMs = 5000;
-    QTimer::singleShot(stoppingGuardTimerInMs, this, SLOT(stopForcefully()));
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startStopGuardTimer()" ) 
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::handleEngineForegroundStatus
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::handleEngineForegroundStatus()
-{
-    bool foreground = !mIsMinimized;
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiEnginePrivate::handleEngineForegroundStatus(), fg:", 
-                 foreground )
-    HbMainWindow *mainWindow = HbInstance::instance()->allMainWindows().at(0);
-
-    if ( mLiveCommsEngine ){
-        bool setStatusToEngine(true);
-        if ( foreground && mFirstForegroundSwitch ){
-            // Have to wait that first paint has occured, otherwise video
-            // windows are shown too early. 
-            // TODO: wk8 does not yet have viewReady signal so simulate it
-            // by using timer. Timer can be removed later.
-            if ( mCurrentView ){
-                LC_QDEBUG( "livecomms [UI]  Wait for first paint" )
-                connect( mainWindow, SIGNAL(viewReady()), 
-                         this, SLOT(handleEngineForegroundStatus()) );
-                setStatusToEngine = false;
-            }
-            
-        }
-        if ( setStatusToEngine ) {
-            LC_QDEBUG( "livecomms [UI]  Set fg status to engine plugin" ) 
-            session().SetForegroundStatus(foreground);
-            disconnect( mainWindow, SIGNAL(viewReady()), 
-                        this, SLOT(handleEngineForegroundStatus()) );
-        }
-        mFirstForegroundSwitch = false;
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::handleEngineForegroundStatus()" )
-}    
-
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::SendDialTone
-// -----------------------------------------------------------------------------
-//
-bool  LcUiEnginePrivate::SendDialTone(const QChar  aKey)
-{
-    if ( mLiveCommsEngine ){
-        const TChar dialChar = static_cast<TChar>(aKey.unicode());
-        return mLiveCommsEngine->Session().SendDialTone(dialChar);
-    }
-    return false;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isAllowedToShareVideo
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::showSendVideoQueryWhenNecessary()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::showSendVideoQueryWhenNecessary()" )
-    if (featureSupported( CLcEngine::ELcSendVideoQuery )) {
-        if (mShareOwnVideoQuery)
-            mShareOwnVideoQuery->show();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::showSendVideoQueryWhenNecessary()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::stopLocalVideo
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::stopLocalVideo()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::stopLocalVideo()" )
-    MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
-    if( localPlayer ) {
-        pause( localPlayer );
-        enableWindow( localPlayer, false );
-        completeAction( lcEngSignalNameCameraDisabled );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::stopLocalVideo()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::startLocalVideo
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::startLocalVideo()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startLocalVideo()" )
-    MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
-    if( localPlayer ){
-        play( localPlayer );
-        enableWindow( localPlayer, true );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startLocalVideo()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::subscribeVolumeEvents
-// -----------------------------------------------------------------------------
-//
-
-void LcUiEnginePrivate::subscribeVolumeEvents()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::subscribeVolumeEvents()" )
-    mSettingsMgr->startMonitoring( *mEarVolumeKey, XQSettingsManager::TypeInt );
-    mSettingsMgr->startMonitoring( *mLoudSpeakerKey, XQSettingsManager::TypeInt );
-    connect(mSettingsMgr, 
-            SIGNAL(valueChanged(const XQSettingsKey&, const QVariant&)), 
-            this, SLOT(volumeLevelChanged(const XQSettingsKey&, const QVariant&)));
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::subscribeVolumeEvents()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::unSubscribeVolumeEvents
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::unSubscribeVolumeEvents()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::unSubscribeVolumeEvents()")
-    mSettingsMgr->stopMonitoring( *mEarVolumeKey );
-    mSettingsMgr->stopMonitoring( *mLoudSpeakerKey );
-    disconnect(mSettingsMgr, 
-                SIGNAL( valueChanged(const XQSettingsKey&, const QVariant& ) ), 
-                this, SLOT(volumeLevelChanged(const XQSettingsKey&, const QVariant&)));
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::unSubscribeVolumeEvents()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::volumeLevelChanged
-// -----------------------------------------------------------------------------
-//
-
-void LcUiEnginePrivate::volumeLevelChanged( const XQSettingsKey& aKey, 
-                                            const QVariant& aValue )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::volumeLevelChanged()" )
-
-    // Ensure We only send value for the valid keys. 
-    if ((aKey.key() == mEarVolumeKey->key() && aKey.uid() == mEarVolumeKey->uid()) ||
-        (aKey.key() == mLoudSpeakerKey->key() && aKey.uid() == mLoudSpeakerKey->uid()) ) {
-    
-        emit mUiEngine.volumeChanged( aValue.toInt() );
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::volumeLevelChanged()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::doUpdate( MLcVideoPlayer& aPlayer )
-// -----------------------------------------------------------------------------
-//
-
-void LcUiEnginePrivate::doUpdate( MLcVideoPlayer& aPlayer )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::doUpdate(), videoplayer" )
-    if ( aPlayer.LcVideoPlayerState() == MLcVideoPlayer::EPlaying ) { 
-        if ( &aPlayer == session().RemoteVideoPlayer() ) {
-            if ( mWaitingNote ) {
-                mWaitingNote->hide();
-            }
-            emit mUiEngine.remotePlayerPlaying();
-        }
-        if ( &aPlayer == session().LocalVideoPlayer() ) {
-            emit mUiEngine.localPlayerPlaying();
-        }
-    } else if ( aPlayer.LcVideoPlayerState() == MLcVideoPlayer::EPreparing ) {
-        if ( &aPlayer == session().RemoteVideoPlayer() ) {
-            emit mUiEngine.remotePlayerPreparing();
-        }
-        if ( &aPlayer == session().LocalVideoPlayer() ) {           
-            emit mUiEngine.localPlayerPreparing();
-        }    
-    } else if ( aPlayer.LcVideoPlayerState() == MLcVideoPlayer::EBuffering ) {
-        if ( &aPlayer == session().RemoteVideoPlayer() ) {
-            emit mUiEngine.remotePlayerBuffering();
-        }
-        if ( &aPlayer == session().LocalVideoPlayer() ) {
-            emit mUiEngine.localPlayerBuffering();
-        }    
-    } else if ( aPlayer.LcVideoPlayerState() == MLcVideoPlayer::EPaused ) {
-        if ( &aPlayer == session().RemoteVideoPlayer() ) {
-            emit mUiEngine.remotePlayerPaused();
-        }
-        if ( &aPlayer == session().LocalVideoPlayer() ) {
-            emit mUiEngine.localPlayerPaused();
-        }    
-    } else if ( aPlayer.LcVideoPlayerState() == MLcVideoPlayer::EUnavailable ) {
-        if ( &aPlayer == session().RemoteVideoPlayer() ) {
-            emit mUiEngine.remotePlayerUnavailable();
-        }
-        if ( &aPlayer == session().LocalVideoPlayer() ) {
-            emit mUiEngine.localPlayerUnavailable();
-        }    
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::doUpdate(),videoplayer" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::doUpdate( MLcSession& aSession )
-// -----------------------------------------------------------------------------
-//
-
-void LcUiEnginePrivate::doUpdate( MLcSession& aSession )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::doUpdate(),session" )
-    MLcSession::TLcSessionState newState = MLcSession::EUninitialized;
-    newState = aSession.LcSessionState();    
-    LC_QDEBUG_2( "livecomms [UI] session state = ", newState )    
-    if ( newState == MLcSession::EOpen ) {
-        LC_QDEBUG( "livecomms [UI] session state is MLcSession::EOpen" )
-        cancelCloseTimer();
-        hideNotes( false );
-        showSendVideoQueryWhenNecessary();
-        startRemoteVideo();
-        fillRemoteInfo( true );
-        emitViewLayoutChanged();
-        startSessionDurationTimer();
-        
-    } else if ( newState == MLcSession::EReceived ) {
-        LC_QDEBUG( "livecomms [UI] state state is MLcSession::EReceived" )
-        mRecipient = DESC_TO_QSTRING( session().RemoteDisplayName() );        
-        if ( mAcceptQuery && 
-             featureSupported( CLcEngine::ELcShowAcceptQuery ) ) {
-            mAcceptQuery->show();
-        } else {
-            startReceiving();
-        }        
-    } else if ( newState == MLcSession::EClosed ) {
-        LC_QDEBUG( "livecomms [UI] state state is MLcSession::EClosed, closing UI..." )
-        emit mUiEngine.stopped();
-            
-    } else if ( newState == MLcSession::EOpening ){
-        LC_QDEBUG( "livecomms [UI] state state is MLcSession::EOpening" )
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::doUpdate(),session" )
-}
-// End of File
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbaction.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBACTION_H
-#define HBACTION_H
-
-#include <QAction>
-#include <hbnamespace.h>
-#include <hbglobal.h>
-#include <hbicon.h>
-
-
-class HbAction : public QAction
-{
-public:
-    explicit HbAction(QObject *parent = 0);
-    explicit HbAction(const QString &text, QObject *parent = 0);
-    virtual ~HbAction();
-    
-private: // Data added for the unit testing stub
-    HbIcon mIcon;   
-};
-
-#endif // HBACTION_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbdialog.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBDIALOG_H
-#define HBDIALOG_H
-
-#include <hbglobal.h>
-#include <hbwidget.h>
-
-
-class HbAction;
-
-
-class HbDialog : public HbWidget
-{
-public:
-    enum DismissPolicy
-        {
-            NoDismiss   = 0,
-            TapInside   = 1,
-            TapOutside  = 2,
-            TapAnywhere = TapInside | TapOutside
-        };
-    enum DefaultTimeout
-      {
-          NoTimeout,
-          ConfirmationNoteTimeout,
-          StandardTimeout,
-          ContextMenuTimeout
-      };
-    
-    explicit HbDialog(QGraphicsItem *parent = 0);
-    virtual  ~HbDialog();
-
-    void setContentWidget(QGraphicsWidget *contentWidget);
-    enum { Type = Hb::ItemType_Popup };
-    void setTimeout( int timeout ) ;
-    void setDismissPolicy( HbDialog::DismissPolicy dismissPolicy );
-
-public slots:
-    void open(QObject* receiver = 0, const char* member = 0);
-protected:
-
-    QVariant itemChange ( GraphicsItemChange change, const QVariant & value );
-};
-
-
-#endif // HBDIALOG_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbinstance.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBINSTANCE_H
-#define HBINSTANCE_H
-
-#include <hbglobal.h>
-#include <hbmainwindow.h>
-#include <QList.h>
-
-#define hbInstance (HbInstance::instance())
-
-class HbInstance
-{
-public:
-    static HbInstance *instance();
-    QList<HbMainWindow *> allMainWindows() const;
-
-private:
-    HbInstance();
-    ~HbInstance();
-    
-private: // Data added for the unit testing stub
-    QList<HbMainWindow *> mAllMainWindows;
-};
-
-#endif // HBINSTANCE_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hblabel.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBLABEL_H
-#define HBLABEL_H
-
-#include <hbglobal.h>
-#include <hbnamespace.h>
-#include <hbwidget.h>
-
-class QGraphicsItem;
-
-
-class HbLabel : public HbWidget 
-{
-public:
-    explicit HbLabel (QGraphicsItem *parent = 0);
-    explicit HbLabel (const QString &displayText, QGraphicsItem *parent = 0);
-    ~HbLabel ();
-    
-    enum { Type = Hb::ItemType_Label };
-};
-
-#endif // HBLABEL_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hblineedit.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-
-#ifndef HBLINEEDIT_H
-#define HBLINEEDIT_H
-
-#include <hbglobal.h>
-#include <hbnamespace.h>
-#include <hbwidget.h>
-
-
-class HbLineEdit: public HbWidget
-{
-public:
-
-    explicit HbLineEdit(const QString &text, QGraphicsItem *parent = 0);
-    virtual ~HbLineEdit();
-
-    enum {
-        Type = Hb::ItemType_LineEdit
-    };
-
-};
-
-#endif // HBLINEEDIT_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbmainwindow.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-
-#ifndef HBMAINWINDOW_H
-#define HBMAINWINDOW_H
-
-#include <QGraphicsView>
-#include <hbglobal.h>
-#include <hbnamespace.h>
-
-class QGraphicsWidget;
-class HbAction;
-class HbView;
-
-
-class HbMainWindow : public QGraphicsView
-{
-public:
-    explicit HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone);
-    ~HbMainWindow();
-};
-
-#endif // HBMAINWINDOW_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbmessagebox.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-
-#ifndef HBMESSAGEBOX_H
-#define HBMESSAGEBOX_H
-
-#include <hbglobal.h>
-#include <hbdialog.h>
-#include <hbicon.h>
-
-class HbMessageBoxPrivate;
-class HbStyleOptionMessageBox;
-
-class HB_WIDGETS_EXPORT HbMessageBox : public HbDialog
-{
-
-public:
-    enum MessageBoxType {
-        MessageTypeInformation,
-        MessageTypeQuestion,
-        MessageTypeWarning
-    };
-    explicit HbMessageBox(MessageBoxType type=MessageTypeInformation,QGraphicsItem *parent = 0);
-    explicit HbMessageBox(const QString &text,MessageBoxType type =MessageTypeInformation, QGraphicsItem *parent = 0);
-    virtual ~HbMessageBox();
-
-    void setText(const QString &text);
-    QString text() const;
-
-    void setIcon(const HbIcon &icon);
-    HbIcon icon() const;
-
-    void setIconAlignment(Qt::Alignment align);
-    Qt::Alignment iconAlignment() const;
-
-    enum { Type = Hb::ItemType_MessageBox };
-    int type() const { return Type; }
-
-public:
-    static bool launchQuestionMessageBox(const QString &questionText,
-                                         const QString &primaryButtonText = tr("Yes"),
-                                         const QString &secondaryButtonText = tr("No"),
-                                         QGraphicsWidget *headWidget = 0,
-                                         QGraphicsScene *scene = 0,
-                                         QGraphicsItem *parent = 0 );
-
-    static void launchInformationMessageBox(const QString &informationText,
-                                            QGraphicsWidget *headWidget = 0,
-                                            QGraphicsScene *scene = 0,
-                                            QGraphicsItem *parent = 0 );
-
-    static void launchWarningMessageBox(const QString &warningText,
-                                        QGraphicsWidget *headWidget = 0,
-                                        QGraphicsScene *scene = 0,
-                                        QGraphicsItem *parent = 0 );
-
-public slots:
-    void updatePrimitives();
-
-protected:
-    HbMessageBox(HbMessageBoxPrivate &dd, QGraphicsItem *parent);
-    void initStyleOption(HbStyleOptionMessageBox *option) const;
-    void keyPressEvent(QKeyEvent *event);
-};
-
-#endif // HB_MESSAGEBOX_H
-
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbnote.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBNOTE_H
-#define HBNOTE_H
-
-#include <hbglobal.h>
-#include <hbpopup.h>
-
-
-class HbNote : public HbPopup
-{
-public:
-    explicit HbNote(QGraphicsItem *parent = 0);
-    HbNote(const QString &text, QGraphicsItem *parent = 0);
-    virtual ~HbNote();
-
-    enum { Type = Hb::ItemType_Note };
-
-protected:
-    QVariant itemChange(GraphicsItemChange change, const QVariant &value);
-};
-
-#endif // HBNOTE_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbprogressdialog.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBPROGRESSDIALOG_H
-#define HBPROGRESSDIALOG_H
-
-#include <hbdialog.h>
-
-class HbProgressDialog : public HbDialog
-{
-public:
-
-    enum ProgressDialogType { ProgressNote,WaitNote };
-    explicit HbProgressDialog(QGraphicsItem *parent = 0);
-
-    enum { Type = Hb::ItemType_ProgressDialog };
-
-protected:
-    QVariant itemChange(GraphicsItemChange change, const QVariant& value);
-};
-
-#endif // HBPROGRESSDIALOG_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbstubs.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-// Orbit classes
-#include <hbinstance.h>
-#include <hbmainwindow.h>
-#include <hbwidget.h>
-#include <hbdialog.h>
-#include <hbaction.h>
-#include <hblabel.h>
-#include <hbprogressdialog.h>
-#include <hblineedit.h>
-#include <hbview.h>
-
-// Static data that simulates HbInstance and HbMainWindow
-static HbInstance* hbInstanceSingleton = 0;
-
-// HbInstance
-
-// -----------------------------------------------------------------------------
-// HbInstance::instance
-// -----------------------------------------------------------------------------
-//
-HbInstance* HbInstance::instance()
-{
-	if (!hbInstanceSingleton)
-		hbInstanceSingleton = new HbInstance;
-	return hbInstanceSingleton;
-}
-
-// -----------------------------------------------------------------------------
-// HbInstance::allMainWindows
-// -----------------------------------------------------------------------------
-//
-QList<HbMainWindow *> HbInstance::allMainWindows() const
-{
-    return mAllMainWindows;
-}
-
-// -----------------------------------------------------------------------------
-// HbInstance::HbInstance
-// -----------------------------------------------------------------------------
-//
-HbInstance::HbInstance()
-{
-    HbMainWindow *mainWindow = new HbMainWindow;
-    mAllMainWindows.append(mainWindow);
-}
-
-// -----------------------------------------------------------------------------
-// HbInstance::~HbInstance
-// -----------------------------------------------------------------------------
-//
-HbInstance::~HbInstance()
-{
-    mAllMainWindows.clear();
-}
-
-
-// HbMainWindow
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::HbMainWindow
-// -----------------------------------------------------------------------------
-//
-HbMainWindow::HbMainWindow(QWidget *parent,Hb::WindowFlags windowFlags)
-: QGraphicsView(parent)
-{
-    Q_UNUSED(windowFlags)
-}
-
-// -----------------------------------------------------------------------------
-// HbMainWindow::~HbMainWindow
-// -----------------------------------------------------------------------------
-//
-HbMainWindow::~HbMainWindow()
-{
-}
-
-// HbDialog
-
-// -----------------------------------------------------------------------------
-// HbDialog::HbDialog
-// -----------------------------------------------------------------------------
-//
-HbDialog::HbDialog(QGraphicsItem *parent) : HbWidget(parent)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::~HbDialog
-// -----------------------------------------------------------------------------
-//
-HbDialog::~HbDialog()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::open()
-// -----------------------------------------------------------------------------
-//
-void HbDialog::open(QObject* receiver, const char* member)
-{
-    Q_UNUSED(receiver);
-    Q_UNUSED(member);
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setContentWidget
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setContentWidget(QGraphicsWidget *contentWidget)
-{
-    Q_UNUSED(contentWidget)    
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::itemChange
-// -----------------------------------------------------------------------------
-//
-QVariant HbDialog::itemChange(GraphicsItemChange change, const QVariant& value)
-{
-    Q_UNUSED(change)
-    return QVariant(value);
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setTimeout
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setTimeout(int timeout )
-{
-    Q_UNUSED(timeout)
-}
-
-// -----------------------------------------------------------------------------
-// HbDialog::setDismissPolicy
-// -----------------------------------------------------------------------------
-//
-void HbDialog::setDismissPolicy( HbDialog::DismissPolicy dismissPolicy )
-{
-    Q_UNUSED(dismissPolicy)
-}
-
-// HbAction
-
-// -----------------------------------------------------------------------------
-// HbAction::HbAction
-// -----------------------------------------------------------------------------
-//
-HbAction::HbAction(QObject *parent) 
-: QAction(parent), mIcon(QString())
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbAction::HbAction
-// -----------------------------------------------------------------------------
-//
-HbAction::HbAction(const QString &text, QObject *parent) 
-: QAction(text,parent), mIcon(QString())
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbAction::~HbAction
-// -----------------------------------------------------------------------------
-//
-HbAction::~HbAction()
-{
-}
-
-
-// HbLabel
-
-// -----------------------------------------------------------------------------
-// HbLabel::HbLabel
-// -----------------------------------------------------------------------------
-//
-HbLabel::HbLabel(QGraphicsItem *parent) : HbWidget(parent)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbLabel::HbLabel
-// -----------------------------------------------------------------------------
-//
-HbLabel::HbLabel(const QString &displayText, QGraphicsItem *parent) 
-: HbWidget(parent)
-{
-    Q_UNUSED(displayText)
-}
-
-// -----------------------------------------------------------------------------
-// HbLabel::~HbLabel
-// -----------------------------------------------------------------------------
-//
-HbLabel::~HbLabel()
-{
-}
-
-
-// -----------------------------------------------------------------------------
-// HbProgressDialog
-
-// -----------------------------------------------------------------------------
-// HbProgressDialog::HbProgressDialog
-// -----------------------------------------------------------------------------
-//
-HbProgressDialog::HbProgressDialog(QGraphicsItem *parent) : HbDialog(parent)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbProgressDialog::itemChange
-// -----------------------------------------------------------------------------
-//
-QVariant HbProgressDialog::itemChange(GraphicsItemChange change, const QVariant& value)
-{
-    Q_UNUSED(change)
-    return QVariant(value);
-}
-
-
-// HbLineEdit
-
-// -----------------------------------------------------------------------------
-// HbLineEdit::HbLineEdit
-// -----------------------------------------------------------------------------
-//
-HbLineEdit::HbLineEdit(const QString &text, QGraphicsItem *parent) 
-: HbWidget(parent)
-{
-    Q_UNUSED(text)
-}
-
-// -----------------------------------------------------------------------------
-// HbLineEdit::~HbLineEdit
-// -----------------------------------------------------------------------------
-//
-HbLineEdit::~HbLineEdit()
-{
-}
-
-// HbWidget
-
-// -----------------------------------------------------------------------------
-// HbWidget::HbWidget
-// -----------------------------------------------------------------------------
-//
-HbWidget::HbWidget(QGraphicsItem *parent, Qt::WindowFlags wFlags)
-: QGraphicsWidget(parent,wFlags)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbWidget::~HbWidget
-// -----------------------------------------------------------------------------
-//
-HbWidget::~HbWidget()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbWidget::clearActions
-// -----------------------------------------------------------------------------
-//
-void HbWidget::clearActions()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbWidget::itemChange
-// -----------------------------------------------------------------------------
-//
-QVariant HbWidget::itemChange(GraphicsItemChange change, const QVariant& value)
-{
-    Q_UNUSED(change)
-    return QVariant(value);
-}
-
-
-// HbView
-
-// -----------------------------------------------------------------------------
-// HbView::HbView
-// -----------------------------------------------------------------------------
-//
-HbView::HbView(QGraphicsItem *parent) : HbWidget(parent)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbView::~HbView
-// -----------------------------------------------------------------------------
-//
-HbView::~HbView()
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbView::menu
-// -----------------------------------------------------------------------------
-//
-HbMenu* HbView::menu() const
-{
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// HbView::toolBar
-// -----------------------------------------------------------------------------
-//
-HbToolBar* HbView::toolBar() const
-{
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// HbView::setTitle
-// -----------------------------------------------------------------------------
-//
-void HbView::setTitle(const QString &title)
-{
-    Q_UNUSED(title)
-}
-
-// -----------------------------------------------------------------------------
-// HbView::setContentFullScreen
-// -----------------------------------------------------------------------------
-//
-void HbView::setContentFullScreen(bool /*enable*/)
-{
-}
-
-// -----------------------------------------------------------------------------
-// HbView::navigationAction
-// -----------------------------------------------------------------------------
-//
-HbAction *HbView::navigationAction() const
-{
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// HbView::setNavigationAction
-// -----------------------------------------------------------------------------
-//
-void HbView::setNavigationAction(HbAction *action)
-{
-    Q_UNUSED(action);
-}
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-QString hbTrId(const char *id, int n)
-{
-    Q_UNUSED(n);
-    return QString(id);
-}
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbview.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-#ifndef HBVIEW_H
-#define HBVIEW_H
-
-#include <hbwidget.h>
-#include <hbglobal.h>
-#include <hbnamespace.h>
-
-class HbMenu;
-class HbToolBar;
-class HbAction;
-
-class HbView : public HbWidget
-{
-public:
-    explicit HbView(QGraphicsItem *parent = 0);
-    virtual ~HbView();
-
-    HbMenu *menu() const;
-    HbToolBar *toolBar() const;
-    
-    void setContentFullScreen(bool enable = true);
-    HbAction *navigationAction() const;
-    void setNavigationAction(HbAction *action);
-
-public slots:
-    void setTitle(const QString &title);
-    
-private: // Data added for the unit testing stub
-	HbMenu* mMenu;
-	HbToolBar* mToolBar;
-    bool mTitlePaneItem;
-    bool mIndicatorItems;
-    bool mSecondarySoftKeyItem;
-};
-
-#endif // HBVIEW_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbwidget.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Orbit stubs for Live Comms UI unit tests
-*
-*/
-
-#ifndef HBWIDGET_H
-#define HBWIDGET_H
-
-#include <hbglobal.h>
-#include <hbstyle.h>
-#include <hbnamespace.h>
-#include <QGraphicsWidget>
-
-class HbEvent;
-
-
-class HbWidget : public QGraphicsWidget
-{
-public:
-    explicit HbWidget( QGraphicsItem *parent=0, Qt::WindowFlags wFlags=0 );
-    virtual ~HbWidget();
-    void clearActions();
-
-protected:
-    QVariant itemChange ( GraphicsItemChange change, const QVariant & value );
-};
-
-#endif // HBWIDGET_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/qthighway_stub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <qglobal.h>
-#include <xqserviceprovider.h>
-#include <xqservicerequest.h>
-#include <xqserviceutil.h>
-#include "qthighway_stub_helper.h"
-
-QString qtHighwayStubService;
-QString qtHighwayStubMessage;
-bool qtHighwayStubIsBg;
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void QtHighwayStubHelper::reset()
-{
-    qtHighwayStubService.clear();
-    qtHighwayStubMessage.clear();
-    qtHighwayStubIsBg = false;
-}
-
-QString QtHighwayStubHelper::service()
-{
-    return qtHighwayStubService;
-}
-
-QString QtHighwayStubHelper::message()
-{
-    return qtHighwayStubMessage;
-}
-
-bool QtHighwayStubHelper::isAtBg()
-{
-    return qtHighwayStubIsBg;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-XQServiceProvider::XQServiceProvider( const QString& service, QObject *parent )
-{
-    Q_UNUSED(service);
-    Q_UNUSED(parent);
-}
-
-XQServiceProvider::~XQServiceProvider()
-{
-    
-}
-
-void XQServiceProvider::SetPlugin(QObject* impl_plugin)
-{
-    Q_UNUSED(impl_plugin);
-}
-
-void XQServiceProvider::publishAll()
-{
-    
-}
-
-int XQServiceProvider::setCurrentRequestAsync()
-{
-    return 0;
-}
-    
-bool XQServiceProvider::completeRequest(int index, const QVariant& retValue)
-{
-    Q_UNUSED(index);
-    Q_UNUSED(retValue);
-    return true;
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-XQServiceRequest::XQServiceRequest(
-    const QString& service, const QString& message, const bool& synchronous)
-{
-    qtHighwayStubService = service;
-    qtHighwayStubMessage = message;
-}
-
-XQServiceRequest::~XQServiceRequest()
-{
-
-}
-
-
-void XQServiceRequest::setArguments(const QList<QVariant> &arguments)
-{
-    Q_UNUSED(arguments)
-}
-
-QString XQServiceRequest::service() const
-{
-    return qtHighwayStubService;
-}
-
-QString XQServiceRequest::message() const
-{
-    return qtHighwayStubMessage;
-}
-
-bool XQServiceRequest::send(QVariant& retValue) 
-{
-    Q_UNUSED(retValue);
-    return true;
-}
-void XQServiceRequest::addArg(const QVariant& v)
-{
-    Q_UNUSED(v);
-}
-
-void XQServiceUtil::toBackground(bool value)
-{
-    qtHighwayStubIsBg = value;
-}
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/qthighway_stub_helper.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-/**
-* Helper class to control logcli stub behavior
-*
-*/ 
-class QtHighwayStubHelper{
-    public:
-        static void reset();
-        static QString service();
-        static QString message();
-        static bool isAtBg();
-};
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/inc/ut_lcactivitymanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef UT_LCACTIVITYMANAGER_H
-#define UT_LCACTIVITYMANAGER_H
-
-#include <QObject>
-class LcActivityManager;
-
-
-class UT_LcActivityManager : public QObject                 
-{
-     Q_OBJECT
-    
-private slots:
-
-/*
- * In addition, there are four private slots that are not treated as testfunctions. 
- * They will be executed by the testing framework and can be used to initialize and clean up 
- * either the entire test or the current test function.
- * 
- * initTestCase() will be called before the first testfunction is executed.
- * cleanupTestCase() will be called after the last testfunction was executed.
- * init() will be called before each testfunction is executed.
- * cleanup() will be called after every testfunction.
-*/
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-private slots: //test methods
-     
-    void testConstructor();
-    void testInitInactivityTimeout();
-    void testEnableActivitySimulation();
-    void testIsActivitySimulationEnabled();
-    void testTimerEvent();
-    
-private:
- 
-    LcActivityManager* mActivityManager;
-};
-
-
-
-
-#endif //UT_LCACTIVITYMANAGER_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/inc/ut_lcuiengine.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef UT_LCUIENGINE_H
-#define UT_LCUIENGINE_H
-
-#include <QObject>
-class LcUiEngine;
-class HbProgressDialog;
-class HbDialog;
-class HbMainWindow;
-class LcSignalSink;
-
-
-class UT_LcUiEngine : public QObject                 
-{
-     Q_OBJECT
-    
-private slots:
-
-/*
- * In addition, there are four private slots that are not treated as testfunctions. 
- * They will be executed by the testing framework and can be used to initialize and clean up 
- * either the entire test or the current test function.
- * 
- * initTestCase() will be called before the first testfunction is executed.
- * cleanupTestCase() will be called after the last testfunction was executed.
- * init() will be called before each testfunction is executed.
- * cleanup() will be called after every testfunction.
-*/
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-private slots: //test methods
-     
-    void testConstructor();
-    void testFeatureSupported();
-    void testEstablishSession();
-    void testTerminateSession();
-    void testSetWindowRect();
-    void testEnableWindow();
-    void testPlay();
-    void testPause();
-    void testEnableSpeaker();
-    void testMuteMic();
-    void testStartLiveContent();
-    void testStart();
-    void testSetContentAreas();
-    void testSetOrientation();
-    void testToggleMute();
-    void testToggleSpeaker();
-    void testToggleDisableCamera();
-    void testToggleCamera();
-    void testSessionStateChanged();
-    void testPlayerStateChanged();
-    void testStartReceiving();
-    void testStartPlayback();
-    void testStop();
-    void testSetViewLayout();
-    void testHideNotes();
-    void testSetUiComponents();
-    void testZoom();
-    void testBlockUi();
-    void testCloseTimer();
-    void testfullScreenMode();
-    void testsetFullScreenMode();
-    void testTimerEvent();
-    void testFillRemoteInfo();
-    void testUpdateSession();
-    void testIsLocalPlayerPlaying();
-    void testIsRemotePlayerPlaying();
-    void testMinimized();
-    void testMaximized();    
-    void testIsMinimized();
-    void testHandleForegroundStatus();
-    void testSendDialTone();
-    void testShareVideoIsAllowedShownAutomatically(); 
-    void testShareVideoIsNotAllowedShown();
-    void testShareVideoPermissionAskedAlways();
-    void testVolumeLevelChanged();
-    
-private:
-    
-    LcUiEngine* mEngine;
-    HbProgressDialog* mInvitingNote;
-    HbProgressDialog* mWaitingNote;
-    HbDialog* mAcceptQuery;
-    HbDialog* mRecipientQuery;
-    HbDialog* mShareOwnVideoQuery;
-};
-
-
-
-
-#endif //UT_LCUIENGINE_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/data/10203399.rss	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "registryinfov2.rh"
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-    dll_uid = 0x10203399;
-    interfaces = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x20021340;
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = 0x10203399;
-                    version_no = 1;
-                    default_data = "MultimediaSharing";
-                    }            
-                };
-            }
-        };
-    }
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_MMPFILES
-lcenginepluginstub.mmp
-
-
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/group/lcenginepluginstub.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-
-#include <platform_paths.hrh>
-
-TARGET         lcenginepluginstub.dll
-TARGETTYPE     PLUGIN
-UID         0x10009d8d 0x10203399
-VENDORID       VID_DEFAULT
-CAPABILITY     CAP_ECOM_PLUGIN
-
-
-SOURCEPATH     ../data
-START RESOURCE 10203399.rss
-TARGET         lcenginepluginstub.rsc
-END
-  
-SOURCEPATH	../src
-SOURCE		dllentry.cpp
-SOURCE 		lcvideoplayerstub.cpp
-SOURCE		lcenginestub.cpp 
-SOURCE		lcsessionstub.cpp
-
-USERINCLUDE 	../inc
-USERINCLUDE     ../../../../../../mmsharing/inc
-USERINCLUDE     ../../../../../../inc
-
-
-
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE 	/epoc32/include/ecom
-
-LIBRARY		euser.lib
-LIBRARY		ecom.lib
-LIBRARY		insock.lib
-
-
-
-
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/centralrepository_stub_helper.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef __CENTRALREPOSITORYHELPER_H__
-#define __CENTRALREPOSITORYHELPER_H__
-
-class CentralRepositoryStubHelper{
-
-public: // Stub data
-    
-    static void reset();
-    static void setFailCode(TInt err);
-    static void setCurrentVal(TInt val);  
-    static TInt currentVal();  
-        
-};
-
-#endif // __CENTRALREPOSITORYHELPER_H__
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/lcenginestub.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef LCENGINESTUB_H
-#define LCENGINESTUB_H
-
-
-extern void lcutStub_LcEngine_reset();
-extern void lcutStub_LcEngine_setFailure( int failure );
-extern int lcutStub_LcEngine_failure();
-extern void lcutStub_LcEngine_setLcFeatureSupported( bool supported );
-
-// INCLUDES
-#include "lcengine.h"
-
-// FORWARD DECLARATIONS
-class CLcSession;
-class MLcUiProvider;
-
-class CLcEngineStub : public CLcEngine
-    {
-    public:
-    
-        static CLcEngineStub* NewL();
-        ~CLcEngineStub();
-    
-    public: // From CLcEngine
-    
-        MLcSession& Session();
-        
-        TBool IsFeatureSupported( TLcFeature aLcFeature );
-        
-    private: // Constructors
-
-        CLcEngineStub();
-        void ConstructL();
-       
-    private: // New functions
-        
-        CLcSession* CreateMusSessionL( int aUseCase );
-        
-    public: // Data
-        
-        CLcSession* iSession;
-    };
-#endif // LCENGINESTUB_H
-
-// end of file
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/lcsessionstub.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef LCSESSIONSTUB_H
-#define LCSESSIONSTUB_H
-
-#include <QString>
-#include <QMap>
-#include <e32std.h>
-
-class MLcUiProvider;
-
-extern bool lcutStub_LcSession_expectCall( const QString& call, int callNdx = 0);
-extern void lcutStub_LcSession_reset();
-extern MLcUiProvider* lcutStub_LcSession_lcUiProvider();
-
-const char lcutStub_LcSession_NoCall[] = "NOCALL";
-const char lcutStub_LcSession_establishSession[] = "LcEngine::EstablishLcSessionL";
-const char lcutStub_LcSession_terminateSession[] = "LcEngine::TerminateLcSessionL";
-const char lcutStub_LcSession_updateSession[] = "LcEngine::UpdateLcSessionL";
-
-_LIT( KLcStubLocalDisplayName, "local");
-_LIT( KLcStubRemoteDisplayName, "remote");
-_LIT( KLcStubRemoteDetails, "112233459");
-
-// INCLUDES
-#include "lcsession.h"
-
-#include <e32std.h>
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class MLcSessionObserver;
-class MLcUiProvider;
-class CLcVideoPlayer;
-
-
-// CLASS DECLARATION
-/**
-* A class representing a Live Comms session. 
-*/
-class CLcSession : public CBase,
-                   public MLcSession
-    {
-public:
-        /**
-        * Creates new CLcSession.
-        *
-        * @return CLcSession* New instanse of specified class
-        */
-        static CLcSession* NewL();  
-        
-
-public:
-
-        /**
-        * Destructor
-        */
-        ~CLcSession();
-
-public: // from MLcSession
-    
-        /**
-        * Returns the current session state.
-        * @return the session state
-        */
-        TLcSessionState LcSessionState() const;
-
-        /**
-        * Sets the observer for the session related events.
-        * @param aObserver the observer
-        */
-        void SetLcSessionObserver( MLcSessionObserver* aObserver );
-
-        /**
-        * Sets the callback for the UI prompts.
-        * @param aUiProvider callback for UI prompts
-        */
-        void SetLcUiProvider( MLcUiProvider* aUiProvider );        
-        
-        /**
-        * Establishes the session.
-        * In case of a MO session initiates the session negotiation.
-        * In case of a MT session accepts the incoming session. 
-        */
-        void EstablishLcSessionL();
-    
-        /**
-        * Terminates the session.
-        * Can be used for terminating an existing session as well as 
-        * cancelling a MO session that has not yet been established.
-        * Can also be used for rejecting an incoming session.  
-        */
-        void TerminateLcSessionL();
-       
-        /**
-        * Returns the video player for the received media.
-        * Is present if the session contains video 
-        * received from the remote participant.
-        * @return the remote video player or NULL if not present
-        */
-        MLcVideoPlayer* RemoteVideoPlayer();
-    
-        /**
-        * Returns the video player for the media that is being sent.
-        * Is present if the session contains outgoing video.
-        * @return the local video player or NULL if not present
-        */
-        MLcVideoPlayer* LocalVideoPlayer();
-       
-        /**
-        * Returns the own display name for the session.
-        * @return the local display name
-        */
-        const TDesC& LocalDisplayName();
-    
-        /**
-        * Returns the remote party's display name for the session.
-        * @return the remote display name
-        */
-        const TDesC& RemoteDisplayName();
-
-        /**
-        * Sets a parameter for the session.
-        * The parameters can be plug-in specific.
-        * @param aId the identifier for the parameter
-        * @param aValue the value for the parameter
-        */
-        TInt SetParameter( TInt aId, TInt aValue );
-
-        /**
-        * Returns a value for a session parameter.
-        * @param aId the identifier for the parameter
-        * @return the value for the parameter or an error if not present
-        */
-        TInt ParameterValue( TInt aId );        
-        
-        /**
-        * Checks whether application should be started in background mode. 
-        * In background mode session will be pre-set up without user   
-        * interaction and will be in paused state.
-        * @return ETrue if background mode should be used
-        */
-        TBool IsBackgroundStartup();
-        
-        /**
-       * Engine can be informed about application foreground status via
-       * this method.
-       * @param aIsForeground ETrue if application is at foreground, EFalse
-       *   if at background
-       * @return KErrNone if succesfully handled
-       */
-       TInt SetForegroundStatus( TBool aIsForeground );
-       
-       /**
-       * Returns remote party details for the session
-       * @return remote party details or KNullDesC if those are not known
-       */
-       const TDesC& RemoteDetails();
-        
-       /**
-       * Updates established session. 
-       * All the changes, if they are not yet delivered, to players, windows 
-       * and session parameters has been commited after the call.
-       */
-       void UpdateLcSessionL();
-       
-       /**
-       * Send DTMF signals. 
-       * @param aKey Key pressed from dialpad. Key can be  [0-9],*,#,A,B,C,D.
-       * which is 16 key combination of DTMF.
-       * Send DTMF signals to remote party.
-       * @return ETrue upon success else EFalse.
-       */
-       TBool SendDialTone( TChar aKey);
-
-       
-protected:
-
-        /**
-        * Constructor
-        */
-        CLcSession( );
-        
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-public:
-        
-        MLcSessionObserver* iSessionObserver;
-        MLcUiProvider* iLcUiProvider;
-        HBufC* iLocalDisplayName; 
-        HBufC* iRemoteDisplayName;
-        HBufC* iRemoteDetails;
-        CLcVideoPlayer* iLocalPlayer;
-        CLcVideoPlayer* iRemotePlayer;
-        TBool iIsForeground;
-        TBool iForegroundChange;
-        TLcSessionState iState;
-        
-        QMap<int, int> mParams;
-        
-    };
- 
-#endif // LCSESSIONSTUB_H
-
-// end of file
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/lcvideoplayerstub.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef LCVIDEOPLAYERSTUB_H
-#define LCVIDEOPLAYERSTUB_H
-
-#include <e32base.h>    // CBase
-
-// USER
-#include "lcvideoplayer.h"
-#include "lcaudiocontrol.h"
-#include "lcwindow.h"
-#include "lccameracontrol.h"
-#include "lczoomcontrol.h"
-#include "lcbrightnesscontrol.h"
-
-class   MLcSourceFileControl; 
-class   MLcDestinationFileControl; 
-
-
-#include <QString>
-
-extern bool lcutStub_LcPlayer_expectCall( const QString& call, int callNdx = 0);
-extern void lcutStub_LcPlayer_reset();
-extern void lcutStub_LcPlayer_asyncCompletion( bool async );
-
-const char lcutStub_LcPlayer_NoCall[] = "NOCALL";
-const char lcutStub_LcPlayer_LcPlayL[] = "LcPlayer::LcPlayL";
-const char lcutStub_LcPlayer_LcPauseL[] = "LcPlayer::LcPauseL";
-const char lcutStub_LcPlayer_SetLcWindowRectL[] = "LcWindow::SetLcWindowRectL";
-const char lcutStub_LcPlayer_EnableLcWindowL[] = "LcPlayer::EnableLcWindowL";
-const char lcutStub_LcPlayer_DecreaseLcBrightnessL[] = "LcPlayer::DecreaseLcBrightnessL";
-const char lcutStub_LcPlayer_EnableLcLoudspeakerL[] = "LcPlayer::EnableLcLoudspeakerL";
-const char lcutStub_LcPlayer_LcZoomInL[] = "LcPlayer::LcZoomInL";
-const char lcutStub_LcPlayer_LcZoomOutL[] = "LcPlayer::LcZoomOutL";
-const char lcutStub_LcPlayer_MuteLcAudioL[] = "LcPlayer::MuteLcAudioL";
-const char lcutStub_LcPlayer_MuteLcMicL[] = "LcPlayer::MuteLcMicL";
-const char lcutStub_LcPlayer_SetLcBrightnessL[] = "LcPlayer::SetLcBrightnessL";
-const char lcutStub_LcPlayer_IncreaseLcBrightnessL[] = "LcPlayer::IncreaseLcBrightnessL";
-const char lcutStub_LcPlayer_SetLcZoomValueL[] = "LcPlayer::SetLcZoomValueL";
-const char lcutStub_LcPlayer_ToggleLcCameraL[] = "LcPlayer::ToggleLcCameraL";
-const char lcutStub_LcPlayer_SetLcWindowOrientationL[] = "LcWindow::SetLcWindowOrientationL";
-
-
-// CLASS DECLARATION
-/**
-*  
-*/
-class CLcVideoPlayer :  public CBase,
-                        public MLcVideoPlayer,
-                        public MLcAudioControl,
-                        public MLcWindow,
-                        public MLcCameraControl,
-                        public MLcZoomControl,
-                        public MLcBrightnessControl
-    {
-    public:
-        /**
-        * Creates new CLcSession.
-        *
-        * @return CLcSession* New instanse of specified class
-        */
-        static CLcVideoPlayer* NewL();  
-    
-    public: 
-    
-        /**
-        * Destructor
-        */
-        ~CLcVideoPlayer();
-
-
-    public: // from MLcVideoPlayer
-            
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        TBool LcIsPlayingL();
-        
-        void LcPlayL(TLcVideoPlayerSource aSource=ECameraSource );
-        
-        void LcPauseL();
-    
-        MLcWindow* LcWindow();
-
-        MLcCameraControl* LcCameraControl();
-        
-        MLcSourceFileControl* LcSourceFileControl();
-            
-        MLcDestinationFileControl* LcDestinationFileControl();
-        
-        MLcAudioControl* LcAudioControl();
-    
-        MLcZoomControl* LcZoomControl();
-    
-        MLcBrightnessControl* LcBrightnessControl();
-        
-public: // from MLcWindow
-        
-        void EnableLcWindowL( TBool aEnable );
-        
-        TBool IsLcWindowEnabled();
-        
-        void SetLcWindowRectL( TRect aRect );
-        
-        TRect LcWindowRect();
-        
-        void SetLcWindowOrientationL( 
-            TLcWindowOrientation aOrientation );
-        
-        TLcWindowOrientation LcWindowOrientationL(); 
-        
-public: // from MLcAudioControl
-        
-        TBool IsLcAudioMutedL();
-
-        void MuteLcAudioL( TBool aMute );       
-
-        TBool IsLcMicMutedL();    
-
-        void MuteLcMicL( TBool aMute );
-        
-        TBool IsLcLoudspeakerEnabled();
-
-        void EnableLcLoudspeakerL( TBool aEnabled );
-        
-        TBool IsEnablingLcLoudspeakerAllowed();
-        
-        TInt LcVolumeL();
-     
-        void SetLcVolumeL( TInt aValue );    
-    
-        void IncreaseLcVolumeL();
-        
-        void DecreaseLcVolumeL();  
-            
-        
-public: //from MLcCameraControl
-    
-    TInt LcCameraCountL();
-    TInt CurrentLcCameraIndex();
-    void ToggleLcCameraL();
-    
-public: //from MLcZoomControl
-    
-    TInt MinLcZoomL();
-    TInt MaxLcZoomL();
-    TInt LcZoomValueL();
-    void SetLcZoomValueL( TInt aValue );
-    void LcZoomInL();
-    void LcZoomOutL();
-    
-public: //from MLcBrightnessControl
-        
-    TInt MinLcBrightnessL();
-    TInt MaxLcBrightnessL();
-    TInt LcBrightnessL();
-    void SetLcBrightnessL( TInt aValue );
-    void IncreaseLcBrightnessL();
-    void DecreaseLcBrightnessL();
-    
-    protected: // CONSTRUCTORS
-
-        /**
-        * Constructor
-        *
-        */
-        CLcVideoPlayer( );
-
-        /**
-        * Second-phase constructor
-        *
-        */
-        void ConstructL();
-        
-
-    public:
-
-        /**
-        * Drawing area rect.
-        */
-        TRect iRect;
-        
-        MLcWindow::TLcWindowOrientation iOrientation;
-        
-        TBool iWindowEnabled;
-        
-        TBool iMuted;
-        
-        TBool iMicMuted;
-        
-        TBool iLoudspeakerEnabled;
-        
-        TBool iEnablingLoudspeakerAllowed;
-        
-        TInt iVolume;
-        
-        MLcVideoPlayer::TLcVideoPlayerState iState;
-        TBool iPlaying;
-
-        
-    };
-    
-#endif //LCVIDEOPLAYERSTUB_H
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/DllEntry.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "lcenginestub.h"
-#include <ECom.h>
-#include <ImplementationProxy.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TImplementationProxy KMusEnginePluginImplementationTableStub[] =
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x20021340, CLcEngineStub::NewL )
-    };
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
-    {
-    aTableCount = sizeof( KMusEnginePluginImplementationTableStub ) /
-                  sizeof( TImplementationProxy );
-
-    return KMusEnginePluginImplementationTableStub;
-    }
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/centralrepository_stub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#include <centralrepository.h>
-#include "centralrepository_stub_helper.h"
-
-TInt mFailCode = KErrNone;
-TInt mCurrentVal = 0;
-
-void CentralRepositoryStubHelper::reset()
-{
-    mFailCode = KErrNone;
-    mCurrentVal = 0;
-}
-void CentralRepositoryStubHelper::setFailCode(TInt err)
-{
-    mFailCode = err;
-}
-void CentralRepositoryStubHelper::setCurrentVal(TInt val)
-{
-    mCurrentVal = val;
-} 
-TInt CentralRepositoryStubHelper::currentVal()
-{
-    return mCurrentVal;
-}  
-    
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CRepository* CRepository::NewL( TUid aRepositoryUid )
-    {
-    CRepository* self = CRepository::NewLC( aRepositoryUid );
-    CleanupStack::Pop( self );
-    return self;
-    }
-    
-    
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-// 
-CRepository* CRepository::NewLC( TUid /*aRepositoryUid*/ )
-    {
-    CRepository* self = new (ELeave) CRepository();
-    if (mFailCode == KErrNoMemory) {
-        User::Leave(KErrNoMemory);
-    }
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRepository::~CRepository()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt CRepository::Get(TUint32 /*aKey*/, TInt& aValue)
-    {
-    aValue = mCurrentVal;
-    return mFailCode;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt CRepository::Set(TUint32 /*aKey*/, TInt aValue)
-    {
-    if ( mFailCode == KErrNone )
-        {
-        mCurrentVal = aValue;
-        }
-    return mFailCode;
-    }
-
-
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/lcenginestub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#include "lcenginestub.h"
-#include "lcsessionstub.h"
-#include "mussessionproperties.h"
-#include "lcsessionobserver.h"
-#include "lcuiprovider.h"
-#include "lcvideoplayerstub.h"
-#include "musmanagercommon.h"
-
-static int lcutStub_LcEngine_failureValue = 0;
-static bool lcutStub_LcEngine_lcFeatureSupported = false;
-
-
-TAny* REComSession::CreateImplementationL( TUid /*aInterfaceUid*/, 
-                                           TInt32 /*aKeyOffset*/, 
-                                           const TEComResolverParams& /*aResolutionParameters*/ )
-{
-    User::LeaveIfError( lcutStub_LcEngine_failureValue );
-    return CLcEngineStub::NewL();
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcEngineStub* CLcEngineStub::NewL()
-    {
-    
-    CLcEngineStub* self = new( ELeave )CLcEngineStub();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-        
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-CLcEngineStub::~CLcEngineStub()
-    {
-    delete iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcEngineStub::CLcEngineStub( )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CLcEngineStub::ConstructL()
-    { 
-    iSession = CLcSession::NewL(); 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MLcSession& CLcEngineStub::Session()
-    {
-    return *iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CLcEngineStub::IsFeatureSupported( TLcFeature aLcFeature )
-    {
-    return lcutStub_LcEngine_lcFeatureSupported;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcSession* CLcEngineStub::CreateMusSessionL( int aUseCase )
-    {
-    CLcSession* session; 
-    switch ( aUseCase ) 
-        {
-        case MultimediaSharing::EMusReceive:
-            {
-            session = CLcSession::NewL(); 
-            session->iRemotePlayer = CLcVideoPlayer::NewL(); 
-            break;
-            }
-            
-        case MultimediaSharing::EMusLiveVideo:
-            {
-            session = CLcSession::NewL();
-            session->iLocalPlayer = CLcVideoPlayer::NewL(); 
-            break;
-            }
-        case MultimediaSharing::EMusTwoWayVideo:
-        case MultimediaSharing::EMusReceiveTwoWayVideo:
-            {
-            session = CLcSession::NewL();
-            session->iLocalPlayer = CLcVideoPlayer::NewL(); 
-            session->iRemotePlayer = CLcVideoPlayer::NewL(); 
-            break;
-            }
-            
-        default:
-            User::Leave( KErrNotSupported );
-            break;
-        }
-    return session;
-    }
-
-
-//stub control
-
-    
-void lcutStub_LcEngine_reset()
-    {
-    lcutStub_LcEngine_failureValue = 0;
-    lcutStub_LcEngine_lcFeatureSupported = false;
-    }
-
-void lcutStub_LcEngine_setFailure( int failure )
-    {
-    lcutStub_LcEngine_failureValue = failure;
-    }
-
-int lcutStub_LcEngine_failure()
-    {
-    return lcutStub_LcEngine_failureValue;
-    }
-
-void lcutStub_LcEngine_setLcFeatureSupported( bool supported )
-    {
-    lcutStub_LcEngine_lcFeatureSupported = supported;
-    }
-
-// End of File
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/lcsessionstub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,260 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "lcenginestub.h"
-#include "lcsessionstub.h"
-#include "lcvideoplayer.h"
-#include "lcsessionobserver.h"
-#include "lcuiprovider.h"
-#include "lcvideoplayerstub.h"
-
-// SYSTEM
-#include <QStringList>
-
-
-static QStringList lcutStub_LcSession_calledMethods;
-static MLcUiProvider* lcutStub_LcSession_uiProvider = 0;
- 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcSession* CLcSession::NewL( )
-    {
-    CLcSession* self = new( ELeave ) CLcSession(  );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcSession::~CLcSession()
-    {
-    //delete iRemoteDisplayName;
-    delete iRemotePlayer;
-    delete iLocalPlayer;
-    delete iLocalDisplayName;
-    delete iRemoteDisplayName;
-    delete iRemoteDetails;
-    }     
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
- 
- MLcSession::TLcSessionState  CLcSession::LcSessionState() const
-    {
-    return iState;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CLcSession::SetLcSessionObserver( MLcSessionObserver* aObserver )
-    {
-    iSessionObserver = aObserver;
-    }
-             
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CLcSession::SetLcUiProvider( MLcUiProvider* aUiProvider )
-    {
-    iLcUiProvider = aUiProvider;
-    lcutStub_LcSession_uiProvider = aUiProvider;
-    }       
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CLcSession::EstablishLcSessionL( )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcSession_calledMethods.insert(0,lcutStub_LcSession_establishSession );
-    }    
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CLcSession::TerminateLcSessionL( )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcSession_calledMethods.insert(0,lcutStub_LcSession_terminateSession );
-    }       
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CLcSession::UpdateLcSessionL( )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcSession_calledMethods.insert(0,lcutStub_LcSession_updateSession );
-    }       
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-
-TBool CLcSession::SendDialTone( TChar /*aKey*/)
-    {
-    return ETrue;
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CLcSession::RemoteVideoPlayer( )
-    {
-    return iRemotePlayer;
-    }     
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CLcSession::LocalVideoPlayer( )
-    {
-    return iLocalPlayer;           
-    }       
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CLcSession::LocalDisplayName( )
-    {
-    return *iLocalDisplayName;
-    }    
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CLcSession::RemoteDisplayName( )
-    {
-    return *iRemoteDisplayName;
-    } 
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
- TInt CLcSession::SetParameter( TInt aId, TInt aValue )
-    {
-    mParams.insert( aId, aValue );
-    return 0;
-    } 
-       
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TInt CLcSession::ParameterValue( TInt /*aId*/ )
-    {
-    return 0;
-    }        
-
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
- TBool CLcSession::IsBackgroundStartup()
-    {
-    return iIsForeground;
-    }
-
- // -----------------------------------------------------------------------------
- // From MLcSession
- // -----------------------------------------------------------------------------
- // 
-TInt CLcSession::SetForegroundStatus( TBool aIsForeground )
-    {
-    iIsForeground = aIsForeground;
-    return iForegroundChange;
-    }
-
- // -----------------------------------------------------------------------------
- // From MLcSession
- // -----------------------------------------------------------------------------
- //     
-const TDesC& CLcSession::RemoteDetails()
-    {
-    return *iRemoteDetails;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcSession::CLcSession( )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CLcSession::ConstructL()
-    {
-    iLocalDisplayName = KLcStubLocalDisplayName().AllocL();
-    iRemoteDisplayName = KLcStubRemoteDisplayName().AllocL();
-    iLocalPlayer = CLcVideoPlayer::NewL();
-    iRemotePlayer = CLcVideoPlayer::NewL();
-    iRemoteDetails = KLcStubRemoteDetails().AllocL();
-    }
-
-
-//stub control
-
-bool lcutStub_LcSession_expectCall( const QString& call, int callNdx )
-{
-    if ( callNdx >= lcutStub_LcSession_calledMethods.count() ) {
-        return call == lcutStub_LcSession_NoCall;
-    }
-
-    return lcutStub_LcSession_calledMethods.count() > 0 ?
-           lcutStub_LcSession_calledMethods[callNdx] == call :
-           call == lcutStub_LcSession_NoCall;
-}
-
-    
-void lcutStub_LcSession_reset()
-{
-    lcutStub_LcSession_calledMethods.clear();
-}
-
-MLcUiProvider* lcutStub_LcSession_lcUiProvider()
-{
-    return lcutStub_LcSession_uiProvider;
-}
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/lcvideoplayerstub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,485 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "lcenginestub.h"
-#include "lcvideoplayerstub.h"
-#include "lcvideoplayer.h"
-#include "lcaudiocontrol.h"
-#include "lccameracontrol.h"
-#include "lczoomcontrol.h"
-#include "lcbrightnesscontrol.h"
-#include "lcsessionstub.h"
-#include "lcuiprovider.h"
-
-#include <QStringList>
-
-static QStringList lcutStub_LcPlayer_calledMethods;
-static bool lcutStub_LcPlayer_asyncCompletionEnabled = false;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcVideoPlayer* CLcVideoPlayer::NewL()
-    {
-    CLcVideoPlayer* self = new( ELeave )CLcVideoPlayer();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    } 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcVideoPlayer::CLcVideoPlayer()
-    : iRect( TRect(10,10,50,100))
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::ConstructL()
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcVideoPlayer::~CLcVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState CLcVideoPlayer::LcVideoPlayerState() const
-    {
-    return iState;
-    }
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CLcVideoPlayer::LcIsPlayingL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return iPlaying;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::LcPlayL(TLcVideoPlayerSource /*aSource*/)
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    iPlaying = ETrue;
-    iState = MLcVideoPlayer::EPlaying;
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_LcPlayL );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::LcPauseL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    iPlaying = EFalse;
-    iState = MLcVideoPlayer::EPaused;
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_LcPauseL );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcWindow* CLcVideoPlayer::LcWindow()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-// 
-MLcCameraControl* CLcVideoPlayer::LcCameraControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcSourceFileControl* CLcVideoPlayer::LcSourceFileControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcDestinationFileControl* CLcVideoPlayer::LcDestinationFileControl()
-    {
-    return NULL;
-    }
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcAudioControl* CLcVideoPlayer::LcAudioControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CLcVideoPlayer::LcZoomControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CLcVideoPlayer::LcBrightnessControl()
-    {
-    return this;
-    }
-
-//-----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::EnableLcWindowL( TBool aEnable )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    iWindowEnabled = aEnable;
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_EnableLcWindowL );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TBool CLcVideoPlayer::IsLcWindowEnabled()
-    {
-    return iWindowEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::SetLcWindowRectL( TRect aRect )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    iRect = aRect;
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_SetLcWindowRectL );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TRect CLcVideoPlayer::LcWindowRect()
-    {
-    return iRect;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::SetLcWindowOrientationL( 
-    TLcWindowOrientation aOrientation )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    iOrientation = aOrientation;
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_SetLcWindowOrientationL );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-MLcWindow::TLcWindowOrientation CLcVideoPlayer::LcWindowOrientationL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    MLcWindow::TLcWindowOrientation orientation;
-    if ( iOrientation == ELandscape )
-        {
-        orientation = MLcWindow::ELandscape;
-        }
-    else
-        {
-        orientation = MLcWindow::EPortrait;
-        }
-    return orientation;
-    }
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CLcVideoPlayer::IsLcAudioMutedL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return iMuted;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::MuteLcAudioL( TBool aMute )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_MuteLcAudioL );
-    iMuted = aMute;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CLcVideoPlayer::IsEnablingLcLoudspeakerAllowed()
-    {
-    return iEnablingLoudspeakerAllowed;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CLcVideoPlayer::IsLcMicMutedL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return iMicMuted;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::MuteLcMicL( TBool aMute )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_MuteLcMicL );
-    iMicMuted = aMute;
-    
-    if ( lcutStub_LcPlayer_asyncCompletionEnabled && 
-         lcutStub_LcSession_lcUiProvider() )
-        {
-        lcutStub_LcSession_lcUiProvider()->BlockUi( ETrue );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CLcVideoPlayer::IsLcLoudspeakerEnabled()
-    {
-    return iLoudspeakerEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::EnableLcLoudspeakerL( TBool aEnabled )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_EnableLcLoudspeakerL );
-    iLoudspeakerEnabled = aEnabled;
-    
-    if ( lcutStub_LcPlayer_asyncCompletionEnabled && 
-         lcutStub_LcSession_lcUiProvider() )
-        {
-        lcutStub_LcSession_lcUiProvider()->BlockUi( ETrue );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TInt CLcVideoPlayer::LcVolumeL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return iVolume;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::SetLcVolumeL( TInt aValue )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    iVolume = aValue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::IncreaseLcVolumeL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    iVolume++;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CLcVideoPlayer::DecreaseLcVolumeL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    iVolume--;
-    }
-
-TInt CLcVideoPlayer::LcCameraCountL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return 2;
-    }
-
-TInt CLcVideoPlayer::CurrentLcCameraIndex()
-    {
-    return 0;
-    }
-
-void CLcVideoPlayer::ToggleLcCameraL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_ToggleLcCameraL );
-    }
-
-TInt CLcVideoPlayer::MinLcZoomL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return 0;
-    }
-
-TInt CLcVideoPlayer::MaxLcZoomL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return 10;
-    }
-
-TInt CLcVideoPlayer::LcZoomValueL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return 0;
-    }
-
-void CLcVideoPlayer::SetLcZoomValueL( TInt /*aValue*/ )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_SetLcZoomValueL );
-    }
-
-void CLcVideoPlayer::LcZoomInL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_LcZoomInL );
-    }
-
-void CLcVideoPlayer::LcZoomOutL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_LcZoomOutL );
-    }
-
-TInt CLcVideoPlayer::MinLcBrightnessL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return 0;
-    }
-
-TInt CLcVideoPlayer::MaxLcBrightnessL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return 20; 
-    }
-
-TInt CLcVideoPlayer::LcBrightnessL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    return 10; 
-    }
-
-void CLcVideoPlayer::SetLcBrightnessL( TInt /*aValue*/ )
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_SetLcBrightnessL );
-    }
-
-void CLcVideoPlayer::IncreaseLcBrightnessL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_IncreaseLcBrightnessL );
-    }
-
-void CLcVideoPlayer::DecreaseLcBrightnessL()
-    {
-    User::LeaveIfError( lcutStub_LcEngine_failure() );
-    lcutStub_LcPlayer_calledMethods.insert(0,lcutStub_LcPlayer_DecreaseLcBrightnessL );
-    }
-
-
-//stub control
-
-bool lcutStub_LcPlayer_expectCall( const QString& call, int callNdx )
-{
-    if ( callNdx >= lcutStub_LcPlayer_calledMethods.count() ) {
-        return call == lcutStub_LcPlayer_NoCall;
-    }
-    return lcutStub_LcPlayer_calledMethods.count() > 0 ?
-           lcutStub_LcPlayer_calledMethods[callNdx] == call :
-           call == lcutStub_LcPlayer_NoCall;
-}
-
-    
-void lcutStub_LcPlayer_reset()
-{
-    lcutStub_LcPlayer_calledMethods.clear();
-    lcutStub_LcPlayer_asyncCompletion( false );
-}
-
-void lcutStub_LcPlayer_asyncCompletion( bool async )
-{
-    lcutStub_LcPlayer_asyncCompletionEnabled = async;
-}
-
-// End of File
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/runtest.cmd	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-#call qmake
-#call bldmake bldfiles
-#call abld build winscw udeb
-call \epoc32\release\winscw\udeb\ut_lcuieng.exe -xml -o c:\ut_lcuieng.xml
-call copy R:\epoc32\winscw\c\ut_lcuieng.xml .
-call type ut_lcuieng.xml
\ No newline at end of file
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/src/main.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include <QtTest/QtTest>
-
-#include "ut_lcuiengine.h"
-#include "testresultxmlparser.h"
-
-#if defined(Q_OS_SYMBIAN)
-#include "ut_lcactivitymanager.h"
-#endif
-
-int main(int argc, char *argv[]) 
-{
-    bool promptOnExit(true);
-    for (int i=0; i<argc; i++) {
-        if (QString(argv[i]) == "-noprompt")
-            promptOnExit = false;
-    }
-    printf("Running tests...\n");
-    
-    QApplication app(argc, argv);
-    TestResultXmlParser parser;
-    
-    UT_LcUiEngine ut_lcUiEngine;
-    QString resultFileName = "c:/ut_lcui_lcUiEngine.xml";
-    QStringList args_lcUiEngine( "ut_lcuiengine");
-    args_lcUiEngine << "-xml" << "-o" << resultFileName;
-    QTest::qExec(&ut_lcUiEngine, args_lcUiEngine);
-    parser.parseAndPrintResults(resultFileName,true); 
-
-#if defined(Q_OS_SYMBIAN)
-    UT_LcActivityManager ut_lcActivityManager;
-    resultFileName = "c:/ut_lcui_lcActivityManager.xml";
-    QStringList args_lcActivityManager( "ut_lcuiengine");
-    args_lcActivityManager << "-xml" << "-o" << resultFileName;
-    QTest::qExec(&ut_lcActivityManager, args_lcActivityManager);
-    parser.parseAndPrintResults(resultFileName,true); 
-#endif
-    
-    if (promptOnExit) {
-        printf("Press any key...\n");
-        getchar(); 
-    }
-    return 0;   
-}
-
-
-
- 
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/src/ut_lcactivitymanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "ut_lcactivitymanager.h"
-#include "lcactivitymanager.h"
-#include "centralrepository_stub_helper.h"
-#include <QtTest/QtTest>
-
-const int utDisplayTimeout = 10;
-
-//////////////////////////////////////////////////////////////////////////////
-// Stub of User::InactivityTime() and User::ResetInactivityTime()
-TTimeIntervalSeconds utInactivityInterval = 0;
-
-TTimeIntervalSeconds User::InactivityTime() 
-{
-    return utInactivityInterval;
-}
-    
-void User::ResetInactivityTime()
-{
-    utInactivityInterval = 0;
-}
-//////////////////////////////////////////////////////////////////////////////
-
-    
-    
-void UT_LcActivityManager::initTestCase()
-{
-}
-
-void UT_LcActivityManager::cleanupTestCase()
-{
-}
-
-
-void UT_LcActivityManager::init()
-{
-    CentralRepositoryStubHelper::reset();
-    CentralRepositoryStubHelper::setCurrentVal(utDisplayTimeout);
-    mActivityManager = new LcActivityManager;   
-}
-
-void UT_LcActivityManager::cleanup()
-{
-    delete mActivityManager;
-}
-
-void UT_LcActivityManager::testConstructor()
-{
-    // Inactivity timeout initialized with value from cenrep
-    QVERIFY( mActivityManager );
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    QVERIFY( mActivityManager->mInactivityTimeout == utDisplayTimeout - 2 );
-    
-    // Fetching value from cenrep failed, timeout initialized with default value
-    delete mActivityManager;
-    mActivityManager = 0;
-    CentralRepositoryStubHelper::setFailCode(-1);
-    mActivityManager = new LcActivityManager;
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    QVERIFY( mActivityManager->mInactivityTimeout == 5 ); //see lcDefaultInactivityTimeout
-    QVERIFY( mActivityManager->mInactivityTimeout != utDisplayTimeout - 2 );
-}
-
-void UT_LcActivityManager::testInitInactivityTimeout()
-{
-    // Creation of cenrep failed, timeout value not changed
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    QVERIFY( mActivityManager->mInactivityTimeout == utDisplayTimeout - 2 );
-    CentralRepositoryStubHelper::setFailCode(KErrNoMemory);
-    CentralRepositoryStubHelper::setCurrentVal(2);
-    QVERIFY( mActivityManager->initInactivityTimeout() == KErrNoMemory );
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    QVERIFY( mActivityManager->mInactivityTimeout 
-             != CentralRepositoryStubHelper::currentVal() - 2 );
-    QVERIFY( mActivityManager->mInactivityTimeout == utDisplayTimeout - 2 );
-    
-    // Fetching value from cenrep failed
-    CentralRepositoryStubHelper::setFailCode(KErrNotFound);
-    CentralRepositoryStubHelper::setCurrentVal(3);
-    QVERIFY( mActivityManager->initInactivityTimeout() == KErrNotFound );
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    QVERIFY( mActivityManager->mInactivityTimeout 
-             == CentralRepositoryStubHelper::currentVal() - 2 );
-    
-    // Timeout initialized with cenrep value
-    CentralRepositoryStubHelper::reset();
-    CentralRepositoryStubHelper::setCurrentVal(2);
-    QVERIFY( mActivityManager->initInactivityTimeout() == KErrNone );
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    QVERIFY( mActivityManager->mInactivityTimeout 
-             == CentralRepositoryStubHelper::currentVal() );
-}
-
-void UT_LcActivityManager::testEnableActivitySimulation()
-{
-    // Starting activity simulation for the 1st time
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    mActivityManager->mInactivityTimeout = 5;
-    utInactivityInterval = 1;
-    QVERIFY( User::InactivityTime().Int() == 1 );
-    mActivityManager->enableActivitySimulation(true);
-    QVERIFY( mActivityManager->mTimerId > 0 );
-    QVERIFY( User::InactivityTime().Int() == 1 );
-    
-    // Starting activity simulation again, user inactivity reached threshold
-    utInactivityInterval = mActivityManager->mInactivityTimeout = 5;
-    QVERIFY( User::InactivityTime().Int() == 5 );
-    mActivityManager->enableActivitySimulation(true);
-    QVERIFY( mActivityManager->mTimerId > 0 );
-    QVERIFY( User::InactivityTime().Int() == 0 );
-
-    // Disabling ongoing activity simulation
-    QVERIFY( mActivityManager->mTimerId > 0 );
-    mActivityManager->enableActivitySimulation(false);
-    QVERIFY( mActivityManager->mTimerId == -1 );
-
-    // Disabling when no activity simulation running
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    mActivityManager->enableActivitySimulation(false);
-    QVERIFY( mActivityManager->mTimerId == -1 );    
-}
-
-void UT_LcActivityManager::testIsActivitySimulationEnabled()
-{
-    QVERIFY( mActivityManager->mTimerId == -1 );
-    QVERIFY( !mActivityManager->isActivitySimulationEnabled() );
-    
-    mActivityManager->mTimerId = 1;
-    QVERIFY( mActivityManager->isActivitySimulationEnabled() );
-}
-
-void UT_LcActivityManager::testTimerEvent()
-{
-    // Time event for some other timer, nothing to do
-    mActivityManager->mTimerId = 10;
-    QTimerEvent dummyTimerEvent(5);
-    mActivityManager->timerEvent(&dummyTimerEvent);
-    QVERIFY( mActivityManager->mTimerId == 10 );
-    
-    // Time event for inactivity timer, timer is restarted
-    QTimerEvent inactivityTimerEvent(mActivityManager->mTimerId);
-    mActivityManager->timerEvent(&inactivityTimerEvent);
-    QVERIFY( mActivityManager->mTimerId != 10 );
-}
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/src/ut_lcuiengine.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1276 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "ut_lcuiengine.h"
-#include "lcuiengine.h"
-#include "lcuiengine_p.h"
-#include "lcactivitymanager.h"
-
-#include "lcenginestub.h"
-#include "lcsessionstub.h"
-#include "lcvideoplayerstub.h"
-#include "lcuidefs.h"
-#include "qthighway_stub_helper.h"
-
-#include <QtTest/QtTest>
-#include <QMap>
-
-#include <hbmainwindow.h>
-#include <hbdialog.h>
-#include <hbprogressdialog.h>
-#include <hbmessagebox.h>
-#include <hbaction.h>
-#include <hblabel.h>
-#include <QSignalSpy>
-#include <hbview.h>
-
-#include <xqsettingsmanager.h>
-#include <xqsettingskey.h>
-#include <settingsinternalcrkeys.h>
-#include <telincallvolcntrlcrkeys.h>
-
-const char lcutMultimediaSharingEng[] = "MultimediaSharing";
-const char lcutVideotelephonyEng[] = "Videotelephony";
-
-const char lcutMultimediaSharingApp[] = "Multimedia Sharing";
-const char lcutVideotelephonyApp[] = "Videotelephony";
-
-#define LC_ENGINE( uiengine )\
-    (static_cast<CLcEngineStub*>( uiengine->d->mLiveCommsEngine ) )
-
-#define LC_SESSION( uiengine )\
-    (LC_ENGINE(uiengine)->iSession)
-
-void UT_LcUiEngine::initTestCase()
-{
-    lcutStub_LcEngine_reset();
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-
-}
-
-void UT_LcUiEngine::cleanupTestCase()
-{
-    lcutStub_LcEngine_reset();
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-}
-
-
-void UT_LcUiEngine::init()
-{
-    lcutStub_LcEngine_reset();
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    mEngine = new LcUiEngine( lcutMultimediaSharingEng,
-                              lcutMultimediaSharingApp );
-    mInvitingNote = new HbProgressDialog();
-    mWaitingNote = new HbProgressDialog();
-    mAcceptQuery = new HbDialog();
-    mRecipientQuery = new HbDialog();
-    mShareOwnVideoQuery = new HbDialog();
-    
-}
-
-void UT_LcUiEngine::cleanup()
-{
-    lcutStub_LcEngine_reset();
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    delete mEngine;
-    delete mInvitingNote;
-    delete mWaitingNote;
-    delete mAcceptQuery;
-    delete mRecipientQuery;
-    delete mShareOwnVideoQuery;
-}
-
-void UT_LcUiEngine::testConstructor()
-{
-    // "MuS plug-in" loaded
-    QVERIFY( mEngine );
-    QCOMPARE( mEngine->d->mViewLayout, Lc_IdleViewLayout );
-    QVERIFY( !mEngine->d->mInvitingNote );
-    QVERIFY( !mEngine->d->mWaitingNote );
-    QVERIFY( !mEngine->d->mAcceptQuery );
-    QVERIFY( !mEngine->d->mRecipientQuery );
-    QVERIFY( !mEngine->d->mCloseTimer );
-    QVERIFY( mEngine->d->mLiveCommsEngine );
-    QCOMPARE( mEngine->d->mEngineName, QByteArray( lcutMultimediaSharingEng ) );
-    QVERIFY( mEngine->d->recipient() != hbTrId("txt_vt_custom_unknown_number") );
-    QCOMPARE( mEngine->d->sessionTitle(), QString( lcutMultimediaSharingApp ) );
-    int engineWindowParam = 0;
-    QVERIFY( LC_SESSION( mEngine )->mParams.contains( engineWindowParam ) );
-    QVERIFY( mEngine->d->mActivityManager );
-    QVERIFY( !mEngine->d->mActivityManager->isActivitySimulationEnabled() );
-    QVERIFY( !mEngine->d->mShareOwnVideoQuery );
-    
-    // "VT plug-in" loaded
-    lcutStub_LcEngine_reset();
-    lcutStub_LcSession_reset();    
-    delete mEngine;
-    mEngine = 0;
-    mEngine = new LcUiEngine( lcutVideotelephonyEng,
-                              lcutVideotelephonyApp );
-    QVERIFY( mEngine );
-    QCOMPARE( mEngine->d->mViewLayout, Lc_AllInOneViewLayout );
-    QVERIFY( !mEngine->d->mInvitingNote );
-    QVERIFY( !mEngine->d->mWaitingNote );
-    QVERIFY( !mEngine->d->mAcceptQuery );
-    QVERIFY( !mEngine->d->mRecipientQuery );
-    QVERIFY( !mEngine->d->mCloseTimer );
-    QVERIFY( mEngine->d->mLiveCommsEngine );
-    QCOMPARE( mEngine->d->mEngineName, QByteArray( lcutVideotelephonyEng ) );
-    QVERIFY( mEngine->d->recipient() != hbTrId("txt_vt_custom_unknown_number") );
-    QCOMPARE( mEngine->d->sessionTitle(), QString( lcutVideotelephonyApp ) );
-    QVERIFY( LC_SESSION( mEngine )->mParams.contains( engineWindowParam ) );
-    QVERIFY( !mEngine->d->mFullScreen );
-    QVERIFY( mEngine->d->mActivityManager );
-    QVERIFY( !mEngine->d->mActivityManager->isActivitySimulationEnabled() );
-    QVERIFY( !mEngine->d->mShareOwnVideoQuery );
-}
-
-void UT_LcUiEngine::testFeatureSupported()
-{
-    // Engine not loaded
-    CLcEngine* enginePtr = mEngine->d->mLiveCommsEngine;
-    mEngine->d->mLiveCommsEngine = 0;
-    QVERIFY( !mEngine->d->featureSupported( CLcEngine::ELcShowAcceptQuery ) );
-    
-    // Engine loaded, feature not supported
-    mEngine->d->mLiveCommsEngine = enginePtr;
-    QVERIFY( !mEngine->d->featureSupported( CLcEngine::ELcShowAcceptQuery ) );
-    
-    // Feature supported
-    lcutStub_LcEngine_setLcFeatureSupported( true );
-    QVERIFY( mEngine->d->featureSupported( CLcEngine::ELcShowAcceptQuery ) );
-}
-
-void UT_LcUiEngine::testEstablishSession()
-{
-    // Leave 
-    lcutStub_LcEngine_setFailure( -1 );
-    QCOMPARE( mEngine->d->establishSession(), -1 );
-    QVERIFY( !mEngine->d->mCloseTimer );
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    QCOMPARE( mEngine->d->establishSession(), 0 );
-    QVERIFY( mEngine->d->mCloseTimer );
-}
-
-void UT_LcUiEngine::testTerminateSession()
-{
-    // Leave 
-    lcutStub_LcEngine_setFailure( -1 );
-    QCOMPARE( mEngine->d->terminateSession(), -1 );
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    QCOMPARE( mEngine->d->establishSession(), 0 );
-}
-
-void UT_LcUiEngine::testSetWindowRect()
-{
-    TRect rect;
-    MLcVideoPlayer* player = 
-        mEngine->d->mLiveCommsEngine->Session().LocalVideoPlayer();
-    
-    // No player
-    QCOMPARE( mEngine->d->setWindowRect( 0, rect ), -1 );
-    
-    // Leave
-    lcutStub_LcEngine_setFailure( -2 );
-    QCOMPARE( mEngine->d->setWindowRect( player, rect ), -2 );    
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    QCOMPARE( mEngine->d->setWindowRect( player, rect ), 0 );
-}
-
-void UT_LcUiEngine::testEnableWindow()
-{
-    MLcVideoPlayer* player = 
-        mEngine->d->mLiveCommsEngine->Session().LocalVideoPlayer();
-    
-    // No player
-    QCOMPARE( mEngine->d->enableWindow( 0, true ), -1 );
-    
-    // Leave
-    lcutStub_LcEngine_setFailure( -2 );
-    QCOMPARE( mEngine->d->enableWindow( player, true ), -2 );    
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    QCOMPARE( mEngine->d->enableWindow( player, true ), 0 );
-}
-
-void UT_LcUiEngine::testPlay()
-{
-    MLcVideoPlayer* player = 
-        mEngine->d->mLiveCommsEngine->Session().LocalVideoPlayer();
-    
-    // No player
-    QCOMPARE( mEngine->d->play( 0 ), -1 );
-    
-    // Leave
-    lcutStub_LcEngine_setFailure( -2 );
-    QCOMPARE( mEngine->d->play( player ), -2 );    
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    QVERIFY( !player->LcIsPlayingL() );
-    QCOMPARE( mEngine->d->play( player ), 0 );
-    QVERIFY( player->LcIsPlayingL() );
-}
-
-void UT_LcUiEngine::testPause()
-{
-    MLcVideoPlayer* player = 
-        mEngine->d->mLiveCommsEngine->Session().LocalVideoPlayer();
-    
-    // No player
-    QCOMPARE( mEngine->d->pause( 0 ), -1 );
-    
-    // Leave
-    lcutStub_LcEngine_setFailure( -2 );
-    QCOMPARE( mEngine->d->pause( player ), -2 );    
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    QCOMPARE( mEngine->d->play( player ), 0 );
-    QVERIFY( player->LcIsPlayingL() );
-    QCOMPARE( mEngine->d->pause( player ), 0 );
-    QVERIFY( !player->LcIsPlayingL() );    
-}
-
-void UT_LcUiEngine::testEnableSpeaker()
-{
-    // Leave 
-    lcutStub_LcEngine_setFailure( -1 );
-    QCOMPARE( mEngine->d->enableSpeaker( true ), -1 );
-    QVERIFY( !mEngine->d->isSpeakerOn() );
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    QCOMPARE( mEngine->d->enableSpeaker( true ), 0 );
-    QVERIFY( mEngine->d->isSpeakerOn() );
-}
-
-void UT_LcUiEngine::testMuteMic()
-{
-    // Leave 
-    lcutStub_LcEngine_setFailure( -1 );
-    QCOMPARE( mEngine->d->muteMic( true ), -1 );
-    lcutStub_LcEngine_reset();
-    QVERIFY( !mEngine->d->isMuted() );
-    
-    // No leave
-    QCOMPARE( mEngine->d->muteMic( true ), 0 );
-    QVERIFY( mEngine->d->isMuted() );
-}
-
-void UT_LcUiEngine::testStartLiveContent()
-{
-    // mInvitingNote not set
-    mInvitingNote->hide();
-    mEngine->d->startLiveContent();
-    QVERIFY( !mInvitingNote->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );
-    
-    // mInvitingNote set, but the engine does not support the feature
-    lcutStub_LcSession_reset();
-    mEngine->d->mInvitingNote = mInvitingNote;
-    mEngine->d->startLiveContent();
-    QVERIFY( !mInvitingNote->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );    
-    
-    // mInvitingNote set and the engine supports the feature
-    lcutStub_LcSession_reset();
-    lcutStub_LcEngine_setLcFeatureSupported( true );
-    mEngine->d->startLiveContent();
-    QVERIFY( mInvitingNote->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) ); 
-}
-
-void UT_LcUiEngine::testStart()
-{    
-    LC_SESSION( mEngine )->iState = MLcSession::EReceived;
-    mEngine->d->start();
-    QVERIFY( mEngine->d->mActivityManager->isActivitySimulationEnabled() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    LC_SESSION( mEngine )->iState = MLcSession::EInitialized;
-    mEngine->d->start();
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );
-
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    mEngine->d->setUiComponents( mInvitingNote, mWaitingNote,
-                              mAcceptQuery, mRecipientQuery,mShareOwnVideoQuery );
-    LC_SESSION( mEngine )->iState = MLcSession::EInitialized;
-    mEngine->d->start();
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );
-}
-    
-void UT_LcUiEngine::testSetUiComponents()
-{
-    QVERIFY( !mEngine->d->mInvitingNote );
-    QVERIFY( !mEngine->d->mWaitingNote );
-    QVERIFY( !mEngine->d->mAcceptQuery );
-    QVERIFY( !mEngine->d->mRecipientQuery );
-    
-    mEngine->d->setUiComponents(0,0,0,0,0);
-    
-    QVERIFY( !mEngine->d->mInvitingNote );
-    QVERIFY( !mEngine->d->mWaitingNote );
-    QVERIFY( !mEngine->d->mAcceptQuery );
-    QVERIFY( !mEngine->d->mRecipientQuery );
-    
-    mEngine->d->setUiComponents(mInvitingNote,mWaitingNote,mAcceptQuery,mRecipientQuery,mShareOwnVideoQuery);
-    QVERIFY( mEngine->d->mInvitingNote );
-    QVERIFY( mEngine->d->mWaitingNote );
-    QVERIFY( mEngine->d->mAcceptQuery );
-    QVERIFY( mEngine->d->mRecipientQuery );
-}
-
-void UT_LcUiEngine::testSessionStateChanged()
-{        
-    LC_SESSION( mEngine )->iState = MLcSession::EUninitialized;
-    mEngine->d->StateChanged( *LC_SESSION( mEngine ) );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-        
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    QVERIFY( mEngine->d->mSessionDurationTimerId == 0 );
-    LC_SESSION( mEngine )->iState = MLcSession::EOpen;
-    mEngine->d->StateChanged( *LC_SESSION( mEngine ) );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_EnableLcWindowL ) );
-    // Session duration is started when session opened
-    QVERIFY( mEngine->d->mSessionDurationTimerId != 0 );
-
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    LC_SESSION( mEngine )->iState = MLcSession::EClosed;
-    QSignalSpy spy(mEngine, SIGNAL(stopped()));
-    mEngine->d->StateChanged( *LC_SESSION( mEngine ) );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    QCOMPARE( spy.count(), 1 );
-    
-    // mAcceptQuery not set
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();    
-    mAcceptQuery->hide();
-    LC_SESSION( mEngine )->iState = MLcSession::EReceived;
-    mEngine->d->StateChanged( *LC_SESSION( mEngine ) );
-    QVERIFY( !mAcceptQuery->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    
-    // mAcceptQuery set, but the engine does not support the feature
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    LC_SESSION( mEngine )->iState = MLcSession::EReceived;
-    mEngine->d->mAcceptQuery = mAcceptQuery;
-    mEngine->d->StateChanged( *LC_SESSION( mEngine ) );
-    QVERIFY( !mAcceptQuery->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    
-    // mAcceptQuery set and the engine supports the feature
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    LC_SESSION( mEngine )->iState = MLcSession::EReceived;
-    lcutStub_LcEngine_setLcFeatureSupported( true );
-    mEngine->d->StateChanged( *LC_SESSION( mEngine ) );
-    QVERIFY( mAcceptQuery->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );    
-    
-    // MT call and sharing own video not allowed by default , popup query shown    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    mShareOwnVideoQuery->hide();
-    mEngine->d->setUiComponents(mInvitingNote,mWaitingNote,mAcceptQuery,mRecipientQuery,mShareOwnVideoQuery);
-    LC_SESSION( mEngine )->iState = MLcSession::EOpen;
-    lcutStub_LcEngine_setLcFeatureSupported( true );
-    mEngine->d->StateChanged( *LC_SESSION( mEngine ) );
-    QVERIFY( mEngine->d->mShareOwnVideoQuery );
-    QVERIFY( mEngine->d->mShareOwnVideoQuery->isVisible() );
-    CLcVideoPlayer* localPlayer = LC_SESSION( mEngine )->iLocalPlayer;
-    localPlayer = 0;
-    
-    // MO call and sharing own video allowed by default , popup query not shown
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    mShareOwnVideoQuery->hide();
-    mEngine->d->setUiComponents(mInvitingNote,mWaitingNote,mAcceptQuery,mRecipientQuery,mShareOwnVideoQuery);
-    LC_SESSION( mEngine )->iState = MLcSession::EOpen;
-    lcutStub_LcEngine_setLcFeatureSupported( false );
-    mEngine->d->StateChanged( *LC_SESSION( mEngine ) );    
-    QVERIFY( mEngine->d->mShareOwnVideoQuery );
-    QVERIFY( !mEngine->d->mShareOwnVideoQuery->isVisible() );
-        
-}
-
-void UT_LcUiEngine::testPlayerStateChanged()
-{
-    CLcVideoPlayer* localPlayer = LC_SESSION( mEngine )->iLocalPlayer;
-    QVERIFY( localPlayer != NULL );
-    QSignalSpy localPlayerSignalSpy( mEngine, SIGNAL( localPlayerPlaying() ) );
-    QSignalSpy localPlayerSignalSpy2( mEngine, SIGNAL( localPlayerPreparing() ) );
-    QSignalSpy localPlayerSignalSpy3( mEngine, SIGNAL( localPlayerBuffering() ) );
-    QSignalSpy localPlayerSignalSpy4( mEngine, SIGNAL( localPlayerPaused() ) );
-    QSignalSpy localPlayerSignalSpy5( mEngine, SIGNAL( localPlayerUnavailable() ) );
-    
-    CLcVideoPlayer* remotePlayer = LC_SESSION( mEngine )->iRemotePlayer;
-    QVERIFY( remotePlayer != NULL );
-    QSignalSpy remotePlayerSignalSpy( mEngine, SIGNAL( remotePlayerPlaying() ) );
-    QSignalSpy remotePlayerSignalSpy2( mEngine, SIGNAL( remotePlayerPreparing() ) );
-    QSignalSpy remotePlayerSignalSpy3( mEngine, SIGNAL( remotePlayerBuffering() ) );
-    QSignalSpy remotePlayerSignalSpy4( mEngine, SIGNAL( remotePlayerPaused() ) );
-    QSignalSpy remotePlayerSignalSpy5( mEngine, SIGNAL( remotePlayerUnavailable() ) );
-
-    // Use local player, player not playing
-    mEngine->d->StateChanged( *localPlayer );
-    QCOMPARE( localPlayerSignalSpy.count(), 0 );
-    QCOMPARE( localPlayerSignalSpy2.count(), 0 );
-    QCOMPARE( localPlayerSignalSpy3.count(), 0 );
-    QCOMPARE( localPlayerSignalSpy4.count(), 0 );
-    QCOMPARE( localPlayerSignalSpy5.count(), 0 );
-    
-    // Use local player, player preparing
-    localPlayer->iState = MLcVideoPlayer::EPreparing;
-    mEngine->d->StateChanged( *localPlayer );
-    QCOMPARE( localPlayerSignalSpy2.count(), 1 );
-
-    // Use local player, player buffering
-    localPlayer->iState = MLcVideoPlayer::EBuffering;
-    mEngine->d->StateChanged( *localPlayer );
-    QCOMPARE( localPlayerSignalSpy3.count(), 1 );
-
-    // Use local player, player playing
-    localPlayer->iState = MLcVideoPlayer::EPlaying;
-    mEngine->d->StateChanged( *localPlayer );
-    QCOMPARE( localPlayerSignalSpy.count(), 1 );
-    
-    // Use local player, player paused
-    localPlayer->iState = MLcVideoPlayer::EPaused;
-    mEngine->d->StateChanged( *localPlayer );
-    QCOMPARE( localPlayerSignalSpy4.count(), 1 );
-    
-    // Use local player, player unavailable
-    localPlayer->iState = MLcVideoPlayer::EUnavailable;
-    mEngine->d->StateChanged( *localPlayer );
-    QCOMPARE( localPlayerSignalSpy5.count(), 1 );
-    
-    // Use remote player, no waiting note
-    mEngine->d->StateChanged( *remotePlayer );
-    QVERIFY( mWaitingNote->isVisible() );
-    QCOMPARE( remotePlayerSignalSpy.count(), 0 );
-    QCOMPARE( remotePlayerSignalSpy2.count(), 0 );  
-    QCOMPARE( remotePlayerSignalSpy3.count(), 0 );  
-    QCOMPARE( remotePlayerSignalSpy4.count(), 0 );  
-    QCOMPARE( remotePlayerSignalSpy5.count(), 0 );  
-
-    // Use remote player, waiting note present, player not playing
-    mEngine->d->mWaitingNote = mWaitingNote;
-    mEngine->d->StateChanged( *remotePlayer );
-    QVERIFY( mWaitingNote->isVisible() );
-    QCOMPARE( remotePlayerSignalSpy.count(), 0 );
-    QCOMPARE( remotePlayerSignalSpy2.count(), 0 );  
-    QCOMPARE( remotePlayerSignalSpy3.count(), 0 );  
-    QCOMPARE( remotePlayerSignalSpy4.count(), 0 );  
-    QCOMPARE( remotePlayerSignalSpy5.count(), 0 );  
-
-    // Use remote player, player preparing
-    remotePlayer->iState = MLcVideoPlayer::EPreparing;
-    mEngine->d->StateChanged( *remotePlayer );
-    QVERIFY( mWaitingNote->isVisible() );
-    QCOMPARE( remotePlayerSignalSpy2.count(), 1 );  
-    
-    // Use remote player, player buffering
-    remotePlayer->iState = MLcVideoPlayer::EBuffering;
-    mEngine->d->StateChanged( *remotePlayer );
-    QVERIFY( mWaitingNote->isVisible() );
-    QCOMPARE( remotePlayerSignalSpy3.count(), 1 );  
-
-    // Use remote player, waiting note present, player playing
-    remotePlayer->iState = MLcVideoPlayer::EPlaying;
-    mEngine->d->StateChanged( *remotePlayer );
-    QVERIFY( !mWaitingNote->isVisible() );
-    QCOMPARE( remotePlayerSignalSpy.count(), 1 );  
-
-    // Use remote player, waiting note present, player playing
-    remotePlayer->iState = MLcVideoPlayer::EUnavailable;
-    mEngine->d->StateChanged( *remotePlayer );
-    QVERIFY( !mWaitingNote->isVisible() );
-    QCOMPARE( remotePlayerSignalSpy5.count(), 1 );  
-
-    // Use remote player, player paused
-    remotePlayer->iState = MLcVideoPlayer::EPaused;
-    mEngine->d->StateChanged( *remotePlayer );
-    QVERIFY( !mWaitingNote->isVisible() );
-    QCOMPARE( remotePlayerSignalSpy4.count(), 1 );  
-
-    QCOMPARE( localPlayerSignalSpy.count(), 1 );
-    QCOMPARE( localPlayerSignalSpy2.count(), 1 );
-    QCOMPARE( localPlayerSignalSpy3.count(), 1 );
-    QCOMPARE( localPlayerSignalSpy4.count(), 1 );
-    QCOMPARE( localPlayerSignalSpy5.count(), 1 );
-
-    QCOMPARE( remotePlayerSignalSpy.count(), 1 );
-    QCOMPARE( remotePlayerSignalSpy2.count(), 1 );  
-    QCOMPARE( remotePlayerSignalSpy3.count(), 1 );  
-    QCOMPARE( remotePlayerSignalSpy4.count(), 1 );  
-    QCOMPARE( remotePlayerSignalSpy5.count(), 1 );  
-    
-}
-
-void UT_LcUiEngine::testSetContentAreas()
-{
-    QRectF shared;
-    QRectF received;
-    
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer );
-    QVERIFY( LC_SESSION( mEngine )->iRemotePlayer );
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer->iRect.iTl.iX != 0);
-    QVERIFY( LC_SESSION( mEngine )->iRemotePlayer->iRect.iTl.iX != 0);
-    
-    mEngine->d->setContentAreas( shared, received );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_SetLcWindowRectL ) );
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer->iRect.iTl.iX == 0);
-    QVERIFY( LC_SESSION( mEngine )->iRemotePlayer->iRect.iTl.iX == 0);
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    mEngine->d->setContentAreas( shared, received );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    shared.setHeight(100);
-    received.setHeight(100);
-    
-    mEngine->d->setContentAreas( shared, received );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_SetLcWindowRectL ) );
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    delete LC_SESSION( mEngine )->iLocalPlayer;
-    LC_SESSION( mEngine )->iLocalPlayer = 0;
-    delete LC_SESSION( mEngine )->iRemotePlayer;
-    LC_SESSION( mEngine )->iRemotePlayer = 0;
-    
-    mEngine->d->setContentAreas( shared, received );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-}
-
-void UT_LcUiEngine::testSetOrientation()
-{
-    bool ok( false );
-
-    //1. setting landscape
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer );
-    QVERIFY( LC_SESSION( mEngine )->iRemotePlayer );
-
-    ok = mEngine->d->setOrientation( Qt::Horizontal );
-    QVERIFY( ok );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_SetLcWindowOrientationL ) );
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer->iOrientation == MLcWindow::ELandscape );
-    QVERIFY( LC_SESSION( mEngine )->iRemotePlayer->iOrientation == MLcWindow::ELandscape );
-
-    //2. setting layout failed
-    // Leave
-    lcutStub_LcEngine_setFailure( -1 );
-    lcutStub_LcPlayer_reset();
-    ok = mEngine->d->setOrientation( Qt::Horizontal );
-    QVERIFY( !ok );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    
-    //3. setting layout with no players
-    lcutStub_LcEngine_reset();
-    lcutStub_LcPlayer_reset();
-    delete LC_SESSION( mEngine )->iLocalPlayer;
-    LC_SESSION( mEngine )->iLocalPlayer = 0;
-    delete LC_SESSION( mEngine )->iRemotePlayer;
-    LC_SESSION( mEngine )->iRemotePlayer = 0;
-    
-    ok = mEngine->d->setOrientation( Qt::Horizontal );
-    QVERIFY( ok );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );    
-}
-
-
-void UT_LcUiEngine::testToggleMute()
-{
-    QSignalSpy mutedSpy(mEngine, SIGNAL(muted()));
-    QSignalSpy unmutedSpy(mEngine, SIGNAL(unmuted()));
-    
-    
-    // Leave from isMuted
-    mEngine->d->toggleMute();
-    QVERIFY( mEngine->d->isMuted() );
-    lcutStub_LcEngine_setFailure( -2 );
-    QVERIFY( !mEngine->d->isMuted() );
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    mutedSpy.clear();
-    unmutedSpy.clear();
-    
-    mEngine->d->toggleMute();
-    QVERIFY( !mEngine->d->isMuted() );
-    mutedSpy.clear();
-    unmutedSpy.clear();
-    
-    mEngine->d->toggleMute();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_MuteLcMicL ) );
-    QVERIFY( mEngine->d->isMuted() );
-    QCOMPARE(mutedSpy.count(), 1); // make sure the signal was emitted exactly one time
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    mutedSpy.clear();
-    unmutedSpy.clear();
-    
-    mEngine->d->toggleMute();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_MuteLcMicL ) );
-    QVERIFY( !mEngine->d->isMuted() );
-    QCOMPARE(unmutedSpy.count(), 1); // make sure the signal was emitted exactly one time
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    mutedSpy.clear();
-    unmutedSpy.clear();
-    
-    // test async mute
-    lcutStub_LcPlayer_asyncCompletion( true );
-    mEngine->d->toggleMute();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_MuteLcMicL ) );
-    QVERIFY( mEngine->d->isMuted() );
-    QVERIFY( mEngine->d->mBlocked );
-    QVERIFY( mEngine->d->mPendingAction == "muted" );
-    
-    // nothing yet signaled as completion is pending
-    QCOMPARE(mutedSpy.count(), 0);
-    QCOMPARE(unmutedSpy.count(), 0);
-    
-    
-    lcutStub_LcPlayer_asyncCompletion( false );
-}
-
-void UT_LcUiEngine::testToggleSpeaker()
-{
-    QSignalSpy speakerEnabledSpy(mEngine, SIGNAL(speakerEnabled()));
-    QSignalSpy speakerDisabledSpy(mEngine, SIGNAL(speakerDisabled()));
-
-    QVERIFY( !mEngine->d->isSpeakerOn() );
-
-    mEngine->d->toggleSpeaker();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_EnableLcLoudspeakerL ) );
-    QVERIFY( mEngine->d->isSpeakerOn() );
-    QCOMPARE(speakerEnabledSpy.count(), 1);
-
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    speakerEnabledSpy.clear();
-    speakerDisabledSpy.clear();
-    
-    mEngine->d->toggleSpeaker();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_EnableLcLoudspeakerL ) );
-    QVERIFY( !mEngine->d->isSpeakerOn() );
-    QCOMPARE(speakerDisabledSpy.count(), 1);
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    speakerEnabledSpy.clear();
-    speakerDisabledSpy.clear();
-    
-    // test asynch speaker functionality.
-    
-    lcutStub_LcPlayer_asyncCompletion( true );
-    mEngine->d->toggleSpeaker();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_EnableLcLoudspeakerL ) );
-    QVERIFY( mEngine->d->isSpeakerOn() );
-    QVERIFY( mEngine->d->mBlocked );
-    QVERIFY( mEngine->d->mPendingAction == "speakerEnabled" );
-    
-    // nothing yet signaled as completion is pending
-    QCOMPARE(speakerEnabledSpy.count(), 0);
-    QCOMPARE(speakerDisabledSpy.count(), 0);
-    
-    lcutStub_LcPlayer_asyncCompletion( false );
-}
-
-void UT_LcUiEngine::testToggleDisableCamera()
-{   
-    QSignalSpy enabledSpy(mEngine, SIGNAL(cameraEnabled()));
-    QSignalSpy disabledSpy(mEngine, SIGNAL(cameraDisabled()));
-
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer );
-    LC_SESSION( mEngine )->iLocalPlayer->iPlaying = ETrue;    
-    LC_SESSION( mEngine )->iRemotePlayer->iState = MLcVideoPlayer::EPlaying;
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer->iPlaying );
-        
-    mEngine->d->toggleDisableCamera();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_LcPauseL ) );
-    QVERIFY( !LC_SESSION( mEngine )->iLocalPlayer->iPlaying );
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer->iState == MLcVideoPlayer::EPaused );
-    QCOMPARE(enabledSpy.count(), 0);
-    QCOMPARE(disabledSpy.count(), 1);
-
-    mEngine->d->toggleDisableCamera();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_LcPlayL ) );   
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer->iPlaying );
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer->iState == MLcVideoPlayer::EPlaying );
-    QCOMPARE(enabledSpy.count(), 1);
-    QCOMPARE(disabledSpy.count(), 1);
-}
-
-void UT_LcUiEngine::testToggleCamera()
-{
-    // Leave
-    lcutStub_LcEngine_setFailure( -1 );
-    mEngine->d->toggleCamera();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    mEngine->d->toggleCamera();
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_ToggleLcCameraL ) );
-}
-
-void UT_LcUiEngine::testStartReceiving()
-{
-    // mAcceptQuery not set, mWaitingNote not set
-    mAcceptQuery->show();
-    mWaitingNote->hide();
-    mEngine->d->startReceiving();
-    QVERIFY( mAcceptQuery->isVisible() );
-    QVERIFY( !mWaitingNote->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );    
-    
-    // mAcceptQuery set, mWaitingNote not set
-    lcutStub_LcSession_reset();
-    mEngine->d->mAcceptQuery = mAcceptQuery;
-    mEngine->d->startReceiving();
-    QVERIFY( !mAcceptQuery->isVisible() );
-    QVERIFY( !mWaitingNote->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );
-    
-    // mWaitingNote set, but the engine does not support the feature
-    lcutStub_LcSession_reset();
-    mEngine->d->mWaitingNote = mWaitingNote;
-    mEngine->d->startReceiving();
-    QVERIFY( !mAcceptQuery->isVisible() );
-    QVERIFY( !mWaitingNote->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );    
-    
-    // mWaitingNote set and the engine supports the feature
-    lcutStub_LcSession_reset();
-    lcutStub_LcEngine_setLcFeatureSupported( true );
-    mEngine->d->startReceiving();
-    QVERIFY( !mAcceptQuery->isVisible() );
-    QVERIFY( mWaitingNote->isVisible() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_establishSession ) );
-}
-
-void UT_LcUiEngine::testStartPlayback()
-{   
-    mEngine->d->startPlayback();
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_EnableLcWindowL,0 ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_EnableLcWindowL,1 ) );
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    delete LC_SESSION( mEngine )->iLocalPlayer;
-    LC_SESSION( mEngine )->iLocalPlayer = 0;
-    mEngine->d->startPlayback();
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_EnableLcWindowL,0 ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall,1 ) );
-    
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    
-    delete LC_SESSION( mEngine )->iRemotePlayer;
-    LC_SESSION( mEngine )->iRemotePlayer = 0;
-    
-    mEngine->d->startPlayback();
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall,0 ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall,1 ) );
-}
-
-void UT_LcUiEngine::testStop()
-{
-    // Ensure that in MLcSession::EOpen state, "stopped" signal won't be emited
-    // Check also that session duration timer is stopped
-    LC_SESSION( mEngine )->iState = MLcSession::EOpen;
-    mEngine->d->startSessionDurationTimer();
-    QVERIFY( mEngine->d->mSessionDurationTimerId != 0 );
-    QSignalSpy spy(mEngine, SIGNAL(stopped()));
-    mEngine->d->mActivityManager->enableActivitySimulation(true);
-    mEngine->d->stop();
-    QVERIFY( !mEngine->d->mActivityManager->isActivitySimulationEnabled() );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_terminateSession ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    QCOMPARE( spy.count(), 0 );
-    QVERIFY( mEngine->d->mSessionDurationTimerId == 0 );
-
-    // Ensure that MLcSession::EClosed, will cause emition of "stopped" signal
-    lcutStub_LcSession_reset();
-    lcutStub_LcPlayer_reset();
-    LC_SESSION( mEngine )->iState = MLcSession::EClosed;
-    mEngine->d->stop();
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_terminateSession ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    QCOMPARE( spy.count(), 1 );
-}
-
-void UT_LcUiEngine::testSetViewLayout()
-{
-    QVERIFY( LC_SESSION( mEngine )->iLocalPlayer );
-    QVERIFY( LC_SESSION( mEngine )->iRemotePlayer );
-    QVERIFY( !LC_SESSION( mEngine )->iLocalPlayer->iPlaying );
-    QVERIFY( !LC_SESSION( mEngine )->iRemotePlayer->iPlaying );
-    LC_SESSION( mEngine )->iRemotePlayer->iState = MLcVideoPlayer::EPaused;
-    QVERIFY( !mEngine->d->usingVideoTelephoneEngine() );
-    
-    mEngine->d->setViewLayout();
-    QVERIFY( mEngine->d->viewLayout() == Lc_IdleViewLayout );
-    
-    LC_SESSION( mEngine )->iLocalPlayer->iPlaying = ETrue;
-    
-    mEngine->d->setViewLayout();
-    QVERIFY( mEngine->d->viewLayout() == Lc_SharedViewLayout );
-    
-    LC_SESSION( mEngine )->iLocalPlayer->iPlaying = EFalse;
-    LC_SESSION( mEngine )->iRemotePlayer->iState = MLcVideoPlayer::EPlaying;
-    
-    mEngine->d->setViewLayout();
-    QVERIFY( mEngine->d->viewLayout() == Lc_ReceivedViewLayout );
-    
-    LC_SESSION( mEngine )->iLocalPlayer->iPlaying = ETrue;
-    LC_SESSION( mEngine )->iRemotePlayer->iState = MLcVideoPlayer::EPlaying;
-    
-    mEngine->d->setViewLayout();
-    QVERIFY( mEngine->d->viewLayout() == Lc_TwowayViewLayout );
-    
-    delete LC_SESSION( mEngine )->iLocalPlayer;
-    LC_SESSION( mEngine )->iLocalPlayer = 0;
-    
-    mEngine->d->setViewLayout();
-    QVERIFY( mEngine->d->viewLayout() == Lc_ReceivedOnlyViewLayout );
-    
-    delete LC_SESSION( mEngine )->iRemotePlayer;
-    LC_SESSION( mEngine )->iRemotePlayer = 0;
-    
-    mEngine->d->setViewLayout();
-    QVERIFY( mEngine->d->viewLayout() == Lc_IdleViewLayout );
-    
-    mEngine->d->mEngineName = lcutVideotelephonyApp;
-    QVERIFY( mEngine->d->usingVideoTelephoneEngine() );
-    
-    mEngine->d->setViewLayout();
-    QVERIFY( mEngine->d->viewLayout() == Lc_AllInOneViewLayout );   
-}
-
-void UT_LcUiEngine::testHideNotes()
-{
-    // Notes not set
-    mEngine->d->hideNotes( true );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    QVERIFY( mInvitingNote->isVisible() );
-    QVERIFY( mWaitingNote->isVisible() );
-    QVERIFY( mAcceptQuery->isVisible() );
-    QVERIFY( mRecipientQuery->isVisible() );    
-    
-    // Notes set, hide all
-    mEngine->d->setUiComponents( mInvitingNote, mWaitingNote,
-                              mAcceptQuery, mRecipientQuery,mShareOwnVideoQuery );
-    mEngine->d->hideNotes( true );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    QVERIFY( !mInvitingNote->isVisible() );
-    QVERIFY( !mWaitingNote->isVisible() );
-    QVERIFY( !mAcceptQuery->isVisible() );
-    QVERIFY( !mRecipientQuery->isVisible() );
-
-    // Notes not set, do not hide waiting note
-    mInvitingNote->show();
-    mWaitingNote->show();
-    mAcceptQuery->show();
-    mRecipientQuery->show();       
-    mEngine->d->hideNotes( false );
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_NoCall ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    QVERIFY( !mInvitingNote->isVisible() );
-    QVERIFY( mWaitingNote->isVisible() );
-    QVERIFY( !mAcceptQuery->isVisible() );
-    QVERIFY( !mRecipientQuery->isVisible() ); 
-}
-
-void UT_LcUiEngine::testZoom()
-{
-    LcControlValues zoomData;
-    
-    // Leave
-    lcutStub_LcEngine_setFailure( -1 );
-    mEngine->d->zoom( 1 );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    QCOMPARE( mEngine->d->zoomValues( zoomData ), -1 );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_NoCall ) );
-    
-    // No leave
-    lcutStub_LcEngine_reset();
-    lcutStub_LcPlayer_reset();
-    QCOMPARE( mEngine->d->zoomValues( zoomData ), 0 );
-    mEngine->d->zoom( 2 );
-    mEngine->d->zoom( 1 );
-    mEngine->d->zoom( 3 );
-    
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_SetLcZoomValueL, 0 ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_SetLcZoomValueL, 1 ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcPlayer_SetLcZoomValueL, 2 ) );
-    QVERIFY( lcutStub_LcPlayer_expectCall( lcutStub_LcSession_NoCall, 3 ) );
-}
-
-void UT_LcUiEngine::testBlockUi()
-{
-    QSignalSpy blockedSpy(mEngine, SIGNAL(blocked()));
-    QSignalSpy unblockedSpy(mEngine, SIGNAL(unblocked()));
-    QSignalSpy mutedSpy(mEngine, SIGNAL(muted()));
-    
-    mEngine->d->BlockUi( ETrue );
-
-    QCOMPARE(blockedSpy.count(), 1);
-    QCOMPARE(unblockedSpy.count(), 0);
-    QCOMPARE(mutedSpy.count(), 0);
-    
-    // no pending action once unblocked
-    blockedSpy.clear();
-    
-    mEngine->d->BlockUi( EFalse );
-    QCOMPARE(blockedSpy.count(), 0);
-    QCOMPARE(unblockedSpy.count(), 1);
-    QCOMPARE(mutedSpy.count(), 0);
-    
-    
-    // pending action once unblocked
-    unblockedSpy.clear();
-    mEngine->d->setPendingAction( "muted" );
-    mEngine->d->BlockUi( EFalse );
-    QCOMPARE(blockedSpy.count(), 0);
-    QCOMPARE(unblockedSpy.count(), 1);
-    QCOMPARE(mutedSpy.count(), 1);
-    QVERIFY( mEngine->d->mPendingAction.isEmpty() );  
-}
-
-void UT_LcUiEngine::testCloseTimer()
-{
-    // Try to cancel without timer
-    mEngine->d->cancelCloseTimer();
-    QVERIFY( !mEngine->d->mCloseTimer );
-    
-    // Try to cancel without timer being active
-    mEngine->d->startCloseTimer();
-    QVERIFY( mEngine->d->mCloseTimer );
-    QVERIFY( mEngine->d->mCloseTimer->isActive() );
-    mEngine->d->mCloseTimer->stop();
-    QVERIFY( !mEngine->d->mCloseTimer->isActive() );
-    mEngine->d->cancelCloseTimer();
-    QVERIFY( mEngine->d->mCloseTimer );
-    QVERIFY( !mEngine->d->mCloseTimer->isActive() );
-    
-    // Cancel an active timer
-    mEngine->d->startCloseTimer();
-    QVERIFY( mEngine->d->mCloseTimer );
-    QVERIFY( mEngine->d->mCloseTimer->isActive() );
-    mEngine->d->cancelCloseTimer();
-    QVERIFY( mEngine->d->mCloseTimer );
-    QVERIFY( !mEngine->d->mCloseTimer->isActive() );    
-}
-
-
-void UT_LcUiEngine::testfullScreenMode()
-{
-    QVERIFY( !mEngine->d->fullScreenMode() );
-}
-
-
-void UT_LcUiEngine::testsetFullScreenMode()
-{
-    mEngine->d->setFullScreenMode(true);
-    QVERIFY( mEngine->d->fullScreenMode() );
-}
-
-void UT_LcUiEngine::testTimerEvent()
-{
-    mEngine->d->startSessionDurationTimer();
-    QSignalSpy spy(mEngine, SIGNAL(sessionDurationChanged(const QString &)));
-    
-    QTimerEvent wrongTimerEvent(9999);
-    mEngine->d->timerEvent(&wrongTimerEvent);
-    QVERIFY( spy.count() == 0 );
-    
-    QTimerEvent correctTimerEvent(mEngine->d->mSessionDurationTimerId);
-    mEngine->d->timerEvent(&correctTimerEvent);
-    QVERIFY( spy.count() == 1 );
-    QVERIFY( spy.at(0).count() == 1 ); // one arg which is duration as string
-    QTime currDuration = QTime::fromString(spy.at(0).at(0).toString());
-    QVERIFY( currDuration.isValid() );
-}
-
-void UT_LcUiEngine::testFillRemoteInfo()
-{
-    QSignalSpy recipientSpy(mEngine, SIGNAL(recipientChanged(const QString &)));
-    QSignalSpy numberSpy(mEngine, SIGNAL(phoneNumberChanged(const QString &)));
-    
-    // test filling without signal emitting
-    
-    // number and name changed 
-    mEngine->d->mRecipient = "";
-    mEngine->d->mPhoneNumber = "";
-    mEngine->d->fillRemoteInfo( false );
-    QVERIFY( mEngine->d->mRecipient.length() > 0 );
-    QVERIFY( mEngine->d->mPhoneNumber.length() > 0 );
-    QVERIFY( recipientSpy.count() == 0 );
-    QVERIFY( numberSpy.count() == 0 );
-    
-    // nothing changed
-    QString prevRecipient = mEngine->d->mRecipient;
-    QString prevNumber = mEngine->d->mPhoneNumber;
-    mEngine->d->fillRemoteInfo( false );
-    QVERIFY( mEngine->d->mRecipient == prevRecipient );
-    QVERIFY( mEngine->d->mPhoneNumber == prevNumber );
-    QVERIFY( recipientSpy.count() == 0 );
-    QVERIFY( numberSpy.count() == 0 );
-    
-    // test filling with signal emitting
-    
-    // number and name changed
-    mEngine->d->mRecipient = "";
-    mEngine->d->mPhoneNumber = "";
-    mEngine->d->fillRemoteInfo( true );
-    QVERIFY( mEngine->d->mRecipient == prevRecipient );
-    QVERIFY( mEngine->d->mPhoneNumber == prevNumber );
-    QVERIFY( recipientSpy.count() == 1 );
-    QVERIFY( numberSpy.count() == 1 );
-    
-    // state is opened and name not found and no number, unknown name is used
-    LC_SESSION( mEngine )->iState = MLcSession::EOpen;
-    delete LC_SESSION( mEngine )->iRemoteDisplayName;
-    LC_SESSION( mEngine )->iRemoteDisplayName = NULL;
-    LC_SESSION( mEngine )->iRemoteDisplayName = KNullDesC().AllocL();
-    delete LC_SESSION( mEngine )->iRemoteDetails;
-    LC_SESSION( mEngine )->iRemoteDetails = NULL;
-    LC_SESSION( mEngine )->iRemoteDetails = KNullDesC().AllocL();
-    mEngine->d->mPhoneNumber = "";
-    mEngine->d->fillRemoteInfo( true );
-    QVERIFY( mEngine->d->mRecipient == hbTrId("txt_vt_custom_unknown_number") );
-    QVERIFY( mEngine->d->mPhoneNumber.isEmpty() );
-    QVERIFY( recipientSpy.count() == 2 );
-    QVERIFY( numberSpy.count() == 1 );
-    
-    // name not found but number exists, number is used at opened state as recipient
-    mEngine->d->mRecipient = "";
-    mEngine->d->mPhoneNumber = "";
-    delete LC_SESSION( mEngine )->iRemoteDetails;
-    LC_SESSION( mEngine )->iRemoteDetails = NULL;
-    LC_SESSION( mEngine )->iRemoteDetails = _L("123445").AllocL();
-    mEngine->d->fillRemoteInfo( true );
-    QVERIFY( mEngine->d->mRecipient == "123445" );
-    QVERIFY( mEngine->d->mPhoneNumber == "123445" );
-    QVERIFY( recipientSpy.count() == 3 );
-    QVERIFY( numberSpy.count() == 2 );
-    
-}
-
-void UT_LcUiEngine::testUpdateSession()
-{
-    mEngine->d->updateSession();
-    QVERIFY( lcutStub_LcSession_expectCall( lcutStub_LcSession_updateSession ) );
-}
-
-void UT_LcUiEngine::testIsLocalPlayerPlaying()
-{
-    // Not playing
-    QVERIFY( !mEngine->d->isLocalPlayerPlaying() );
-
-    // Playing
-    LC_SESSION( mEngine )->iLocalPlayer->LcPlayL();
-    QVERIFY( mEngine->d->isLocalPlayerPlaying() );
-}
-
-void UT_LcUiEngine::testIsRemotePlayerPlaying()
-{
-    // Not playing
-    QVERIFY( !mEngine->d->isRemotePlayerPlaying() );
-    
-    // Playing
-    LC_SESSION( mEngine )->iRemotePlayer->LcPlayL();
-    QVERIFY( mEngine->d->isRemotePlayerPlaying() );
-}
-
-void UT_LcUiEngine::testMinimized()
-{  
-    mEngine->minimize();    
-    QVERIFY( mEngine->isMinimized() );
-    mEngine->minimize(); // Doing nothing
-    QVERIFY( mEngine->isMinimized() );
-}
-
-void UT_LcUiEngine::testMaximized()
-{    
-    mEngine->maximize();    
-    QVERIFY(mEngine->isMaximized() ); 
-    mEngine->maximize(); // Doing nothing
-    QVERIFY(mEngine->isMaximized() );
-}
-
-void UT_LcUiEngine::testIsMinimized()
-{
-    mEngine->minimize();
-    QVERIFY( mEngine->isMinimized() );    
-}
-
-void UT_LcUiEngine::testHandleForegroundStatus()
-{
-    QtHighwayStubHelper::reset();
-    
-    // First time to foreground, engine is not set to foreground until viewReady signal
-    HbView currView;
-    mEngine->d->setCurrentView(&currView);
-    QVERIFY( mEngine->d->mFirstForegroundSwitch );
-    QVERIFY( !mEngine->d->mActivityManager->isActivitySimulationEnabled() );
-    
-    mEngine->d->HandleForegroundStatus(ETrue);
-    QVERIFY( mEngine->d->mActivityManager->isActivitySimulationEnabled() );
-    QVERIFY( !mEngine->d->session().IsBackgroundStartup() ); // Stub returns fg status in this
-    QVERIFY( !QtHighwayStubHelper::isAtBg() );
-    QVERIFY( !mEngine->d->mFirstForegroundSwitch );
-    
-    //Simulate viewReady signal happens, funciton will be called again.
-    mEngine->d->HandleForegroundStatus(ETrue);
-    QVERIFY( mEngine->d->session().IsBackgroundStartup() ); // Stub returns fg status in this
-    QVERIFY( !mEngine->d->mFirstForegroundSwitch );
-       
-    // Bg switch
-    QtHighwayStubHelper::reset();
-    QVERIFY( mEngine->d->mActivityManager->isActivitySimulationEnabled() );
-    mEngine->d->HandleForegroundStatus(EFalse);
-    QVERIFY( !mEngine->d->mActivityManager->isActivitySimulationEnabled() );
-    QVERIFY( QtHighwayStubHelper::isAtBg() );
-    QVERIFY( !mEngine->d->session().IsBackgroundStartup() ); // Stub returns fg status in this
-
-}
-
-
-void UT_LcUiEngine::testSendDialTone()
-{
-    //Dumy test: Ensure Conversion does not cause any problem.
-    QVERIFY( mEngine->d->SendDialTone('3') );
-}
-
-
-void UT_LcUiEngine::testShareVideoIsAllowedShownAutomatically() 
-{
-    lcutStub_LcEngine_setLcFeatureSupported( false );
-    mShareOwnVideoQuery->hide();
-    mEngine->d->setUiComponents(mInvitingNote,mWaitingNote,mAcceptQuery,mRecipientQuery,mShareOwnVideoQuery);
-    mEngine->d->showSendVideoQueryWhenNecessary();
-    QVERIFY(mEngine->d->mShareOwnVideoQuery && !mEngine->d->mShareOwnVideoQuery->isVisible());
-}
-
-
-void UT_LcUiEngine::testShareVideoIsNotAllowedShown() 
-{
-    lcutStub_LcEngine_setLcFeatureSupported( false );
-    mShareOwnVideoQuery->hide();
-    mEngine->d->setUiComponents(mInvitingNote,mWaitingNote,mAcceptQuery,mRecipientQuery,mShareOwnVideoQuery);
-    mEngine->d->showSendVideoQueryWhenNecessary();
-    QVERIFY(mEngine->d->mShareOwnVideoQuery && !mEngine->d->mShareOwnVideoQuery->isVisible());    
-}
-
-
-void UT_LcUiEngine::testShareVideoPermissionAskedAlways() 
-{
-    lcutStub_LcEngine_setLcFeatureSupported( true );
-    mShareOwnVideoQuery->hide();
-    mEngine->d->setUiComponents(mInvitingNote,mWaitingNote,mAcceptQuery,mRecipientQuery,mShareOwnVideoQuery);
-    mEngine->d->showSendVideoQueryWhenNecessary();
-    QVERIFY(mEngine->d->mShareOwnVideoQuery && mEngine->d->mShareOwnVideoQuery->isVisible());
-}
-
-
-void UT_LcUiEngine::testVolumeLevelChanged()
-{
-    // Subscribe to the events.
-    mEngine->d->subscribeVolumeEvents();
-
-    QSignalSpy spy(mEngine, SIGNAL(volumeChanged(int)));
-    QCOMPARE( spy.count(), 0 );
-
-    
-    //Test1: Known Key Event handled
-    QVariant value;
-    value.setValue(5);
-    
-    XQSettingsKey validKey1(XQSettingsKey::TargetCentralRepository, 
-                            KCRUidInCallVolume.iUid, KTelIncallEarVolume);
-    mEngine->d->volumeLevelChanged(validKey1, value);
-    QCOMPARE( spy.count(), 1 );
-    spy.clear();
-
-    
-    //Test2: Known Key Event-2 handled
-    XQSettingsKey validKey2(XQSettingsKey::TargetCentralRepository, 
-                            KCRUidInCallVolume.iUid,KTelIncallLoudspeakerVolume);
-    mEngine->d->volumeLevelChanged(validKey2, value);
-    QCOMPARE( spy.count(), 1 );
-    spy.clear();
-    
-    //Test3: Unknow Key Event Ignored.
-    XQSettingsKey unKnownKey(XQSettingsKey::TargetCentralRepository, 
-                            787,899);
-    mEngine->d->volumeLevelChanged(unKnownKey, value);
-    QCOMPARE( spy.count(), 0 );
-    
-    // Un-Subscribe Events.
-    mEngine->d->unSubscribeVolumeEvents();
-}
-
-
-
-// End of file
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/ut_lcuieng.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Fri May 22 10:46:25 2009
-######################################################################
-
-TEMPLATE = app
-TARGET = 
-
-QT += testlib xml
-CONFIG  += qtestlib
-
-MUS_DIR = ../../../../..
-LCUI_DIR = ../../../lcui
-LCUIENGINE_DIR = ../..
-
-DEPENDPATH += .
-
-INCLUDEPATH += .
-INCLUDEPATH += hbstubs
-INCLUDEPATH += /epoc32/include
-INCLUDEPATH += /epoc32/include/platform/app
-INCLUDEPATH += /epoc32/include/ecom
-INCLUDEPATH += inc
-INCLUDEPATH += $$LCUIENGINE_DIR
-INCLUDEPATH += $$LCUIENGINE_DIR/inc
-INCLUDEPATH += $$LCUI_DIR/mmshlcuiengine/tsrc/lcstub/inc
-INCLUDEPATH += $$LCUI_DIR/inc
-INCLUDEPATH += $$LCUI_DIR/../inc
-INCLUDEPATH += lcstub/inc
-INCLUDEPATH += $$MUS_DIR/tsrc/qtestutils/inc
-INCLUDEPATH += $$MUS_DIR/inc
-
-CONFIG  += hb
-
-DEFINES += QT_NO_DEBUG_OUTPUT
-
-# Input
-HEADERS += inc/ut_lcuiengine.h
-HEADERS += $$LCUIENGINE_DIR/inc/lcuiengine.h
-
-SOURCES += src/main.cpp 
-SOURCES += src/ut_lcuiengine.cpp 
-SOURCES += $$LCUIENGINE_DIR/src/lcuiengine.cpp
-SOURCES += hbstubs/hbstubs.cpp
-SOURCES += hbstubs/qthighway_stub.cpp
-SOURCES += lcstub/src/lcsessionstub.cpp
-SOURCES += lcstub/src/lcvideoplayerstub.cpp
-SOURCES += lcstub/src/lcenginestub.cpp
-SOURCES += $$MUS_DIR/tsrc/qtestutils/src/testresultxmlparser.cpp
-
-symbian: {
-    INCLUDEPATH += $$LCUIENGINE_DIR/inc
-    HEADERS += inc/ut_lcactivitymanager.h
-    HEADERS += $$LCUIENGINE_DIR/inc/lcuiengine_p.h
-    HEADERS += $$LCUIENGINE_DIR/inc/lcactivitymanager.h
-    SOURCES += src/ut_lcactivitymanager.cpp 
-    SOURCES += $$LCUIENGINE_DIR/src/lcuiengine_p.cpp
-    SOURCES += $$LCUIENGINE_DIR/src/lcactivitymanager.cpp
-    SOURCES += lcstub/src/centralrepository_stub.cpp
-
-    TARGET.UID2 = 0x100039CE
-    TARGET.UID3 = 0xEfa329b2
-    TARGET.CAPABILITY = ALL -TCB
-    LIBS += -lecom -lflogger -lws32 -lbafl -lxqservice -lxqserviceutil -lcone -lxqsettingsmanager
-    TARGET.EPOCALLOWDLLDATA = 1
-}
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/launch.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-musui.exe -1 -2 -3
\ No newline at end of file
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/lcconfig.xml	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<setup layout="5" sessionname="HomerSimpson" phoneno="+358504867872" remote="sip:marchsimpson@springfiled.com"></setup>
-<timer duration="2" >in seconds</timer>
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/lcconfiguration.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "LcConfiguration.h"
-#include <stdio.h>
-
-// File name
-const char fileName[] = "c:\\data\\lcconfig.xml";
-
-// XML configuration elements
-const char setupElement[] = "setup";
-const char timerElement[] = "timer";
-
-// XML configuration attriputes
-const char layoutAttr[] = "layout";
-const char sessionNameAttr[] = "sessionname";
-const char phoneNoAttr[] = "phoneno";
-const char remoteAttr[] = "remote";
-const char durationAttr[] = "duration";
-
-
-// -----------------------------------------------------------------------------
-// LcConfiguration::LcConfiguration
-// -----------------------------------------------------------------------------
-//
-LcConfiguration::LcConfiguration()
-    :mLayout(5),
-    mSessionTitle(QString::fromAscii("Homer Simpson")),
-    mRecipient(QString::fromAscii("sip:march@simpsons.com")),
-    mPhoneNumber(QString::fromAscii("+35850898282")),
-    mTimerDuration(4*1000)
-{    
-}
-
-// -----------------------------------------------------------------------------
-// LcConfiguration::LcConfiguration
-// -----------------------------------------------------------------------------
-//
-LcConfiguration::~LcConfiguration()
-{
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::parse
-// -----------------------------------------------------------------------------
-//
-int LcConfiguration::parse()
-{
-    QFile file(fileName);
-    QXmlInputSource inputSource(&file);
-    QXmlSimpleReader reader;
-    reader.setContentHandler(this);
-    return reader.parse(inputSource);
-}
-
-// -----------------------------------------------------------------------------
-// LcConfiguration::startElement
-// -----------------------------------------------------------------------------
-//
-bool LcConfiguration::startElement(
-    const QString& /*namespaceURI*/,
-    const QString& /*localName*/,
-    const QString& qName,
-    const QXmlAttributes& atts)
-{
-    if( qName == setupElement) {
-        mLayout = atts.value(layoutAttr).toInt();
-        mSessionTitle = atts.value(sessionNameAttr);
-        mRecipient = atts.value(phoneNoAttr);
-        mPhoneNumber = atts.value(durationAttr);
-    }
-    else if (qName == timerElement) {
-        mTimerDuration = atts.value(durationAttr).toInt()*1000;// ms to s
-    }    
-    return true;
-}
-
-// End of File.
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/lcconfiguration.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef LCCONFIGURATION_H
-#define LCCONFIGURATION_H
-
-#include <QXmlDefaultHandler>
-
-
-class LcConfiguration : public QXmlDefaultHandler
-{
-public: // Constructors and destructor
-    LcConfiguration();
-    ~LcConfiguration();
-
-public:
-    int parse();
-
-protected: // From QXmlContentHandler
-    bool startElement(
-        const QString& namespaceURI,
-        const QString& localName,
-        const QString& qName,
-        const QXmlAttributes& atts);
-
-public: // Data
-    int mLayout;
-    QString mSessionTitle;
-    QString mRecipient;
-    QString mPhoneNumber;
-    int mTimerDuration;
-};
-
-
-#endif // LCCONFIGURATION_H
-
-
-
-
-
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/lcuiengine_p.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,480 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcuiengine_p.h"
-#include "lcuidefs.h"
-#include "lclogger.h"
-#include "lcuienginesimulator.h"
-
-//SYSTEM
-#include <QTimer>
-#include <hbdialog.h>
-#include <hblineedit.h>
-#include <hbinstance.h>
-
-
-#define LC_VTPLUGIN_NAME "Videotelephony";
-
-const char localMovieName[] = "c:\\data\\local.3gp";
-const char local2MovieName[] = "c:\\data\\local2.mpeg";
-const char remoteMovieName[] = "c:\\data\\remote.3gp";
-const char mPlayer[] = "c:\\data\\mplayer.exe";
-const char msPaint[] = "mspaint";
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::LcUiEnginePrivate
-// -----------------------------------------------------------------------------
-//
-LcUiEnginePrivate::LcUiEnginePrivate( LcUiEngine& uiEngine,
-                                      const QString& engineName,
-                                      const QString& applicationDisplayName)
-    :mUiEngine( uiEngine )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::LcUiEnginePrivate()" )                 
-    mSimulator = new LcUiEngineSimulator( *this );
-    mViewLayout = (LcViewLayoutHint)mSimulator->layout();
-    mSessionTitle = mSimulator->sessionTitle();
-    mRecipient =  mSimulator->remoteAddress();
-    mPhoneNumber = mSimulator->phoneNo();        
-    mLocalPlayerProcess = new QProcess();
-    mRemotePlayerProcess = new QProcess();
-    mProgram = QString::fromAscii(mPlayer);
-    mProgramImage = QString::fromAscii(msPaint);
-    mLocalMovieName = QString::fromAscii(localMovieName);
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::LcUiEnginePrivate()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::~LcUiEnginePrivate
-// -----------------------------------------------------------------------------
-//
-LcUiEnginePrivate::~LcUiEnginePrivate()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::~LcUiEnginePrivate()" )
-    delete mSimulator;
-    delete mLocalPlayerProcess;
-    delete mRemotePlayerProcess;    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::~LcUiEnginePrivate()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::zoom
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::zoom( int value )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::zoom()" )
-
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::zoom()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::stop
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::stop()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::stop()" )    
-    mSimulator->stop();    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::stop()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::start
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::start()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::start()" )
-    mSimulator->start();
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::start()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::sessionTitle
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEnginePrivate::sessionTitle() const
-{
-    return mSessionTitle;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::recipient
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEnginePrivate::recipient() const
-{
-    return mRecipient;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::phoneNumber
-// -----------------------------------------------------------------------------
-//
-const QString& LcUiEnginePrivate::phoneNumber() const
-{
-    return mPhoneNumber;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::viewLayout
-// -----------------------------------------------------------------------------
-//
-LcViewLayoutHint LcUiEnginePrivate::viewLayout() const
-{
-    return mViewLayout;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setContentAreas
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setContentAreas( const QRectF& sharedContent,
-                                  const QRectF& receivedContent )
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::setContentAreas()" )
-    LC_QDEBUG_2( "livecomms [UI] shared window: ",  sharedContent )
-    LC_QDEBUG_2( "livecomms [UI] received window: ",  receivedContent )    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setContentAreas()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setOrientation
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::setOrientation( Qt::Orientation orientation )
-{
-    bool ok( false );
-    return ok;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setUiComponents
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setUiComponents(
-        HbDialog* invitingNote,
-        HbDialog* waitingNote,
-        HbDialog* acceptQuery,
-        HbDialog* recipientQuery )
-{
-    mInvitingNote = invitingNote;
-    mWaitingNote = waitingNote;
-    mAcceptQuery = acceptQuery;
-    mRecipientQuery = recipientQuery;
-    
-
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::toggleMute
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::toggleMute()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::toggleMute()" )        
-    if( mMuteState ){
-        unmuted();
-    }else{
-        muted();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::toggleMute()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isMuted
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isMuted() const
-{
-    return mMuteState;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::toggleSpeaker
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::toggleSpeaker()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::toggleSpeaker()" )
-    if ( mSpeakerState ){
-        speakerDisabled();
-    }else{
-        speakerEnabled();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::toggleSpeaker()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isSpeakerOn
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isSpeakerOn() const
-{    
-    return mSpeakerState;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::zoomValues
-// -----------------------------------------------------------------------------
-//
-int LcUiEnginePrivate::zoomValues( LcControlValues& values ) const
-{
-    int err( 1 );
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::toggleEnableCamera
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::toggleDisableCamera()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::toggleDisableCamera()" )            
-    if( mPlayerStateLocal == EPlaying ){
-        localPlayerPaused();
-        cameraDisabled();
-    }else if( mPlayerStateLocal == EPaused){
-        localPlayerPlaying();
-        cameraEnabled();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::toggleDisableCamera()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setCameraMain
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setMainCamera(const bool aMainCamera)
-{
-    LC_QDEBUG_2( "livecomms [UI] -> LcUiEnginePrivate::setCameraMain()", aMainCamera )
-    if(aMainCamera){
-        cameraChangedToMain();
-    }else{
-        cameraChangedToSecondary();
-    }
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setCameraMain()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::cameraIndex
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::mainCamera() const
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::mainCamera()" )
-    LC_QDEBUG_2( "livecomms [UI] <- LcUiEnginePrivate::mainCamera()", mMainCamera )
-    return mMainCamera;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::toggleCamera
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::toggleCamera()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::toggleCamera()" )
-    if( mMainCamera ){
-        cameraChangedToSecondary();
-    }else{
-        cameraChangedToMain();
-    }
-    if( mPlayerStateLocal==EPlaying ){
-        localPlayerPaused();
-        mSimulator->setSimulation(2);
-        mSimulator->start();
-    }
-    LC_QDEBUG_2( "livecomms [UI] <- LcUiEnginePrivate::toggleCamera(), mainCamera:", mMainCamera )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::fullScreenMode
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::fullScreenMode()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::fullScreenMode()" )
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::fullScreenMode()" )
-    return mFullScreen;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::setFullScreenMode
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::setFullScreenMode(bool aMode)
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::setFullScreenMode()" )
-    mFullScreen = aMode;
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setFullScreenMode()" )
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::updateSession
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::updateSession()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::updateSession()" )
-    
-    LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::updateSession()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isLocalPlayerPlaying
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isLocalPlayerPlaying() const
-{
-    return ( mPlayerStateLocal == EPlaying )? true : false;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isRemotePlayerPlaying
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isRemotePlayerPlaying() const
-{
-    return ( mSimulatorRemote == EPlaying )? true : false;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::localPlayerPlaying
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::localPlayerPlaying()
-{    
-    QStringList args;
-    args << mLocalMovieName;
-    mLocalPlayerProcess->start(mProgram,args);        
-    mPlayerStateLocal=EPlaying;
-    emit mUiEngine.localPlayerPlaying();
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::remotePlayerPlaying
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::remotePlayerPlaying()
-{
-    QStringList args;
-    args << QString::fromAscii(remoteMovieName);    
-    mRemotePlayerProcess->start(mProgram,args);    
-    mSimulatorRemote=EPlaying;
-    emit mUiEngine.remotePlayerPlaying();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::localPlayerPaused
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::localPlayerPaused()
-{    
-    mLocalPlayerProcess->close();       
-    mPlayerStateLocal=EPaused;
-    emit mUiEngine.localPlayerPaused();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::remotePlayerPaused
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::remotePlayerPaused()
-{    
-    mRemotePlayerProcess->close();    
-    mSimulatorRemote=EPaused;
-    emit mUiEngine.remotePlayerPaused();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::cameraChangedToSecondary
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::cameraChangedToSecondary()
-{
-    mLocalMovieName= QString::fromAscii(local2MovieName);
-    mMainCamera=false;
-    emit mUiEngine.cameraChangedToSecondary();
-}
-
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::cameraChangedToSecondary
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::cameraChangedToMain()
-{
-    mLocalMovieName= QString::fromAscii(localMovieName);
-    mMainCamera=true;
-    emit mUiEngine.cameraChangedToMain();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::isMinimized
-// -----------------------------------------------------------------------------
-//
-bool LcUiEnginePrivate::isMinimized() const
-{
-    return (QApplication::activeWindow()->windowState()==Qt::WindowMinimized);
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::minimize
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::minimize()
-{
-    QApplication::activeWindow()->setWindowState(Qt::WindowMinimized);
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::maximize
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::maximize()
-{
-    QApplication::activeWindow()->setWindowState(Qt::WindowMaximized);
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::shareImage
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::shareImage(const QString& fileName)
-{
-    localPlayerPaused();    
-    QStringList args;
-    args << fileName;
-    mLocalPlayerProcess->start(mProgramImage,args);
-    mPlayerStateLocal=EPlaying;
-    emit mUiEngine.localPlayerPlaying();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEnginePrivate::shareCamera
-// -----------------------------------------------------------------------------
-//
-void LcUiEnginePrivate::shareCamera()
-{
-    localPlayerPaused();
-    localPlayerPlaying();
-}
-// End of File
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/lcuiengine_p.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCUIENGINEPRIVATE_H
-#define LCUIENGINEPRIVATE_H
-
-//SYSTEM
-#include <QObject>
-#include <QString>
-#include <QTime>
-#include <QProcess>
-#include <lcuiengine.h>
-
-class QTimer;
-class QRectF;
-class HbDialog;
-class LcUiEngine;
-class LcUiEngineSimulator;
-
-enum simulationState {
-    ENone,
-    EPreparing,
-    EBuffering,
-    EPlaying,
-    EPaused,
-    EStopped,
-    EUnavailable
-};
-
-/*
- * Live Comms UI Engine 
- */
-class LcUiEnginePrivate
-                  
-{
-
-public:
-    
-    LcUiEnginePrivate ( LcUiEngine& uiEngine,
-                        const QString &engineName,
-                        const QString &applicationDisplayName );
-    ~LcUiEnginePrivate ();
-    
-public :
-
-    void zoom( int value );
-    void stop();
-
-private:
-
-    //signaled when engine is stopped
-    void stopped(){ emit mUiEngine.stopped();};
-    //signaled when layout is changed
-    void layoutChanged(){ emit mUiEngine.layoutChanged();};
-    //signaled when camera changes to main
-    void cameraChangedToMain();
-    //signaled when camera changes to secondary
-    void cameraChangedToSecondary();
-    //signaled when mic is muted
-    void muted(){ mMuteState = true; emit mUiEngine.muted();};
-    //signaled when mic is unmuted
-    void unmuted(){ mMuteState = false; emit mUiEngine.unmuted();};
-    //signaled when speaker is enabled
-    void speakerEnabled(){ mSpeakerState = true; emit mUiEngine.speakerEnabled();};
-    //signaled when speaker is disabled
-    void speakerDisabled(){ mSpeakerState = false; emit mUiEngine.speakerDisabled();};
-    //signaled when camera is disabled
-    void cameraDisabled(){ mPlayerStateLocal = EPaused; emit mUiEngine.cameraDisabled();};
-    //signaled when camera is enabled
-    void cameraEnabled(){  mPlayerStateLocal = EPlaying; emit mUiEngine.cameraEnabled();};
-    //signaled when engine is blocked,
-    //no calls expected until signaled unblocked
-    void blocked(){ emit mUiEngine.blocked();};
-    //signaled when engine is free
-    void unblocked(){ emit mUiEngine.unblocked();};
-    //signaled continuously while session is up and running
-    //carries current session duration
-    void sessionDurationChanged(const QString &duration){ emit mUiEngine.sessionDurationChanged(duration);};
-    void recipientChanged(const QString &recipient){ emit mUiEngine.recipientChanged(recipient);};
-    void phoneNumberChanged(const QString &number){ emit mUiEngine.phoneNumberChanged(number);};
-    //signaled when player state changed
-    void localPlayerPlaying();
-    void remotePlayerPlaying();
-    void localPlayerPreparing(){ mPlayerStateLocal=EPreparing;emit mUiEngine.localPlayerPreparing();};
-    void remotePlayerPreparing(){ mSimulatorRemote=EPreparing;emit mUiEngine.remotePlayerPreparing();};
-    void localPlayerBuffering(){ mPlayerStateLocal=EBuffering;emit mUiEngine.localPlayerBuffering();};
-    void remotePlayerBuffering(){ mSimulatorRemote=EBuffering;emit mUiEngine.remotePlayerBuffering();};
-    void localPlayerPaused();
-    void remotePlayerPaused();
-    void localPlayerUnavailable(){ mPlayerStateLocal=EUnavailable;emit mUiEngine.localPlayerUnavailable();};
-    void remotePlayerUnavailable(){ mSimulatorRemote=EUnavailable;emit mUiEngine.remotePlayerUnavailable();};
-
-public:
-    
-    void start();
-    const QString& sessionTitle() const;
-    const QString& recipient() const;
-    const QString& phoneNumber() const;
-    LcViewLayoutHint viewLayout() const;
-    void setContentAreas( const QRectF& sharedContent,
-                          const QRectF& receivedContent );
-    bool setOrientation( Qt::Orientation orientation );
-    void setUiComponents(HbDialog* invitingNote,
-                         HbDialog* waitingNote,
-                         HbDialog* acceptQuery,
-                         HbDialog* recipientQuery);
-    void toggleMute();
-    bool isMuted() const;
-    void toggleSpeaker();
-    bool isSpeakerOn() const;
-    int zoomValues( LcControlValues& values ) const;
-    void toggleDisableCamera();
-    void setMainCamera(const bool aMainCamera);
-    bool mainCamera() const;
-    void toggleCamera();
-    bool fullScreenMode();
-    void setFullScreenMode(bool aMode);
-    void updateSession();
-    bool isLocalPlayerPlaying() const;
-    bool isRemotePlayerPlaying() const;
-    bool isMinimized()const;
-    void minimize();
-    void maximize();
-    void shareImage(const QString&);
-    void shareCamera();
-
-public: // Data
-    
-    QByteArray mEngineName;
-    QString mSessionTitle;
-    QString mRecipient;
-    QString mPhoneNumber;
-    LcViewLayoutHint mViewLayout;
-    QTimer* mCloseTimer;
-    HbDialog* mInvitingNote; // Not owned
-    HbDialog* mWaitingNote; // Not owned
-    HbDialog* mAcceptQuery; // Not owned
-    HbDialog* mRecipientQuery; // Not owned
-    QString mPendingAction;
-    bool mBlocked;
-    bool mFullScreen;
-    int mSessionDurationTimerId;
-    QTime mSessionDurationStartTime;    
-    LcUiEngine& mUiEngine;
-
-public:
-    simulationState mPlayerStateLocal;
-    simulationState mSimulatorRemote;
-    bool mSpeakerState;
-    bool mMuteState;
-    bool mMainCamera;    
-    QProcess *mLocalPlayerProcess;
-    QProcess *mRemotePlayerProcess;
-    QString mProgram;
-    QString mProgramImage;
-    QString mLocalMovieName;
-
-private:
-    LcUiEngineSimulator* mSimulator;
-
-friend class LcUiEngineSimulator;
-};
-
-#endif // LCUIENGINEPRIVATE_H
-
-
-// End of file
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/lcuienginesimulator.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcconfiguration.h"
-#include "LcUiEngine_p.h"
-#include "lcuidefs.h"
-#include "lclogger.h"
-#include "lcuienginesimulator.h"
-
-
-//SYSTEM
-#include <QTimer>
-#include <hbdialog.h>
-#include <hbaction.h>
-#include <hblabel.h>
-#include <hblineedit.h>
-#include <hbinstance.h>
-#include <hbmessagebox.h>
-
-
-#define LC_VTPLUGIN_NAME "Videotelephony";
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::LcUiEngineSimulator
-// -----------------------------------------------------------------------------
-//
-LcUiEngineSimulator::LcUiEngineSimulator( LcUiEnginePrivate& uiEngine)
-    :mUiEngine( uiEngine )
-{    
-    mConfig = new LcConfiguration();
-    mConfig->parse();
-    mTimer = new QTimer( this );
-    connect( mTimer, SIGNAL(timeout()), this, SLOT(timerEvent()) );    
-    iSimulatorCount = 0;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::~LcUiEngineSimulator
-// -----------------------------------------------------------------------------
-//
-LcUiEngineSimulator::~LcUiEngineSimulator()
-{
-    LC_QDEBUG( "livecomms [UI] -> LcUiEngineSimulator::~LcUiEngineSimulator()" )
-    delete mConfig;
-    delete mTimer;
-    LC_QDEBUG( "livecomms [UI] <- LcUiEngineSimulator::~LcUiEngineSimulator()" )
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::~LcUiEngineSimulator
-// -----------------------------------------------------------------------------
-//
-void LcUiEngineSimulator::start()
-{
-   mTimer->start(mConfig->mTimerDuration);
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::~LcUiEngineSimulator
-// -----------------------------------------------------------------------------
-//
-void LcUiEngineSimulator::stop()
-{
-   mTimer->stop();
-   mUiEngine.stopped();
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::~LcUiEngineSimulator
-// -----------------------------------------------------------------------------
-//
-int LcUiEngineSimulator::layout()
-{
-   return mConfig->mLayout;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::~LcUiEngineSimulator
-// -----------------------------------------------------------------------------
-//
-QString LcUiEngineSimulator::phoneNo()
-{
-   return mConfig->mPhoneNumber;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::~LcUiEngineSimulator
-// -----------------------------------------------------------------------------
-//
-QString LcUiEngineSimulator::sessionTitle()
-{
-   return mConfig->mSessionTitle;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::~LcUiEngineSimulator
-// -----------------------------------------------------------------------------
-//
-QString LcUiEngineSimulator::remoteAddress()
-{
-   return mConfig->mRecipient;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::zoom
-// -----------------------------------------------------------------------------
-//
-void LcUiEngineSimulator::timerEvent()
-{    
-    switch( mConfig->mLayout ){
-    case 0 : {
-            break;
-        }
-    case 1:{
-            simulateLiveSharingSend();
-            break;
-        }
-    case 2:{
-            simulateLiveSharingReceive();
-            break;
-        }
-    case 3:{
-            // TODO : Add simulation
-            break;
-        }
-    case 4:{
-            simulateTwoWaySharing();
-            break;
-        }
-    case 5:{
-            simulateVideoTelephony();
-            break;
-        }
-    default:{
-            
-            break;
-        }
-    }
-
-    iSimulatorCount++;
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::zoom
-// -----------------------------------------------------------------------------
-//
-void LcUiEngineSimulator::simulateLiveSharingSend()
-{
-    switch ( iSimulatorCount ){
-        case 0:{
-                mUiEngine.mInvitingNote->show();
-                mUiEngine.localPlayerPreparing();
-                break;
-            }
-        case 1:{
-                mUiEngine.mInvitingNote->hide();;
-                mUiEngine.localPlayerBuffering();
-                break;
-            }
-        case 2:{
-                mUiEngine.localPlayerPlaying();
-                break;
-            }
-        default:{
-                mUiEngine.sessionDurationChanged(QString::number(iSimulatorCount));
-                break;
-            }
-    }    
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::zoom
-// -----------------------------------------------------------------------------
-//
-void LcUiEngineSimulator::simulateLiveSharingReceive()
-{
-    switch ( iSimulatorCount ){
-    case 0:{
-            mUiEngine.mAcceptQuery->show();
-            mUiEngine.remotePlayerPreparing();
-            break;
-        }
-    case 1:{
-            mUiEngine.mAcceptQuery->hide();
-            mUiEngine.mWaitingNote->show();            
-            mUiEngine.remotePlayerBuffering();
-            break;
-        }
-    case 2:{
-            mUiEngine.mWaitingNote->hide();            
-            mUiEngine.remotePlayerPlaying();
-            break;
-        }
-    default:{
-            mUiEngine.sessionDurationChanged(QString::number(iSimulatorCount));
-            break;
-        }
-    }    
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::zoom
-// -----------------------------------------------------------------------------
-//
-void LcUiEngineSimulator::simulateTwoWaySharing()
-{
-    switch ( iSimulatorCount ){
-    case 0:{
-            mUiEngine.localPlayerPreparing();
-            mUiEngine.remotePlayerPreparing();
-            break;
-        }
-    case 1:{
-            mUiEngine.localPlayerBuffering();
-            mUiEngine.remotePlayerBuffering();
-            break;
-        }
-    case 2:{
-            mUiEngine.localPlayerPlaying();
-            mUiEngine.remotePlayerPlaying();
-            break;
-        }
-    default:{
-            mUiEngine.sessionDurationChanged(QString::number(iSimulatorCount));
-            break;
-        }
-    }    
-}
-
-// -----------------------------------------------------------------------------
-// LcUiEngineSimulator::zoom
-// -----------------------------------------------------------------------------
-//
-void LcUiEngineSimulator::simulateVideoTelephony()
-{
-    switch ( iSimulatorCount ){
-    case 0:{
-            mUiEngine.localPlayerPreparing();            
-            mUiEngine.remotePlayerPreparing();
-            break;
-        }
-    case 1:{
-            mUiEngine.localPlayerBuffering();
-            mUiEngine.remotePlayerBuffering();
-            break;
-        }    
-    case 2:{
-            if( !mUiEngine.isRemotePlayerPlaying() ){
-                mUiEngine.remotePlayerPlaying();
-            }
-            break;
-        }
-    case 3:{
-            if( !mUiEngine.isLocalPlayerPlaying() ){
-                mUiEngine.localPlayerPlaying();
-            }
-            break;
-        }
-    default:{
-            mUiEngine.sessionDurationChanged(QString::number(iSimulatorCount));
-            break;
-        }
-    }    
-}
-
-// End of File
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/lcuienginesimulator.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCUIENGINESIMULATOR_H
-#define LCUIENGINESIMULATOR_H
-
-//SYSTEM
-#include <QObject>
-#include <QString>
-#include <QTime>
-
-class QTimer;
-class LcUiEnginePrivate;
-class LcConfiguration;
-
-/*
- * Live Comms simulator
- */
-class LcUiEngineSimulator : public QObject
-{
-    Q_OBJECT
-
-public:
-
-    LcUiEngineSimulator ( LcUiEnginePrivate& uiEngine );
-    ~LcUiEngineSimulator ();
-    int layout();
-    QString sessionTitle();
-    QString remoteAddress();
-    QString phoneNo();
-    void setSimulation(int index){iSimulatorCount = index;};
-    int simulation(){return iSimulatorCount;};
-public:
-    void start();
-    void stop();
-
-public slots:
-
-     void timerEvent();
-
-private:
-     void simulateLiveSharingSend();
-     void simulateLiveSharingReceive();
-     void simulateTwoWaySharing();
-     void simulateVideoTelephony();
-
-private: // Data
-
-    QTimer* mTimer;
-    LcConfiguration* mConfig;
-    LcUiEnginePrivate& mUiEngine;    
-    int iSimulatorCount;
-
-};
-
-#endif // LCUIENGINESIMULATOR_H
-
-
-// End of file
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/lcvideowidget.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcvideowidget.h"
-
-//SYSTEM
-#include <QPainter>
-
-const qreal lcVideoWidgetCornerRounding = 10.0;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LcVideoWidget::LcVideoWidget(QGraphicsItem *parent, bool showVideo) :
-    HbTransparentWindow(parent),
-    mShowVideo(showVideo)
-{
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-LcVideoWidget::~LcVideoWidget()
-{
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcVideoWidget::paint(
-        QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
-{
-    Q_UNUSED(widget)
-    if ( mShowVideo ){
-        QPainter::CompositionMode origCompositionMode = painter->compositionMode();
-        QPoint point(10,10);
-        QString str = QString::fromAscii("Playing...");
-        if( mLocalPlayer ){
-            painter->setBrush( Qt::red );            
-        }else{
-            painter->setBrush( Qt::green );
-        }
-        painter->setPen( Qt::white );
-        painter->drawRoundedRect( option->exposedRect, 
-            lcVideoWidgetCornerRounding, lcVideoWidgetCornerRounding);        
-        painter->drawText(option->exposedRect.center(),str);
-        painter->setCompositionMode(origCompositionMode); // restore
-    } else {
-        painter->setBrush(QColor(0,0,0,255));
-        painter->drawRoundedRect( option->exposedRect, 
-            lcVideoWidgetCornerRounding, lcVideoWidgetCornerRounding);
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void LcVideoWidget::setShowVideo(bool showVideo)
-{
-    mShowVideo = showVideo;
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-bool LcVideoWidget::isShowingVideo()
-{
-    return mShowVideo;
-}
-
-// End of file
--- a/mmsharing/livecommsui/lcuiengine/tsrc/win32/package.bat	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-@goto invoke_perl
-
-#!perl
-#line 5
-
-################################################################################################################
-# This Script will package livecomms ui compoenents to run in windows environment
-################################################################################################################
-
-#	Packages needed
-use File::Find;			# File operations
-File::Spec::Win32;  # File operartions
-use Getopt::Long;		# parameter handling
-use Cwd;						# Directory operations
-Getopt::Long::Configure( "bundling_override","ignore_case_always" );
-
-#	Global variables
-my $orbit_bin_dir = "c:\\hb\\bin";
-my $qt_bin_dir = "C:\\Qt\\4.6.0-beta1\\bin";
-my $mingw_dll = "C:\\MinGW\\bin\\mingwm10.dll";
-my $livecomms_ui_exe = "$qt_bin_dir\\musui.exe";
-my $livecomms_ui_dll = "$qt_bin_dir\\livecommsui.dll";
-my $package_name = "livecommsui_win";
-my $launch_bat = "launch.bat";
-my $config_file = "lcconfig.xml";
-
-  
-opendir(DIR,$orbit_bin_dir) or die "Can't find dir: $!\n";
-closedir(DIR);
-opendir(DIR,$qt_bin_dir) or die "Can't find dir: $!\n";
-closedir(DIR);
-die "$livecomms_ui_exe Doesn't Exist!" unless (-e $livecomms_ui_exe) ;
-die "$livecomms_ui_dll Doesn't Exist!" unless (-e $livecomms_ui_dll);
-die "$mingw_dll Doesn't Exist!" unless (-e $mingw_dll);
-opendir(DIR,$package_name) or system("mkdir $package_name");
-closedir(DIR);
-system("copy $orbit_bin_dir $package_name\\*");
-system("copy $qt_bin_dir $package_name\\*");
-system("copy $mingw_dll $package_name\\*");
-system("copy $launch_bat $package_name\\*");
-system("copy $config_file $package_name\\*");
-system("del $package_name\.zip") if( -e "$package_name\.zip" );
-system("zip $package_name $package_name\\*");
-system("rmdir /s/q $package_name");
-	
-__END__
-
-:invoke_perl
-@perl -x -S C:\SynergyWorkArea\Mercurial\mmsharinguis\mmsharing\mmshlcui\mmshlcuiengine\win32\package.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
--- a/mmsharing/livecommsui/livecommsui.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-# Contributors:
-# Description:
-
-TEMPLATE = lib
-TARGET = livecommsui
-CONFIG += hb \
-    dll \
-    svg
-    
-QT += xml
-
-DEFINES += LIVECOMMSUI_LIB
-TRANSLATIONS = dialer.ts
-
-LCUI_DIR = lcui
-LCUIENGINE_DIR = lcuiengine
-DOCML_DIR = lcui/resources/lcviews
-
-DOCML += $$DOCML_DIR/lcidleview.docml
-DOCML += $$DOCML_DIR/lcreceiveview.docml
-DOCML += $$DOCML_DIR/lcreceiveonlyview.docml
-DOCML += $$DOCML_DIR/lcsendview.docml
-DOCML += $$DOCML_DIR/lctwowayview.docml
-DOCML += $$DOCML_DIR/lcvtview.docml
-
-RESOURCES += $$LCUI_DIR/livecommsui.qrc
-
-INCLUDEPATH += $$LCUI_DIR/inc
-INCLUDEPATH += $$LCUIENGINE_DIR/inc
-INCLUDEPATH += ../inc
-
-# Input
-HEADERS += $$LCUI_DIR/inc/lcviewmanager.h     
-HEADERS += $$LCUI_DIR/inc/lcviewmanager_p.h
-HEADERS += $$LCUI_DIR/inc/lcview.h
-HEADERS += $$LCUI_DIR/inc/lcuicomponentrepository.h
-HEADERS += $$LCUI_DIR/inc/lceffecthandler.h
-HEADERS += $$LCUI_DIR/inc/lcvideowidget.h
-HEADERS += $$LCUIENGINE_DIR/inc/lcuiengine.h
-
-SOURCES += $$LCUI_DIR/src/lcviewmanager.cpp    
-SOURCES += $$LCUI_DIR/src/lcviewmanager_p.cpp
-SOURCES += $$LCUI_DIR/src/lcview.cpp
-SOURCES += $$LCUI_DIR/src/lcuicomponentrepository.cpp
-SOURCES += $$LCUI_DIR/src/lceffecthandler.cpp
-SOURCES += $$LCUIENGINE_DIR/src/lcuiengine.cpp
-
-libFiles.sources = livecommsui.dll
-DEPLOYMENT += libFiles
-
-symbian: {
-
-    INCLUDEPATH += /epoc32/include/ecom
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-    
-    HEADERS += $$LCUIENGINE_DIR/inc/lcuiengine_p.h
-    HEADERS += $$LCUIENGINE_DIR/inc/lcactivitymanager.h
-    
-    SOURCES += $$LCUIENGINE_DIR/src/lcuiengine_p.cpp
-    SOURCES += $$LCUIENGINE_DIR/src/lcactivitymanager.cpp
-    SOURCES += $$LCUI_DIR/src/lcvideowidget.cpp
-        
-    TARGET.UID2 = 0x1000008d
-    TARGET.UID3 = 0x2002434D
-    TARGET.CAPABILITY = CAP_GENERAL_DLL
-    TARGET.EPOCALLOWDLLDATA = 1
-    
-    libFiles.path = "!:/sys/bin"
-    LIBS += -lecom \
-        -lflogger \
-        -lws32 \
-        -lbafl \
-        -lcone \
-        -lcentralrepository \
-        -lxqserviceutil \
-        -ldialpad \
-        -lxqsettingsmanager
-    
-    defFiles = "$${LITERAL_HASH}ifdef WINS" \
-        "DEFFILE bwins/livecommsui.def" \
-        "$${LITERAL_HASH}else" \
-        "DEFFILE eabi/livecommsui.def" \
-        "$${LITERAL_HASH}endif"
-    MMP_RULES += defFiles
-            
-    :BLD_INF_RULES.prj_exports += "$$LCUI_DIR/inc/lcviewmanager.h /epoc32/include/lcviewmanager.h"
-    :BLD_INF_RULES.prj_exports += "$$LCUI_DIR/inc/lcexport.h /epoc32/include/lcexport.h"    
-}
-
--- a/mmsharing/livecommsui/tsrc/win32/livecommsui.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-# Contributors:
-# Description:
-
-TEMPLATE = lib
-TARGET = livecommsui
-CONFIG += hb \
-    dll \
-    svg
-    
-QT += xml
-
-DEFINES += LIVECOMMSUI_LIB
-
-LCUI_DIR = ../../lcui
-LCUIENGINE_DIR = ../../lcuiengine
-LCUIENGINE_WIN32_DIR = $$LCUIENGINE_DIR/tsrc/win32
-
-RESOURCES += $$LCUI_DIR/livecommsui.qrc
-
-INCLUDEPATH += $$LCUI_DIR/inc
-INCLUDEPATH += $$LCUIENGINE_WIN32_DIR
-INCLUDEPATH += $$LCUIENGINE_DIR/inc
-
-# Input
-HEADERS += $$LCUI_DIR/inc/lcviewmanager.h     
-HEADERS += $$LCUI_DIR/inc/lcviewmanager_p.h
-HEADERS += $$LCUI_DIR/inc/lcview.h
-HEADERS += $$LCUI_DIR/inc/lcuicomponentrepository.h
-HEADERS += $$LCUI_DIR/inc/lceffecthandler.h
-HEADERS += $$LCUI_DIR/inc/lcvideowidget.h
-HEADERS += $$LCUIENGINE_DIR/inc/lcuiengine.h
-
-SOURCES += $$LCUI_DIR/src/lcviewmanager.cpp    
-SOURCES += $$LCUI_DIR/src/lcviewmanager_p.cpp
-SOURCES += $$LCUI_DIR/src/lcview.cpp
-SOURCES += $$LCUI_DIR/src/lcuicomponentrepository.cpp
-SOURCES += $$LCUI_DIR/src/lceffecthandler.cpp
-SOURCES += $$LCUIENGINE_DIR/src/lcuiengine.cpp
-
-libFiles.sources = livecommsui.dll
-DEPLOYMENT += libFiles
-
-win32: { 
-    INCLUDEPATH += $$LCUIENGINE_WIN32_DIR
-    
-    HEADERS += $$LCUIENGINE_WIN32_DIR/lcuiengine_p.h
-    HEADERS += $$LCUIENGINE_WIN32_DIR/lcuienginesimulator.h
-    HEADERS += $$LCUIENGINE_WIN32_DIR/lcconfiguration.h    
-    SOURCES += $$LCUIENGINE_WIN32_DIR/lcuiengine_p.cpp
-    SOURCES += $$LCUIENGINE_WIN32_DIR/lcuienginesimulator.cpp
-    SOURCES += $$LCUIENGINE_WIN32_DIR/lcconfiguration.cpp    
-    SOURCES += $$LCUIENGINE_WIN32_DIR/lcvideowidget.cpp
-}
Binary file mmsharing/mmshapp/help/data/xhtml.zip has changed
--- a/mmsharing/mmshapp/help/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - Initial contribution
-* 
-* Contributors:
-* 
-* 
-* Description:
-* Export help related files.
-*
-*/
-
-#include <platform_paths.hrh>				
-PRJ_EXPORTS
-:zip ../data/xhtml.zip   /epoc32/data/z/resource/ overwrite
-:zip ../data/xhtml.zip   /epoc32/winscw/c/resource/ overwrite
-
-../inc/msh.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/msh.hlp.hrh)
-../rom/mmshuihelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(mmshuihelps_variant.iby)
--- a/mmsharing/mmshapp/help/inc/msh.hlp.hrh	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-//
-// msh.hlp.hrh
-// 
-
-//
-// File generated by CSXHelp Utilities on 2009-04-17
-// 
-
-#ifndef __MSH_HLP_HRH__
-#define __MSH_HLP_HRH__
-
-_LIT(KMSH_HLP_LIVE, "MSH_HLP_LIVE"); // 
-_LIT(KMSH_HLP_CLIP, "MSH_HLP_CLIP"); // 
-_LIT(KMSH_HLP_SETTINGS, "MSH_HLP_SETTINGS"); // 
-_LIT(KMSH_HLP_RECEIVE, "MSH_HLP_RECEIVE"); // 
-
-#endif 
\ No newline at end of file
--- a/mmsharing/mmshapp/help/rom/mmshuihelps_variant.iby	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __MMSHUIHELPS_VARIANT_IBY__
-#define __MMSHUIHELPS_VARIANT_IBY__
-
-#if defined(FF_S60_HELPS_IN_USE) && defined(__MULTIMEDIA_SHARING)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10282391\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10282391\contents.zip)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10282391\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10282391\index.xml)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10282391\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10282391\keywords.xml)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10282391\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10282391\meta.xml)
-#endif
-
-#endif
\ No newline at end of file
--- a/mmsharing/mmshapp/inc/lcapplication.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef LCAPPLICATION_H
-#define LCAPPLICATION_H
-
-#include <hbapplication.h>
-
-class LcHbApplication : public HbApplication
-{
-    Q_OBJECT
-    friend class UT_LcApplication;
-    
-public:
-    
-    LcHbApplication(int &argc, char *argv[]);
-    ~LcHbApplication();
-    
-signals:
-    
-    void handleQuit();
-
-public slots:
-
-    //from QCoreApplication
-    static void quit();        
-
-private: //data
-    
-    static LcHbApplication* self;
-};
-
-
-#endif //LCAPPLICATION_H
--- a/mmsharing/mmshapp/mmshapp.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#                                                                    
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).   
-# All rights reserved.                                                
-# This component and the accompanying materials are made available    
-# under the terms of "Eclipse Public License v1.0"    
-# which accompanies this distribution, and is available               
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".   
-#                                                                     
-# Initial Contributors:                                               
-# Nokia Corporation - initial contribution.                           
-#                                                                     
-# Contributors:                                                       
-#                                                                     
-# Description:                                                        
-#                                                                     
-#
-
-TEMPLATE = app
-TARGET = musui
-CONFIG += hb
-
-# Input
-HEADERS += inc/lcapplication.h
-
-SOURCES += src/main.cpp 
-SOURCES += src/lcapplication.cpp
-
-LIBS += -llivecommsui
-
-symbian: {
-    TARGET.UID2 = 0x100039CE
-    TARGET.UID3 = 0x10282391
-    TARGET.CAPABILITY = CAP_APPLICATION NetworkControl SwEvent Location MultimediaDD
-    RSS_RULES += "hidden = KAppIsHidden;"
-}
--- a/mmsharing/mmshapp/src/lcapplication.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-//USER
-#include "lcapplication.h"
-
-//SYSTEM
-#include <QDebug>
-
-LcHbApplication* LcHbApplication::self = 0;
-
-
-// -----------------------------------------------------------------------------
-// LcHbApplication::LcHbApplication
-// -----------------------------------------------------------------------------
-//
-LcHbApplication::LcHbApplication(int &argc, char *argv[]) :
-    HbApplication(argc, argv)
-{    
-    self = this;
-}
-
-// -----------------------------------------------------------------------------
-// LcHbApplication::~LcHbApplication
-// -----------------------------------------------------------------------------
-//
-LcHbApplication::~LcHbApplication()
-{
-    self = 0;
-}
-
-
-// -----------------------------------------------------------------------------
-// LcHbApplication::quit
-// -----------------------------------------------------------------------------
-//
-void LcHbApplication::quit()
-{
-    qDebug() << "LcHbApplication::quit()";
-    if (self) {
-        emit self->handleQuit();
-    }
-}
--- a/mmsharing/mmshapp/src/main.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-//USER
-#include "lcapplication.h"
-
-//SYSTEM
-#include <hbmainwindow.h>
-#include <lcviewmanager.h>
-#include <QObject>
-
-int main(int argc, char *argv[])
-{
-    int err=-1;
-    if (argc >= 2)
-    {
-        LcHbApplication app(argc, argv);    
-        QString engineName(QString::fromUtf8(argv[1]));
-        QString applicationName("Video Sharing");
-        LcViewManager viewManager(engineName,applicationName);
-        
-        QObject::connect( &app, SIGNAL( handleQuit() ), 
-                 &viewManager, SLOT( terminateSession() ),
-                 Qt::QueuedConnection );
-        
-        err = app.exec();
-    }
-    return err;
-}
--- a/mmsharing/mmshapp/tsrc/ut_mmshapp/inc/ut_lcapplication.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef UT_LCAPPLICATION_H
-#define UT_LCAPPLICATION_H
-
-
-#include <QObject>
-
-class LcHbApplication;
-
-class UT_LcApplication : public QObject
-{
-    Q_OBJECT
-     
-private slots:
-
-/*
- * In addition, there are four private slots that are not treated as testfunctions. 
- * They will be executed by the testing framework and can be used to initialize and clean up 
- * either the entire test or the current test function.
- * 
- * initTestCase() will be called before the first testfunction is executed.
- * cleanupTestCase() will be called after the last testfunction was executed.
- * init() will be called before each testfunction is executed.
- * cleanup() will be called after every testfunction.
-*/
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-
-private slots: //test methods
-     
-    void testConstructorDestructor();
-    void testQuit();
-    
-private:
- 
-    LcHbApplication* mLcApplication;
-    int mArgc;
-};
-
-#endif //UT_LCAPPLICATION_H
--- a/mmsharing/mmshapp/tsrc/ut_mmshapp/src/main.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <QtTest/QtTest>
-
-#include "ut_lcapplication.h"
-#include "testresultxmlparser.h"
-
-
-int main(int argc, char *argv[]) 
-{
-    bool promptOnExit(true);
-    for (int i=0; i<argc; i++) {
-        if (QString(argv[i]) == "-noprompt")
-            promptOnExit = false;
-    }
-    printf("Running tests...\n");
-    
-    QApplication app(argc, argv);
-    TestResultXmlParser parser;
-    
-    UT_LcApplication ut_lcApplication;
-    QString resultFileName = "c:/ut_lcapplication.xml";
-    QStringList args_lcApplication( "ut_lcapplication");
-    args_lcApplication << "-xml" << "-o" << resultFileName;
-    QTest::qExec(&ut_lcApplication, args_lcApplication);
-    parser.parseAndPrintResults(resultFileName,true); 
-
-    if (promptOnExit) {
-        printf("Press any key...\n");
-        getchar(); 
-    }
-    return 0;   
-}
--- a/mmsharing/mmshapp/tsrc/ut_mmshapp/src/ut_lcapplication.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//USER
-#include "lcapplication.h"
-#include "ut_lcapplication.h"
-
-#include <QtTest/QtTest>
-
-
-void UT_LcApplication::initTestCase()
-{
-}
-
-void UT_LcApplication::cleanupTestCase()
-{
-}
-
-
-void UT_LcApplication::init()
-{
-    mArgc = 0;
-    mLcApplication = new LcHbApplication( mArgc, 0 );
-}
-
-void UT_LcApplication::cleanup()
-{
-    delete mLcApplication;
-}
-
-void UT_LcApplication::testConstructorDestructor()
-    {
-    QVERIFY( mLcApplication );
-    QVERIFY( LcHbApplication::self == mLcApplication );
-    
-    delete mLcApplication;
-    mLcApplication = 0;
-    QVERIFY( !LcHbApplication::self );
-    }
-
-void UT_LcApplication::testQuit()
-{
-    QSignalSpy spy( mLcApplication, SIGNAL(handleQuit()) );
-    LcHbApplication::quit();
-    QCOMPARE( spy.count(), 1 );
-    
-    mLcApplication->self = 0;
-    spy.clear();
-    LcHbApplication::quit();
-    QCOMPARE( spy.count(), 0 );
-}
--- a/mmsharing/mmshapp/tsrc/ut_mmshapp/stubs/hbapplication.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef HBAPPLICATION_H
-#define HBAPPLICATION_H
- 
-#include <qobject.h>
-#include <qglobal.h> 
-
-class HbApplication : public QObject
-{
-public:
-    HbApplication(int &/*argc*/, char */*argv*/[]){};
-    ~HbApplication(){};
-};
-
-#endif//HBAPPLICATION_H
--- a/mmsharing/mmshapp/tsrc/ut_mmshapp/ut_mmshapp.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#                                                                    
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).   
-# All rights reserved.                                                
-# This component and the accompanying materials are made available    
-# under the terms of "Eclipse Public License v1.0"    
-# which accompanies this distribution, and is available               
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".   
-#                                                                     
-# Initial Contributors:                                               
-# Nokia Corporation - initial contribution.                           
-#                                                                     
-# Contributors:                                                       
-#                                                                     
-# Description:                                                        
-#                                                                     
-#
-
-TEMPLATE = app
-TARGET = 
-
-CONFIG += hb
-QT += testlib xml
-#CONFIG  += qtestlib
-
-MUSAPP_DIR = ../..
-MUS_DIR = ../../../..
-
-DEPENDPATH += .
-
-INCLUDEPATH += inc
-INCLUDEPATH += stubs
-INCLUDEPATH += $$MUSAPP_DIR/inc
-INCLUDEPATH += $$MUS_DIR/tsrc/qtestutils/inc
-
-# Input
-HEADERS += inc/ut_lcapplication.h
-HEADERS += $$MUSAPP_DIR/inc/lcapplication.h
-
-SOURCES += src/main.cpp
-SOURCES += src/ut_lcapplication.cpp
-SOURCES += $$MUSAPP_DIR/src/lcapplication.cpp
-SOURCES += $$MUS_DIR/tsrc/qtestutils/src/testresultxmlparser.cpp
-
-
-symbian: {
-    TARGET.UID2 = 0x100039CE
-    TARGET.UID3 = 0xE5923aef
-    TARGET.CAPABILITY = ALL -TCB
-    TARGET.EPOCALLOWDLLDATA = 1
-}
--- a/mmsharing/mmshavailability/group/musavailabilityplugin.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/group/musavailabilityplugin.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -91,6 +91,8 @@
 LIBRARY                 sipprofile.lib
 LIBRARY                 sipprofilecli.lib
 LIBRARY                 centralrepository.lib
+LIBRARY                 pbkeng.lib
+LIBRARY                 phoneengine.lib
 LIBRARY                 cntmodel.lib            // Contact Model
 LIBRARY                 sipcodec.lib
 LIBRARY                 sdpcodec.lib            // SDP Codec
@@ -102,6 +104,6 @@
 LIBRARY                 inetprotutil.lib
 LIBRARY                 estor.lib
 DEBUGLIBRARY            flogger.lib
-LIBRARY                 insock.lib 
+LIBRARY                 insock.lib
 
 PAGED
--- a/mmsharing/mmshavailability/inc/mmusavacapabilityqueryobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/mmusavacapabilityqueryobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -20,7 +20,6 @@
 
 #include <sipstrconsts.h>
 #include <bamdesca.h>
-#include <mussettingskeys.h>
 
 class CMusAvaCapabilityQueryBase;
 
@@ -68,10 +67,6 @@
     
     virtual TBool CapabilityQueryAnswered( TBool aAnswered = EFalse ) = 0;
     
-    /**
-     * Advertise about fast mode capability 
-     */
-    virtual void FastModeResolved( MusSettingsKeys::TFastMode aMode ) = 0;
     };
 
 
--- a/mmsharing/mmshavailability/inc/musavaavailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavaavailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -147,7 +147,16 @@
             }
         MUS_LOG( "mus: [MUSAVA]  <- CMusAvaAvailability::SetState" )
         }
-   
+
+	/**
+	* Calculate the availabilited to decide to show the toolbar or not.
+	*
+	*/
+    void AvailabilitiesAbleToShowIndicator()
+    	{
+    	iObserver.AvailabilitiesAbleToShowIndicator();
+    	}
+
    /**
 	* Returns specific availability state.
 	*
@@ -158,14 +167,7 @@
         return iObserver.Available( aAvailability );
         }
         
-    /**
-    * Invitation has been received.
-    */  
-    virtual void PrepareForReceivedInviteL()
-        {
-        MUS_LOG( "mus: [MUSAVA]  <-> CMusAvaAvailability::PrepareForReceivedInviteL" )
-        }
-    
+
     virtual ~CMusAvaAvailability() {};
 
 protected:
@@ -187,4 +189,4 @@
     };
 
 
-#endif // __CMUSAVAAVAILABILITY_H__
+#endif // __CMUSAVAAVAILABILITY_H__
\ No newline at end of file
--- a/mmsharing/mmshavailability/inc/musavaavailabilityobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavaavailabilityobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -57,6 +57,8 @@
         
     virtual MMusAvaObserver::TAvailabilityStatus 
     	AvailabilityPluginState() = 0;
+    
+    virtual void AvailabilitiesAbleToShowIndicator() = 0;
    
     };
 
--- a/mmsharing/mmshavailability/inc/musavacalleventmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavacalleventmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -49,9 +49,16 @@
      * @return call direction
      */
     TInt CallDirectionL();
+    
+    /**
+     * get call Privacy
+     *
+     * @return call privacy
+     */
+    TInt CallPrivacyL();
 
 
-    void GetTelNumberL( TDes& aTelNumber, TBool& aIsSipUri );
+    void GetTelNumberL( TDes& aTelNumber );
 
 	 /**
      * Start to monitoring call state events
@@ -110,7 +117,6 @@
      */
     void ConstructL();
 
-    TBool IsSipUri( const TDesC& aTelNumber ) const;
 
 private: // data
 
--- a/mmsharing/mmshavailability/inc/musavacapability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavacapability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -25,7 +25,7 @@
 #include <sdpcodecstringpool.h>
 #include <badesca.h>
 #include "musunittesting.h"
-#include "mussettingskeys.h"
+
 
 class CMusAvaCapabilityExchange;
 class CSIPServerTransaction;
@@ -47,7 +47,6 @@
 _LIT8( KCapabilitySwisFormatList, "98 96" );
 _LIT8( KCapabilitySwisFormatListH263Only, "96" );
 _LIT8( KCapabilitySDPAttributeCodecH264, "H264" );
-_LIT8( KCapabilitySDPAttributeFastMode, "fastmode" ); //a=keywds:fastmode, see RFC 4566
 
 const TUint64 KCapabilitySDPAttributeClockrate = 90000;
 const TUint64 KCapabilitySDPAttributePayloadType = 96;
@@ -170,18 +169,6 @@
     static const CSdpAttributeField* Attribute( const RStringF& aMedia,
                                         const RStringF& aAttribute,
                                         CSdpDocument& aSDP );
-    
-    /**
-     * Finds fast mode value from the SDP document
-     */
-    static MusSettingsKeys::TFastMode ResolveFastModeL( CSdpDocument& aSdp );
-    
-    /**
-     * Add fast mode related attribute to SDP, if fast mode is supported
-     */
-    static void AddFastModeL( CSdpDocument& aSdp );
-    
-    
 public://new functions
 
     /**
--- a/mmsharing/mmshavailability/inc/musavacapabilityquerybase.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavacapabilityquerybase.h	Wed Sep 01 12:31:01 2010 +0100
@@ -44,7 +44,7 @@
 const TInt KCapabilityCapabilitesReady = 1;
 const TInt KCapabilityCapabilitesNotFound = 2;
 const TInt KCapabilityCapabilitiesForbidden = 3;
-
+const TInt KMaxRemoteUriLength = 512;
 
 /**
  * Sent capability query (OPTIONS)
@@ -113,6 +113,12 @@
      */
     HBufC8* ContentLC();
 
+    /**
+     * Check if Recipient address is same as that in profile.
+     *     
+     */
+    TBool ValidateUri();
+
     
     
 public: // new functions
@@ -214,10 +220,18 @@
     CUri8* iRegisteredContact;
     CUri8* iOriginator;
     CSIPClientTransaction* iTrx;
+    TBuf8<KMaxRemoteUriLength> iRemoteUri;
     
 //for unit testing
     CAPABILITY_UT_DEFINITIONS
     
+private:    // Friend classes
+
+#ifdef EUNIT_TEST
+   friend class UT_CMusAvaCapabilityQuery;
+   friend class UT_CMusAvaCapabilityQueryBase;
+#endif
+    
     };
 
 
--- a/mmsharing/mmshavailability/inc/musavacapabilitytimer.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavacapabilitytimer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -45,6 +45,10 @@
 protected: // From CTimer
 
     void RunL();
+    
+protected: // from CActive
+
+    TInt RunError( TInt aError );
 
 private:
 
--- a/mmsharing/mmshavailability/inc/musavaconnectionavailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavaconnectionavailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -25,6 +25,7 @@
 #include "musavatelephonystatusobserver.h"
 #include "musavaconnectionmonitorobserver.h"
 #include "musunittesting.h"
+
 #include <e32base.h>
 #include <etelmm.h>
 
@@ -50,9 +51,10 @@
 class CMusAvaConnectionAvailability : public CMusAvaAvailability,
                                       public MMusAvaTelephonyStatusObserver,
                                       public MMusAvaConnectionMonitorObserver
-	{
-	public:
-	/**
+    {
+public:
+    
+    /**
      * Two-phased constructor
      *
      * @since S60 v3.2
@@ -62,27 +64,26 @@
      * @return Returns pointer to CMusAvaInterface object
      */
     static CMusAvaConnectionAvailability* NewL( MMusAvaAvailabilityObserver& aObserver,
-    											CMusAvaSettingsImp& aSettings );
+                                                CMusAvaSettingsImp& aSettings );
 
-	static CMusAvaConnectionAvailability* NewLC( MMusAvaAvailabilityObserver& aObserver,
-												 CMusAvaSettingsImp& aSettings );
+    static CMusAvaConnectionAvailability* NewLC( MMusAvaAvailabilityObserver& aObserver,
+                                                 CMusAvaSettingsImp& aSettings );
 
-	/**
+    /**
      * Destructor
      */
-
     ~CMusAvaConnectionAvailability();
 
 protected:
 
-	CMusAvaConnectionAvailability( MMusAvaAvailabilityObserver& aObserver,
-								   CMusAvaSettingsImp& aSettings );
+    CMusAvaConnectionAvailability( MMusAvaAvailabilityObserver& aObserver,
+                                   CMusAvaSettingsImp& aSettings );
 
-	void ConstructL();
+    void ConstructL();
+
 
-// from base class CMusAvaAvailability
+public:// from base class CMusAvaAvailability
 
-public:
 
     /**
      * Executes for the availability.
@@ -108,14 +109,15 @@
 
 public: // from MMusAvaTelephonyStatusObserver
 
-	/**
-     * Current Network Mode Status
-	 *
-     * @since  S60 v3.2
-     * @return
-	 */
+    /**
+    * Current Network Mode Status
+    *
+    * @since  S60 v3.2
+    * @return
+    */
     void PhoneNetworkModeStatus(
-                            RMobilePhone::TMobilePhoneNetworkMode aStatus );
+            RMobilePhone::TMobilePhoneNetworkMode aStatus );
+    
     /**
      * Current Network Registration Status
      *
@@ -123,27 +125,25 @@
      * @return
      */
     void NetworkRegistrationStatus(
-                    RMobilePhone::TMobilePhoneRegistrationStatus aRegStatus );
+            RMobilePhone::TMobilePhoneRegistrationStatus aRegStatus );
 
 public: //from MMusAvaConnectionMonitorObserver
 
-   	/**
-	 * Event from connection monitor server
-	 *
-	 */
+    /**
+    * Event from connection monitor server
+    *
+    */
     void EventL(const CConnMonEventBase& aConnMonEvent);
 
-
-
 private:
 
-	 /**
-     * Check needs to have manual activation 
-     *
-     * @since  S60 v3.2
-     * @return TAvailabilityStatus is returned
-     */
-	MMusAvaObserver::TAvailabilityStatus ManualActivationL();
+    /**
+    * Check needs to have manual activation 
+    *
+    * @since  S60 v3.2
+    * @return TAvailabilityStatus is returned
+    */
+    MMusAvaObserver::TAvailabilityStatus ManualActivationL();
 
     /**
      * Current test network registration agains the settings
@@ -153,6 +153,8 @@
      */
     MMusAvaObserver::TAvailabilityStatus NetworkRegistrationAndSettingsL();
 
+    static TBool OperatorVariant();
+    
 private: // data
 
     /**
@@ -185,6 +187,7 @@
      */
     CMusAvaSettingsImp& iSettings;
 
+    
     MUS_UNITTEST( UT_CMusAvaConnectionAvailability )
     };
 
--- a/mmsharing/mmshavailability/inc/musavacontactavailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavacontactavailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -22,16 +22,19 @@
 #include "musavaavailability.h"
 #include "musunittesting.h"
 #include "mussettingskeys.h"
-
+#include "muscallmonitorobserver.h"
 #include <badesca.h>
+#include <PbkFields.hrh>
 
 class MMusAvaAvailabilityObserver;
 class MMusAvaObserver;
 class CMusAvaSharedObject;
+class CPbkContactEngine;
 class CContactIdArray;
+class CPbkContactItem;
 class CContactItem;
 class CMusAvaSettingsImp;
-
+class CMusAvaCallEventMonitor;
 
 /**
  *  Implemets register vailability.
@@ -40,7 +43,8 @@
  *
  *  @lib musavailabilityplugin.lib
  */
-class CMusAvaContactAvailability : public CMusAvaAvailability
+class CMusAvaContactAvailability : public CMusAvaAvailability,
+								   public MMusCallMonitorObserver
 	{
 
 public:
@@ -95,23 +99,118 @@
      * @return Name of *this* availability.
      */
     virtual MMusAvaObserver::TAvailabilityName Name();
+    // from class MMusCallMonitorObserver
+    /**
+    * Call connected
+    *
+    * @since  S60 v3.2
+    * @return
+    */
+    virtual void CallConnectedL( const TDesC& aTelNumber );
+    
+    /**
+    * Call on hold
+    *
+    * @since  S60 v3.2
+    * @return
+    */
+    virtual void CallHoldL( const TDesC& aTelNumber );
+
+    /**
+    * Call disconnected
+    *
+    * @since  S60 v3.2
+    * @return
+    */
+    virtual void NoActiveCallL();
+
+    /**
+    * Call on hold
+    *
+    * @since  S60 v3.2
+    * @return
+    */
+    virtual void ConferenceCallL();
+    
+    
+    virtual void ConferenceCallLTerminated();
 
 private:
 
      /**
      *
      */
-    TBool ActiveCallL( CDesCArrayFlat*& aContactsArray );
+	TBool ActiveCallL( CDesCArrayFlat*& aContactsArray );
+
+     /**
+     *
+     */
+    TBool ContactL( CContactIdArray*& aContactIdArray,
+                    CPbkContactEngine& aPbkContactEngine );
+
+     /**
+     *
+     */
+    void UpdateContactNameL( CContactItem& aContactItem );
+
+     /**
+     *
+     */
+    TInt ContactArrayL(  CContactIdArray*& aContactIdArray,
+                         CPbkContactEngine& aPbkContactEngine );
+
+     /**
+     *
+     */
+    TInt ContactItem( CContactIdArray& aContactIdArray,
+                       CPbkContactItem*& aPbkContactItem,
+                       CPbkContactEngine& aPbkContactEngine );
+
+    /**
+    *
+    */
+    TBool ContactId( CPbkContactItem& aPbkItem,
+                    TPbkFieldId aTPbkFieldId  );
+    /**
+    *
+    */
+    TPbkFieldId ContactIdSearch( CContactIdArray& aContactIdArray,
+                                  CPbkContactEngine& aPbkContactEngine );
+
+     /**
+     *
+     */
+    TBool PhoneResolutionL( CPbkContactItem& aPbkItem,
+                            CDesCArrayFlat*& aContactsArray  );
 
 
      /**
      *
      */
-    TBool ResolveAddressesL( const TDesC& aContactId,
-                             CDesCArrayFlat*& aContactsArray );
+    TBool ResolveAddressesL( CPbkContactItem& aPbkItem,
+                             CDesCArrayFlat*& aContactsArray,
+                             TPbkFieldId aTPbkFieldId  );
+
+     /**
+     *
+     */
+    TBool ResolvePhoneContactL( CPbkContactItem& aPbkItem,
+                                CDesCArrayFlat*& aContactsArray );
 
-    
+    /* -------------------------------------------------------------------------
+    *  Checks that whether aDesItem present in aDesArray.
+    *  Utility function used to avoid dublication.
+    * -------------------------------------------------------------------------
+    */
+    TBool IsExistAlready(const MDesCArray& aDesArray,
+                                          const TDesC& aDesItem);
+
 private:
+    /**
+    * iPhoneStatus subscribe property resource. When the resource 
+    * changed somewhere,availability will get notification.
+    */
+    CMusAvaCallEventMonitor* iPhoneStatus;
 
      /**
      * resolved contact name
@@ -137,4 +236,4 @@
     };
 
 
-#endif // __MUSAVACONTACTAVAILABILITY_H__
+#endif // __MUSAVACONTACTAVAILABILITY_H__
\ No newline at end of file
--- a/mmsharing/mmshavailability/inc/musavadefaultimp.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavadefaultimp.h	Wed Sep 01 12:31:01 2010 +0100
@@ -162,8 +162,7 @@
         virtual TBool MandatoryAvailability();
         virtual TBool ExtensionAvailability();
         virtual MMusAvaObserver::TAvailabilityStatus AvailabilityState( MMusAvaObserver::TAvailabilityName aAvailability );
-        virtual void PrepareForReceivedInviteL();
-        
+
     public: // from base class MMusAvaAvailabilityObserver
 
        /**
@@ -190,6 +189,8 @@
         
     virtual MMusAvaObserver::TAvailabilityStatus AvailabilityPluginState();
     
+    virtual void AvailabilitiesAbleToShowIndicator();
+    
 
     private: // data
 
--- a/mmsharing/mmshavailability/inc/musavanetworkavailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavanetworkavailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -21,6 +21,7 @@
 
 #include "musavaavailability.h"
 #include "muscallmonitorobserver.h"
+#include "musunittesting.h"
 #include <sipprofileregistryobserver.h>
 
 #include <e32base.h>
@@ -45,6 +46,8 @@
 class CMusAvaNetworkAvailability : public CMusAvaAvailability,
                                    public MMusCallMonitorObserver
 	{
+	MUS_UNITTEST( UT_CMusAvaNetworkAvailability )
+	
 public:
 	/**
      * Two-phased constructor
@@ -123,7 +126,7 @@
      * @since  S60 v3.2
      * @return
      */
-    void CallConnectedL( const TDesC& aTelNumber, TBool aIsSipUri );
+    void CallConnectedL( const TDesC& aTelNumber );
 
      /**
      * Call on hold
@@ -131,7 +134,7 @@
      * @since  S60 v3.2
      * @return
      */
-    virtual void CallHoldL( const TDesC& aTelNumber, TBool aIsSipUri );
+    virtual void CallHoldL( const TDesC& aTelNumber );
 
     /**
      * Call disconnected
@@ -148,10 +151,15 @@
      * @return
      */
     virtual void ConferenceCallL();
-
-private:
-
-	void SetRemoteHostL( const TDesC& aTelNumber, TBool aIsSipUri );
+    
+    
+    /**
+     * Call on conf Terminated
+     *
+     * @since  S60 v3.2
+     * @return
+     */
+    virtual void ConferenceCallLTerminated();
 
 private: // data
 
@@ -170,8 +178,8 @@
     */
     CMusAvaSettingsImp& iSettings;
     
-    MUS_UNITTEST( UT_CMusAvaNetworkAvailability )
+    TBool iConfcall;
     };
 
 
-#endif // __MUSAVANETWORKAVAILABILITY_H__
+#endif // __MUSAVANETWORKAVAILABILITY_H__
\ No newline at end of file
--- a/mmsharing/mmshavailability/inc/musavaoptionhandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavaoptionhandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -124,11 +124,6 @@
      */
     virtual MMusAvaObserver::TAvailabilityName Name();
     
-    /**
-    * Invitation has been received.
-    */  
-    virtual void PrepareForReceivedInviteL();
-    
 
 public: // functions from base class MMusAvaCapabilityQueryObserver
 
@@ -163,45 +158,9 @@
      */
     void VideoCodecsResolvedL( const MDesCArray& aVideoCodecs );
 
+
     TBool CapabilityQueryAnswered( TBool aAnswered );
 
-    void FastModeResolved( MusSettingsKeys::TFastMode aMode );
-
-private:
-    
-    /**
-    * Change state.
-    * @param aNewState, proposed new state
-    * @return KErrNone if successfull
-    */
-    TInt DoSetState( MMusAvaObserver::TAvailabilityStatus aNewState );
-    
-    /**
-    * Handle state change in fast mode, state change may be modified
-    * based on fast mode session setup progress.
-    * @param aNewState, proposed new state
-    * @param aCouldNotProceed, ETrue if state change occured because
-    *       couldn't proceed (e.g. missing information)
-    * @return new state to set
-    */
-    MMusAvaObserver::TAvailabilityStatus HandleFastModeL( 
-        MMusAvaObserver::TAvailabilityStatus aNewState );
-    
-    MMusAvaObserver::TAvailabilityStatus HandleFastModeAvailableL(
-        MMusAvaObserver::TAvailabilityStatus aNewState );
-    
-    MMusAvaObserver::TAvailabilityStatus HandleFastModeOptionsNotSentL(
-        MMusAvaObserver::TAvailabilityStatus aNewState );
-    
-    MMusAvaObserver::TAvailabilityStatus HandleFastModeOptionNotAvailableL(
-        MMusAvaObserver::TAvailabilityStatus aNewState );
-    
-    void HandleFastModeQueryAnswered();
-    
-    TBool FastModeNegotiatedByAnswerMT();
-    
-    TBool FastModeNegotiationFailedMO();
-    
 private:
 
     /**
@@ -220,9 +179,6 @@
     TBool                       iCapabilitiesRequestAnswered;
     TBool                       iCapabilityQueryAnswered;
     
-    TBool                       iFastModeCapable;
-    TBool                       iFastModeAvailabilityDelayed;
-    
     MUS_UNITTEST ( UT_CMusAvaOptionHandler )
     MUS_UNITTEST ( UT_CMusAvaCapabilityExchange )
     MUS_UNITTEST ( UT_CMusAvaCapability )
@@ -231,4 +187,4 @@
     MUS_UNITTEST ( UT_CMusAvaCapabilityQuery )
     };
 
-#endif // __MUSAVAOPTIONHANDLER_H__
+#endif // __MUSAVAOPTIONHANDLER_H__
\ No newline at end of file
--- a/mmsharing/mmshavailability/inc/musavaregisteravailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavaregisteravailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -5,7 +5,7 @@
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*  Version     : %version: 15.1.5 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: 15.1.4 % << Don't touch! Updated by Synergy at check-out.
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
@@ -26,6 +26,7 @@
 #include "musavaavailability.h"
 #include "musavasipconnectionadapter.h"
 #include "musavasipprofileregistryadapter.h"
+#include "mussettingskeys.h"
 #include <sipprofileregistryobserver.h>
 #include <e32base.h>
 
@@ -203,7 +204,7 @@
 	* EFalse otherwise
 	*/
     TBool RegistrationStatusL();
-
+    
 private: // Data
 
     /**
@@ -226,9 +227,9 @@
      */
      CSIPConnection* iConnection;
 
-
+     MusSettingsKeys::TOperatorVariant iOperatorVariant;
     MUS_UNITTEST( UT_CMusAvaRegisterAvailability )
     };
 
 
-#endif // __MUSAVAREGISTERAVAILABILITY_H__
\ No newline at end of file
+#endif // __MUSAVAREGISTERAVAILABILITY_H__
--- a/mmsharing/mmshavailability/inc/musavasettingsimp.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavasettingsimp.h	Wed Sep 01 12:31:01 2010 +0100
@@ -61,13 +61,7 @@
 	
 public: // from MMusAvaSettings
 
-    /**
-    * Returns the fast mode value.
-    */         
-
-    virtual MusSettingsKeys::TFastMode FastMode() const;
-	
-    /**
+	/**
      * Returns the manual activation
      *
      */   		
@@ -135,18 +129,22 @@
      * @param aObserver Pointer to observer intercase 
      */   		
     virtual void SetObserver( MMusAvaSettingsObserver& aObserver );
-    
-    /*
-    * Gets the settings observer pointer 
-    * 
-    */
-    virtual MMusAvaSettingsObserver* Observer();
 
      /**
      * Sets the for the manual activation
      *
      */   		
     virtual void SetManualActivation( TManualActivation aManualActivation );
+    
+    
+    /**
+    * Returns the direction of the mobile call.
+    *
+    * @return 0, if the direction of the call is unknown.
+    *         1, call is from public number.
+    *         2, call is from private number   
+    */         
+    virtual TInt CallPrivacy();
 
      
 public:
@@ -244,6 +242,15 @@
      * @param aProfileId the SIP profile id.
      */   		
     void SetSipProfileId( TInt aProfileId );
+    
+    
+    /**
+     * Sets the call privacy e.g. current call number is from private number, 
+     * should be shown on MT.
+     *
+     * @param aPrivacy the SIP profile id.
+     */  
+    void SetCallPrivacy( TInt aPrivacy );
      
     /**
      * Returns the id of the preferable SIP profile.
@@ -251,21 +258,15 @@
      * @return The SIP profile id.
      */   		
     CMusAvaSip& Sip();
-
-    /**
-     * Sets the fast mode value
-     */
-    void SetFastMode( MusSettingsKeys::TFastMode aMode );
+    
+    void SetOptionSentNumber( const TDesC& aTelNumber );
+    
+    const TDesC& OptionSentTelNumber() const;
     
-    /**
-    * Sets contact resolving uri
-    */
-    void SetUriForContactResolvingL( const TDesC& aRemoteUri );
+    void ReleaseOptionSentNumber();
     
-    /**
-    * Gets contact resolving uri
-    */
-    TPtrC ContactResolvingUri();  
+
+     
      
 private: 
 
@@ -296,6 +297,9 @@
      * Owns.
      */   
     HBufC* iTelNumber;
+    
+    HBufC* iOptionSentTelNumber;
+
 
 	/**
      * Current Call Direction
@@ -354,17 +358,15 @@
 	TManualActivation iManualActivation;
 	
 	/**
-	* Fast mode
-	*/   
-	MusSettingsKeys::TFastMode iFastMode;
-	
-	/**
-	* Contact resolving 
-	*/
-	HBufC* iContactResolvingUri;
+  * Call privacy indicator
+  * 
+  */
+  
+	TInt iCallPrivacy;
 	
     MUS_UNITTEST( UT_CMusAvaSettingsImp )	
     MUS_UNITTEST( UT_CMusAvaOptionHandler )   
+    MUS_UNITTEST( UT_CMusAvaTerminal )  
 	};
 
 #endif __MUSAVASETTINGSIMP_H__
--- a/mmsharing/mmshavailability/inc/musavasip.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavasip.h	Wed Sep 01 12:31:01 2010 +0100
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  This is client interface class for SIP-server 
-*  Version     : %version: 24 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: 23 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -223,6 +223,11 @@
      *         that this pointer is NULL.
      */
     CMusAvaClientResolverUtil* ClientResolverUtil() const;
+    
+    /**
+    * Deletes unnecessary CSIPConnection   
+    */
+    void DeleteSIPConnection();
 
 
 private:
--- a/mmsharing/mmshavailability/inc/musavasipheaderutil.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/inc/musavasipheaderutil.h	Wed Sep 01 12:31:01 2010 +0100
@@ -115,6 +115,14 @@
 
     static void AddAcceptSdpHeaderL(RPointerArray<CSIPHeaderBase>& aRequestHeaders );
     
+    /**
+     * Utility class to add SIP privacy header when the PS key
+     * NMusSessionInformationApi::KMusClirSetting PS indicates so.
+     * @lib AlwaysOnlinePlugin.dll
+     */
+    static void AddPrivacyHeaderL( 
+                             RPointerArray<CSIPHeaderBase>& aRequestHeaders );
+    
     };
 
 
--- a/mmsharing/mmshavailability/src/musavacalleventmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavacalleventmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -117,39 +117,66 @@
         CallDirectionL" )
     return direction;
     }
-
+    
 // --------------------------------------------------------------------------
-// aTelNumber will be filled with telephone number or SIP URI of current
-// connected call
+// Returns the direction of connected call.
 // --------------------------------------------------------------------------
 //
-void
-CMusAvaCallEventMonitor::GetTelNumberL( TDes& aTelNumber, TBool& aIsSipUri )
+TInt CMusAvaCallEventMonitor::CallPrivacyL()
+    {
+    MUS_LOG( "mus: [CMusAvaCallEventMonitor]  -> CMusAvaCallEventMonitor::\
+            CallPrivacyL" )
+    // retrieve call count
+    TInt privacy( 0 );
+    User::LeaveIfError( RProperty::Get(
+        NMusSessionInformationApi::KCategoryUid,
+        NMusSessionInformationApi::KMUSPrivacy,
+        privacy ) );
 
+    MUS_LOG1( "mus: [CMusAvaCallEventMonitor]     Call privacy = %d ", 
+            privacy )
+    MUS_LOG( "mus: [CMusAvaCallEventMonitor]  <- CMusAvaCallEventMonitor::\
+        CallPrivacyL" )
+    return privacy;
+    }
+	
+// --------------------------------------------------------------------------
+// aTelNumber will be filled with telephone number of current connected call
+// --------------------------------------------------------------------------
+//
+void CMusAvaCallEventMonitor::GetTelNumberL( TDes& aTelNumber )
     {
     MUS_LOG( "mus: [CMusAvaCallEventMonitor]  -> CMusAvaCallEventMonitor::\
         GetTelNumberL" )
+    TBuf<KMusTelNumberMaxLength> telNumber;
 
-    TInt error = RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                                 NMusSessionInformationApi::KMusTelNumber,
-                                 aTelNumber );
+    MUS_LOG( "mus: [CMusAvaCallEventMonitor]  CMusAvaCallEventMonitor::\
+        GetTelNumberL - a" )
+    TInt error = RProperty::Get(
+        NMusSessionInformationApi::KCategoryUid,
+        NMusSessionInformationApi::KMusTelNumber,
+        telNumber );
 
     MUS_LOG1( "mus: [CMusAvaCallEventMonitor]  CMusAvaCallEventMonitor::\
         GetTelNumberL (%d)", error )
 
-    if ( error == KErrOverflow )
+    if ( error != KErrOverflow )
         {
-        MUS_LOG1( "mus: [CMusAvaCallEventMonitor]  CMusAvaCallEventMonitor::\
-            GetTelNumberL - Buffer too small (%d), leave", 
-            aTelNumber.MaxLength() )
-        User::Leave( error );
+        User::LeaveIfError( error );
         }
-    User::LeaveIfError( error );
-    
-    aIsSipUri = IsSipUri( aTelNumber );
-    MUS_LOG1( "mus: [CMusAvaCallEventMonitor]  CMusAvaCallEventMonitor::\
-          GetTelNumberL (is SIP URI=%d)", aIsSipUri )
-    
+
+    TInt length = telNumber.Length();
+    TInt maxLength = aTelNumber.MaxLength();
+    if ( maxLength < length )
+        {
+        // buffer is too small for returned tel number.
+        MUS_LOG2( "mus: [CMusAvaCallEventMonitor]  CMusAvaCallEventMonitor::\
+            GetTelNumberL - Buffer too small (%d, %d), leave", 
+            maxLength, length )
+        User::Leave( KErrOverflow );
+        }
+
+    aTelNumber.Copy( telNumber );
     MUS_LOG( "mus: [CMusAvaCallEventMonitor]  <- CMusAvaCallEventMonitor::\
         GetTelNumberL" )
     }
@@ -221,19 +248,38 @@
 
             case NMusSessionInformationApi::ECallConnected:
                 {
+                // retrieve telnumber
+                TInt error;
                 TBuf<KMusTelNumberMaxLength> telNumber;
-                TBool isSipUri( EFalse );
-                GetTelNumberL( telNumber, isSipUri );
-                iObserver.CallConnectedL( telNumber, isSipUri );
+                error = RProperty::Get(
+                    NMusSessionInformationApi::KCategoryUid,
+                    NMusSessionInformationApi::KMusTelNumber,
+                    telNumber );
+
+                if ( error != KErrOverflow )
+                    {
+                    User::LeaveIfError( error );
+                    }
+
+                iObserver.CallConnectedL( telNumber );
                 break;
                 }
 
             case NMusSessionInformationApi::ECallHold:
                 {
+                 // retrieve telnumber
+                TInt error;
                 TBuf<KMusTelNumberMaxLength> telNumber;
-                TBool isSipUri( EFalse );
-                GetTelNumberL( telNumber, isSipUri );
-                iObserver.CallHoldL( telNumber, isSipUri );
+                error = RProperty::Get(
+                    NMusSessionInformationApi::KCategoryUid,
+                    NMusSessionInformationApi::KMusTelNumber,
+                    telNumber );
+
+                if ( error != KErrOverflow )
+                    {
+                    User::LeaveIfError( error );
+                    }
+                iObserver.CallHoldL( telNumber );
                 break;
                 }
 
@@ -242,6 +288,11 @@
                 iObserver.ConferenceCallL();
                 break;
                 }
+            case NMusSessionInformationApi::EConferenceTerminated:
+            	{
+            	iObserver.ConferenceCallLTerminated();
+            	break;
+            	}
 
             default:
                 {
@@ -271,15 +322,3 @@
     MUS_LOG( "mus: [MUSAOP]  <- CMusAvaCallEventMonitor::RunError" )
     return aError;
     }
-
-
-// --------------------------------------------------------------------------
-// CMusAvaCallEventMonitor::IsSipUri()
-// --------------------------------------------------------------------------
-//
-TBool CMusAvaCallEventMonitor::IsSipUri( const TDesC& aTelNumber ) const
-    {
-    _LIT( KSipPrefix, "sip:" );
-     TPtrC prefix = aTelNumber.Left( KSipPrefix().Length() );
-     return prefix.Compare( KSipPrefix ) == 0;
-     }
--- a/mmsharing/mmshavailability/src/musavacapability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavacapability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -23,11 +23,14 @@
 #include "musavacapabilitycontext.h"
 #include "mmusavacapabilityqueryobserver.h"
 #include "mussettings.h"
+#include "mussettingskeys.h"
 
 #include <e32math.h>
 #include <uri8.h>
 #include <escapeutils.h>
+//#include <sip.h>
 #include <sipservertransaction.h>
+//#include <sipclienttransaction.h>
 #include <sipacceptcontactheader.h>
 #include <sipcontactheader.h>
 #include <siprequestelements.h>
@@ -206,9 +209,6 @@
     aResponseContent.AttributeFields().AppendL( type );
     CleanupStack::Pop( type );
     
-    //Add fast startup mode, if supported
-    AddFastModeL( aResponseContent );
-
     MUS_LOG( "mus: [MUSAVA] Adding media line to SDP" )
     //media line    
     CSdpMediaField* mediaLine = MediaLineLC( 
@@ -340,54 +340,6 @@
     return codecs;
     }
     
-// -----------------------------------------------------------------------------
-// CMusAvaCapability::ResolveFastModeL
-// -----------------------------------------------------------------------------
-// 
-MusSettingsKeys::TFastMode CMusAvaCapability::ResolveFastModeL( 
-        CSdpDocument& aSDP )
-    {
-    MUS_LOG( "mus: [MUSAVA]: -> CMusAvaCapability::ResolveFastModeL" )
-    MusSettingsKeys::TFastMode mode = MusSettingsKeys::EFastModeOff;
-    if ( MultimediaSharingSettings::FastStartupModeL() == 
-            MusSettingsKeys::EFastModeOn )
-        {
-        MUS_LOG( "mus: [MUSAVA] Checking if a=keywds:fastmode present..." )
-        const CSdpAttributeField* keywds = CMusAvaCapability::Attribute( 
-                    MusAvaCapabilityContext::SDPStringL( 
-                        SdpCodecStringConstants::EAttributeKeywds ),
-                    aSDP );
-        if ( keywds && 
-             keywds->Value().Compare( KCapabilitySDPAttributeFastMode ) == 0 )        
-            {
-            mode = MusSettingsKeys::EFastModeOn;
-            }
-        }
-    MUS_LOG( "mus: [MUSAVA]: <- CMusAvaCapability::ResolveFastModeL" )
-    return mode;
-    }
-
-// -----------------------------------------------------------------------------
-// CMusAvaCapability::ResolveFastModeL
-// -----------------------------------------------------------------------------
-// 
-void CMusAvaCapability::AddFastModeL( CSdpDocument& aSdp )
-    {
-    MUS_LOG( "mus: [MUSAVA]: -> CMusAvaCapability::AddFastModeL" )
-    if ( MultimediaSharingSettings::FastStartupModeL() == 
-            MusSettingsKeys::EFastModeOn )
-        {
-        CSdpAttributeField* fastmode = CSdpAttributeField::NewLC(
-             MusAvaCapabilityContext::SDPStringL( 
-                 SdpCodecStringConstants::EAttributeKeywds ), 
-             KCapabilitySDPAttributeFastMode );
-                                           
-        aSdp.AttributeFields().AppendL( fastmode );
-        CleanupStack::Pop( fastmode );
-        }    
-    MUS_LOG( "mus: [MUSAVA]: <- CMusAvaCapability::AddFastModeL" )        
-    }
-
 
 // -----------------------------------------------------------------------------
 // CMusAvaCapability::Attribute
--- a/mmsharing/mmshavailability/src/musavacapabilityquery.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavacapabilityquery.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -366,10 +366,7 @@
             type->Value().Compare( KCapabilitySDPAttributeType ) == 0 ) ;
         
         }
-        
-    MusSettingsKeys::TFastMode mode = CMusAvaCapability::ResolveFastModeL( aSDP );
-    Capability().Exchange().QueryObserver().FastModeResolved( mode );
-
+    
     return valid;        
     }
 
--- a/mmsharing/mmshavailability/src/musavacapabilityquerybase.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavacapabilityquerybase.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -32,13 +32,14 @@
 #include <sipstrconsts.h>
 #include <sipresponseelements.h>
 #include <sipaddress.h>
+#include <sipfromheader.h>
 #include <sdpdocument.h>
 #include <sdporiginfield.h>
 #include <sdpconnectionfield.h>
 #include <sdpattributefield.h>
 #include <sdpmediafield.h>
 #include <e32math.h>
-
+#include <e32property.h>
 
 #include "mussettings.h"
 #include "muslogger.h"
@@ -48,6 +49,14 @@
 #include "musavaterminal.h"
 #include "musavacapabilitycontext.h"
 #include "musavasipheaderutil.h"
+#include "mussesseioninformationapi.h"
+
+_LIT8( KMusSipPrefix, "sip:" );
+_LIT8( KMusTelPrefix, "tel:" );
+_LIT8( KMusPlusSign, "+" );
+_LIT8( KMusAtSign, "@" );
+
+const TInt KMusMinDigitCountInTelNumber = 7;
 
 // --------------------------------------------------------------------------
 // C++ constructor
@@ -152,6 +161,7 @@
     CleanupStack::PopAndDestroy(sipAddress);        
     
     HBufC8* sipAddress8 = EscapeUtils::ConvertFromUnicodeToUtf8L( aSipAddress );
+    iRemoteUri.Copy( sipAddress8->Des() ) ;
     CleanupStack::PushL( sipAddress8 );
     iTerminal = &Capability().Exchange().TerminalL( sipAddress8->Des() );
     CleanupStack::PopAndDestroy( sipAddress8 ) ;
@@ -230,7 +240,24 @@
                                                iOriginator->Uri().UriDes());
             MUS_LOG( "mus: [MUSAVA]  AddPreferredIdentityHeaderL -> Success ")                         
             AddContactHeaderL( headers );
-            MUS_LOG( "mus: [MUSAVA]  AddContactHeaderL -> Success ")             
+            MUS_LOG( "mus: [MUSAVA]  AddContactHeaderL -> Success ")
+            
+            TBool usePrivacy = MultimediaSharingSettings::PrivacySetting();
+            if ( usePrivacy )
+                {
+                NMusSessionInformationApi::TMusClirSetting clir =
+                    NMusSessionInformationApi::ESendOwnNumber;
+                RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                                NMusSessionInformationApi::KMusClirSetting,
+                                reinterpret_cast<TInt&>( clir ) );
+                usePrivacy = ( clir == NMusSessionInformationApi::EDoNotSendOwnNumber );
+                }
+                    
+            if (usePrivacy)
+                {
+                CMusAvaSipheaderUtil::AddPrivacyHeaderL( headers );
+                MUS_LOG( "mus: [MUSAVA]  AddPrivacyHeaderL -> Success ")
+                }
             //terminal ID
             if ( Capability().Exchange().TerminalId().Length() > 0 )
                 {
@@ -251,6 +278,16 @@
             CleanupStack::Pop( remoteUri );
             CleanupStack::PushL( request );
             
+            if (usePrivacy)
+                {
+                _LIT8( KAnonymous,
+                       "\"Anonymous\" <sip:anonymous@anonymous.invalid>" );
+                CSIPFromHeader* from = CSIPFromHeader::DecodeL( KAnonymous );
+                CleanupStack::PushL( from );
+                request->SetFromHeaderL( from );
+                CleanupStack::Pop( from );
+                }
+            
             request->SetMethodL( 
                         SIPStrings::StringF( SipStrConsts::EOptions ) );
             
@@ -470,7 +507,7 @@
     //application
     CSdpAttributeField* application = CSdpAttributeField::NewLC(
        MusAvaCapabilityContext::SDPStringL( 
-           SdpCodecStringConstants::EMediaApplication ), 
+            SdpCodecStringConstants::EMediaApplication ), 
        KCapabilitySwisApplication );
                                       
     aResponseContent.AttributeFields().AppendL( application );
@@ -489,16 +526,13 @@
     aResponseContent.AttributeFields().AppendL( type );
     CleanupStack::Pop( type );
     
-    // Fast startup mode
-    CMusAvaCapability::AddFastModeL( aResponseContent );
-
     MUS_LOG( "mus: [MUSAVA] Adding media line to SDP" )
     //media line
-    CSdpMediaField* mediaLine = CSdpMediaField::NewLC( 
-    			MusAvaCapabilityContext::SDPStringL
+    CSdpMediaField* mediaLine=CSdpMediaField::NewLC( 
+                    MusAvaCapabilityContext::SDPStringL
     				(SdpCodecStringConstants::EMediaVideo ),
                      							       NULL,
-                         MusAvaCapabilityContext::SDPStringL
+                     MusAvaCapabilityContext::SDPStringL
                 (SdpCodecStringConstants::EProtocolRtpAvp ), 
                         KCapabilitySwisFormatListH263Only );
     
@@ -538,7 +572,111 @@
     aResponseContent.MediaFields().AppendL( mediaLine );
     CleanupStack::Pop( mediaLine );
 
+    
     MUS_LOG( "mus: [MUSAVA] <- CMusAvaCapabilityQueryBase::OtherSDPHeadersL" )
     }
 
+// --------------------------------------------------------------------------
+// CMusAvaCapabilityQueryBase::ValidateUri
+// --------------------------------------------------------------------------
+//
+TBool CMusAvaCapabilityQueryBase::ValidateUri()
+	{
+    MUS_LOG( "mus: [MUSAVA] -> CMusAvaCapabilityQueryBase::ValidateUri" )
+    		
+	TBool valid = ETrue;
+     
+    const TDesC8& originator = iOriginator->Uri().UriDes();
+    MUS_LOG_TDESC8( "mus: [MUSAVA]  originator uri: ", originator )
 
+    TBuf8<KMaxRemoteUriLength> sipUri;
+    TBuf8<KMaxRemoteUriLength> telUri;
+    
+    if ( iRemoteUri.FindF( KMusSipPrefix ) != KErrNotFound )
+        {
+        sipUri.Copy( iRemoteUri );
+        MUS_LOG_TDESC8( "mus: [MUSAVA]  sip uri: ", sipUri )
+        }
+    else if ( iRemoteUri.FindF( KMusTelPrefix ) != KErrNotFound )
+        {
+        telUri.Copy( iRemoteUri );
+        MUS_LOG_TDESC8( "mus: [MUSAVA]  tel uri: ", telUri )
+        }
+   
+    // Tel Uri case
+    if ( telUri.Length() > 0 )
+        {
+        telUri.Trim();
+        
+        // Remove prefix and plus sign from remote uri if there is
+        TPtrC8 telUriWithoutPrefix = 
+                telUri.Right( telUri.Length() - KMusTelPrefix().Length() );
+        MUS_LOG_TDESC8( "mus: [MUSAVA]  telUriWithoutPrefix: ", telUriWithoutPrefix )
+        
+        TPtrC8 numberPartOfTelUri = 
+                telUriWithoutPrefix.Find( KMusPlusSign ) == 0 ?
+                telUriWithoutPrefix.Right( telUriWithoutPrefix.Length() - 1 ) :
+                telUriWithoutPrefix;
+        MUS_LOG_TDESC8( "mus: [MUSAVA]  numberPartOfTelUri: ", numberPartOfTelUri )
+        
+        // Remove prefix and domain part from uri in profile
+        TPtrC8 originatorWithoutPrefix = 
+        		originator.Right( originator.Length() - KMusSipPrefix().Length() );
+        MUS_LOG_TDESC8( "mus: [MUSAVA]  originatorWithoutPrefix: ", originatorWithoutPrefix )
+        
+        TPtrC8 usernameOfOriginator = 
+        		originatorWithoutPrefix.Find( KMusPlusSign ) == 0 ?
+        		originatorWithoutPrefix.Right( originatorWithoutPrefix.Length() - 1 ) :
+                originatorWithoutPrefix;
+        
+        TInt posOfAtSign = originatorWithoutPrefix.Find( KMusAtSign );
+        
+        if ( posOfAtSign >= KMusMinDigitCountInTelNumber )
+        	{
+            usernameOfOriginator.Set( 
+            		originatorWithoutPrefix.Mid( (originatorWithoutPrefix.Find( KMusAtSign ) 
+        				- KMusMinDigitCountInTelNumber), KMusMinDigitCountInTelNumber ) );
+            MUS_LOG_TDESC8( "mus: [MUSAVA]  usernameOfOriginator: ", usernameOfOriginator )
+        	}
+        
+        else
+        	{
+            usernameOfOriginator.Set( originatorWithoutPrefix.Left( posOfAtSign ) );
+            MUS_LOG_TDESC8( "mus: [MUSAVA]  usernameOfOriginator: ", usernameOfOriginator )
+        	}
+        
+        if ( numberPartOfTelUri.Length() >= KMusMinDigitCountInTelNumber )
+        	{
+            numberPartOfTelUri.Set( numberPartOfTelUri.Right( KMusMinDigitCountInTelNumber ) );
+            MUS_LOG_TDESC8( "mus: [MUSAVA]  numberPartOfTelUri: ", numberPartOfTelUri )
+        	}
+        
+                
+        if  ( numberPartOfTelUri == usernameOfOriginator )
+            {
+            MUS_LOG( "mus: Recipient address is evaluated to be same as in profile.\
+            		We do not send OPTIONS")
+			valid = EFalse;
+            MUS_LOG( "mus: [MUSAVA] <- CMusAvaCapabilityQueryBase::ValidateUri" )
+            return valid;              
+            }
+        }
+    
+    // SIP Uri case
+    if ( sipUri.Length() > 0 )
+		{
+		if ( !originator.Compare( sipUri ) )
+			{
+		    MUS_LOG( "mus: Recipient address is evaluated to be same as in profile.\
+		            		We do not send OPTIONS")
+		    valid = EFalse;
+		    MUS_LOG( "mus: [MUSAVA] <- CMusAvaCapabilityQueryBase::ValidateUri" )
+		    return valid; 
+			}
+		}
+
+    MUS_LOG( "mus: [MUSAVA] <- CMusAvaCapabilityQueryBase::ValidateUri" )
+    return valid;
+	}
+
+
--- a/mmsharing/mmshavailability/src/musavacapabilitysipagent.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavacapabilitysipagent.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -30,6 +30,7 @@
 #include <sipstrconsts.h>
 #include <sipresponseelements.h>
 
+#include "mussettings.h"
 #include "muslogger.h"
 #include "musavacapabilityexchange.h"
 #include "musavacapabilityquery.h"
@@ -164,12 +165,25 @@
     {
     MUS_LOG( "mus: [MUSAVA] -> CMusAvaCapabilitySipAgent::IncomingRequest" )
     TInt retval = KErrNone;
+    MusSettingsKeys::TOperatorVariant variantValue = MusSettingsKeys::EStandard;
+    TRAPD( error, variantValue = 
+                  MultimediaSharingSettings::OperatorVariantSettingL() );
+    if( error )
+    	{
+         MUS_LOG("CMusAvaCapabilitySipAgent::IncomingRequest\
+        		  Get OperatorVariantSettingL worng");
+    	}
+    
     if ( aTransaction->Type() == 
                         SIPStrings::StringF( SipStrConsts::EOptions ) )
         {  
-        // Answer 200OK only when CS call remain at Availability States
+        // Answer 200OK when CS call remain at Availability States
+        //or at EMusAvaOptionNotAvailable State in operatorspecific mode
         if ( MMusAvaObserver::EMusAvaStatusNotExecuted <= 
-             iAvailabilityObserver.AvailabilityPluginState() )
+             iAvailabilityObserver.AvailabilityPluginState()  
+             ||( ( iAvailabilityObserver.AvailabilityPluginState() ==
+              MMusAvaObserver::EMusAvaOptionNotAvailable ) 
+              && ( variantValue == MusSettingsKeys::EOperatorSpecific  )))
             {
             retval = 
              iCapabilityExchange.QueryObserver().CapabilityQueryAnswered() ?
--- a/mmsharing/mmshavailability/src/musavacapabilitytimer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavacapabilitytimer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -56,6 +56,18 @@
     {
     iNotify->OnExpiredL( iStatus.Int() );
     }
+
+// -------------------------------------------------------------------------
+//  If RunL() leaves,It should be handled here.
+// -------------------------------------------------------------------------
+//
+TInt CMusAvaCapabilityTimer::RunError( TInt aError )
+    {    
+    // Nothing can be done here.
+    aError = KErrNone;
+
+    return aError;
+    }
     
 
 // ---------------------------------------------------------------------------
--- a/mmsharing/mmshavailability/src/musavaconnectionavailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavaconnectionavailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -30,7 +30,6 @@
 #include "mussettings.h"
 #include "mussettingskeys.h"
 #include "muslogger.h"
-#include "musfactorysettings.h"
 
 #include <e32base.h>
 #include <rconnmon.h>
@@ -127,10 +126,9 @@
 
 // ---------------------------------------------------------------------------
 // From CMusAvaAvailability.
-// Executes for the availability
+// Executes for the availability.
 // ---------------------------------------------------------------------------
 //
-
 void CMusAvaConnectionAvailability::DoExecuteL()
     {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaConnectionAvailability::DoExecuteL()" )
@@ -138,23 +136,36 @@
     MUS_LOG( "mus: [MUSAVA]  Check network mode" )
     RMobilePhone::TMobilePhoneNetworkMode networkmode = 
                                         iNetworkModeStatus->PhoneNetworkMode();
-
-	TBool SupportedNetwork = EFalse; 
-	
-	TRAPD( err, SupportedNetwork = MusFactorySettings::IsSupportedL(networkmode) );
-	
-	
-	if ( err != KErrNone )
-		{
-	    MUS_LOG1( "mus: [MUSAVA]  Reading activation setting error:%d", err )
-    	SetState( MMusAvaObserver::EMusActivationError );
-		}
-
-	else if ( SupportedNetwork )
+    if ( networkmode == RMobilePhone::ENetworkModeWcdma||
+         networkmode == RMobilePhone::ENetworkModeTdcdma ||
+         networkmode == RMobilePhone::ENetworkModeCdma95 ||
+         networkmode == RMobilePhone::ENetworkModeCdma2000 )
         {
-        if (  networkmode == RMobilePhone::ENetworkModeGsm )
-        	{
-        	MUS_LOG( "mus: [MUSAVA]  Edge Network Mode allowed in settings " )     
+        status = NetworkRegistrationAndSettingsL();
+    	if ( status == MMusAvaObserver::EMusAvaStatusAvailable )
+	        {
+	        MUS_LOG( "mus: [MUSAVA]  Network available" )
+	        SetState( status );
+	        }
+        else
+            {
+            MUS_LOG1( "mus: [MUSAVA] Activation error: %d", status )
+            SetState( status );
+            }        
+        }
+    else if( networkmode == RMobilePhone::ENetworkModeGsm)
+    	{
+    	TInt edgeDtmSupport = KErrNone;
+        TRAPD( err, edgeDtmSupport = 
+                       MultimediaSharingSettings::EdgeDtmSupportSettingL() );
+        if( err != KErrNone )
+            {
+            MUS_LOG1( "mus: [MUSAVA]  Reading activation setting error:%d", err )
+            SetState( MMusAvaObserver::EMusActivationError );
+            }
+        else if( edgeDtmSupport == MusSettingsKeys::EDtmModeAllowed )
+            { 
+            MUS_LOG( "mus: [MUSAVA]  Edge Network Mode allowed in settings " )     
             if( iConnectionMonitor->ConnectionCount() > 0)       
                 {
                 MUS_LOG( "mus: [MUSAVA]  Atlease one packect connection exists " )     
@@ -164,27 +175,39 @@
                 {
                 MUS_LOG( "mus: [MUSAVA]  No Packet connection exists now." )     
                 SetState( MMusAvaObserver::EMusAvaEdgeDtmStatusUnknown );                    
-                }
-        	}
-
-		 else
-        	{
-       		status = NetworkRegistrationAndSettingsL();
-        	MUS_LOG1( "mus: [MUSAVA] Activation Status: %d", status )
-        	SetState( status );
-        	}
-        }
-	else 
-    	{    	
+                }            
+            }
+        else
+            {
+            MUS_LOG( "mus: [MUSAVA]  Edge Network Mode Not allowed in settings " )     
+            SetState( MMusAvaObserver::EMusAvaNetworkType );    
+            }
+    	}
+    else
+        {
         MUS_LOG( "mus: [MUSAVA] Network not available" )
         SetState( MMusAvaObserver::EMusAvaNetworkType );
-    	}
-
+        }
+    
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::DoExecuteL()" )
     }
 
 
 // ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+TBool CMusAvaConnectionAvailability::OperatorVariant()
+    {
+    MusSettingsKeys::TOperatorVariant variantValue = MusSettingsKeys::EStandard;
+    TRAPD( error, variantValue = 
+                  MultimediaSharingSettings::OperatorVariantSettingL() );
+    
+    return ( variantValue == MusSettingsKeys::EOperatorSpecific && 
+             error == KErrNone );
+     
+    }
+
+// ---------------------------------------------------------------------------
 // From CMusAvaAvailability.
 // Stops execution.
 // ---------------------------------------------------------------------------
@@ -212,8 +235,9 @@
     return MMusAvaObserver::EMusAvaBearerStatus;
     }
 
+
 // ---------------------------------------------------------------------------
-// CMusAvaConnectionAvailability::PhoneNetworkModeStatus  
+// CMusAvaConnectionAvailability::PhoneNetworkModeStatus
 // 
 // ---------------------------------------------------------------------------
 //
@@ -223,28 +247,51 @@
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaConnectionAvailability::\
     PhoneNetworkModeStatus()" )
     MUS_LOG1( "mus: [MUSAVA] Mobile Phone Network Status = ", aStatus )
-    
-   	TBool SupportedNetwork = EFalse; 
-	
-	TRAPD( err, SupportedNetwork = MusFactorySettings::IsSupportedL(aStatus) );
-    
-    if ( err != KErrNone || !SupportedNetwork )
-    	{
-        MUS_LOG( "mus: [MUSAVA] Network not available" )
-        SetState( MMusAvaObserver::EMusAvaNetworkType );
-    	}
-	else
-		{
-		MMusAvaObserver::TAvailabilityStatus status = 
-		                   MMusAvaObserver::EMusActivationError;
-        TRAP_IGNORE( status = NetworkRegistrationAndSettingsL() );
-        SetState( status );
-		}    
 
+    switch ( aStatus )
+        {
+        case RMobilePhone::ENetworkModeWcdma :
+        case RMobilePhone::ENetworkModeTdcdma :
+        case RMobilePhone::ENetworkModeCdma95:
+        case RMobilePhone::ENetworkModeCdma2000:
+            {
+            MMusAvaObserver::TAvailabilityStatus status = 
+                                        MMusAvaObserver::EMusActivationError;
+            TRAP_IGNORE( status = NetworkRegistrationAndSettingsL() );
+            SetState( status );
+            break;
+            }
+        case RMobilePhone::ENetworkModeGsm : // For EDGE /DTM support
+            {
+            TInt edgeDtmSupport = 0;
+            TRAPD( err, edgeDtmSupport = 
+                       MultimediaSharingSettings::EdgeDtmSupportSettingL() );
+            if( err != KErrNone )
+                {
+                MUS_LOG1( "mus: [MUSAVA]  Reading activation setting error:%d", err )
+                SetState( MMusAvaObserver::EMusActivationError );
+                }
+            else if( edgeDtmSupport == MusSettingsKeys::EDtmModeAllowed )
+                { 
+                MUS_LOG( "mus: [MUSAVA]  Edge Network supported " )            
+                SetState( MMusAvaObserver::EMusAvaEdgeDtmStatusUnknown );                               
+                }
+            else
+                {
+                SetState( MMusAvaObserver::EMusAvaNetworkType );    
+                }
+            break;
+            }
+         default :
+            {
+            SetState( MMusAvaObserver::EMusAvaNetworkType );
+            }
+        }
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
     PhoneNetworkModeStatus()" )
     }
 
+
 // ---------------------------------------------------------------------------
 // CMusAvaConnectionAvailability::NetworkRegistrationStatus
 // 
@@ -254,30 +301,18 @@
                     RMobilePhone::TMobilePhoneRegistrationStatus aRegStatus )
     {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaConnectionAvailability::\
-    NetworkRegistrationStatus()" )
+NetworkRegistrationStatus()" )
     MUS_LOG1( "Mobile Phone Network Status = ", aRegStatus )
-
-    MusSettingsKeys::TActivation activation  = MusSettingsKeys::ENever;
-
-    TRAPD( err, activation = MultimediaSharingSettings::ActivationSettingL() );
-    if( err != KErrNone )
+    
+    if( OperatorVariant() &&
+        aRegStatus != RMobilePhone::ERegisteredOnHomeNetwork )
         {
-        MUS_LOG1( "mus: [MUSAVA]  Reading activation setting error:%d", err )
-        SetState( MMusAvaObserver::EMusActivationError );
-        }
-    else
-        {
-        if( activation == MusSettingsKeys::EActiveInHomeNetworks &&
-        aRegStatus != RMobilePhone::ERegisteredOnHomeNetwork )
-            {
-            MUS_LOG( "mus: [MUSAVA]  -> CMusAvaConnectionAvailability::\
-            NetworkRegistrationStatus()" )
-            SetState( MMusAvaObserver::EMusAvaRoamingError );
-            }
+        MUS_LOG( "mus: [MUSAVA]  Roaming not allowed" )
+        SetState( MMusAvaObserver::EMusAvaRoamingError );
         }
 
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
-    NetworkRegistrationStatus()" )
+NetworkRegistrationStatus()" )
     }
 
 
@@ -314,9 +349,9 @@
                     SetState( MMusAvaObserver::EMusAvaConnectionErr );
                     }
                	else
-               		{
-               		iConnectionMonitor->SetConnectionID( connectionId );
-               		}
+                    {
+                    iConnectionMonitor->SetConnectionID( connectionId );
+                    }
                 }
             break;
             }
@@ -327,13 +362,12 @@
                 {
                 SetState( MMusAvaObserver::EMusAvaConnectionErr );
                 }
-            break;
-            }
-
-		 case EConnMonConnectionStatusChange:
+                break;
+                }
+         case EConnMonConnectionStatusChange:
             {
             MUS_LOG( "mus: [MUSAVA] Event type = \
-                EConnMonConnectionStatusChange" )
+EConnMonConnectionStatusChange" )
             const CConnMonConnectionStatusChange* connectionStatusChange
                  = (const CConnMonConnectionStatusChange*)(&aConnMonEvent);
             TInt connStatus = connectionStatusChange->ConnectionStatus();
@@ -357,7 +391,7 @@
                 }
             break;
             }
-		case EConnMonNetworkStatusChange:
+        case EConnMonNetworkStatusChange:
             {
             MUS_LOG( "mus: [MUSAVA] Event type = EConnMonNetworkStatusChange" )
             const CConnMonNetworkStatusChange* networkStatusChange
@@ -368,36 +402,36 @@
             	{
             	if( EConnMonStatusAttached == networkStatus ||
             	    EConnMonStatusActive == networkStatus )
-	            	{
-	            	SetState( NetworkRegistrationAndSettingsL() );
-	            	}
+                    {
+                    SetState( NetworkRegistrationAndSettingsL() );
+                    }
              	else
-	                {
-	                SetState( MMusAvaObserver::EMusAvaConnectionErr );
-	                }
+                    {
+                    SetState( MMusAvaObserver::EMusAvaConnectionErr );
+                    }
             	}
             break;
             }
         case EConnMonNetworkRegistrationChange:
             {
             MUS_LOG( "mus: [MUSAVA] Event type = \
-                EConnMonNetworkRegistrationChange" )
+EConnMonNetworkRegistrationChange" )
             const CConnMonNetworkRegistrationChange* registrationChange
                  = (const CConnMonNetworkRegistrationChange*)(&aConnMonEvent);
             TInt registrationStatus = registrationChange->RegistrationStatus();
             MUS_LOG1( "mus: [MUSAVA] RegistrationStatus =  %d", 
                     registrationStatus )
-           	if( connId == EBearerIdWCDMA || connId == EBearerIdWcdmaCSD )
-           	    {
-           	    if ( ENetworkRegistrationRoaming == registrationStatus )
-                    {
-                    SetState( MMusAvaObserver::EMusAvaRoamingError );
-                    }
-                else
-                    {
-                    SetState( NetworkRegistrationAndSettingsL() );
-                    }
+            if( connId == EBearerIdWCDMA || connId == EBearerIdWcdmaCSD )
+                {
+                if ( ENetworkRegistrationRoaming == registrationStatus )
+                {
+                SetState( MMusAvaObserver::EMusAvaRoamingError );
                 }
+            else
+                {
+                SetState( NetworkRegistrationAndSettingsL() );
+                }
+            }
             break;
             }
         case EConnMonBearerChange:
@@ -433,17 +467,8 @@
 
         case EConnMonPacketDataUnavailable:
             {
-			if( connId == musConnID )
-            	{
-            	SetState( MMusAvaObserver::EMusAvaNetworkType );
-            	MUS_LOG( "mus: [MUSAVA] EConnMonPacketDataUnavailable" )	
-            	}
-            else
-                {
-                MUS_LOG2(
-"mus: [MUSAVA] different connId (%d,%d) ignore EConnMonPacketDataUnavailable",
-                          musConnID, connId )
-                }
+            SetState( MMusAvaObserver::EMusAvaNetworkType );
+            MUS_LOG( "mus: [MUSAVA] EConnMonPacketDataUnavailable" )
             break;
             }
 
@@ -470,48 +495,44 @@
 //    
 MMusAvaObserver::TAvailabilityStatus CMusAvaConnectionAvailability::
     ManualActivationL()
-	{
+    {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaConnectionAvailability::\
-    ManualActivationL()" )
+ManualActivationL()" )
 
-    MusSettingsKeys::TOperatorVariant operatorVariant = 
-    	MusSettingsKeys::EStandard;
-    operatorVariant = MultimediaSharingSettings::OperatorVariantSettingL(); 
-    
-    if( operatorVariant ==  MusSettingsKeys::EOperatorSpecific )
+    if( OperatorVariant() )
     	{
     	MUS_LOG( "mus: [MUSAVA] Operator Specific No Manual query" )
     	MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
-    	NetworkRegistrationAndSettingsL()" )
+NetworkRegistrationAndSettingsL()" )
     	return MMusAvaObserver::EMusActivationError;	
     	}
-  	else
-  		{
-  		if ( iSettings.ManualActivation() == 
-  		    MMusAvaSettings::EActivationAllowed )
-  			{
-  			MUS_LOG( "mus: [MUSAVA] Manual activation allowed" )
-  			MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
-    		ManualActivationL()" )
-  			return MMusAvaObserver::EMusAvaStatusAvailable;	
-  			}
-  		else if ( iSettings.ManualActivation() == 
-  		    MMusAvaSettings::EActivationNotExecuted )
-  			{
-  			MUS_LOG( "mus: [MUSAVA] Manual activation is not executed" )
-  			MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
-    		ManualActivationL()" )
-  			return MMusAvaObserver::EMusAvaManualActivation;	
-  			}
-  		else
-  			{
-  			MUS_LOG( "mus: [MUSAVA] Activation error" )
-  			MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
-    		ManualActivationL()" )
-  			return MMusAvaObserver::EMusActivationError;	
-  			}
-  		}
-	}
+    else
+        {
+        if ( iSettings.ManualActivation() == 
+            MMusAvaSettings::EActivationAllowed )
+            {
+            MUS_LOG( "mus: [MUSAVA] Manual activation allowed" )
+            MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
+ManualActivationL()" )
+            return MMusAvaObserver::EMusAvaStatusAvailable;	
+            }
+        else if ( iSettings.ManualActivation() == 
+            MMusAvaSettings::EActivationNotExecuted )
+            {
+            MUS_LOG( "mus: [MUSAVA] Manual activation is not executed" )
+            MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
+ManualActivationL()" )
+            return MMusAvaObserver::EMusAvaManualActivation;	
+            }
+        else
+            {
+            MUS_LOG( "mus: [MUSAVA] Activation error" )
+            MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
+ManualActivationL()" )
+            return MMusAvaObserver::EMusActivationError;	
+            }
+        }
+    }
 
 // -------------------------------------------------------------------------
 // CMusAvaConnectionAvailability::NetworkRegistrationAndSettingsL
@@ -522,7 +543,7 @@
     NetworkRegistrationAndSettingsL()
     {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaConnectionAvailability::\
-    NetworkRegistrationAndSettingsL()" )
+NetworkRegistrationAndSettingsL()" )
     MUS_LOG( "mus: [MUSAVA]  Check registration network status" )
     MUS_LOG( "mus: [MUSAVA]  Check roaming" )
 
@@ -535,33 +556,35 @@
     MusSettingsKeys::TActivation activation = MusSettingsKeys::EAlwaysActive;
   
     activation = MultimediaSharingSettings::ActivationSettingL();
-
+    TBool operatorVariant = OperatorVariant();
+    
     MUS_LOG1( "mus: [MUSAVA]     ActivationSetting returned %d", 
         activation )
-
-	if ( activation == MusSettingsKeys::EAlwaysActive )
-    	{
-    	status = MMusAvaObserver::EMusAvaStatusAvailable;	
-    	}
-   	else if ( activation == MusSettingsKeys::EActiveInHomeNetworks &&
-        regStatus == RMobilePhone::ERegisteredOnHomeNetwork )
-    	{
-    	status = MMusAvaObserver::EMusAvaStatusAvailable;	
-    	}
-    else if( activation == MusSettingsKeys::EActiveInHomeNetworks &&
-        regStatus == RMobilePhone::ERegisteredRoaming )
-        {
-        status = ManualActivationL();        
-        } 
-    else
+    
+    //VS off
+    if ( activation != MusSettingsKeys::EAlwaysActive )
         {
         status = MMusAvaObserver::EMusActivationError;
         }
+    //VS on
+    else
+        {
+        //roaming
+        if( regStatus == RMobilePhone::ERegisteredRoaming )
+            {
+            status = ManualActivationL();        
+            }
+        //other states including also not registered states, thus
+        //failing of PDP context activation will be detected elsewhere
+        else
+            {
+            status = MMusAvaObserver::EMusAvaStatusAvailable;   
+            }
+        }
     
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaConnectionAvailability::\
-            NetworkRegistrationAndSettingsL()" )
+NetworkRegistrationAndSettingsL()" )
     return status;
     }
 
-// End of File	
 
--- a/mmsharing/mmshavailability/src/musavacontactavailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavacontactavailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -16,22 +16,36 @@
 */
 
 
+
 #include "musavacontactavailability.h"
 #include "musavaavailabilityobserver.h"
 #include "musavasettingsimp.h"
 #include "musavaobserver.h"
 #include "muslogger.h"
 #include "mussettings.h"
+#include "musavacalleventmonitor.h"
 
+#include <CPbkContactItem.h>
+#include <CPbkContactEngine.h>
+#include <CPbkFieldInfo.h>
+#include <TPbkContactItemField.h>
 #include <cntviewbase.h>
 #ifdef UNIT_TESTING // if unit testing
 #include <digia/eunit/eunitdecorators.h>
 #endif // UNIT_TESTING
 
+const TInt KNumberMatchingDigitsRequired = 7;
 const TInt KContactsArraySize = 10;
 
+
+_LIT( KMusAvaSip,               "sip:" );
 _LIT( KMusAvaTel,               "tel:" );
 _LIT( KMusAvaPlus,              "+"    );
+_LIT( KMusAvaAtSign ,           "@"    );
+_LIT( KMusEmptyStringSymbol,    ""     );
+_LIT( KMusSpaceSymbol,          " "    );
+_LIT( KMusAvaTestString,        "*#"   );
+
 
 CMusAvaContactAvailability* CMusAvaContactAvailability::NewL(
     MMusAvaAvailabilityObserver& aObserver,
@@ -73,6 +87,12 @@
              ~CMusAvaContactAvailability()" )
     delete iContactName;
     iContactName = NULL;
+    if ( iPhoneStatus )
+        {
+        iPhoneStatus->Cancel();
+        }
+    delete iPhoneStatus;
+    iPhoneStatus = NULL; 
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaContactAvailability::\
              ~CMusAvaContactAvailability()" )
     }
@@ -92,6 +112,7 @@
     {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::ConstructL()" )
     iOperatorVariant = MultimediaSharingSettings::OperatorVariantSettingL();
+    iPhoneStatus = CMusAvaCallEventMonitor::NewL( *this );
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaContactAvailability::ConstructL()" )
     }
 
@@ -103,12 +124,94 @@
 void CMusAvaContactAvailability::DoExecuteL()
     {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::DoExecuteL()" )
+    iPhoneStatus->StartMonitoringL();
+
+    CContactIdArray* idArray = NULL;
+
+    #ifdef UNIT_TESTING // if unit testing
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    #endif // UNIT_TESTING
+    CPbkContactEngine* pbkContactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( pbkContactEngine );
+
+    // resolve the name order     
+    CContactViewBase& contactView = pbkContactEngine->AllContactsView();
+    const RContactViewSortOrder& sortOrder = contactView.SortOrderL();
+    #ifdef UNIT_TESTING // if unit testing
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    #endif // UNIT_TESTING
+    
+    iBeginWithFirstName = ETrue;
+    TBool foundOrder = EFalse;
+	for( TInt i = 0; i < sortOrder.Count() && !foundOrder; ++i )
+	    {
+	    if ( sortOrder[i] == KUidContactFieldFamilyName )
+		    {
+            iBeginWithFirstName = EFalse;
+            foundOrder = ETrue;
+		    }
+	    else if ( sortOrder[i] == KUidContactFieldGivenName )
+		    {
+		    iBeginWithFirstName = ETrue;
+		    foundOrder = ETrue;
+		    }
+	    }
 
     CDesCArrayFlat* contactsArray
         = new ( ELeave ) CDesCArrayFlat( KContactsArraySize );
     CleanupStack::PushL( contactsArray );
 
-    ActiveCallL( contactsArray );
+    if ( ContactL( idArray, *pbkContactEngine ) )
+        {
+        CleanupStack::PushL( idArray );
+
+        TInt idArrayCount = idArray->Count();
+        MUS_LOG1( "mus: [MUSAVA]     idArray->Count %d", idArrayCount )
+        CPbkContactItem* pbkItem = NULL;
+        TPbkFieldId fieldId = ContactIdSearch( *idArray, *pbkContactEngine );
+
+        for ( TInt i = 0; i < idArrayCount; i++ )
+            {
+            MUS_LOG1( "mus: [MUSAVA]     i %d", i )
+            TContactItemId itemId( KErrNotFound );
+            itemId = ( *idArray )[i];
+
+            TRAPD( error, pbkItem = pbkContactEngine->ReadContactL( itemId ) );
+
+            if ( !error )
+                {
+                TBool found = EFalse;
+                if ( fieldId == EPbkFieldIdShareView )
+                    {
+                    found = ResolveAddressesL( 
+                                *pbkItem, contactsArray, EPbkFieldIdShareView );
+                    }
+                else if( fieldId == EPbkFieldIdSIPID)
+                    {
+                    found = ResolveAddressesL( 
+                                *pbkItem, contactsArray, EPbkFieldIdSIPID );
+                    }
+
+                if ( !found )
+                    {
+                    PhoneResolutionL( *pbkItem, contactsArray );
+                    }
+                    
+                    // tbd: causes test case to fail
+                    // break;
+                }
+
+            delete pbkItem; 
+            pbkItem = NULL;
+            }
+
+        idArray->Reset();
+        CleanupStack::PopAndDestroy( idArray );
+        }
+    else
+        {
+        ActiveCallL( contactsArray );
+        }
 
     iSettings.SetSipAddressesL( *contactsArray );
 
@@ -116,11 +219,55 @@
 
     CleanupStack::PopAndDestroy( contactsArray );
 
+    CleanupStack::PopAndDestroy( pbkContactEngine );
+
     SetState( MMusAvaObserver::EMusAvaStatusAvailable );
 
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaContactAvailability::DoExecuteL()" )
     }
 
+// -------------------------------------------------------------------------
+//  This function is called when a cs call is connected.
+// -------------------------------------------------------------------------
+//
+void CMusAvaContactAvailability::CallConnectedL( const TDesC& aTelNumber )
+    {
+    MUS_LOG( "mus: [MUSAVA]  \
+                -> CMusAvaContactAvailability::CallConnectedL()" )
+                
+    iSettings.SetTelNumberL(aTelNumber);              
+    DoExecuteL();
+
+    MUS_LOG( "mus: [MUSAVA]  \
+                <- CMusAvaContactAvailability::CallConnectedL()" )
+    }
+void CMusAvaContactAvailability::ConferenceCallL()
+    {   
+    }
+
+
+// -------------------------------------------------------------------------
+//  This function is called when a cs call goes hold
+// -------------------------------------------------------------------------
+//
+void CMusAvaContactAvailability::CallHoldL( const TDesC& /*aTelNumber*/ )
+    {    
+    }
+
+
+// -------------------------------------------------------------------------
+//  This function is called when a cs call goes into a state
+//  that is not connected.
+// -------------------------------------------------------------------------
+//
+void CMusAvaContactAvailability::NoActiveCallL()
+    {
+    }
+
+
+void CMusAvaContactAvailability::ConferenceCallLTerminated ()
+	{	
+	}
 
 // -------------------------------------------------------------------------
 //
@@ -132,8 +279,6 @@
 
     const TDesC& phoneNumber = iSettings.TelNumber();
     TInt retval = EFalse;
-    const MDesCArray& addresses = iSettings.SipAddresses();
-    TInt addressesCount = addresses.MdcaCount();
     
     if ( phoneNumber.Length() > 0 &&
          ( iOperatorVariant == MusSettingsKeys::EOperatorSpecific ||
@@ -154,19 +299,9 @@
         CleanupStack::PopAndDestroy( tmpDescriptor );
         retval = ETrue;
         }
-	else if ( addressesCount > 0 )
-        {
-        MUS_LOG1( "mus: [MUSAVA]    addresses.MdcaCount() %d", 
-                        addressesCount )
-        const TDesC& sipAddress = addresses.MdcaPoint( 0 );
-        MUS_LOG_TDESC( "mus: [MUSAVA]       SIP Address: ", 
-            sipAddress )                       
-        aContactsArray->AppendL( sipAddress );
-        retval = ETrue;
-        }
     else
         {
-        MUS_LOG( "mus: [MUSAVA]     Phone number or SIP URL not found " )
+        MUS_LOG( "mus: [MUSAVA]     Phone number not found " )
         retval = EFalse;
         }
     MUS_LOG1( "mus: [MUSAVA]     <- CMusAvaContactAvailability::\
@@ -175,12 +310,575 @@
     return retval;
     }
 
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+TBool CMusAvaContactAvailability::ContactL(
+                                    CContactIdArray*& aContactIdArray,
+                                    CPbkContactEngine& aPbkContactEngine )
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::ContactL()" )
+    CPbkContactItem* pbkContactItem = NULL;
+
+    TInt conRes = EFalse;
+
+    TInt err = ContactArrayL( aContactIdArray, aPbkContactEngine );
+    if ( !err )
+        {
+        err = ContactItem( *aContactIdArray, pbkContactItem, aPbkContactEngine );
+        // NOTE: KErrNotSupported means there is more than one contact id.
+        if ( err == KErrNotSupported )
+            {
+            iSettings.SetContactId( KErrNotSupported );
+            conRes = ETrue;
+            }
+        else if( err != KErrNone )
+            {
+            MUS_LOG( "mus: [MUSAVA]     No contact item found; contact id = \
+                KErrNotFound" )
+            conRes = EFalse;
+            }
+        else
+            {
+            TContactItemId itemId = pbkContactItem->Id();
+            MUS_LOG1( "mus: [MUSAVA]        Setting contact id to be %d",
+                      itemId )
+            CleanupStack::PushL( pbkContactItem );
+            iSettings.SetContactId( itemId );
+            UpdateContactNameL( pbkContactItem->ContactItem() );
+            CleanupStack::Pop( pbkContactItem );
+            conRes = ETrue;
+            }
+        }
+    MUS_LOG1( "mus: [MUSAVA]     <- CMusAvaContactAvailability::\
+              ContactL return %d", conRes )
+
+    delete pbkContactItem;
+    pbkContactItem = NULL;
+
+    return conRes;
+    }
+
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+void CMusAvaContactAvailability::UpdateContactNameL( 
+                                                CContactItem& aContactItem )
+    {
+    MUS_LOG( "mus: [MUSAVA ]  -> CMusAvaContactAvailability::\
+        UpdateContactName" )
+    //TBuf<KMusNameFieldMaxLength> givenName;
+    //TBuf<KMusNameFieldMaxLength> familyName;
+
+    HBufC* givenName = NULL;
+    HBufC* familyName = NULL;
+
+    delete iContactName;
+    iContactName = NULL;
+    iContactName = HBufC::NewL( 0 );
+
+    CContactItemFieldSet& fieldSet = aContactItem.CardFields();
+
+    TInt pos = fieldSet.Find( KUidContactFieldGivenName );
+    if ( pos != KErrNotFound )
+        {
+        CContactItemField& itemField = fieldSet[pos];
+        //givenName = HBufC::NewL( itemField.TextStorage()->Text().Length() );
+
+        //givenName.Copy( itemField.TextStorage()->Text().Alloc() );
+        givenName = itemField.TextStorage()->Text().AllocLC();
+
+        }
+    else
+        {
+        //givenName = KMusEmptyStringSymbol;
+        givenName = KMusEmptyStringSymbol().AllocLC();
+        }
+
+    pos = fieldSet.Find( KUidContactFieldFamilyName );
+    if ( pos != KErrNotFound )
+        {
+        CContactItemField& itemField = fieldSet[pos];
+        //familyName = HBufC::NewL( itemField.TextStorage()->Text().Length() );
+        //familyName.Copy( field.TextStorage()->Text() );
+        familyName = itemField.TextStorage()->Text().AllocLC();
+        }
+    else
+        {
+        familyName = KMusEmptyStringSymbol().AllocLC();
+        }
+
+    TInt strLength = NULL;
+    TBool bothNames = givenName->Length() > 0 && familyName->Length() > 0;
+    
+    if ( bothNames )
+        {
+        strLength = givenName->Length() +
+                     KMusSpaceSymbol().Length() +
+                     familyName->Length();
+        }
+    else
+        {
+        strLength = givenName->Length() + familyName->Length();
+        }
+    
+    if ( strLength > iContactName->Length() )
+        {
+        iContactName = iContactName->ReAllocL( strLength );
+        }
+
+    if ( strLength > 0 )
+        {
+        TPtr ptr = iContactName->Des();
+        if ( iBeginWithFirstName )
+            {
+            if ( bothNames )
+                {
+                ptr.Append( givenName->Des() );
+                ptr.Append( KMusSpaceSymbol );
+                ptr.Append( familyName->Des() );
+                }
+            else
+                {
+                ptr.Append( givenName->Des() );
+                ptr.Append( familyName->Des() );
+                }
+            }
+        else            
+            {
+            if ( bothNames )
+                {
+                ptr.Append( familyName->Des() );
+                ptr.Append( KMusSpaceSymbol );
+                ptr.Append( givenName->Des() );
+                }
+            else
+                {
+                ptr.Append( familyName->Des() );
+                ptr.Append( givenName->Des() );
+                }
+            } 
+        }
+
+    CleanupStack::PopAndDestroy( familyName );
+    CleanupStack::PopAndDestroy( givenName );
+
+    TRAP_IGNORE( iSettings.SetContactNameL( iContactName->Des() ) )
+
+    MUS_LOG( "mus: [MUSAVA ]  <- CMusAvaContactAvailability::\
+        UpdateContactName" )
+    }
+
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+TInt CMusAvaContactAvailability::ContactArrayL(
+                                    CContactIdArray*& aContactIdArray,
+                                    CPbkContactEngine& aPbkContactEngine )
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::ContactArrayL()" )
+
+    const TDesC& phoneNumber = iSettings.TelNumber();
+    TInt retval = KErrNotFound;
+
+    if ( phoneNumber.Length() > 0 )
+        {
+        MUS_LOG( "mus: [MUSAVA]     Phone number found " )
+        // Instantiate a PhonebookContactEngine object, which represents a
+        // connection to the Phonebook contact database:
+        #ifdef UNIT_TESTING // if unit testing
+        EUNIT_DISABLE_ALLOC_DECORATOR;
+        #endif // UNIT_TESTING
+        CContactIdArray* tmpContactIdArray =
+                        aPbkContactEngine.MatchPhoneNumberL(
+                                             phoneNumber,
+                                             KNumberMatchingDigitsRequired );
+        #ifdef UNIT_TESTING // if unit testing
+        EUNIT_ENABLE_ALLOC_DECORATOR;
+        #endif // UNIT_TESTING
+        if ( tmpContactIdArray->Count() > 0 )
+            {
+            aContactIdArray = tmpContactIdArray;    
+            retval = KErrNone;
+            }
+        else
+            {
+            tmpContactIdArray->Reset();
+            delete tmpContactIdArray;
+            MUS_LOG( 
+            "mus: [MUSAVA]     Phone number not found in CPbkContactEngine" )
+            }
+        }
+    else
+        {
+        MUS_LOG( "mus: [MUSAVA]     Phone number not found " )
+        }
+    
+    MUS_LOG1( "mus: [MUSAVA]     <- CMusAvaContactAvailability::\
+          ContactArrayL return %d", retval )
+
+    return retval;
+    }
+
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+TInt CMusAvaContactAvailability::ContactItem( 
+                                        CContactIdArray& aContactIdArray,
+                                        CPbkContactItem*& aPbkContactItem,
+                                        CPbkContactEngine& aPbkContactEngine )
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::ContactItem()" )
+    CPbkContactItem* pbkItem = NULL;
+    TInt retval = KErrNotFound;
+    TInt contactIdsCount = aContactIdArray.Count();
+    
+    if( contactIdsCount > 1 )
+      {
+      // NOTE: KErrNotSupported means there is more than one contact id.
+      MUS_LOG( "mus: [MUSAVA]    More than one Contact ID found." )
+      retval = KErrNotSupported;
+      }
+    else if ( contactIdsCount == 1 )
+        {
+        // Contact card whose phone number matches that of the other party
+        // was found. The ID(s) of the contacts are recorded in iIdArray.
+        MUS_LOG( "mus: [MUSAVA]     Contact ID found." )
+
+        TContactItemId itemId( KErrNotFound );
+
+        MUS_LOG1( "mus: [MUSAVA]    ID array has <%d> elements",
+                  contactIdsCount )
+        // iterate through the contact cards we consider as belonging to
+        // the other party, that is, those saved in iIdArray:
+        for ( TInt i = 0; i < contactIdsCount; i++ )
+            {
+            itemId = ( aContactIdArray )[i];
+            MUS_LOG2( "mus: [MUSAVA]        Current array index == <%d>, \
+                    contact ID == <%d>", i, itemId )
+            TRAPD( pbkFailure, pbkItem =
+                   aPbkContactEngine.ReadContactL( itemId ) );
+
+            if ( pbkFailure )
+                {
+                // Contact lookup failed.
+                MUS_LOG1( "mus: [MUSAVA]    Leave code <%d> occurred at call \
+                        of ReadContactL.", pbkFailure )
+                }
+            else
+                {
+                aPbkContactItem = pbkItem;
+                retval = KErrNone;
+                }
+            }
+        }
+    else
+        {
+        MUS_LOG( "mus: [MUSAVA]     No contact card whose phone number\
+             matches that of the other party" )
+        }
+    
+    MUS_LOG1( "mus: [MUSAVA]  <- CMusAvaContactAvailability::\
+                 ContactItem() return %d", retval )
+        
+    return retval;
+    }
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+TBool CMusAvaContactAvailability::PhoneResolutionL( CPbkContactItem& aPbkItem,
+                                           CDesCArrayFlat*& aContactsArray )
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::PhoneResolutionL()" )
+    TInt retval = ETrue;
+    if ( ResolvePhoneContactL( aPbkItem, aContactsArray ) )
+        {
+        MUS_LOG( "mus: [MUSAVA]     Stop Execution" )
+        }
+    else
+        {
+        if ( ActiveCallL( aContactsArray ) )
+            {
+            MUS_LOG( "mus: [MUSAVA]     Stop Execution" )
+            }
+        else
+            {
+            MUS_LOG( "mus: [MUSAVA]     Stop Execution" )
+            retval = EFalse;
+            }
+        }
+        
+    MUS_LOG1( "mus: [MUSAVA]  <- CMusAvaContactAvailability::\
+                 PhoneResolutionL() return %d", retval )
+    return retval;
+    }
+
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+TBool CMusAvaContactAvailability::ContactId( CPbkContactItem& aPbkItem,
+                                                  TPbkFieldId aTPbkFieldId  )
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::ContactId()" )
+
+    CPbkFieldArray& fieldArray = aPbkItem.CardFields();
+    TPbkContactItemField itemField;
+    TBool returnValue = EFalse;
+
+    // Get the number of detail fields of the phonebook contact item.
+    const TInt fieldCount( fieldArray.Count() );
+
+    for ( TInt index = 0; index < fieldCount && returnValue == EFalse; 
+        index++ )
+        {
+        itemField = fieldArray.At( index );
+
+        if ( itemField.FieldInfo().Match( aTPbkFieldId ) &&
+              itemField.Text().Find( KMusAvaAtSign() ) != KErrNotFound )
+            {
+            returnValue = ETrue;
+            MUS_LOG( "mus: [MUSAVA]     Contact id found" )
+            }
+        }
+    MUS_LOG1( "mus: [MUSAVA]     <- CMusAvaContactAvailability::\
+              ContactId() return %d", returnValue )
+    return returnValue;
+    }
+
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+TPbkFieldId CMusAvaContactAvailability::ContactIdSearch(
+                                        CContactIdArray& aContactIdArray,
+                                        CPbkContactEngine& aPbkContactEngine )
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::\
+    ContactIdSearch()" )
+    
+    TInt contactIdsCount = aContactIdArray.Count();
+    MUS_LOG1( "mus: [MUSAVA]     aContactIdArray.Count %d", \
+    contactIdsCount )
+
+    CPbkContactItem* pbkItem = NULL;
+    TPbkFieldId retFieldId = EPbkFieldIdNone;
+
+    for ( TInt i = 0; 
+        i < contactIdsCount && retFieldId == EPbkFieldIdNone; 
+        i++ )
+        {
+        MUS_LOG1( "mus: [MUSAVA]     i %d", i )
+        TContactItemId itemId( KErrNotFound );
+        itemId = ( aContactIdArray )[i];
+
+        #ifdef UNIT_TESTING // if unit testing
+        EUNIT_DISABLE_ALLOC_DECORATOR;
+        #endif // UNIT_TESTING
+        TRAPD( error, pbkItem = aPbkContactEngine.ReadContactL( itemId ) )
+        #ifdef UNIT_TESTING // if unit testing
+        EUNIT_ENABLE_ALLOC_DECORATOR;
+        #endif // UNIT_TESTING
+        if ( error != KErrNone )
+            {
+            return retFieldId;
+            }
+        if ( ContactId( *pbkItem, EPbkFieldIdShareView ) )
+            {
+            MUS_LOG( "mus: [MUSAVA]     Contact have a prefix = \
+            EPbkFieldIdShareView" )
+            delete pbkItem;
+            retFieldId = EPbkFieldIdShareView;
+            }
+        else if ( ContactId( *pbkItem, EPbkFieldIdSIPID ) )
+            {
+            MUS_LOG( "mus: [MUSAVA]     Contact have a prefix = \
+            EPbkFieldIdSIPID" )
+            delete pbkItem;
+            retFieldId = EPbkFieldIdSIPID;
+            }
+        else if ( ContactId( *pbkItem, EPbkFieldIdPhoneNumberGeneral ) )
+            {
+            // this part never run!!!!
+            MUS_LOG( "mus: [MUSAVA]     Contact have a prefix = \
+            EPbkFieldIdPhoneNumberGeneral" )
+            delete pbkItem;
+            retFieldId = EPbkFieldIdPhoneNumberGeneral;
+            }
+        else
+            {
+            MUS_LOG( "mus: [MUSAVA]     Contact have no prefix " )
+            delete pbkItem;
+            }
+        }
+    return retFieldId;
+    }
+
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+TBool CMusAvaContactAvailability::ResolveAddressesL( CPbkContactItem& aPbkItem,
+                                        CDesCArrayFlat*& aContactsArray,
+                                        TPbkFieldId aTPbkFieldId  )
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::\
+        ResolveAddressesL()" )
+
+    CPbkFieldArray& fieldArray = aPbkItem.CardFields();
+    TPbkContactItemField itemField;
+    HBufC* tmpDescriptor( NULL );
+    TBool returnValue( EFalse );
+
+    // Get the number of detail fields of the phonebook contact item.
+    const TInt fieldCount( fieldArray.Count() );
+
+    for ( TInt index = 0; index < fieldCount; index++ )
+        {
+        itemField = fieldArray.At( index );
+
+        if ( itemField.FieldInfo().Match( aTPbkFieldId ) &&
+             itemField.Text().Find( KMusAvaAtSign() ) != KErrNotFound && 
+             ( iOperatorVariant != MusSettingsKeys::EOperatorSpecific || 
+               itemField.Text().Find( KMusAvaTestString() ) != KErrNotFound ) )
+            {
+            returnValue = ETrue;
+            MUS_LOG( "mus: [MUSAVA]     Contact id found" )            
+            
+            HBufC* sipAddress;
+            if ( iOperatorVariant == MusSettingsKeys::EOperatorSpecific )
+                {
+                sipAddress = HBufC::NewLC( itemField.Text().Length() - 
+                                           KMusAvaTestString().Length() );
+                TInt pos = itemField.Text().Find( KMusAvaTestString() );
+                sipAddress->Des().Append( itemField.Text().Left( pos ) );
+                sipAddress->Des().Append( itemField.Text().Right( 
+                                    itemField.Text().Length() - 
+                                    pos - KMusAvaTestString().Length() ) );
+                }
+            else                
+                {
+                sipAddress = itemField.Text().AllocLC();
+                }
+
+            if ( sipAddress->Find( KMusAvaSip() ) == KErrNotFound )
+                {
+                // No, it doesn't, so add the prefix to the new address.
+                MUS_LOG( "mus: [MUSAVA]     Prefix to the new address is added" )
+                tmpDescriptor = HBufC::NewLC( KMusAvaSip().Length() +
+                                              sipAddress->Length() );
+                tmpDescriptor->Des().Append( KMusAvaSip() );
+                tmpDescriptor->Des().Append( *sipAddress );
+                // if multiple contact have same phone number then 
+                // sip address can be repeated . To avoid this check
+                // whether sip address exist already in array
+                // it not exist then add it to array.
+                if(! IsExistAlready(*aContactsArray,*tmpDescriptor))
+                    {
+                    aContactsArray->AppendL( *tmpDescriptor );    
+                    }                
+                CleanupStack::PopAndDestroy( tmpDescriptor );
+                }
+            else
+                {
+                MUS_LOG( "mus: [MUSAVA]     Contact have a prefix" )
+                 // if multiple contact have same phone number then 
+                // sip address can be repeated . To avoid this check
+                // whether sip address exist already in array
+                // it not exist then add it to array.
+                if(! IsExistAlready(*aContactsArray,*sipAddress))
+                    {
+                    aContactsArray->AppendL( *sipAddress );
+                    }
+                }
+                
+            CleanupStack::PopAndDestroy( sipAddress );                
+            }
+        }
+    MUS_LOG1( "mus: [MUSAVA]     <- CMusAvaContactAvailability::\
+              ResolveAddressesL() return %d", returnValue )
+    return returnValue;
+    }
+
+
+// -------------------------------------------------------------------------
+//
+// -------------------------------------------------------------------------
+//
+TBool CMusAvaContactAvailability::ResolvePhoneContactL(
+                                                CPbkContactItem& aPbkItem,
+                                              CDesCArrayFlat*& aContactsArray )
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaContactAvailability::\
+        ResolvePhoneContactL()" )
+    CPbkFieldArray& fieldArray = aPbkItem.CardFields();
+    TPbkContactItemField itemField;
+    HBufC* tmpDescriptor( NULL );
+    TBool returnValue = EFalse;
+
+    // Get the number of detail fields of the phonebook contact item.
+    const TInt fieldCount( fieldArray.Count() );
+
+    for ( TInt index = 0; index < fieldCount; index++ )
+        {
+        itemField = fieldArray.At( index );
+
+        if ( itemField.FieldInfo().IsPhoneNumberField() && 
+             ( iOperatorVariant == MusSettingsKeys::EOperatorSpecific ||
+               itemField.Text().Left(1) == KMusAvaPlus() ) )
+            {
+            MUS_LOG( "mus: [MUSAVA]     Contact id found" )
+            // No, it doesn't, so add the prefix to the new address.
+            MUS_LOG( "mus: [MUSAVA]     Prefix to the new address is added" )
+            tmpDescriptor = HBufC::NewLC( KMusAvaTel().Length() +
+                                          itemField.Text().Length() );
+            tmpDescriptor->Des().Append( KMusAvaTel() );
+            tmpDescriptor->Des().Append( itemField.Text() );
+            aContactsArray->AppendL( *tmpDescriptor );
+            CleanupStack::PopAndDestroy( tmpDescriptor );
+            returnValue = ETrue;
+            }
+        }
+
+    MUS_LOG( "mus: [MUSAVA]  <- CMusAvaContactAvailability::\
+        ResolvePhoneContactL()" )
+    return returnValue;
+    }
+
+
 MMusAvaObserver::TAvailabilityName CMusAvaContactAvailability::Name()
     {
     return MMusAvaObserver::EMusAvaNameContactStatus;
     }
 
 
-
-
-// End of file
+// -------------------------------------------------------------------------
+// Checks that whether aDesItem present in aDesArray.
+// Utility function used to avoid dublication.
+// -------------------------------------------------------------------------
+//
+TBool CMusAvaContactAvailability::IsExistAlready(const MDesCArray& aDesArray,
+                                          const TDesC& aDesItem)                                              
+    {    
+    for ( TInt i=0;i<aDesArray.MdcaCount();i++)
+        {
+        if (! aDesArray.MdcaPoint(i).Compare( aDesItem ) ) 
+            {
+            return ETrue;            
+            }
+        }
+    return EFalse;
+    }
--- a/mmsharing/mmshavailability/src/musavadefaultimp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavadefaultimp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -368,6 +368,11 @@
     }
 
 
+void CMusAvaDefaultImp::AvailabilitiesAbleToShowIndicator()
+	{
+	iObserver->AvailabilitiesAbleToShowIndicator();
+	}
+
 // -----------------------------------------------------------------------------
 //  Availability error.
 // -----------------------------------------------------------------------------
@@ -511,17 +516,3 @@
         retval )
     return retval;
     }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusAvaDefaultImp::PrepareForReceivedInviteL()
-    {
-    for ( TInt i = 0; i < iAvailabilities.Count(); i++ )
-        {
-        iAvailabilities[i]->PrepareForReceivedInviteL();
-        }
-    }
-
-// End of file
--- a/mmsharing/mmshavailability/src/musavadefaultoptionhandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavadefaultoptionhandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -26,7 +26,6 @@
 #include "musavacapability.h"
 #include "musavacapabilitycontext.h"
 #include "musavanetworkmodestatus.h"
-
 #include <sipstrings.h>
 #include <siptransactionbase.h>
 #include <sipheaderbase.h>
@@ -420,6 +419,9 @@
 	LocalHostL( aTransaction,localHost,hostType);
 	CSdpOriginField* originField = CreateOriginFieldL(localHost,hostType);
 	sdpDocument->SetOriginField(originField);
+	//session name
+	_LIT8(KSessionName, "-");
+	sdpDocument->SetSessionNameL(KSessionName);
 	// Connection field
 	CSdpConnectionField* connectionField =
         CSdpConnectionField::NewL( netType, hostType, localHost );
@@ -447,8 +449,6 @@
     sdpDocument->AttributeFields().AppendL( type );
     CleanupStack::Pop( type );
 
-    // Fast startup mode
-    CMusAvaCapability::AddFastModeL( *sdpDocument );
 
     MUS_LOG( "mus: [MUSAVA] Adding media line to SDP" )
     //media line
--- a/mmsharing/mmshavailability/src/musavanetworkavailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavanetworkavailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -29,7 +29,6 @@
 
 #include <e32base.h>
 
-const TInt KSipUriArrayGranularity = 1;
 
 CMusAvaNetworkAvailability* CMusAvaNetworkAvailability::NewL(
     MMusAvaAvailabilityObserver& aObserver,
@@ -75,7 +74,8 @@
     MMusAvaAvailabilityObserver& aObserver,
     CMusAvaSettingsImp& aSettings )
     :CMusAvaAvailability( aObserver ),
-    iSettings( aSettings )
+    iSettings( aSettings ),
+    iConfcall( EFalse )
     {
     }
 
@@ -101,13 +101,14 @@
         {
             case NMusSessionInformationApi::ECallConnected:                 
                 {
-				TBuf<CMusAvaCallEventMonitor::KMusTelNumberMaxLength> telNumber;
-				TBool isSipUri( EFalse );
-				iPhoneStatus->GetTelNumberL( telNumber, isSipUri );
-				SetRemoteHostL( telNumber, isSipUri );
-				iSettings.SetCallDirection( iPhoneStatus->CallDirectionL() );
-				SetState( MMusAvaObserver::EMusAvaStatusAvailable );
-				break;
+                 TBuf<CMusAvaCallEventMonitor::KMusTelNumberMaxLength> telNumber;
+                 iPhoneStatus->GetTelNumberL( telNumber );
+                 iSettings.SetTelNumberL( telNumber );
+                 iSettings.SetCallDirection( iPhoneStatus->CallDirectionL() );
+                 iSettings.SetCallPrivacy( iPhoneStatus->CallPrivacyL() );
+        
+                 SetState( MMusAvaObserver::EMusAvaStatusAvailable );
+                 break;
                 }      
             case NMusSessionInformationApi::ECallHold:  
                  SetState( MMusAvaObserver::EMusAvaStatusCallOnHold );
@@ -147,15 +148,31 @@
 //  This function is called when a cs call is connected.
 // -------------------------------------------------------------------------
 //
-void CMusAvaNetworkAvailability::CallConnectedL( const TDesC& aTelNumber,
-                                                 TBool aIsSipUri)
+void CMusAvaNetworkAvailability::CallConnectedL( const TDesC& aTelNumber )
     {
     MUS_LOG( "mus: [MUSAVA]  \
                 -> CMusAvaNetworkAvailability::CallConnectedL()" )
-    // try to resolve to contact information of the remote host
-	SetRemoteHostL( aTelNumber, aIsSipUri );
-    iSettings.SetCallDirection( iPhoneStatus->CallDirectionL() );
-    SetState( MMusAvaObserver::EMusAvaStatusAvailable );
+                
+// try to resolve to contact information of the remote host	
+	iSettings.SetTelNumberL( aTelNumber );
+	iSettings.SetCallDirection( iPhoneStatus->CallDirectionL() );
+	iSettings.SetCallPrivacy( iPhoneStatus->CallPrivacyL() );
+   
+	//isn't the phone sent option successfully
+    if ( ( aTelNumber != iSettings.OptionSentTelNumber()  
+    	   || iSettings.OptionSentTelNumber() == KNullDesC() )
+    	   && iConfcall )
+   	    {
+        MUS_LOG("CMusAvaNetworkAvailability::CallConnectedL EMusAvaStatusInProgress");
+        iSettings.ReleaseOptionSentNumber();
+        SetState( MMusAvaObserver::EMusAvaStatusInProgress );         
+   	    }
+    else
+    	{
+	    SetState( MMusAvaObserver::EMusAvaStatusAvailable );
+	    MUS_LOG("CMusAvaNetworkAvailability::CallConnectedL EMusAvaStatusAvailable");
+			
+    	  }
 
     MUS_LOG( "mus: [MUSAVA]  \
                 <- CMusAvaNetworkAvailability::CallConnectedL()" )
@@ -172,6 +189,7 @@
     MUS_LOG( "mus: [MUSAVA]  \
             -> CMusAvaNetworkAvailability::ConferenceCallL()" )
     //Report line status
+    iConfcall = ETrue;
     SetState( MMusAvaObserver::EMusAvaStatusConferenceCall );
     MUS_LOG( "mus: [MUSAVA]  \
                 <- CMusAvaNetworkAvailability::ConferenceCallL()" )
@@ -182,13 +200,13 @@
 //  This function is called when a cs call goes hold
 // -------------------------------------------------------------------------
 //
-void CMusAvaNetworkAvailability::CallHoldL( const TDesC& aTelNumber,
-                                            TBool aIsSipUri)
+void CMusAvaNetworkAvailability::CallHoldL( const TDesC& aTelNumber )
     {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaNetworkAvailability::CallHoldL()" )
     //Report line status
-    SetRemoteHostL( aTelNumber, aIsSipUri );
+    iSettings.SetTelNumberL( aTelNumber );
     iSettings.SetCallDirection( iPhoneStatus->CallDirectionL() );
+    iSettings.SetCallPrivacy( iPhoneStatus->CallPrivacyL() );
     SetState( MMusAvaObserver::EMusAvaStatusCallOnHold );
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaNetworkAvailability::CallHoldL()" )
     }
@@ -204,11 +222,6 @@
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaNetworkAvailability::NoActiveCallL()" )
 
     iSettings.SetTelNumberL( KNullDesC() );
-    CDesCArrayFlat* sipUris =
-    	new ( ELeave ) CDesCArrayFlat( KSipUriArrayGranularity );
-	CleanupStack::PushL( sipUris );
-	iSettings.SetSipAddressesL( sipUris );
-	CleanupStack::Pop( sipUris );                    
 
     //Report line status
     //Availability status
@@ -217,28 +230,19 @@
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaNetworkAvailability::NoActiveCallL()" )
     }
 
-
-void CMusAvaNetworkAvailability::SetRemoteHostL( const TDesC& aTelNumber,
-												 TBool aIsSipUri )
+// -------------------------------------------------------------------------
+//This function is called when conference call terminted
+//
+// -------------------------------------------------------------------------
+//
+void CMusAvaNetworkAvailability::ConferenceCallLTerminated()
 	{
-	MUS_LOG1( "mus: [MUSAVA]  -> CMusAvaNetworkAvailability::SetRemoteHostL(%d)",
-			  aIsSipUri )
-	  
-	if ( aIsSipUri )
-		{
-		CDesCArrayFlat* sipUris =
-			new ( ELeave ) CDesCArrayFlat( KSipUriArrayGranularity );
-		CleanupStack::PushL( sipUris );
-		sipUris->AppendL( aTelNumber );
-		iSettings.SetSipAddressesL( sipUris );
-		CleanupStack::Pop( sipUris );
-		
-		iSettings.SetUriForContactResolvingL( aTelNumber );
-		}
-	else
-		{
-		iSettings.SetTelNumberL( aTelNumber );
-		}
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaNetworkAvailability::ConferenceCallLTerminated()" )
+    if ( iConfcall )
+    	{
+        iConfcall = EFalse;
+    	}
+    AvailabilitiesAbleToShowIndicator();
 
-	MUS_LOG( "mus: [MUSAVA]  <- CMusAvaNetworkAvailability::SetRemoteHostL()" )
+    MUS_LOG( "mus: [MUSAVA]  <- CMusAvaNetworkAvailability::ConferenceCallLTerminated()" )
 	}
--- a/mmsharing/mmshavailability/src/musavanetworkmodestatus.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavanetworkmodestatus.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -54,8 +54,11 @@
     iObserver.Reset();
     iObserver.Close();
     iPhone.Close();
-    iTelServer.UnloadPhoneModule( KMmTsyModuleName );
-    iTelServer.Close();
+    if( iTelServer.Handle() )
+    	{
+        iTelServer.UnloadPhoneModule( KMmTsyModuleName );
+        iTelServer.Close();
+    	}
     }
 
     
--- a/mmsharing/mmshavailability/src/musavanetworkregistrationstatus.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavanetworkregistrationstatus.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -51,8 +51,11 @@
     iObserver.Reset();
     iObserver.Close();
     iPhone.Close();
-    iTelServer.UnloadPhoneModule( KMmTsyModuleName );
-    iTelServer.Close();
+    if( iTelServer.Handle() )
+    	{
+        iTelServer.UnloadPhoneModule( KMmTsyModuleName );
+        iTelServer.Close();
+    	}
     }
 
     
--- a/mmsharing/mmshavailability/src/musavaoptionhandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavaoptionhandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -33,7 +33,6 @@
 #include "musavaterminal.h"
 #include "mussettingskeys.h"
 #include "mussettings.h"
-#include "mussesseioninformationapi.h"
 
 
 _LIT( KMusSipPrefix, "sip:" );
@@ -142,21 +141,6 @@
                             ( MMusAvaSipAdapter& ) *iSipAgent, 
                             KMusOptionsHandlerIndex ); 
     
-    MUS_LOG( "mus: [MUSAVA]     Check fast mode capability" )
-    
-    TRAPD( err,
-    iFastModeCapable = 
-        MultimediaSharingSettings::FastStartupModeL() == MusSettingsKeys::EFastModeOn  && 
-        MultimediaSharingSettings::VideoDirectionL() == MusSettingsKeys::ETwoWayVideo &&
-        MultimediaSharingSettings::CapabilityQuerySettingL() == MusSettingsKeys::EParallel );
-    if ( err == KErrNoMemory )
-        {
-        User::Leave( err );
-        }
-    
-    MUS_LOG2( "mus: [MUSAVA]     Fast mode check, err:%d, capable:%d", 
-              err, iFastModeCapable )
-    
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaOptionHandler::ConstructL()" )
     }
 
@@ -167,13 +151,8 @@
 //
 TBool CMusAvaOptionHandler::CapabilityQueryAnswered( TBool aAnswered )
     {
-    MUS_LOG1( "mus: [MUSAVA]  <-> CMusAvaOptionHandler::CapabilityQueryAnswered():%d", 
-              aAnswered )
-    
     iCapabilityQueryAnswered = aAnswered ? aAnswered : iCapabilityQueryAnswered;
     
-    HandleFastModeQueryAnswered();
-    
     return iCapabilityQueryAnswered;
         
     }
@@ -252,13 +231,13 @@
     if ( variantSetting == MusSettingsKeys::EOperatorSpecific 
         && iSettings.CallDirection() == 2 && !iCapabilitiesRequestAnswered )
         { // terminated party 
-        DoSetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
+        SetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
         }
     else if ( MusSettingsKeys::ESequential ==  
      	        MultimediaSharingSettings::CapabilityQuerySettingL()
         && iSettings.CallDirection() == 2 && !iCapabilitiesRequestAnswered )
         { // terminated party 
-        DoSetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
+        SetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
         }
     else
         {
@@ -289,11 +268,11 @@
                     if ( iCapabilityExchange->
                         TerminalL( sipAddress8->Des() ).QueryExecuting() )
                         {
-                        DoSetState( MMusAvaObserver::EMusAvaStatusOptionsSent );
+                        SetState( MMusAvaObserver::EMusAvaStatusOptionsSent );
                         }
     		    	else
     		    	    {
-    		    	    DoSetState( MMusAvaObserver::EMusAvaStatusAvailable );	
+    		    	    SetState( MMusAvaObserver::EMusAvaStatusAvailable );	
     		            }
     		        CleanupStack::PopAndDestroy( sipAddress8 );
     		    	}
@@ -302,24 +281,24 @@
                 // since we did not send any options set the state EMusAvaStatusNotExecuted.
                 else if( err == KErrSIPInvalidRegistrationState )
                     {
-                    DoSetState( MMusAvaObserver::EMusAvaStatusNotExecuted );
+                    SetState( MMusAvaObserver::EMusAvaStatusNotExecuted );
                     }
                 // anything other than this should be considered default , means options sent
                 // and was not successful.
     		    else
     		        {
-    		        DoSetState( MMusAvaObserver::EMusAvaOptionNotAvailable );
+    		        SetState( MMusAvaObserver::EMusAvaOptionNotAvailable );
     		        }
     	        }
     	    else
     	    	{
-    	    	DoSetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );	
+    	    	SetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );	
     	    	}
         	}
         else
         	{
         	// option sending not needed 
-        	DoSetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
+        	SetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
         	}  
         }
     
@@ -348,23 +327,6 @@
     return MMusAvaObserver::EMusAvaOptionHandler;
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusAvaOptionHandler::PrepareForReceivedInviteL()
-    {
-    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaOptionHandler::PrepareForReceivedInviteL()" )
-    
-    if ( iFastModeAvailabilityDelayed )
-        {
-        MUS_LOG( "mus: [MUSAVA]     Set delayed availability" )
-        SetState( MMusAvaObserver::EMusAvaStatusAvailable );
-        iFastModeAvailabilityDelayed = EFalse;
-        }
-    
-    MUS_LOG( "mus: [MUSAVA]  <- CMusAvaOptionHandler::PrepareForReceivedInviteL()" )
-    }
 
 // -----------------------------------------------------------------------------
 // 
@@ -379,17 +341,19 @@
         {
         // tell the upper layer that
         // query was succesfull. VS is available
-        DoSetState( MMusAvaObserver::EMusAvaStatusAvailable );
+        //record the number
+        iSettings.SetOptionSentNumber( iSettings.TelNumber() );
+        SetState( MMusAvaObserver::EMusAvaStatusAvailable );
         }
     else if ( aSentQuery.Result() == KCapabilityCapabilitiesForbidden )
         {
         // query returned with response "403 Forbidden". VS is NOT available
-        DoSetState( MMusAvaObserver::EMusAvaFailureCode );
+        SetState( MMusAvaObserver::EMusAvaFailureCode );
         }
     else
         {
         //query failed. VS is NOT available
-        DoSetState( MMusAvaObserver::EMusAvaOptionNotAvailable );
+        SetState( MMusAvaObserver::EMusAvaOptionNotAvailable );
         }
 
     MUS_LOG(
@@ -436,7 +400,6 @@
         "mus: [MUSAVA]  -> CMusAvaOptionHandler::\
         SetCapabilitiesResolvedForCingular()" )
     iCapabilitiesRequestAnswered = ETrue;
-    
     TRAPD( error, DoExecuteL() );
     if ( error )
         {
@@ -571,214 +534,8 @@
     {
     MUS_LOG("mus: [MUSAVA]  -> CMusAvaOptionHandler::VideoCodecsResolvedL()" )
     
-    iSettings.SetVideoCodecsL( aVideoCodecs );
+    iSettings.SetVideoCodecsL(aVideoCodecs);
     
     MUS_LOG("mus: [MUSAVA]  <- CMusAvaOptionHandler::VideoCodecsResolvedL()" )
     }
 
-
-// -----------------------------------------------------------------------------
-// If MO side fast mode negotiation has failed, cannot change the value anymore
-// as it is very likely that automatic invitation fails as well.
-// -----------------------------------------------------------------------------
-//
-void CMusAvaOptionHandler::FastModeResolved( MusSettingsKeys::TFastMode aMode )
-    {
-    MUS_LOG1("mus: [MUSAVA]  -> CMusAvaOptionHandler::FastModeResolved():%d", 
-        aMode )
-    
-    if ( FastModeNegotiationFailedMO() )
-        {
-        MUS_LOG("mus: [MUSAVA]  Ignore setting as failed already" )
-        }
-    else
-        {
-        iSettings.SetFastMode( aMode );
-        }
-    
-    MUS_LOG("mus: [MUSAVA]  <- CMusAvaOptionHandler::FastModeResolved()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TInt CMusAvaOptionHandler::DoSetState( MMusAvaObserver::TAvailabilityStatus aNewState )
-    {
-    MUS_LOG1( "mus: [MUSAVA]  -> CMusAvaOptionHandler::DoSetState() state:%d", 
-              aNewState )
-    TInt err( KErrNone );
-    
-    if ( iFastModeCapable )
-        {
-        TRAP( err, aNewState = HandleFastModeL( aNewState  ) );
-        }
-    
-    SetState( aNewState );
-    
-    MUS_LOG1("mus: [MUSAVA]  <- CMusAvaOptionHandler::DoSetState(), err:%d", err )
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MMusAvaObserver::TAvailabilityStatus CMusAvaOptionHandler::HandleFastModeL(
-    MMusAvaObserver::TAvailabilityStatus aNewState )
-    {
-    MUS_LOG("mus: [MUSAVA]  -> CMusAvaOptionHandler::HandleFastModeL()" )
-    
-    switch ( aNewState )
-        {
-        case MMusAvaObserver::EMusAvaOptionNotAvailable:
-            {
-            aNewState = HandleFastModeOptionNotAvailableL( aNewState );
-            break;
-            }
-        case MMusAvaObserver::EMusAvaStatusOptionsNotSent:
-            {
-            aNewState = HandleFastModeOptionsNotSentL( aNewState );
-            break;
-            }
-        case MMusAvaObserver::EMusAvaStatusAvailable:
-            {
-            aNewState = HandleFastModeAvailableL( aNewState );
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-    
-    MUS_LOG("mus: [MUSAVA]  <- CMusAvaOptionHandler::HandleFastModeL()" )
-    
-    return aNewState;
-    }
-
-// -----------------------------------------------------------------------------
-// If fast mode and call originator, application is started
-// automatically at background with two-way MO use case. If fast mode is
-// negotiated, availability publishing is delayed at MT side until invitation
-// is received (as MO will send invite automatically).
-// -----------------------------------------------------------------------------
-//
-MMusAvaObserver::TAvailabilityStatus CMusAvaOptionHandler::HandleFastModeAvailableL(
-    MMusAvaObserver::TAvailabilityStatus aNewState )
-    {
-    MUS_LOG("mus: [MUSAVA]  -> CMusAvaOptionHandler::HandleFastModeAvailableL()" )
-    
-    __ASSERT_ALWAYS( iSettings.Observer(), User::Leave( KErrNotReady ) );
-    
-    if ( State() != MMusAvaObserver::EMusAvaStatusAvailable &&
-         iSettings.FastMode() == MusSettingsKeys::EFastModeOn )
-        {
-        if ( iSettings.CallDirection() == NMusSessionInformationApi::ECallOrginated )
-            {
-            MUS_LOG("mus: [MUSAVA]      Starting application at background" )
-            iSettings.Observer()->StartApplicationL( MultimediaSharing::EMusTwoWayVideo );
-            }
-        else
-            {
-            MUS_LOG("mus: [MUSAVA]      Delay availability publishing" )
-            iFastModeAvailabilityDelayed = ETrue;
-            aNewState = State();
-            }
-        }
-    
-    MUS_LOG("mus: [MUSAVA]  <- CMusAvaOptionHandler::HandleFastModeAvailableL()" )
-    
-    return aNewState;
-    }
-
-// -----------------------------------------------------------------------------
-// If fast mode and call terminated side, answering to 200 ok is already enough
-// to set us available in delayed manner as other end can start sending
-// invitation already after getting fast mode information in answer. 
-// -----------------------------------------------------------------------------
-//
-void CMusAvaOptionHandler::HandleFastModeQueryAnswered()
-    {
-    if ( FastModeNegotiatedByAnswerMT() )
-        {
-        MUS_LOG( "mus: [MUSAVA]     Set fastmode available already as answered" )
-        
-        // Will result delayed availability handling
-        DoSetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// If options wasn't sent because of missing information, state can be set to
-// available immediately as MT cannot start waiting for invite unless it is
-// sure that other end is about to send it.
-// -----------------------------------------------------------------------------
-//
-MMusAvaObserver::TAvailabilityStatus 
-CMusAvaOptionHandler::HandleFastModeOptionsNotSentL(
-    MMusAvaObserver::TAvailabilityStatus aNewState )
-    {
-    MUS_LOG("mus: [MUSAVA]  -> CMusAvaOptionHandler::HandleFastModeOptionsNotSentL()" )
-    
-    if ( FastModeNegotiatedByAnswerMT() )
-        {
-        MUS_LOG("mus: [MUSAVA]      Answered already, set available" )
-        // Make available but start waiting for invitation
-        aNewState = HandleFastModeAvailableL( MMusAvaObserver::EMusAvaStatusAvailable );
-        }
-    
-    MUS_LOG("mus: [MUSAVA]  <- CMusAvaOptionHandler::HandleFastModeOptionsNotSentL()" )
-    
-    return aNewState;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MMusAvaObserver::TAvailabilityStatus 
-CMusAvaOptionHandler::HandleFastModeOptionNotAvailableL(
-    MMusAvaObserver::TAvailabilityStatus aNewState )
-    {
-    MUS_LOG("mus: [MUSAVA]  -> CMusAvaOptionHandler::HandleFastModeOptionNotAvailableL()" )
-    
-    if ( iFastModeAvailabilityDelayed || 
-         State() == MMusAvaObserver::EMusAvaStatusAvailable )
-        {
-        MUS_LOG("mus: [MUSAVA]  In delayed mode or available, ignore" )
-        aNewState = State();
-        }
-    
-    MUS_LOG("mus: [MUSAVA]  <- CMusAvaOptionHandler::HandleFastModeOptionNotAvailableL()" )
-    
-    return aNewState;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusAvaOptionHandler::FastModeNegotiatedByAnswerMT()
-    {
-    return ( iFastModeCapable && 
-             iCapabilityQueryAnswered && 
-             iSettings.FastMode() == MusSettingsKeys::EFastModeOn &&
-             iSettings.CallDirection() == NMusSessionInformationApi::ECallTerminated );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusAvaOptionHandler::FastModeNegotiationFailedMO()
-    {
-    return ( iFastModeCapable && 
-             iSettings.FastMode() != MusSettingsKeys::EFastModeOn &&
-             iSettings.CallDirection() == NMusSessionInformationApi::ECallOrginated &&
-             State() != MMusAvaObserver::EMusAvaStatusAvailable && 
-             State() != MMusAvaObserver::EMusAvaStatusOptionsSent );
-    }
-
-// End of file
--- a/mmsharing/mmshavailability/src/musavaregisteravailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavaregisteravailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -5,6 +5,7 @@
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*  Version     : %version: be1sipx1#42.1.4.1.4 % << Don't touch! Updated by Synergy at check-out.
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
@@ -94,6 +95,7 @@
     {
     iSharedObj = CMusAvaSharedObject::GetSingletonL();
     iSharedObj->MusAvaSip().AddAdapterL( *this );
+    iOperatorVariant = MultimediaSharingSettings::OperatorVariantSettingL();
     }
 
 
@@ -118,7 +120,11 @@
     {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaRegisterAvailability::DoExecuteL " )
     SetState( MMusAvaObserver::EMusAvaStatusInProgress );
-    RegisterL();
+    TRAPD( err, RegisterL() );
+    if( err != KErrNone )
+       {
+   		SetState( MMusAvaObserver::EMusAvaStatusNotRegistered );
+       }
     // TBD: SetState( MMusAvaObserver::EMusAvaNameRegistration );
 
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaRegisterAvailability::DoExecuteL " )
@@ -278,6 +284,7 @@
                 {
                 MUS_LOG( "mus: [MUSAVA]     Profile is deregistered" )
                 SetState( MMusAvaObserver::EMusAvaStatusNotRegistered );
+                iSharedObj->MusAvaSip().DeleteSIPConnection();
                 }
                 break;
 
@@ -310,7 +317,7 @@
 //
 void CMusAvaRegisterAvailability::ProfileRegistryErrorOccurred(
     TUint32 aProfileId,
-    TInt /* aError */ )
+    TInt aError )
     {
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaRegisterAvailability::\
              ProfileRegistryErrorOccurred" )
@@ -327,7 +334,17 @@
 
     if( profileId == aProfileId )
         {
-        SetState( MMusAvaObserver::EMusAvaStatusNotRegistered );
+        if ( iOperatorVariant == MusSettingsKeys::EOperatorSpecific &&
+                aError == KErrGeneral )
+            {
+            MUS_LOG( "SIP profile is disabled by the user" )
+            SetState( MMusAvaObserver::EMusActivationError );
+            }
+        else
+            {
+            MUS_LOG1("Error %d",aError )
+            SetState( MMusAvaObserver::EMusAvaStatusNotRegistered );
+            }
         }
 
     MUS_LOG( "mus: [MUSAVA]  <- CMusAvaRegisterAvailability::\
@@ -486,29 +503,29 @@
     MUS_LOG( "mus: [MUSAVA]  -> CMusAvaRegisterAvailability::EnableRegisterL " )		
  	MUS_LOG( "mus: [MUSAVA]   Fetch SIP ProfileRegistry" )
  	
-    CSIPProfileRegistry& registry = iSharedObj->MusAvaSip().ProfileRegistryL();
+   CSIPProfileRegistry& registry = iSharedObj->MusAvaSip().ProfileRegistryL();
     MUS_LOG( "mus: [MUSAVA]   Profile status" )
     if ( !registry.IsEnabled( *iSharedObj->MusAvaSip().Profile() ) )
-        {
-        MUS_LOG("mus: [MUSAVA]     Calling EnableL()" )
-        registry.EnableL( *iSharedObj->MusAvaSip().Profile(), 
-                        iSharedObj->MusAvaSip().ConnectionObserver() );
-        }
-       
+       {
+       MUS_LOG("mus: [MUSAVA]     Calling EnableL()" )
+       registry.EnableL( *iSharedObj->MusAvaSip().Profile(), 
+                       iSharedObj->MusAvaSip().ConnectionObserver() );
+       }
+      
     // Try to write client information to CenRep of client resolver.
     // This functionality is needed in __VOIP enabled terminals.
     // In __VOIP disabled builds this will fail because of a lack of needed 
     // CenRep UID. To avoid branching, we just try to do this and let it fail 
     // in normal build.
     CMusAvaClientResolverUtil* resolver = 
-                                iSharedObj->MusAvaSip().ClientResolverUtil();
+                               iSharedObj->MusAvaSip().ClientResolverUtil();
     if ( resolver )
-        {
-        TRAP_IGNORE( resolver->RegisterClientWithUserL( 
-                *iSharedObj->MusAvaSip().Profile() ) )
-        }
-                    
-    MUS_LOG( "mus: [MUSAVA]  <- CMusAvaRegisterAvailability::EnableRegisterL " )		
+       {
+       TRAP_IGNORE( resolver->RegisterClientWithUserL( 
+               *iSharedObj->MusAvaSip().Profile() ) )
+       }
+                   
+    MUS_LOG( "mus: [MUSAVA]  <- CMusAvaRegisterAvailability::EnableRegisterL " )         
     }
 
 
@@ -584,4 +601,3 @@
         }
     }
   
-   
--- a/mmsharing/mmshavailability/src/musavasettingavailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavasettingavailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -131,10 +131,10 @@
         switch( activation )
             {                
             case MusSettingsKeys::ENever:
+            case MusSettingsKeys::EActiveInHomeNetworks: 
                  iState = MMusAvaObserver::EMusActivationError ;    
                  break;
-            case MusSettingsKeys::EAlwaysActive:
-            case MusSettingsKeys::EActiveInHomeNetworks:  
+            case MusSettingsKeys::EAlwaysActive:  
             default:                 
                 if ( !IsForbiddenByOptionsResponse())  
                     {
--- a/mmsharing/mmshavailability/src/musavasettingsimp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavasettingsimp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -56,6 +56,9 @@
 
     delete iContactName;
     iContactName = NULL;
+    
+    delete iOptionSentTelNumber;
+    iOptionSentTelNumber = NULL ;
 
     delete iSipAddressProposal;
     iSipAddressProposal = NULL ;
@@ -81,8 +84,7 @@
         iAudioCodecs = NULL ;
         }
     
-    delete iContactResolvingUri;
-    
+
     MUS_LOG( "mus: [MUSAVA]	<- CMusAvaSettingsImp::~CMusAvaSettingsImp()" )
     }
 
@@ -90,9 +92,9 @@
 // C++ Constructor
 // -----------------------------------------------------------------------------
 //
-CMusAvaSettingsImp::CMusAvaSettingsImp() :
-    iFastMode( MusSettingsKeys::EFastModeOff )
+CMusAvaSettingsImp::CMusAvaSettingsImp()
     {
+
     }
 
 // -----------------------------------------------------------------------------
@@ -103,6 +105,8 @@
     {
     MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::ConstructL()" )
     iTelNumber = HBufC::NewL( 0 );
+    
+    iOptionSentTelNumber = HBufC::NewL( 0 );
 
     iContactName = HBufC::NewL( 0 );
 
@@ -119,7 +123,8 @@
     iAudioCodecs = new( ELeave ) CDesCArrayFlat( 1 );
 
     MUS_LOG( "mus: [MUSAVA]	<- CMusAvaSettingsImp::ConstructL()" )
-    }        
+    }  
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -128,6 +133,7 @@
 	{
 	return iManualActivation;	
 	}
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -143,6 +149,51 @@
 //
 // -----------------------------------------------------------------------------
 //
+void CMusAvaSettingsImp::SetOptionSentNumber( const TDesC& aTelNumber )
+	{
+    MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::SetOptionSentNumber() " )
+    MUS_LOG_TDESC( "mus: [MUSAVA]	   aTelNumber = ", aTelNumber )
+    delete iOptionSentTelNumber;
+    iOptionSentTelNumber = NULL ;
+    TRAPD ( error , iOptionSentTelNumber = aTelNumber.AllocL() );
+    if ( error )
+    	{
+        MUS_LOG1("CMusAvaSettingsImp::SetOptionSentNumber() leave code: %d ", error);
+    	}
+    MUS_LOG( "mus: [MUSAVA]	<- CMusAvaSettingsImp::SetOptionSentNumber() " )
+	}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusAvaSettingsImp::OptionSentTelNumber() const
+	{
+    MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::OptionSentTelNumber() " )
+	return *iOptionSentTelNumber;
+	}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusAvaSettingsImp::ReleaseOptionSentNumber ()
+	{
+	MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::ReleaseOptionSentNumber() " )
+	delete iOptionSentTelNumber;
+	iOptionSentTelNumber = NULL;
+	TRAPD ( err , iOptionSentTelNumber = HBufC::NewL( 0 ) );
+    if ( err )
+    	{
+        MUS_LOG1("CMusAvaSettingsImp::ReleaseOptionSentNumber() leave code: %d ", err);
+    	}
+	MUS_LOG( "mus: [MUSAVA]	<- CMusAvaSettingsImp::ReleaseOptionSentNumber() " )
+	}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 const TDesC& CMusAvaSettingsImp::ContactName() const
     {
     MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::ContactName()" )
@@ -394,15 +445,6 @@
 //
 // -----------------------------------------------------------------------------
 //
-MMusAvaSettingsObserver* CMusAvaSettingsImp::Observer()
-    {
-    return iObserver;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
 void CMusAvaSettingsImp::SetManualActivation( TManualActivation aManualActivation )
     {
     MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::SetManualActivation" )
@@ -429,7 +471,6 @@
     return state;
     }
 
-
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -447,48 +488,23 @@
 	{
 	iCallDirection = aDirection;	
 	}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusAvaSettingsImp::SetFastMode( MusSettingsKeys::TFastMode aMode )
-    {
-    iFastMode = aMode;    
-    }
-
+    
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-MusSettingsKeys::TFastMode CMusAvaSettingsImp::FastMode() const
-    {
-    return iFastMode;
-    }
-
-// -----------------------------------------------------------------------------
-// In case of not having tel number, contact for remote end may be searched
-// based on sip uri
+TInt CMusAvaSettingsImp::CallPrivacy()
+	{
+	return iCallPrivacy;	
+	}
+	
 // -----------------------------------------------------------------------------
 //
-void CMusAvaSettingsImp::SetUriForContactResolvingL( 
-    const TDesC& aRemoteUri )
-    {
-    HBufC* tempResolvingUri = aRemoteUri.AllocL();
-    delete iContactResolvingUri;
-    iContactResolvingUri = tempResolvingUri;
-    }
-
-// -----------------------------------------------------------------------------
-// 
 // -----------------------------------------------------------------------------
 //
-TPtrC CMusAvaSettingsImp::ContactResolvingUri()
-    {
-    TPtrC resolvingUri( KNullDesC );
-    if ( iContactResolvingUri )
-        {
-        resolvingUri.Set( iContactResolvingUri->Des() );
-        }
-    return resolvingUri;
-    }
+void CMusAvaSettingsImp:: SetCallPrivacy( TInt aPrivacy )
+	{
+	iCallPrivacy = aPrivacy;	
+	}
+
+// end of file
--- a/mmsharing/mmshavailability/src/musavasip.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavasip.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -5,7 +5,7 @@
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*  Version     : %version:  30.1.5 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version:  30.1.4 % << Don't touch! Updated by Synergy at check-out.
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
@@ -406,6 +406,15 @@
     {
     return iClientResolverUtil;
     }
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+void CMusAvaSip::DeleteSIPConnection()
+    {
+    MUS_LOG( "mus: [MUSAVA]  -> CMusAvaSip::DeleteSIPConnection()" )
+        delete iSipConnection; iSipConnection = NULL;
+    MUS_LOG( "mus: [MUSAVA]  <- CMusAvaSip::DeleteSIPConnection()" )
+    }
 
     
 // -----------------------------------------------------------------------------
--- a/mmsharing/mmshavailability/src/musavasipheaderutil.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavasipheaderutil.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -19,6 +19,8 @@
 
 #include "musavasipheaderutil.h"
 #include "muscleanupresetanddestroy.h"
+#include "mussesseioninformationapi.h"
+#include <e32property.h>
 #include <escapeutils.h>
 #include <sipconnection.h>
 #include <sipprofile.h>
@@ -226,6 +228,29 @@
     "mus: [MUSAVA] <- CMusAvaSipheaderUtil::AddAcceptSDPHeaderL" )
     }
 
-
-
-
+// --------------------------------------------------------------------------
+// CMusAvaSipheaderUtil::AddPrivacyHeaderL
+// --------------------------------------------------------------------------
+//
+void CMusAvaSipheaderUtil::AddPrivacyHeaderL( 
+                         RPointerArray<CSIPHeaderBase>& aRequestHeaders )
+    {    
+    MUS_LOG( "mus: [MUSAVA]  -> AddPrivacyHeaderL()" )
+    NMusSessionInformationApi::TMusClirSetting clir =
+		NMusSessionInformationApi::ESendOwnNumber;
+    // Ignore RProperty::Get return value.Incase of error it should behave default.
+    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                    NMusSessionInformationApi::KMusClirSetting,
+                    reinterpret_cast<TInt&>( clir ) );
+    MUS_LOG1( "mus: [MUSAVA]  - clir setting = %d", clir )
+    if ( clir == NMusSessionInformationApi::EDoNotSendOwnNumber )
+        {
+        _LIT8( KMusPrivacyHeader, "Privacy" );
+        _LIT8( KMusPrivacyHeaderValue, "id" );
+        CSIPExtensionHeader* header = CSIPExtensionHeader::NewLC( 
+            KMusPrivacyHeader, KMusPrivacyHeaderValue );
+        aRequestHeaders.AppendL( header );
+        CleanupStack::Pop( header );
+        }
+    MUS_LOG( "mus: [MUSAVA]  <- AddPrivacyHeaderL()" )
+    }
--- a/mmsharing/mmshavailability/src/musavaterminal.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavaterminal.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -189,7 +189,15 @@
 
     ResetAndDestroyQuery();
                   
-    aQuery->ExecuteL();
+    if( aQuery->ValidateUri() )
+    	{
+		aQuery->ExecuteL();
+    	}
+    
+    else
+    	{
+		User::Leave( KErrNotSupported );
+    	}
     
     iQuery = aQuery;                           
         
@@ -513,12 +521,7 @@
             CleanupStack::PushL( videoCodecs );
             capability->Exchange().QueryObserver().VideoCodecsResolvedL( *videoCodecs );
             CleanupStack::PopAndDestroy( videoCodecs );                    
-            
-            //store fast startup mode if present
-            MusSettingsKeys::TFastMode mode = 
-                CMusAvaCapability::ResolveFastModeL( *sdp );
-            capability->Exchange().QueryObserver().FastModeResolved( mode );
-            
+        
             CleanupStack::PopAndDestroy( sdp );
             
             capability->PopulateResponseL( aQuery,
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -24,5 +24,5 @@
 PRJ_EXPORTS
 
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
 ut_availability.mmp
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Group/ut_availability.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Group/ut_availability.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -27,8 +27,8 @@
 MACRO                   UNIT_TESTING
 //epocallowdlldata 
 
+CAPABILITY      EUNIT_CAPS
 
-CAPABILITY              EUNIT_CAPS
 VENDORID                VID_DEFAULT
 
 // Test sources
@@ -59,8 +59,7 @@
 SOURCE                  UT_CMusAvaSipprofileAvailability.cpp
 SOURCE                  UT_CMusAvaSipProfileRegistryObserver.cpp
 SOURCE                  UT_CMusAvaNetworkAvailability.cpp
-SOURCE                  UT_CMusAvaSettingAvailability.cpp
-SOURCE					UT_CMusAvaCallEventMonitor.cpp    
+SOURCE                  UT_CMusAvaSettingAvailability.cpp    
 SOURCE                  UT_CMusAvaSipheaderUtil.cpp
 SOURCE                  ut_cmusavaclientresolverutil.cpp  
 SOURCE                  musavacapabilitytesthelper.cpp
@@ -127,8 +126,7 @@
 SOURCE                  centralrepositorystub.cpp
 SOURCE                  sipprofileregistrystub.cpp
 SOURCE                  sipprofilestub.cpp
-SOURCE					csipcontactheaderstub.cpp
-SOURCE					musavacallmonitorobserver.cpp
+SOURCE			csipcontactheaderstub.cpp
 SOURCE                  muscallmonitorstub.cpp
 
 SOURCEPATH              ../../../../../tsrc/sipprofilestub/src
@@ -149,6 +147,7 @@
 SOURCEPATH              ../../../../../mmshplugins/mmshaoplugin/src
 SOURCE                  muscalleventmonitor.cpp
 SOURCE                  muscallmonitor.cpp
+SOURCE                  musclirmonitor.cpp
 
 //SOURCE                  musconferencecallmonitor.cpp
 // Using RProperty Stubs
@@ -169,16 +168,12 @@
 USERINCLUDE             ../../../../../mmshplugins/mmshaoplugin/inc
 USERINCLUDE             ../../../../../tsrc/propertystub/inc
 USERINCLUDE             ../../../../../tsrc/sipclientstub/inc
-USERINCLUDE             ../../../../../tsrc/musavaailabilitystub/inc
-USERINCLUDE             ../../../../../tsrc/centralrepositorystub/inc
-USERINCLUDE             ../../../../../tsrc/sipprofilestub/inc
 
 SYSTEMINCLUDE           ../../../../../tsrc/sipprofilestub/inc
 SYSTEMINCLUDE           ../../../../../tsrc/sipclientstub/inc
 SYSTEMINCLUDE           ../../../../../tsrc/musavaailabilitystub/inc
 SYSTEMINCLUDE           ../../../../../tsrc/centralrepositorystub/inc
 SYSTEMINCLUDE           ../../../../../tsrc/propertystub/inc
-SYSTEMINCLUDE           /epoc32/include/platform/digia/eunit
 
 APP_LAYER_SYSTEMINCLUDE
 
@@ -199,6 +194,7 @@
 LIBRARY                 insock.lib
 LIBRARY                 sdpcodec.lib
 LIBRARY                 sipcodec.lib
+LIBRARY                 PbkEng.lib
 LIBRARY                 connmon.lib
 LIBRARY                 etelmm.lib
 LIBRARY                 etel.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Group/ut_availability.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,33 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHAvail"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_availability.dll"-"c:\sys\bin\ut_availability.dll"
+
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavaavailabilityobserverimp.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavaavailabilityobserverimp.h	Wed Sep 01 12:31:01 2010 +0100
@@ -118,6 +118,9 @@
         
         
     virtual MMusAvaObserver::TAvailabilityStatus AvailabilityPluginState();
+    
+    
+    virtual void AvailabilitiesAbleToShowIndicator();
 
      
      /**
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavacallmonitorobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Unit test stub of MMusCallMonitorObserver
-*
-*/
-
-
-#ifndef __MUSAVACALLMONITOROBSERVER_H__
-#define __MUSAVACALLMONITOROBSERVER_H__
-
-#include "musavaavailabilityobserver.h"
-#include "muscallmonitorobserver.h"
-#include <e32base.h>
-
-/**
- *  Test stub of MMusCallMonitorObserver
- */
-class CMusAvaCallMonitorObserverStub :
-	public CBase,
-	public MMusCallMonitorObserver                            
-	{
-public:
-
-	/**
-     * Two-phased constructor
- 	 *
-	 * @return New CMusAvaCallMonitorObserverStub instance
-	 */
-	static CMusAvaCallMonitorObserverStub* NewL();
-	
-	/**
-     * Destructor
-     */
-	~CMusAvaCallMonitorObserverStub();
-
-public: // From MMusCallMonitorObserver
-
-	void CallConnectedL( const TDesC& aTelNumber, TBool aIsSipUri );
-
-	void CallHoldL( const TDesC& aTelNumber, TBool aIsSipUri );
-
-	void ConferenceCallL();
-
-	void NoActiveCallL();
-	
-private:
-	/**
-     * Constructor
-     */
-	CMusAvaCallMonitorObserverStub();
-
-    /**
-     * Perform the second phase construction
-     */
-	void ConstructL();
-	
-	void CopyDescriptorL( const TDesC& aSource );
-
-public:
-
-	// Most recently received tel number. Owned.
-	HBufC* iTelNumber;
-
-	// Contains the most recent value a of aIsSipUri parameter, from
-	// CallConnectedL or CallHoldL.
-	TBool iIsSipUri;
-    };
-
-
-#endif // __MUSAVACALLMONITOROBSERVER_H__
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavacapabilityqueryobserverimp.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavacapabilityqueryobserverimp.h	Wed Sep 01 12:31:01 2010 +0100
@@ -20,7 +20,6 @@
 #define __MUSAVACAPABQUERYOBSERVERIMP_H__
 
 #include <e32base.h>
-#include <mussettingskeys.h>
 #include "mmusavacapabilityqueryobserver.h"
 
 class CMusAvaCapabilityQueryObserverImp : public CBase, 
@@ -48,7 +47,6 @@
     
     TBool CapabilityQueryAnswered( TBool aAnswered = EFalse );
     
-    void FastModeResolved( MusSettingsKeys::TFastMode aMode );
     };
 
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavaobserverimp.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavaobserverimp.h	Wed Sep 01 12:31:01 2010 +0100
@@ -108,6 +108,8 @@
     virtual void AvailabilityError(
         MMusAvaObserver::TAvailabilityName aName,
         MMusAvaObserver::TAvailabilityStatus aStatus );
+    
+    virtual void AvailabilitiesAbleToShowIndicator();
 
 public:
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavasettingsobserverimp.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/inc/musavasettingsobserverimp.h	Wed Sep 01 12:31:01 2010 +0100
@@ -96,13 +96,9 @@
 
     TBool OptionAllowed();
     
-    void StartApplicationL( MultimediaSharing::TMusUseCase aUseCase );
-    
 public: //data
 
     TBool iOptionAllowed;
-    
-    TBool iApplicationStarted;
    
 	};
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/CMusAvaAvailabilityObserverImp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/CMusAvaAvailabilityObserverImp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -113,3 +113,8 @@
            && MMusAvaObserver::EMusAvaStatusAvailable == iStatus );
     }
 
+void CMusAvaAvailabilityObserverImp::AvailabilitiesAbleToShowIndicator()
+	{
+	 //nothing to do
+	}
+
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/CSipSseTestTls.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/CSipSseTestTls.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -36,7 +36,7 @@
     self->ClientRequest( NULL );
     self->ClientResponse( SIPStrings::StringF( SipStrConsts::EEmpty ), NULL );
     Dll::SetTls( self );
-
+	
     User::LeaveIfError( self->Set ( MusSettingsKeys::KActivation,
                             MusSettingsKeys::EAlwaysActive ) );
     User::LeaveIfError( self->Set ( MusSettingsKeys::KAuditoryNotification,
@@ -57,9 +57,7 @@
                             MusSettingsKeys::EPortrait ) );                    
     User::LeaveIfError( self->Set ( MusSettingsKeys::KCapabilityQuery,
                             MusSettingsKeys::ENoOptions ) );
-    User::LeaveIfError( self->Set ( MusSettingsKeys::KAllowOnlyIn3GNetwork,
-                            MusSettingsKeys::EAllowedAllBearers ) );
-                            
+
 	}
 
 void CSipSseTestTls::Close ()
@@ -110,9 +108,6 @@
         MusSettingsKeys::EPortrait );
     Storage()->Set ( MusSettingsKeys::KCapabilityQuery,
         MusSettingsKeys::ENoOptions );
-        
-   	Storage()->Set ( MusSettingsKeys::KAllowOnlyIn3GNetwork,
-	   	MusSettingsKeys::EAllowedAllBearers );       
 
     iRegistryBehavior = 0;
     iProfileBehavior = 0;
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavacallmonitorobserver.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Unit test stub of MMusCallMonitorObserver
-*
-*/
-
-
-#include "musavacallmonitorobserver.h"
-#include <e32base.h>
-
-
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::NewL()
-// -----------------------------------------------------------------------------
-//
-CMusAvaCallMonitorObserverStub* CMusAvaCallMonitorObserverStub::NewL()
-	{
-	CMusAvaCallMonitorObserverStub* self =
-		new ( ELeave ) CMusAvaCallMonitorObserverStub();
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );
-	return self;
-	}
-	
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::~CMusAvaCallMonitorObserverStub()
-// -----------------------------------------------------------------------------
-//
-CMusAvaCallMonitorObserverStub::~CMusAvaCallMonitorObserverStub()
-    {
-    delete iTelNumber;
-    }
-
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::CallConnectedL()
-// -----------------------------------------------------------------------------
-//
-void CMusAvaCallMonitorObserverStub::CallConnectedL( const TDesC& aTelNumber,
-													 TBool aIsSipUri )
-	{
-	CopyDescriptorL( aTelNumber );
-	iIsSipUri = aIsSipUri;
-	}
-
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::CallHoldL()
-// -----------------------------------------------------------------------------
-//
-void CMusAvaCallMonitorObserverStub::CallHoldL( const TDesC& aTelNumber,
-												TBool aIsSipUri )
-	{
-	CopyDescriptorL( aTelNumber );
-	iIsSipUri = aIsSipUri;
-	}
-
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::ConferenceCallL()
-// -----------------------------------------------------------------------------
-//
-void CMusAvaCallMonitorObserverStub::ConferenceCallL()
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::NoActiveCallL()
-// -----------------------------------------------------------------------------
-//
-void CMusAvaCallMonitorObserverStub::NoActiveCallL()
-	{
-	}
-	
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::CMusAvaCallMonitorObserverStub()
-// -----------------------------------------------------------------------------
-//
-CMusAvaCallMonitorObserverStub::CMusAvaCallMonitorObserverStub()
-	{
-	}		
-
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::ConstructL()
-// -----------------------------------------------------------------------------
-//
-void CMusAvaCallMonitorObserverStub::ConstructL()
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CMusAvaCallMonitorObserverStub::CopyDescriptorL()
-// -----------------------------------------------------------------------------
-//
-void CMusAvaCallMonitorObserverStub::CopyDescriptorL( const TDesC& aSource )
-	{
-	HBufC* newDescriptor = aSource.AllocL();
-	delete iTelNumber;
-	iTelNumber = newDescriptor;
-	}
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavacapabilityqueryobserverimp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavacapabilityqueryobserverimp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -77,9 +77,3 @@
     {
     return EFalse;
     }
-
-void CMusAvaCapabilityQueryObserverImp::FastModeResolved( 
-                                    MusSettingsKeys::TFastMode /*aMode*/ )
-    {
-    
-    }
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavaobserverimp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavaobserverimp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -93,4 +93,8 @@
 	}	
 	
 
+ void CMusAvaObserverImp::AvailabilitiesAbleToShowIndicator()
+	{
+	  //nothing to do
+	}
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavasettingsobserverimp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavasettingsobserverimp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -97,15 +97,6 @@
 	MUS_LOG( " [MUSAVA ] ->  CMusAvaSettingsObserverImp::OptionAllowed" );
 	MUS_LOG( " [MUSAVA ] <-  CMusAvaSettingsObserverImp::OptionAllowed" );
 	return iOptionAllowed;
-	}   
-
-// -----------------------------------------------------------------------------
-//  
-// -----------------------------------------------------------------------------
-// 
-void CMusAvaSettingsObserverImp::StartApplicationL( MultimediaSharing::TMusUseCase /*aUseCase*/ )
-    {
-    iApplicationStarted = ETrue;
-    }
+	}     	
 
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/muscallmonitorstub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/muscallmonitorstub.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -35,10 +35,8 @@
 // C++ constructor.
 // -----------------------------------------------------------------------------
 //
-CMusCallMonitorBase::CMusCallMonitorBase(const RMobileCall& aCall, 
-                                            MMusTsyPropertyObserver& aObserver,
-                                            MMusCallStateObserver& aCallStateObserver ) 
-        : CActive( EPriorityNormal ),iCall(aCall),iTsyObserver( aObserver ),iCallStateObserver( aCallStateObserver )
+CMusCallMonitorBase::CMusCallMonitorBase(const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver ) 
+        : CActive( EPriorityNormal ),iCall(aCall),iTsyObserver( aObserver )
         
     {   
     }
@@ -74,14 +72,7 @@
     {
     }
 
-
-// -----------------------------------------------------------------------------
-// MusCallStatusMonitor
-// -----------------------------------------------------------------------------
-//
-
-CMusCallStatusMonitor* CMusCallStatusMonitor::NewL(const RMobileCall&, MMusTsyPropertyObserver&, 
-        MMusCallStateObserver& )
+CMusCallStatusMonitor* CMusCallStatusMonitor::NewL(const RMobileCall&, MMusTsyPropertyObserver& )
     {
     return NULL;
     }
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaCallEventMonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef __UT_CMUSAVACALLEVENTMONITOR_H__
-#define __UT_CMUSAVACALLEVENTMONITOR_H__
-
-#ifdef __MWERKS__
-#pragma warn_emptydecl off
-#pragma warn_illtokenpasting off
-#endif
-
-//  EXTERNAL INCLUDES
-#include <CEUnitTestSuiteClass.h>
-
-//  INTERNAL INCLUDES
-
-//  FORWARD DECLARATIONS
-class CMusAvaCallEventMonitor;
-class CMusAvaCallMonitorObserverStub;
-
-
-#include <e32def.h>
-#ifndef NONSHARABLE_CLASS
-    #define NONSHARABLE_CLASS(x) class x
-#endif
-
-//  CLASS DEFINITION
-/**
- *
- * EUnitWizard generated test class. 
- *
- */
-NONSHARABLE_CLASS( UT_CMusAvaCallEventMonitor )
-     : public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_CMusAvaCallEventMonitor* NewL();
-        static UT_CMusAvaCallEventMonitor* NewLC();
-        /**
-         * Destructor
-         */
-        ~UT_CMusAvaCallEventMonitor();
-
-    private:    // Constructors and destructors
-
-        UT_CMusAvaCallEventMonitor();
-        void ConstructL();
-
-    public:     // From observer interface
-
-        
-
-    private:    // New methods
-
-        void SetupL();
-
-        void Teardown();
-
-        void UT_CMusAvaCallEventMonitor_GetTelNumberLL();
-
-
-    private:    // Data
-
-        EUNIT_DECLARE_TEST_TABLE; 
-        
-        // Owned
-        CMusAvaCallEventMonitor* iCallEventMonitor;
-        
-        // Owned
-        CMusAvaCallMonitorObserverStub* iObserver;
-    };
-
-#endif      //  __UT_CMUSAVACALLEVENTMONITOR_H__
-
-// End of file
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaCapability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaCapability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -43,7 +43,6 @@
 class CMusAvaSettingsImp;
 class CMusAvaAvailabilityObserverImp;
 class CMusAvaCapabilityQueryObserverImp;	
-class CSipSseTestTls;
 
 #include <e32def.h>
 #ifndef NONSHARABLE_CLASS
@@ -102,19 +101,13 @@
         
         void UT_CMusAvaCapability_PopulateResponseL_OpSpecificL();
 
-        void UT_CMusAvaCapability_ResolveFastModeLL();
-
-        void UT_CMusAvaCapability_AddFastModeLL();
-
-        
     private:    // Data
 
         EUNIT_DECLARE_TEST_TABLE; 
 
     CMusAvaCapabilityExchange* iExchange;
     
-    CSipSseTestTls* iStorage;
-   
+    
     CSIP* iSIP;
     CSIPConnection* iSIPConnection;
     CSIPProfile* iProfile;
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaCapabilityQuery.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaCapabilityQuery.h	Wed Sep 01 12:31:01 2010 +0100
@@ -82,6 +82,8 @@
         
         void UT_CMusAvaCapabilityQuery_ExecuteLL();
         
+        void UT_CMusAvaCapabilityQuery_ValidateUriL();
+        
         void UT_CMusAvaCapabilityQuery_CanceledL();
         
         void UT_CMusAvaCapabilityQuery_CompletedLL();
@@ -102,6 +104,8 @@
         
         void UT_CMusAvaCapabilityQuery_DoCompleted200OKLL();
         
+        void UT_CMusAvaCapabilityOtherSDPHeadersLL();
+        
 		EUNIT_DECLARE_TEST_TABLE; 
 				
 		CMusAvaOptionHandler* iOptionHandler;
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaConnectionAvailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaConnectionAvailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -72,7 +72,6 @@
         void UT_CMusAvaConnectionAvailability_NewLL();   
 		
         void UT_CMusAvaConnectionAvailability_DoExecuteLL();
-        void UT_CMusAvaConnectionAvailability_DoExecuteLL2();
          		
         void UT_CMusAvaConnectionAvailability_NameL();
           
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaContactAvailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaContactAvailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,7 +26,7 @@
 
 //  INTERNAL INCLUDES
 #include <e32def.h>
-#include <cntdef.h>
+#include <PbkFields.hrh>
 
 //  FORWARD DECLARATIONS
 class CMusAvaAvailabilityObserverImp;
@@ -36,8 +36,6 @@
 class CContactTextField;
 class CPbkContactItem;
 class CPbkContactEngine;
-
-
 //  CLASS DEFINITION
 /**
  *
@@ -83,8 +81,6 @@
         void UT_CMusAvaController_DoExecuteL1_L();
          		
         void UT_CMusAvaController_DoExecuteL2_L();
-        
-         void UT_CMusAvaController_DoExecuteL3_L();
          		
         void UT_CMusAvaController_NameL();
           
@@ -120,6 +116,23 @@
         
         void UT_CMusAvaController_UpdateContactNameLL();
         
+        void UT_CMusAvaController_CallConnectedLL();
+        CContactTextField* EditableContactFieldL( CPbkContactEngine& aContactEngine, 
+                                                  CPbkContactItem& aContact, 
+                                                  TPbkFieldId aFieldId );
+                                                  
+        void AddFields(CPbkContactEngine& aContactEngine,
+                       CPbkContactItem& contact,
+                       const TDesC& aText, 
+                       TPbkFieldId aFieldId);
+        
+        void AddToMyContact( CPbkContactEngine& aContactEngine,
+                             const TDesC& aText, 
+                             TPbkFieldId aFieldId,
+                             const TDesC& aText2, 
+                             TPbkFieldId aFieldId2 );
+        
+
     private:    // Data
 
 		EUNIT_DECLARE_TEST_TABLE; 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaNetworkAvailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaNetworkAvailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -80,8 +80,6 @@
         
         void UT_CMusAvaNetworkAvailability_DoExecuteLL();
         
-        void UT_CMusAvaNetworkAvailability_DoExecuteL_SipUriL();
-        
         void UT_CMusAvaNetworkAvailability_StopL();
 
         void UT_CMusAvaNetworkAvailability_NameL();
@@ -93,8 +91,6 @@
         void UT_CMusAvaNetworkAvailability_CallHoldLL();
 
         void UT_CMusAvaNetworkAvailability_NoActiveCallLL();
-        
-        void UT_CMusAvaNetworkAvailability_SetRemoteHostLL();
 
     private:    // Data
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaOptionHandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaOptionHandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -35,7 +35,6 @@
 class CMusAvaSettingsImp;	
 class CMusAvaSharedObject;
 class CMusAvaAvailabilityObserverImp;
-class CMusAvaSettingsObserverImp;
 
 //  CLASS DEFINITION
 /**
@@ -90,14 +89,6 @@
         void UT_CMusAvaOptionHandler_SipHeadersL();
         
         void UT_CMusAvaOptionHandler_VideoCodecsResolvedLL();
-        
-        void UT_CMusAvaOptionHandler_DoSetStateL();
-        
-        void UT_CMusAvaOptionHandler_DoSetStateFastModeL();
-        
-        void UT_CMusAvaOptionHandler_FastModeResolvedL();
-        
-        void UT_CMusAvaOptionHandler_CapabilityQueryAnsweredL();
 
         
 		EUNIT_DECLARE_TEST_TABLE; 
@@ -113,8 +104,6 @@
 
         CSIPProfile* iProfile;
         
-        CMusAvaSettingsObserverImp* iSettingsObserver;
-        
     };
 
 #endif      //  __UT_CMUSAVAOPTIONHANDLER_H__
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaRegisterAvailability.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaRegisterAvailability.h	Wed Sep 01 12:31:01 2010 +0100
@@ -24,6 +24,7 @@
 
 //  INTERNAL INCLUDES
 #include <e32def.h>
+#include <PbkFields.hrh>
 
 //  FORWARD DECLARATIONS
 class CMusAvaAvailabilityObserverImp;
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaSettingsImp.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaSettingsImp.h	Wed Sep 01 12:31:01 2010 +0100
@@ -111,6 +111,11 @@
              
         void UT_CMusAvaSettingsImp_CopyDescArrayLL();
 
+        void UT_CMusAvaSettingsImp_SetOptionSentNumber();
+        
+        const UT_CMusAvaSettingsImp_OptionSentTelNumber();
+        
+        void UT_CMusAvaSettingsImp_ReleaseOptionSentNumber();
 
 		EUNIT_DECLARE_TEST_TABLE; 
 				
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaTerminal.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/UT_CMusAvaTerminal.h	Wed Sep 01 12:31:01 2010 +0100
@@ -41,7 +41,6 @@
 class CMusAvaObserverImp;
 class CMusAvaSettingsImp;
 class CMusAvaAvailabilityObserverImp;	
-class CSipSseTestTls;
 
 #include <e32def.h>
 #ifndef NONSHARABLE_CLASS
@@ -118,7 +117,6 @@
     private: // NOT owned
     
     CMusAvaCapability* iCapability;
-    CSipSseTestTls* iStorage;
 
     };
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/inc/musavacapabilitytesthelper.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/inc/musavacapabilitytesthelper.h	Wed Sep 01 12:31:01 2010 +0100
@@ -194,18 +194,6 @@
 a=rtpmap:96 H263-2000/90000\r\n\
 a=rtpmap:99 MPEG4/90000\r\n");
 
-_LIT8( KCapabilityTestSDPFastMode,"v=0\r\n\
-o=- 452027953 452027953 IN IP4 foobar.com\r\n\
-s=-\r\n\
-c=IN IP4 foobar.com\r\n\
-t=0 0\r\n\
-a=application:com.gsma.rts\r\n\
-a=type:videolive\r\n\
-a=keywds:fastmode\r\n\
-m=video 0 RTP/AVP 96\r\n\
-a=rtpmap:96 H263-2000/90000\r\n");
-
-
 _LIT8( KCapabilityTestContentTypeOther, "application/text");
 
 _LIT8( KRegisteredContact, "sip:registeredcontact@domain.com" );
@@ -253,7 +241,7 @@
                                                    const TDesC8& aAcceptContact, 
                                                    const TDesC8& aContact,
                                                    const TDesC8& aAccept,
-                                                   const TDesC8& aUserAgent );
+                                                   const TDesC8& aUserAgent);
 
     static CSIPServerTransaction* OptionsRequestL( const TDesC8& aRequestUri,
                                                    const TDesC8& aFrom,
@@ -261,7 +249,8 @@
                                                    const TDesC8& aContact,
                                                    const TDesC8& aAccept,
                                                    const TDesC8& aUserAgent,
-                                                   const TDesC8& aAssertId);
+                                                   const TDesC8& aAssertId,
+                                                   const TDesC8& aSdp = KNullDesC8);
 
 
     static CSIPClientTransaction* OptionsResponseL( TUint aResponse,
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCallEventMonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-//  CLASS HEADER
-#include "UT_CMusAvaCallEventMonitor.h"
-
-//  EXTERNAL INCLUDES
-#include <EUnitMacros.h>
-
-//  INTERNAL INCLUDES
-#include "musavacalleventmonitor.h"
-#include "musavacallmonitorobserver.h"
-#include "mussesseioninformationapi.h"
-
-
-// CONSTRUCTION
-UT_CMusAvaCallEventMonitor* UT_CMusAvaCallEventMonitor::NewL()
-    {
-    UT_CMusAvaCallEventMonitor* self = UT_CMusAvaCallEventMonitor::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-UT_CMusAvaCallEventMonitor* UT_CMusAvaCallEventMonitor::NewLC()
-    {
-    UT_CMusAvaCallEventMonitor* self = new( ELeave ) UT_CMusAvaCallEventMonitor();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// Destructor (virtual by CBase)
-UT_CMusAvaCallEventMonitor::~UT_CMusAvaCallEventMonitor()
-    {
-    }
-
-// Default constructor
-UT_CMusAvaCallEventMonitor::UT_CMusAvaCallEventMonitor()
-    {
-    }
-
-// Second phase construct
-void UT_CMusAvaCallEventMonitor::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }
-
-
-//  METHODS
-
-
-void UT_CMusAvaCallEventMonitor::SetupL()
-    {
-    iObserver = CMusAvaCallMonitorObserverStub::NewL();
-    iCallEventMonitor = CMusAvaCallEventMonitor::NewL( *iObserver );    
-    }
-
-void UT_CMusAvaCallEventMonitor::Teardown()
-    {
-    delete iObserver;
-    iObserver = NULL;
-    delete iCallEventMonitor;
-    iCallEventMonitor = NULL;
-    }
-    
-void UT_CMusAvaCallEventMonitor::UT_CMusAvaCallEventMonitor_GetTelNumberLL()
-    {
-    // Test tel number
-    _LIT( KTelNbr, "12345678" );
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                        NMusSessionInformationApi::KMusTelNumber,
-                                        KTelNbr ) );
-    
-    TBuf<CMusAvaCallEventMonitor::KMusTelNumberMaxLength> telNumber;
-	TBool isSipUri( ETrue );
-
-    iCallEventMonitor->GetTelNumberL( telNumber, isSipUri );
-    
-    EUNIT_ASSERT( !isSipUri );
-    EUNIT_ASSERT_EQUALS( telNumber, KTelNbr );
-    
-    
-    // Test SIP URI
-    _LIT( KSipUri, "sip:12345678@host" );
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                        NMusSessionInformationApi::KMusTelNumber,
-                                        KSipUri) );        
-    iCallEventMonitor->GetTelNumberL( telNumber, isSipUri );
-    EUNIT_ASSERT( isSipUri );
-    EUNIT_ASSERT_EQUALS( telNumber, KSipUri );
-    
-    
-#if 0
-    // This case can't be run since Unit tests use a stub of RProperty::Get
-    // and the stub doesn't return KErrOverflow, but results USER 11 panic
-    // if the value does not fit into given buffer.
-    
-    
-    // Test with a SIP URI that is too long to fit into telNumber buffer
-    _LIT( KLongSipUri,
-    "sip:567890@domain.9012345678901234567890123456789012345678901234567890\
-1234567890123456789012345678901" );
-
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                        NMusSessionInformationApi::KMusTelNumber,
-                                        KLongSipUri) );        
-    EUNIT_ASSERT_SPECIFIC_LEAVE(
-        iCallEventMonitor->GetTelNumberL( telNumber, isSipUri ), KErrOverflow );
-#endif
-    }
-
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusAvaCallEventMonitor,
-    "CMusAvaCallEventMonitor",
-    "UNIT" )
-
-EUNIT_TEST(
-    "GetTelNumberL - test ",
-    "CMusAvaCapability",
-    "GetTelNumberL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAvaCallEventMonitor_GetTelNumberLL, Teardown )
-
-EUNIT_END_TEST_TABLE
-
-//  END OF FILE
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -22,7 +22,6 @@
 //  EXTERNAL INCLUDES
 #include <digia/eunit/eunitmacros.h>
 #include <sdpmediafield.h>
-#include <sdpattributefield.h>
 
 
 //  INTERNAL INCLUDES
@@ -111,9 +110,7 @@
     iCapability = iOptionHandler->iSwisCapability;
     
     CSipSseTestTls::OpenL();
-    iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-         MusSettingsKeys::EFastModeOff );
+    
     }
 
 void UT_CMusAvaCapability::Teardown(  )
@@ -121,13 +118,8 @@
     delete iOptionHandler;
     delete iAvailabilityObserver;
     delete iConcreteSettings;
-    if ( iStorage )
-        {
-        iStorage->Clear();
-        CSipSseTestTls::Close();
-        iStorage = NULL;
-        }
-
+    CSipSseTestTls::Close();
+    
     delete iSIPConnection;
     delete iProfile;
     delete iSIP;
@@ -181,9 +173,11 @@
                                              KCapabilityTestTerminalID_B );
     CleanupStack::PushL( options );                                         
 
-    CSdpDocument* sdpContent = 
-            CMusAvaCapability::ResponseContentLC( *options );
-
+    // Test  : AVC enabled => H263 & H264
+    TInt32 KMusDisableAVC = 0x0ffffff1; // some value other than disable magic value
+    MultimediaSharingSettings::SetPropertyValueL(MusSettingsKeys::KEncodingDevice,
+                                                         KMusDisableAVC );
+    CSdpDocument* sdpContent = CMusAvaCapability::ResponseContentLC( *options );
     RPointerArray<CSIPHeaderBase> responseHeaders;
     CSIPHeaderBase::PushLC( &responseHeaders );
 
@@ -193,7 +187,20 @@
     EUNIT_ASSERT( sdpContent->AttributeFields().Count() == 2 );
     EUNIT_ASSERT( sdpContent->MediaFields().Count() == 1 );
     EUNIT_ASSERT( sdpContent->MediaFields()[0]->FormatAttributeFields().Count() == 2 );
-
+    CleanupStack::PopAndDestroy( &responseHeaders );
+    CleanupStack::PopAndDestroy( sdpContent );
+    
+    // Test : AVC disabled => H263
+    KMusDisableAVC = 0x0fffffff; // disable magic value
+    MultimediaSharingSettings::SetPropertyValueL(MusSettingsKeys::KEncodingDevice,
+                                                     KMusDisableAVC );
+    sdpContent = CMusAvaCapability::ResponseContentLC( *options );
+    CSIPHeaderBase::PushLC( &responseHeaders );
+    iCapability->PopulateResponseL( *options, responseHeaders, *sdpContent );
+    EUNIT_ASSERT( responseHeaders.Count() == 1 );
+    EUNIT_ASSERT( sdpContent->AttributeFields().Count() == 2 );
+    EUNIT_ASSERT( sdpContent->MediaFields().Count() == 1 );
+    EUNIT_ASSERT( sdpContent->MediaFields()[0]->FormatAttributeFields().Count() == 1 );
     CleanupStack::PopAndDestroy( &responseHeaders );
     CleanupStack::PopAndDestroy( sdpContent );
     CleanupStack::PopAndDestroy( options );
@@ -209,19 +216,11 @@
     iExchange = CMusAvaCapabilityExchange::NewL( KTestTerminalId, *iCapabQueryObserver );
     iCapability = CMusAvaCapability::NewL( *iExchange );
     CSipSseTestTls::OpenL();
-    iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-         MusSettingsKeys::EFastModeOff );
     }
 
 void UT_CMusAvaCapability::Teardown1(  )
     {
-    if ( iStorage )
-        {
-        iStorage->Clear();
-        CSipSseTestTls::Close();
-        iStorage = NULL;
-        }
+    CSipSseTestTls::Close();
     delete iCapability;
     delete iExchange;
     delete iCapabQueryObserver;     
@@ -345,49 +344,6 @@
     }
 
 
-void UT_CMusAvaCapability::UT_CMusAvaCapability_ResolveFastModeLL()
-    {
-    // Fast mode feature is disabled in cenrep, fast mode is present in SDP
-    CSdpDocument* sdpContent = CSdpDocument::DecodeLC( KCapabilityTestSDPFastMode );
-    MusSettingsKeys::TFastMode mode = iCapability->ResolveFastModeL( *sdpContent );
-    EUNIT_ASSERT( mode == MusSettingsKeys::EFastModeOff );
-    CleanupStack::PopAndDestroy( sdpContent );
-    
-    // Fast mode feature is enabled in cenrep, fast mode is present in SDP
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, MusSettingsKeys::EFastModeOn );
-    sdpContent = CSdpDocument::DecodeLC( KCapabilityTestSDPFastMode );
-    mode = iCapability->ResolveFastModeL( *sdpContent );
-    EUNIT_ASSERT( mode == MusSettingsKeys::EFastModeOn );
-    CleanupStack::PopAndDestroy( sdpContent );
-
-    // Fast mode feature is enabled in cenrep, fast mode isn't present in SDP
-    sdpContent = CSdpDocument::DecodeLC( KCapabilityTestSDP );
-    mode = iCapability->ResolveFastModeL( *sdpContent );
-    EUNIT_ASSERT( mode == MusSettingsKeys::EFastModeOff );
-    CleanupStack::PopAndDestroy( sdpContent );
-    }
-
-void UT_CMusAvaCapability::UT_CMusAvaCapability_AddFastModeLL()
-    {
-    // Fast mode feature is disabled in cenrep
-    CSdpDocument* sdpContent = CSdpDocument::DecodeLC( KCapabilityTestSDP );
-    EUNIT_ASSERT( sdpContent->AttributeFields().Count() == 2 );
-    iCapability->AddFastModeL( *sdpContent );
-    EUNIT_ASSERT( sdpContent->AttributeFields().Count() == 2 );
-    
-    // Fast mode feature is enabled in cenrep, a=keywds:fastmode added
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, MusSettingsKeys::EFastModeOn );
-    iCapability->AddFastModeL( *sdpContent );
-    EUNIT_ASSERT( sdpContent->AttributeFields().Count() == 3 );
-    const CSdpAttributeField* field = sdpContent->AttributeFields()[2];
-    RStringF keywds = MusAvaCapabilityContext::SDPStringL( 
-            SdpCodecStringConstants::EAttributeKeywds );
-    EUNIT_ASSERT( field->Attribute() == keywds );
-    EUNIT_ASSERT( field->Value().Compare( KCapabilitySDPAttributeFastMode ) == 0 );
-    CleanupStack::PopAndDestroy( sdpContent );
-    }
-
-
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE(
@@ -436,20 +392,7 @@
     "PopulateResponseL",
     "FUNCTIONALITY",
     Setup1L, UT_CMusAvaCapability_PopulateResponseL_OpSpecificL, Teardown1 )         
-   
-EUNIT_TEST(
-    "ResolveFastModeL - test ",
-    "CMusAvaCapability",
-    "ResolveFastModeL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAvaCapability_ResolveFastModeLL, Teardown)
     
-EUNIT_TEST(
-    "AddFastModeL - test ",
-    "CMusAvaCapability",
-    "AddFastModeL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAvaCapability_AddFastModeLL, Teardown)
 
 EUNIT_END_TEST_TABLE
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilityExchange.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilityExchange.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -41,6 +41,7 @@
 #include "CSipSseTestTls.h"
 #include "musavaoptionhandler.h"
 #include "musavasettingsimp.h"
+#include "CSipSseTestTls.h"
 #include "musavacapabilityquery.h"
 #include "mussettings.h"
 #include "mussettingskeys.h"
@@ -119,8 +120,6 @@
     
     CSipSseTestTls::OpenL();
     iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-        MusSettingsKeys::EFastModeOff );
     } 
 
 void UT_CMusAvaCapabilityExchange::Teardown(  )
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilityQuery.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilityQuery.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -33,6 +33,12 @@
 #include <stringpool.h>
 #include <sipservertransaction.h>
 #include <siptransactionbase.h>
+#include <sdpfmtattributefield.h>
+#include <SdpMediaField.h>
+#include <SdpRtpmapValue.h>
+
+#include <e32debug.h>
+
 //  INTERNAL INCLUDES
 #include "musavaoptionhandler.h"
 #include "musavacapabilitytesthelper.h"
@@ -48,6 +54,12 @@
 #include "musavasip.h"
 #include "musavacapabilityqueryobserverimp.h"
 
+_LIT8( KRTPCapabilitySDPAttributeClockrate, "90000" );
+_LIT8( KRTPCapabilitySDPAttributePayloadTypeH264, "98" );
+_LIT8( KRTPCapabilitySDPAttributeCodec, "H264" );
+
+_LIT8( KRTPCapabilitySDPAttributePayloadTypeH263, "96" );
+_LIT8( KRTPCapabilitySDPAttributeCodecH263, "H263-2000" );
 
 // CONSTRUCTION
 UT_CMusAvaCapabilityQuery* UT_CMusAvaCapabilityQuery::NewL()
@@ -130,8 +142,6 @@
 
     CSipSseTestTls::OpenL();
     iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-        MusSettingsKeys::EFastModeOff );
     iOpVariantSetting = MultimediaSharingSettings::OperatorVariantSettingL();
     } 
 
@@ -382,6 +392,62 @@
     CleanupStack::PopAndDestroy( capabQueryObserver );
     }
 
+
+void UT_CMusAvaCapabilityQuery::UT_CMusAvaCapabilityQuery_ValidateUriL()
+    {
+	if( iQuery->iOriginator )
+		{
+	    delete iQuery->iOriginator;
+		}
+	
+    //SIP Uri case, identical
+	CSIPAddress* iOriginatorSipAddress = CSIPAddress::DecodeL( _L8("sip:username111@domain.com") );
+    CleanupStack::PushL( iOriginatorSipAddress );
+
+	iQuery->iOriginator = CUri8::NewL( iOriginatorSipAddress->Uri8().Uri() );
+	iQuery->iRemoteUri.Copy( _L8("sip:username111@domain.com") );
+	
+	EUNIT_ASSERT( iQuery->ValidateUri() == EFalse );
+	
+    CleanupStack::PopAndDestroy(iOriginatorSipAddress);    
+	
+    delete iQuery->iOriginator;
+    
+    //SIP Uri case, not identical
+	iOriginatorSipAddress = CSIPAddress::DecodeL( _L8("sip:username111@domain.com") );	
+    CleanupStack::PushL( iOriginatorSipAddress );
+    
+	iQuery->iOriginator = CUri8::NewL( iOriginatorSipAddress->Uri8().Uri() );	
+	iQuery->iRemoteUri.Copy( _L8("sip:username222@domain.com") );
+	
+	EUNIT_ASSERT( iQuery->ValidateUri() == ETrue );
+    CleanupStack::PopAndDestroy(iOriginatorSipAddress);
+	
+    delete iQuery->iOriginator;
+    
+    //TEL Uri, identical
+	iOriginatorSipAddress = CSIPAddress::DecodeL( _L8("sip:18586037801@domain.com") );
+    CleanupStack::PushL( iOriginatorSipAddress );
+
+	iQuery->iOriginator = CUri8::NewL( iOriginatorSipAddress->Uri8().Uri() );
+	iQuery->iRemoteUri.Copy( _L8("tel:8586037801") );
+	
+	EUNIT_ASSERT( iQuery->ValidateUri() == EFalse );
+    CleanupStack::PopAndDestroy(iOriginatorSipAddress);
+
+    delete iQuery->iOriginator;
+	
+    //TEL Uri, not identical
+	iOriginatorSipAddress = CSIPAddress::DecodeL( _L8("sip:18586037801@domain.com") );
+    CleanupStack::PushL( iOriginatorSipAddress );
+
+	iQuery->iOriginator = CUri8::NewL( iOriginatorSipAddress->Uri8().Uri() );
+	iQuery->iRemoteUri.Copy( _L8("tel:9876543210") );
+	
+	EUNIT_ASSERT( iQuery->ValidateUri() == ETrue );
+    CleanupStack::PopAndDestroy(iOriginatorSipAddress);
+    }
+
 void UT_CMusAvaCapabilityQuery::UT_CMusAvaCapabilityQuery_CanceledL(  )
     {
     
@@ -1064,6 +1130,76 @@
     
     }
 
+void UT_CMusAvaCapabilityQuery::UT_CMusAvaCapabilityOtherSDPHeadersLL()
+    {
+    CSdpDocument* content = CSdpDocument::NewLC();
+    //AVC Disabled  
+    MultimediaSharingSettings::SetPropertyValueL(MusSettingsKeys::KEncodingDevice,
+                                                 KMusDisableAVC );
+    iQuery->OtherSDPHeadersL(*content);
+    
+    RStringF media = MusAvaCapabilityContext::SDPStringL( 
+                                          SdpCodecStringConstants::EMediaVideo );
+    RStringF rtpmap =  MusAvaCapabilityContext::SDPStringL( 
+                                 SdpCodecStringConstants::EAttributeRtpmap );
+     
+    RPointerArray<CSdpMediaField>& mediaFields = content->MediaFields();
+    
+    for ( TInt i=0; i < mediaFields.Count(); i++ )
+     {
+     if ( mediaFields[ i ]->Media() == media )
+         {
+         EUNIT_ASSERT( mediaFields[ i ]->FormatList().Find( KCapabilitySwisFormatListH263Only ) >= KErrNone ); 
+         RPointerArray<CSdpFmtAttributeField>& fmtLines =  
+                             mediaFields[ i ]->FormatAttributeFields();
+         EUNIT_ASSERT( fmtLines.Count() == 1 ); 
+         for ( TInt j=0; j < fmtLines.Count(); j++ )
+             {
+             if ( fmtLines[ j ]->Attribute() == rtpmap ) 
+                 {
+                 EUNIT_ASSERT(fmtLines[ j ]->Value().Find( KRTPCapabilitySDPAttributeCodecH263 ) == 0 );
+                 EUNIT_ASSERT(fmtLines[ j ]->Format().Find( KRTPCapabilitySDPAttributePayloadTypeH263 ) == 0 );
+                 } 
+             }
+         }
+     }
+    CleanupStack::PopAndDestroy(content );
+    //AVC Enabled
+    content = CSdpDocument::NewLC();
+    MultimediaSharingSettings::SetPropertyValueL(MusSettingsKeys::KEncodingDevice,
+                                                 KMusDisableAVC - 1 );
+    iQuery->OtherSDPHeadersL(*content);
+    
+    mediaFields = content->MediaFields();
+    
+    for ( TInt i=0; i < mediaFields.Count(); i++ )
+         {
+         if ( mediaFields[ i ]->Media() == media )
+             {
+             EUNIT_ASSERT( mediaFields[ i ]->FormatList().Find( KCapabilitySwisFormatList ) >= KErrNone ); 
+             RPointerArray<CSdpFmtAttributeField>& fmtLines =  
+                                 mediaFields[ i ]->FormatAttributeFields();
+             EUNIT_ASSERT( fmtLines.Count() == 2 )
+             for ( TInt j=0; j < fmtLines.Count(); j++ )
+                 {
+                 if ( fmtLines[ j ]->Attribute() == rtpmap ) 
+                     {
+                     if ( j == 0 ) //AVC first i.e. prefered
+                         {
+                         EUNIT_ASSERT(fmtLines[ j ]->Value().Find( KRTPCapabilitySDPAttributeCodec ) == 0 );
+                         EUNIT_ASSERT(fmtLines[ j ]->Format().Find( KRTPCapabilitySDPAttributePayloadTypeH264 ) == 0 );
+                         }
+                     else
+                         {
+                         EUNIT_ASSERT(fmtLines[ j ]->Value().Find( KRTPCapabilitySDPAttributeCodecH263 ) == 0 );
+                         EUNIT_ASSERT(fmtLines[ j ]->Format().Find( KRTPCapabilitySDPAttributePayloadTypeH263 ) == 0 );
+                         }
+                     }                     
+                 }
+             }
+         }
+    CleanupStack::PopAndDestroy(content );
+    }
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE( 
@@ -1084,7 +1220,14 @@
     "ExecuteL",
     "FUNCTIONALITY",
     SetupL,UT_CMusAvaCapabilityQuery_ExecuteLL, Teardown)
-
+  
+EUNIT_TEST(
+    "ValidateUri - test ",
+    "CMusAvaCapabilityQuery",
+    "ValidateUri",
+    "FUNCTIONALITY",
+    SetupL,UT_CMusAvaCapabilityQuery_ValidateUriL, Teardown)    
+    
 EUNIT_TEST(
     "Canceled - test ",
     "CMusAvaCapabilityQuery",
@@ -1155,6 +1298,14 @@
     "FUNCTIONALITY",
     SetupL,UT_CMusAvaCapabilityQuery_DoCompleted200OKLL, Teardown)  
     
+EUNIT_TEST(
+    "OtherSDPHeadersL - test ",
+    "CMusAvaCapabilityQuery",
+    "OtherSDPHeadersL",
+    "FUNCTIONALITY",
+    SetupL,UT_CMusAvaCapabilityOtherSDPHeadersLL, Teardown)  
+
+    
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilitySipAgent.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaCapabilitySipAgent.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -125,11 +125,13 @@
         {
         iProfile->iRegisteredContact = KRegisteredContact().AllocL();
         }
+    if ( !iProfile->iRegisteredContact )
+        {
+        iProfile->iRegisteredContact = KRegisteredContact().AllocL();
+        }
 
     CSipSseTestTls::OpenL();
     iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-        MusSettingsKeys::EFastModeOff );
     
     iProfileId = MultimediaSharingSettings::SipProfileSettingL();
     } 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaConnectionAvailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaConnectionAvailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -135,14 +135,28 @@
 
 void UT_CMusAvaConnectionAvailability::UT_CMusAvaConnectionAvailability_DoExecuteLL()
     {
-	// Test: VS is allowed in All Netwoks by Default. 
+    TInt ret = 0;
+    iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
+    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
+    MultimediaSharingSettings::SetEdgeDtmSupportSettingL( MusSettingsKeys::EDtmModeNotAllowed );
+    TRAPD( error, iConnectionAvailability->DoExecuteL() );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( error == KErrNone );
 
-	// Test1: VS in 3G Always Allowed. 
-	TInt error = KErrArgument;
-	TInt count = KErrNone;
+    TInt count = 0;
+    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
+    if ( count > 0 && iConnectionAvailability->State() 
+        == MMusAvaObserver::EMusActivationError )
+        {
+        User::Leave( KErrNoMemory );
+        }
+    EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaNetworkType );
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
+    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EStandard );
+    
     TRAP( error, iConnectionAvailability->DoExecuteL() );
     if ( error == KErrNoMemory ) User::Leave( error );
     EUNIT_ASSERT ( error == KErrNone );
@@ -155,131 +169,27 @@
         }
     EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaStatusAvailable );
 
-
-	//Test2 : VS is even allowed when Network type is Unknown
-	iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeUnknown );
-    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
+    // No roaming for operator variant
     MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
-    CMusAvaConnectionMonitor& avaConnectionMonitor = iSharedObject->ConnectionMonitor();
-    avaConnectionMonitor.iConnectionMonitor.iConnectionId = 1; 
-    avaConnectionMonitor.iConnectionMonitor.iConnectionCounter = 1;
-    avaConnectionMonitor.iConnectionMonitor.iUintAttributeValue = 1;
-    avaConnectionMonitor.iConnectionMonitor.iConnectionInfoError = KErrNone;    
-    
-    //EUNIT_DISABLE_ALLOC_DECORATOR;
-    
-    TRAP( error, iConnectionAvailability->DoExecuteL() );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    
-    //EUNIT_DISABLE_ALLOC_DECORATOR;
-    
-    EUNIT_ASSERT ( error == KErrNone );
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
+    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EOperatorSpecific );
+    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredRoaming );
     
-    //HKK Define own error condition in which it can fil. 
-    
-    
-    if ( count > 0 && ( iConnectionAvailability->State() 
-        == MMusAvaObserver::EMusActivationError) ||
-        (iConnectionAvailability->State() == MMusAvaObserver::EMusAvaNetworkType ))
-        {
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaStatusAvailable );
-	
-	// Test3: VS in GSM Network is Allowed Ensure, PDP Context Need to be up to ensure network does 
-	// support data connection; Note DTM Flag is not needed anymore since VS is allowed in all network. 
-    iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
-    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
-    
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
-    avaConnectionMonitor.iConnectionMonitor.iConnectionId = 1; 
-    avaConnectionMonitor.iConnectionMonitor.iConnectionCounter = 1;
-    avaConnectionMonitor.iConnectionMonitor.iUintAttributeValue = 1;
-    avaConnectionMonitor.iConnectionMonitor.iConnectionInfoError = KErrNone;    
     TRAP( error, iConnectionAvailability->DoExecuteL() );
     if ( error == KErrNoMemory ) User::Leave( error );
     EUNIT_ASSERT ( error == KErrNone );
     EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 && ( iConnectionAvailability->State() 
-        == MMusAvaObserver::EMusActivationError ) ||
-        (iConnectionAvailability->State() == MMusAvaObserver::EMusAvaNetworkType ))
-        
-        {
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaStatusAvailable );
-	
-	
-	// Test4: VS in GSM Network is dis-allowed if PDP context is not up. 
-    iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
-    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
-    avaConnectionMonitor.iConnectionMonitor.iConnectionId = 1; 
-    avaConnectionMonitor.iConnectionMonitor.iConnectionCounter = 0;
-    avaConnectionMonitor.iConnectionMonitor.iUintAttributeValue = 1;
-    avaConnectionMonitor.iConnectionMonitor.iConnectionInfoError = KErrNone;    
-    TRAP( error, iConnectionAvailability->DoExecuteL() );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 && ( iConnectionAvailability->State() 
-        == MMusAvaObserver::EMusActivationError ) ||
-        (iConnectionAvailability->State() == MMusAvaObserver::EMusAvaNetworkType ))
-        
-        {
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaEdgeDtmStatusUnknown );
-    }
-
-
-void UT_CMusAvaConnectionAvailability::UT_CMusAvaConnectionAvailability_DoExecuteLL2()
-    {
-    // Restrict VS to be only Used in 3G mode, 
-    
-   	iStorage->Set ( MusSettingsKeys::KAllowOnlyIn3GNetwork,
-   	MusSettingsKeys::EAllowed3GOnly );       
-	
-	// Test: In GSM VS is not Allowed when its restricted to be only used in 3G
-    
-    TInt ret = 0;
-    iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
-    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
-    MultimediaSharingSettings::SetEdgeDtmSupportSettingL( MusSettingsKeys::EDtmModeNotAllowed );
-    TRAPD( error, iConnectionAvailability->DoExecuteL() );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-
-    TInt count = 0;
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 &&
-         iConnectionAvailability->State() !=  MMusAvaObserver::EMusAvaNetworkType )
-        {
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaNetworkType );
-
-    // Test2: In 3G VS is allowed.
-    
-    iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
-    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
-    TRAP( error, iConnectionAvailability->DoExecuteL() );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
     if ( count > 0 && iConnectionAvailability->State() 
         == MMusAvaObserver::EMusActivationError )
         {
         User::Leave( KErrNoMemory );
         }
-    EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaStatusAvailable );
+    EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusActivationError );
     
-    // Test3: Active in home networks
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
+    // operator variant OK
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
+    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EOperatorSpecific );
+    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
+    
     TRAP( error, iConnectionAvailability->DoExecuteL() );
     if ( error == KErrNoMemory ) User::Leave( error );
     EUNIT_ASSERT ( error == KErrNone );
@@ -290,8 +200,9 @@
         User::Leave( KErrNoMemory );
         }
     EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaStatusAvailable );
+    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EStandard );
     
-    //Test4: activation set off
+    // activation set off
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
     MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::ENever );
@@ -300,7 +211,7 @@
     EUNIT_ASSERT ( error == KErrNone );
     EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusActivationError ); 
 
-    // Test5: Edge/Dtm activation settings
+    //Edge/Dtm activation settings
     // case 1 Dtm mode allowed and atleast one pdp context exist
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
@@ -322,7 +233,6 @@
         }
     EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaStatusAvailable );
     
-    // Test5: Edge DTM is allowed but no pdp context
     // case 2 Dtm mode allowed and no pdp context exist
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
@@ -343,7 +253,7 @@
         }
     EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaEdgeDtmStatusUnknown );
     
-    // Test6: case 2 Dtm mode not allowed
+    // case 2 Dtm mode not allowed
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
     MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
@@ -358,12 +268,6 @@
         User::Leave( KErrNoMemory );
         }
     EUNIT_ASSERT( iConnectionAvailability->State() ==  MMusAvaObserver::EMusAvaNetworkType );
-    
-    // Reset the Central Reppository to the default value to avoid 
-    // poluting common storage.
-    
-   	iStorage->Set ( MusSettingsKeys::KAllowOnlyIn3GNetwork,
-   	MusSettingsKeys::EAllowedAllBearers );       
     }
  		
 void UT_CMusAvaConnectionAvailability::UT_CMusAvaConnectionAvailability_NameL()
@@ -379,80 +283,26 @@
 
 void UT_CMusAvaConnectionAvailability::UT_CMusAvaConnectionAvailability_PhoneNetworkModeStatusL()
     {
-    //Test1:  VS by default would allow all type of Networks. 
-    // Unknow Network Type : Allowed
     iConnectionAvailability->PhoneNetworkModeStatus( RMobilePhone::ENetworkModeUnknown );
-    TInt count = 0;
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 && ( iConnectionAvailability->State() ==  MMusAvaObserver::EMusActivationError ) ||
-    					(iConnectionAvailability->State() == MMusAvaObserver::EMusAvaNetworkType ))
-        {
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( iConnectionAvailability->iState ==  MMusAvaObserver::EMusAvaStatusAvailable );
-    
-    //GSM Network is Allowed:
-    iConnectionAvailability->PhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
-    
-    count = 0;
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 && ( iConnectionAvailability->State() ==  MMusAvaObserver::EMusActivationError ) ||
-    					(iConnectionAvailability->State() == MMusAvaObserver::EMusAvaNetworkType ))
-        {
-        User::Leave( KErrNoMemory );
-        }
-    
-    EUNIT_ASSERT( iConnectionAvailability->iState ==  MMusAvaObserver::EMusAvaStatusAvailable );
-    
-    //WCDMA: 3G is Allowed
+    EUNIT_ASSERT( iConnectionAvailability->iState ==  MMusAvaObserver::EMusAvaNetworkType );
     iConnectionAvailability->PhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     MMusAvaObserver::TAvailabilityStatus state = MMusAvaObserver::EMusAvaStatusNotExecuted;
     state = iConnectionAvailability->State();
-    count = 0;
+    TInt count = 0;
     EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 && (state == MMusAvaObserver::EMusActivationError ) ||
-    				    ( state == MMusAvaObserver::EMusAvaNetworkType ))
+    if ( count > 0 && state == MMusAvaObserver::EMusActivationError )
         {
         User::Leave( KErrNoMemory );
         }
     EUNIT_ASSERT( state ==  MMusAvaObserver::EMusAvaStatusAvailable );
-
-    //Test2:  Restrict VS to be only used in 3G
-	iStorage->Set ( MusSettingsKeys::KAllowOnlyIn3GNetwork,
-      	MusSettingsKeys::EAllowed3GOnly );       
-	
-	//Unknown Network DisAllowed
-    iConnectionAvailability->PhoneNetworkModeStatus( RMobilePhone::ENetworkModeUnknown );
-    EUNIT_ASSERT( iConnectionAvailability->iState ==  MMusAvaObserver::EMusAvaNetworkType );
-    
-    //GSM Network is Dis-Allowed:
-    iConnectionAvailability->PhoneNetworkModeStatus( RMobilePhone::ENetworkModeGsm );
-    EUNIT_ASSERT( iConnectionAvailability->iState ==  MMusAvaObserver::EMusAvaNetworkType );
-
-    
-    //3G is Allowed:
-    iConnectionAvailability->PhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
-    MMusAvaObserver::TAvailabilityStatus state1 = MMusAvaObserver::EMusAvaStatusNotExecuted;
-    state1 = iConnectionAvailability->State();
-    TInt count1 = 0;
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count1 > 0 && state1 == MMusAvaObserver::EMusActivationError )
-        {
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( state1 ==  MMusAvaObserver::EMusAvaStatusAvailable );
-    
-    //Reset the key to the default value.
-   	iStorage->Set ( MusSettingsKeys::KAllowOnlyIn3GNetwork,
-      	MusSettingsKeys::EAllowedAllBearers );       
     }
                           
 void UT_CMusAvaConnectionAvailability::UT_CMusAvaConnectionAvailability_NetworkRegistrationStatusL()
     {
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
+    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EOperatorSpecific );
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     iConnectionAvailability->iState = MMusAvaObserver::EMusAvaStatusAvailable;
     iConnectionAvailability->NetworkRegistrationStatus( RMobilePhone::ERegistrationUnknown );
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     TInt count = 0;
     EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
     if ( count > 0 && iConnectionAvailability->iState 
@@ -462,7 +312,8 @@
         }
     EUNIT_ASSERT( iConnectionAvailability->iState ==  MMusAvaObserver::EMusAvaRoamingError );
     iConnectionAvailability->iState = MMusAvaObserver::EMusAvaStatusAvailable;
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
+    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EStandard );
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     iConnectionAvailability->NetworkRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
     EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
     if ( count > 0 && iConnectionAvailability->iState 
@@ -735,12 +586,6 @@
     == MMusAvaObserver::EMusAvaStatusAvailable );
     
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
-    iStorage->SetRegistrationStatus( RMobilePhone::ERegistrationUnknown );
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
-    EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
-    == MMusAvaObserver::EMusActivationError );
-    
-    iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
     MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::ENever );
     EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
@@ -748,7 +593,7 @@
     
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
     == MMusAvaObserver::EMusAvaStatusAvailable );
     
@@ -763,7 +608,7 @@
      	iConcreteSettings->SetManualActivation( MMusAvaSettings::EActivationAllowed);
     MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
-    == MMusAvaObserver::EMusAvaStatusAvailable );
+    == MMusAvaObserver::EMusActivationError );
     
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredOnHomeNetwork );
@@ -773,6 +618,7 @@
     == MMusAvaObserver::EMusAvaStatusAvailable );
     
     
+    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EStandard );
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredRoaming );
     MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
@@ -791,20 +637,12 @@
     iConcreteSettings->SetManualActivation( MMusAvaSettings::EActivationExecuted);
     MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
-    == MMusAvaObserver::EMusAvaStatusAvailable );
+    == MMusAvaObserver::EMusActivationError );
     
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredRoaming );
-    iConcreteSettings->SetManualActivation( MMusAvaSettings::EActivationExecuted);
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
-    EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
-    == MMusAvaObserver::EMusActivationError );
-    
-    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EStandard );
-    iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
-    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredRoaming );
     iConcreteSettings->SetManualActivation( MMusAvaSettings::EActivationNotExecuted);
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
     == MMusAvaObserver::EMusAvaManualActivation );
     
@@ -822,21 +660,13 @@
     iConcreteSettings->SetManualActivation( MMusAvaSettings::EActivationNotAllowed);
     MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
-    == MMusAvaObserver::EMusAvaStatusAvailable );
-    
-    MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EStandard );
-    iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
-    iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredRoaming );
-    iConcreteSettings->SetManualActivation( MMusAvaSettings::EActivationNotAllowed);
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
-    EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
     == MMusAvaObserver::EMusActivationError );
     
     MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EStandard );
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredRoaming );
     iConcreteSettings->SetManualActivation( MMusAvaSettings::EActivationNotExecuted);
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
     == MMusAvaObserver::EMusAvaManualActivation );
     
@@ -844,7 +674,7 @@
     iStorage->SetPhoneNetworkModeStatus( RMobilePhone::ENetworkModeWcdma );
     iStorage->SetRegistrationStatus( RMobilePhone::ERegisteredRoaming );
     iConcreteSettings->SetManualActivation( MMusAvaSettings::EActivationAllowed);
-    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EActiveInHomeNetworks );
+    MultimediaSharingSettings::SetActivationSettingL( MusSettingsKeys::EAlwaysActive );
     EUNIT_ASSERT( iConnectionAvailability->NetworkRegistrationAndSettingsL()
     == MMusAvaObserver::EMusAvaStatusAvailable );
     }
@@ -888,14 +718,6 @@
     SetupL, UT_CMusAvaConnectionAvailability_DoExecuteLL, Teardown)
     
 EUNIT_TEST(
-    "DoExecuteL - test 3G Restricted",
-    "CMusAvaConnectionAvailability",
-    "DoExecuteL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAvaConnectionAvailability_DoExecuteLL2, Teardown)
-    
-    
-EUNIT_TEST(
     "Name - test ",
     "CMusAvaConnectionAvailability",
     "Name",
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaContactAvailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaContactAvailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -30,8 +30,13 @@
 
 //  EXTERNAL INCLUDES
 #include <digia/eunit/eunitmacros.h>
+#include <CPbkContactItem.h>
+#include <CPbkContactEngine.h>
+#include <CPbkFieldInfo.h>
 #include <cntfldst.h>
 #include <cntfield.h>
+#include <PbkFields.hrh>
+#include <CPbkFieldsInfo.h>
 #include <cntfilt.h>
 #include <digia/eunit/eunitdecorators.h>
 
@@ -47,6 +52,7 @@
 _LIT(KLastName,"Meikalainen");
 _LIT(KFirstLastName,"Matti Meikalainen");
 _LIT(KLastFirstName,"Meikalainen Matti");
+_LIT( KTelNumber, "12345" );
 
 // CONSTRUCTION
 UT_CMusAvaContactAvailability* UT_CMusAvaContactAvailability::NewL()
@@ -174,11 +180,73 @@
     
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_DoExecuteL1_L()
     {
+    CContactIdArray* contactIdArray = NULL;
+    CPbkContactItem*  contactItem = NULL;
+    CPbkContactItem*  contactItemTmp = NULL;
+    
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine );
+
+    // dummy initialization, other ways CPbkContactEngine leaks memory
+    CPbkContactItem* pbkItem = NULL;
+    TRAP_IGNORE( pbkItem = contactEngine->ReadContactL( 1 ) );
+    delete pbkItem;
+    
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+        
+     //contact  
+    TPbkContactItemField* fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    
+    iConcreteSettings->SetTelNumberL( KPlusNumber() );
+    
+    TRAPD( error, iContactAvailability->DoExecuteL() );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    TInt count;
+    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
+    if ( count > 0 && error != KErrNone )
+        {
+        User::Leave( KErrNoMemory );
+        }
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
     }
     
     
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_DoExecuteL2_L()
     {
+    CContactIdArray* contactIdArray = NULL;
+    CPbkContactItem*  contactItem = NULL;
+    CPbkContactItem*  contactItemTmp = NULL;
+    
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine );
+
+    // dummy initialization, other ways CPbkContactEngine leaks memory
+    CPbkContactItem* pbkItem = NULL;
+    TRAP_IGNORE( pbkItem = contactEngine->ReadContactL( 1 ) );
+    delete pbkItem;
+    
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+        
+    CContactTextField* urlAtSignField = 
+    EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdSIPID );
+    if ( urlAtSignField )
+        {
+        urlAtSignField->SetTextL( _L("sip:test@10.21.30.50") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlAtSignField );
+        }
+    EUNIT_ENABLE_ALLOC_DECORATOR;
 
     iConcreteSettings->SetTelNumberL( KPlusNumber );
     
@@ -201,35 +269,20 @@
         {
         User::Leave( KErrNoMemory );
         }
+    
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
     }
-    
-void UT_CMusAvaContactAvailability::UT_CMusAvaController_DoExecuteL3_L()
+void UT_CMusAvaContactAvailability::UT_CMusAvaController_CallConnectedLL()
     {
-    iConcreteSettings->SetTelNumberL( KPlusNumber );
-    
-    TRAPD( error, iContactAvailability->DoExecuteL() );
-    EUNIT_ASSERT( error == KErrNoMemory || error == KErrNone );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    TInt count;
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 && error != KErrNone )
-        {
-        User::Leave( KErrNoMemory );
-        }
-    
-    iConcreteSettings->SetTelNumberL( KPlusNumber );
-        
-    TRAP( error, iContactAvailability->DoExecuteL() );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 && error != KErrNone )
-        {
-        User::Leave( KErrNoMemory );
-        }
-    
+    TRAPD( error,  iContactAvailability->CallConnectedL( KTelNumber ) );
+    if ( error == KErrNone )
+    	{
+    	EUNIT_ASSERT_EQUALS( iContactAvailability->State(), 
+                         MMusAvaObserver::EMusAvaStatusAvailable );
+    	EUNIT_ASSERT_EQUALS( iConcreteSettings->TelNumber(), KTelNumber ); 
+    	}
     }
-
-    
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_NameL()
     {
     EUNIT_ASSERT( iContactAvailability->Name() == MMusAvaObserver::EMusAvaNameContactStatus );
@@ -296,52 +349,1138 @@
     
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ContactLL()
     {
+    CContactIdArray* contactIdArray = NULL;
+    CPbkContactItem*  contactItem = NULL;
+
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    CleanupStack::PushL( contactEngine );
+    
+    // Non cont or phone number added to contact DB
+    TBool ret;
+    TRAPD( error, ret = iContactAvailability->ContactL( contactIdArray, *contactEngine ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( !ret );
+    EUNIT_ASSERT( contactIdArray == NULL );
+    
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+        
+     //contact  
+    TPbkContactItemField* fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    
+    iConcreteSettings->SetTelNumberL( KPlusNumber );
+    
+    TRAP( error, ret = iContactAvailability->ContactL( contactIdArray, *contactEngine ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( ret );
+    EUNIT_ASSERT( contactIdArray != NULL );
+
+    delete contactIdArray;
+    contactIdArray = NULL;    
+    
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
+    
     }
-
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ContactArrayLL()
     {
+    CContactIdArray* array = NULL;
+    
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* pbkContactEngine = CPbkContactEngine::NewL();
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    CleanupStack::PushL( pbkContactEngine );
+    
+    //No number found
+    TInt ret = NULL;
+    TRAPD( error, ret = iContactAvailability->ContactArrayL( array, 
+        *pbkContactEngine ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( error == KErrNone );
+    EUNIT_ASSERT( ret == KErrNotFound );
+    EUNIT_ASSERT( array == NULL );
+    //Number length 0
+    iConcreteSettings->SetTelNumberL( _L("") );
+    TRAP( error, ret = iContactAvailability->ContactArrayL( array, 
+        *pbkContactEngine ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( error == KErrNone );
+    EUNIT_ASSERT( ret == KErrNotFound );
+    EUNIT_ASSERT( array == NULL );
+    //Number found
+    iConcreteSettings->SetTelNumberL( KNumber );
+    TRAP( error, ret = iContactAvailability->ContactArrayL( array, 
+        *pbkContactEngine ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( ret == KErrNone );
+    EUNIT_ASSERT( array != NULL );
+    EUNIT_ASSERT( array->Count() > 0 );
+
+    CleanupStack::PopAndDestroy( pbkContactEngine );
+
+    delete array;
+    array = NULL;
     }
-
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ContactItemL()   
     {
+    CPbkContactItem* tmpItem = NULL;
+    CContactIdArray* tmpContactIdArray = NULL;
+    
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine );
+    
+    CPbkContactItem* contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+    
+    // CContactIdArray == 0
+    //tmpContactIdArray = CContactIdArray::NewLC();
+    //EUNIT_ASSERT_EQUALS( KErrNotFound, iContactAvailability->ContactItem( 
+    //*tmpContactIdArray, tmpItem ) ); 
+    //CleanupStack::PopAndDestroy( ); 
+    
+    
+    // CContactIdArray  > 0
+    TPbkContactItemField* fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    contactEngine->AddNewContactL( *contactItem );
+
+    CContactDatabase* contactDatabase = CContactDatabase::OpenL(); 
+    CleanupStack::PushL( contactDatabase );  
+    CCntFilter* newFilter = CCntFilter::NewL();
+    CleanupStack::PushL( newFilter );
+    newFilter->Reset();
+    newFilter->SetContactFilterTypeALL( ETrue );
+    contactDatabase->FilterDatabaseL( *newFilter );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    
+    //CContactIdArray* tmpaArray = newFilter->iIds;
+    //Item found
+    
+    TInt err = iContactAvailability->ContactItem( *( newFilter->iIds ), tmpItem, *contactEngine );
+    // NOTE: Multiple contact id's could be in database and KErrNotSupported is 
+    // returned if more than one. Maybe first run could get result KErrNone and 
+    // then KErrNotSupported
+    EUNIT_ASSERT( ( KErrNotSupported == err ) || ( KErrNone == err ) );  
+
+    //EUNIT_ASSERT( tmpItem != NULL );
+    //delete tmpaArray;
+    //contactDatabase->CommitContactL( *tmpItem );
+    delete tmpItem;
+    //tmpItem = NULL;   
+    //End test
+  
+    CleanupStack::PopAndDestroy( newFilter );
+    
+    contactDatabase->CloseTables();
+    
+    CleanupStack::PopAndDestroy( contactDatabase );
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
+    
+
+    
     }
-
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_PhoneResulutionLL()         
     {   
+    CDesCArrayFlat* array = new ( ELeave ) CDesCArrayFlat( 10 );
+    CleanupStack::PushL( array ); 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine );
+    CPbkContactItem* contactItem = contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+
+    // dummy initialization, other ways CPbkContactEngine leaks memory
+    CPbkContactItem* pbkItem = NULL;
+    TRAP_IGNORE( pbkItem = contactEngine->ReadContactL( 1 ) );
+    delete pbkItem;
+
+     //No prefix
+    contactItem->RemoveDefaultPhoneNumberField();
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    iConcreteSettings->SetTelNumberL( KNumber );    
+    TBool ret; 
+    TRAPD( error, ret = iContactAvailability->PhoneResolutionL( *contactItem, array ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( !ret );
+    
+    EUNIT_ASSERT( array->MdcaCount() == 0);
+   
+    //Prefix
+    iConcreteSettings->SetTelNumberL( KPlusNumber );
+        
+    TRAP( error, ret = iContactAvailability->PhoneResolutionL( *contactItem, array ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( ret );
+    EUNIT_ASSERT( array->MdcaCount() > 0 );
+    //remove object from the array
+    array->Reset();
+    
+    ///Number plan is in national mode
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    TPbkContactItemField* fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KNumber() );
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iConcreteSettings->ReleseTelNumberL();
+    TRAP( error, ret = iContactAvailability->PhoneResolutionL( *contactItem, array ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( !ret );
+    EUNIT_ASSERT( array->MdcaCount() == 0 );
+
+
+    //Number plan is in internatiolan mode 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem->RemoveDefaultPhoneNumberField();
+    fieldMobile = contactItem->FindField( EPbkFieldIdPhoneNumberMobile );
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    iConcreteSettings->ReleseTelNumberL();
+    TRAP( error, ret = iContactAvailability->PhoneResolutionL( *contactItem, array ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( ret );
+    EUNIT_ASSERT( array->MdcaCount() > 0 );
+  
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine ); 
+    CleanupStack::PopAndDestroy( array );                                               
     }   
+
+    
+
+    
     
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ContactIdL()
     {
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine ); 
+    
+    CPbkContactItem* contactItem = NULL;
+    
+    // dummy initialization, other ways CPbkContactEngine leaks memory
+    TRAP_IGNORE( contactItem = contactEngine->ReadContactL( 1 ) );
+    delete contactItem;
+    
+    contactItem = contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    
+    //Contact field not created
+    EUNIT_ASSERT( !iContactAvailability->ContactId( *contactItem, EPbkFieldIdSIPID ) );
+    
+    //Contact URi not defined
+    CContactTextField* urlFieldNotDefined = 
+    EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdShareView );
+    if ( urlFieldNotDefined )
+        {
+        urlFieldNotDefined->SetTextL( _L("sip:10.21.32.51") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlFieldNotDefined );
+        }
+        
+    EUNIT_ASSERT( !iContactAvailability->ContactId( *contactItem, EPbkFieldIdShareView ) );
+     
+    //Contact field not found
+    CContactTextField* urlField = 
+    EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdShareView );
+    if ( urlField )
+        {
+        urlField->SetTextL( _L("test@10.21.32.51") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlField );
+        }
+        
+    EUNIT_ASSERT( !iContactAvailability->ContactId( *contactItem, EPbkFieldIdSIPID ) );
+    
+    //Contact field found
+    EUNIT_ASSERT( iContactAvailability->ContactId( *contactItem, EPbkFieldIdShareView ) );
+        
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
     }
 
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ContactIdSearchL()
     {
+    CPbkContactItem* contactItem = NULL;
+    CContactIdArray* contactIdArray = NULL;
+    CContactTextField* phoneNumberMobiled = NULL;
+    CContactTextField* country = NULL;
+    CContactTextField* urlFieldNotDefined = NULL;
+    CPbkContactEngine* contactEngine = NULL;
+    
+    
+     //No contact //////////////////////////////////////////////////////////////
+    //General info
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine ); 
+    
+    //Clear contacts 
+    contactIdArray = contactEngine->MatchPhoneNumberL(
+                                              KNumber(),
+                                             KNumberMatchingDigitsRequired );                                       
+    CleanupStack::PushL( contactIdArray );                                          
+    contactEngine->DeleteContactsL( *contactIdArray );                                        
+
+    CleanupStack::PopAndDestroy( contactIdArray );
+
+    
+    // dummy initialization, other ways CPbkContactEngine leaks memory
+    TRAP_IGNORE( contactItem = contactEngine->ReadContactL( 1 ) );
+    delete contactItem; 
+    
+    AddToMyContact( *contactEngine,
+                    KNumber(), 
+                    EPbkFieldIdPhoneNumberMobile,
+                    _L("nokia"), 
+                    EPbkFieldIdCompanyName );    
+                      
+    contactIdArray = contactEngine->MatchPhoneNumberL(
+                                              KNumber(),
+                                             KNumberMatchingDigitsRequired );   
+    CleanupStack::PushL( contactIdArray );                                          
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+                                             
+    EUNIT_ASSERT( 
+        iContactAvailability->ContactIdSearch( *contactIdArray, *contactEngine ) == 
+        EPbkFieldIdNone );
+    
+    contactEngine->DeleteContactsL( *contactIdArray );  
+    CleanupStack::PopAndDestroy( contactIdArray );
+    
+    // Field Phone number general found /////////////////////////////////////////////////////////
+     
+    //Clear contacts 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactIdArray = contactEngine->MatchPhoneNumberL(
+                                              KNumber(),
+                                             KNumberMatchingDigitsRequired );                                       
+    CleanupStack::PushL( contactIdArray );                                          
+    contactEngine->DeleteContactsL( *contactIdArray );                                        
+
+    CleanupStack::PopAndDestroy( contactIdArray );
+    
+    AddToMyContact( *contactEngine,
+                    KNumber(), 
+                    EPbkFieldIdPhoneNumberMobile,
+                    _L("+35805123456789"), 
+                    EPbkFieldIdPhoneNumberGeneral );    
+        
+    contactIdArray = contactEngine->MatchPhoneNumberL(
+                                              KNumber(),
+                                             KNumberMatchingDigitsRequired );
+        
+    CleanupStack::PushL( contactIdArray );                                          
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+                                             
+    EUNIT_ASSERT( 
+        iContactAvailability->ContactIdSearch( *contactIdArray, *contactEngine ) == 
+        EPbkFieldIdNone );
+    //EUNIT_ASSERT( ret == EPbkFieldIdPhoneNumberGeneral );
+    contactEngine->DeleteContactsL( *contactIdArray );  
+    CleanupStack::PopAndDestroy( contactIdArray );
+ 
+    // Field SIP id found /////////////////////////////////////////////////////////
+     
+    //Clear contacts 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactIdArray = contactEngine->MatchPhoneNumberL(
+                                              KNumber(),
+                                             KNumberMatchingDigitsRequired );                                       
+    CleanupStack::PushL( contactIdArray );                                          
+    contactEngine->DeleteContactsL( *contactIdArray );                                        
+
+    CleanupStack::PopAndDestroy( contactIdArray );
+    
+    AddToMyContact( *contactEngine,
+                    KNumber(), 
+                    EPbkFieldIdPhoneNumberMobile,
+                    _L("test@10.21.32.51"), 
+                    EPbkFieldIdSIPID );    
+        
+    contactIdArray = contactEngine->MatchPhoneNumberL(
+                                              KNumber(),
+                                             KNumberMatchingDigitsRequired );
+        
+    CleanupStack::PushL( contactIdArray );                                          
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+                                             
+    TPbkFieldId ret = iContactAvailability->ContactIdSearch( *contactIdArray, *contactEngine );
+    if ( ret == EPbkFieldIdNone )
+        {
+        User::Leave( KErrNoMemory );
+        }
+    EUNIT_ASSERT( ret == EPbkFieldIdSIPID );
+    contactEngine->DeleteContactsL( *contactIdArray );  
+    CleanupStack::PopAndDestroy( contactIdArray );
+ 
+    // Share View found 
+    //Clear contacts 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactIdArray = contactEngine->MatchPhoneNumberL(
+                                              KNumber(),
+                                             KNumberMatchingDigitsRequired );                                       
+    CleanupStack::PushL( contactIdArray );                                          
+    contactEngine->DeleteContactsL( *contactIdArray );                                        
+
+    CleanupStack::PopAndDestroy( contactIdArray );
+
+    AddToMyContact( *contactEngine,
+                    KNumber(), 
+                    EPbkFieldIdPhoneNumberMobile,
+                    _L("test@10.21.32.51"), 
+                    EPbkFieldIdShareView );    
+        
+    contactIdArray = contactEngine->MatchPhoneNumberL(
+                                              KNumber(),
+                                             KNumberMatchingDigitsRequired );
+        
+    CleanupStack::PushL( contactIdArray );                                          
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+                                             
+    ret = iContactAvailability->ContactIdSearch( *contactIdArray, *contactEngine );
+    if ( ret == EPbkFieldIdNone )
+        {
+        User::Leave( KErrNoMemory );
+        }
+    EUNIT_ASSERT( ret == EPbkFieldIdShareView );
+    
+    contactEngine->DeleteContactsL( *contactIdArray );  
+    CleanupStack::PopAndDestroy( contactIdArray );
+    CleanupStack::PopAndDestroy( contactEngine );
     }
 
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ResolveAddressesLL()
     {
+    CDesCArrayFlat* array = new ( ELeave ) CDesCArrayFlat( 10 );
+    CleanupStack::PushL( array ); 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine ); 
+    
+    // dummy initialization, other ways CPbkContactEngine leaks memory
+    CPbkContactItem* pbkItem = NULL;
+    TRAP_IGNORE( pbkItem = contactEngine->ReadContactL( 1 ) );
+    delete pbkItem;
+    
+    CPbkContactItem* contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    
+    //Test cases
+     //Sip Uri without At sign
+    CContactTextField* urlSipField = 
+    EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdSIPID );
+  
+    
+     if ( urlSipField )
+        {
+        urlSipField->SetTextL( _L("sip:10.21.32.51") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlSipField );
+        }
+  
+    TBool ret;
+    TRAPD( error, ret = iContactAvailability->ResolveAddressesL( *contactItem, 
+                                             array,
+                                             EPbkFieldIdSIPID  ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( !ret );
+    EUNIT_ASSERT( array->Count() == 0 );
+   
+    
+    //Undefined Uri
+    CContactTextField* urlUndefinedField = 
+    EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdPushToTalk );
+    if ( urlUndefinedField )
+        {
+        urlUndefinedField->SetTextL( _L("test@10.21.32.51") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlUndefinedField );
+        }
+    contactEngine->AddNewContactL( *contactItem );
+    TRAP( error, ret = iContactAvailability->ResolveAddressesL( *contactItem, 
+                                             array,
+                                             EPbkFieldIdSIPID ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( !ret );
+                                                 
+    EUNIT_ASSERT( array->Count() == 0 );
+    
+      //Sip Uri
+    CContactTextField* urlAtSignField = 
+    EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdSIPID );
+    if ( urlAtSignField )
+        {
+        urlAtSignField->SetTextL( _L("sip:test@10.21.32.51") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlAtSignField );
+        }
+    contactEngine->AddNewContactL( *contactItem );
+    TRAP( error, ret = iContactAvailability->ResolveAddressesL( *contactItem, 
+                                             array,
+                                             EPbkFieldIdSIPID ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( ret );
+    EUNIT_ASSERT( array->Count() > 0 );
+    
+    //Clear array
+    array->Reset();
+    
+    //ShareView Uri
+    CContactTextField* urlShareViewField = 
+    EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdShareView );
+    if ( urlShareViewField )
+        {
+        urlShareViewField->SetTextL( _L("test@10.21.32.51") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlShareViewField );
+        }
+  
+    TRAP( error, ret = iContactAvailability->ResolveAddressesL( *contactItem, 
+                                             array,
+                                             EPbkFieldIdShareView ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( ret );
+    EUNIT_ASSERT( array != NULL );
+    EUNIT_ASSERT( array->Count() > 0 );
+    array->Reset();  
+  
+ 
+    //End test
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
+    CleanupStack::PopAndDestroy( array );
+    
     }
     
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ResolveAddressesLOpSpecificL()
     {
+    CDesCArrayFlat* array = new ( ELeave ) CDesCArrayFlat( 10 );
+    CleanupStack::PushL( array ); 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine ); 
+    
+    // dummy initialization, other ways CPbkContactEngine leaks memory
+    CPbkContactItem* pbkItem = NULL;
+    TRAP_IGNORE( pbkItem = contactEngine->ReadContactL( 1 ) );
+    delete pbkItem;
+    
+    CPbkContactItem* contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    
+    //Test cases
+    //Sip Uri without test string
+    CContactTextField* urlAtSignField = 
+            EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdSIPID );
+    if ( urlAtSignField )
+        {
+        urlAtSignField->SetTextL( _L("sip:test@10.21.32.51") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlAtSignField );
+        }
+    contactEngine->AddNewContactL( *contactItem );
+    TBool ret;
+    TRAPD( error, ret = iContactAvailability->ResolveAddressesL( *contactItem, 
+                                             array,
+                                             EPbkFieldIdSIPID ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( !ret );
+    EUNIT_ASSERT_EQUALS( array->Count(), 0 );
+    
+    //Clear array
+    array->Reset();
+    
+    //Sip Uri with test string (*#)
+    urlAtSignField = 
+            EditableContactFieldL( *contactEngine, *contactItem, EPbkFieldIdSIPID );
+    if ( urlAtSignField )
+        {
+        urlAtSignField->SetTextL( _L("sip:test*#@10.21.32.51") );
+        }
+    else
+        {
+        EUNIT_ASSERT( !urlAtSignField );
+        }
+    contactEngine->AddNewContactL( *contactItem );
+    TRAP( error, ret = iContactAvailability->ResolveAddressesL( *contactItem, 
+                                             array,
+                                             EPbkFieldIdSIPID ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT ( ret );
+    EUNIT_ASSERT( array->Count() > 0 );
+    
+    //Clear array
+    array->Reset();    
+
+    //End test
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
+    CleanupStack::PopAndDestroy( array );
+    
     }
     
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ResolvePhoneContactLL()  
     {
+    CDesCArrayFlat* array = new ( ELeave ) CDesCArrayFlat( 10 );
+    CleanupStack::PushL( array );
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine );
+
+    CPbkContactItem* contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+     ///Number plan is in national mode
+    TPbkContactItemField* fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL(_L("0401234567"));
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iContactAvailability->ResolvePhoneContactL( *contactItem, array );
+    EUNIT_ASSERT( array->MdcaCount() == 0 );
+    //Number plan is in internatiolan mode 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem->RemoveDefaultPhoneNumberField();
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL(_L("+358401234567"));
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    iContactAvailability->ResolvePhoneContactL( *contactItem, array );
+    EUNIT_ASSERT( array->MdcaCount() > 0 );
+    array->Reset();
+   
+    //tel uri
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem->RemoveDefaultPhoneNumberField();
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL(_L("tel:+358401234567"));
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    iContactAvailability->ResolvePhoneContactL( *contactItem, array );
+    EUNIT_ASSERT( array->Count() == 0 );
+    
+    //End test
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
+    CleanupStack::PopAndDestroy( array );
     }
     
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_ResolvePhoneContactLOpSpecificL()  
     {
+    CDesCArrayFlat* array = new ( ELeave ) CDesCArrayFlat( 10 );
+    CleanupStack::PushL( array );
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine );
+
+    CPbkContactItem* contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+     ///Number plan is in national mode
+    TPbkContactItemField* fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL(_L("0401234567"));
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iContactAvailability->ResolvePhoneContactL( *contactItem, array );
+    EUNIT_ASSERT( array->MdcaCount() > 0  );
+    //Number plan is in internatiolan mode 
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem->RemoveDefaultPhoneNumberField();
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL(_L("+358401234567"));
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    iContactAvailability->ResolvePhoneContactL( *contactItem, array );
+    EUNIT_ASSERT( array->MdcaCount() > 0 );
+    array->Reset();
+   
+    //tel uri
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem->RemoveDefaultPhoneNumberField();
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL(_L("tel:+358401234567"));
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    iContactAvailability->ResolvePhoneContactL( *contactItem, array );
+    EUNIT_ASSERT( array->Count() > 0 );
+    
+    //End test
+    CleanupStack::PopAndDestroy( contactItem );
+    CleanupStack::PopAndDestroy( contactEngine );
+    CleanupStack::PopAndDestroy( array );
+    }    
+    
+CContactTextField* UT_CMusAvaContactAvailability::EditableContactFieldL(
+        CPbkContactEngine& aContactEngine, 
+        CPbkContactItem& aContact, 
+        TPbkFieldId aFieldId )
+    {
+   /* CContactDatabase* contactDatabase = NULL;
+    contactDatabase = CContactDatabase::OpenL(); 
+    CleanupStack::PushL( contactDatabase );  
+    CCntFilter* newFilter = CCntFilter::NewLC();
+    newFilter->Reset();
+    newFilter->SetContactFilterTypeALL( ETrue );
+    contactDatabase->FilterDatabaseL( *newFilter );
+    
+    CContactIdArray* contactsId = newFilter->iIds;
+    if ( contactsId->Count() )
+        {
+        aContactEngine.DeleteContactsL( *contactsId );
+        }
+    //contactDatabase->CommitContactL():
+
+    CleanupStack::PopAndDestroy( 2 );
+    CleanupStack::PopAndDestroy( contactDatabase );*/
+    
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    const CPbkFieldsInfo& fieldsInfo = aContactEngine.FieldsInfo();
+    // Try to get the SIP URI storage field for this contact
+    TPbkContactItemField* itemField = aContact.FindField( aFieldId );
+
+    if ( !itemField )
+        {
+        CPbkFieldInfo* fieldInfo = fieldsInfo.Find( aFieldId );
+        // Add field to this contact
+        if ( fieldInfo )
+            {
+            CleanupStack::PushL( fieldInfo );
+            // Contact takes ownership of the field.
+            aContact.AddFieldL( *fieldInfo );
+            CleanupStack::Pop( fieldInfo );
+            itemField = aContact.FindField( aFieldId );
+            if ( itemField )
+                {
+                return itemField->TextStorage();
+                }
+            else
+                {
+                EUNIT_ASSERT( !itemField );
+                }
+            }
+        else
+            {
+            EUNIT_ASSERT( !fieldInfo );
+            }
+        }
+    else
+        {
+        return itemField->TextStorage();
+        }
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+    return NULL; // Should never reach here, just to avoid warnings.
     }
 
+void UT_CMusAvaContactAvailability::AddFields( CPbkContactEngine& aContactEngine,
+                                               CPbkContactItem& contact,
+                                               const TDesC& aText, 
+                                               TPbkFieldId aFieldId )
+    {
+    const CPbkFieldsInfo& fieldsInfo = aContactEngine.FieldsInfo();
+    // Try to get the storage field for this contact
+    TPbkContactItemField* itemField = contact.FindField( aFieldId );
+
+    if ( itemField == NULL )
+        {
+        CPbkFieldInfo* fieldInfo = fieldsInfo.Find( aFieldId );
+        // Add field to this contact
+        if ( fieldInfo )
+            {
+            CleanupStack::PushL( fieldInfo );
+            // Contact takes ownership of the field.
+            contact.AddFieldL( *fieldInfo );
+            CleanupStack::Pop( fieldInfo );
+            itemField = contact.FindField( aFieldId );
+            if ( itemField )
+                {
+                itemField->TextStorage()->SetTextL( aText );
+                }
+            else
+                {
+                EUNIT_ASSERT( !itemField );
+                }
+            }
+        else
+            {
+            EUNIT_ASSERT( !fieldInfo );
+            }
+        }
+    else
+        {
+        // Set some default fields
+        itemField->TextStorage()->SetTextL(aText );
+        }
+    } 
+    
+void UT_CMusAvaContactAvailability::AddToMyContact( CPbkContactEngine& aContactEngine,
+                                                    const TDesC& aText, 
+                                                    TPbkFieldId aFieldId,
+                                                    const TDesC& aText2, 
+                                                    TPbkFieldId aFieldId2 )
+    {
+    // Create a contact with few default fields
+    // All the default fields are empty and won't be displayed
+    // until some information is stored in them
+    /*CPbkContactItem* contact = aContactEngine.CreateEmptyContactL();
+    CleanupStack::PushL( contact );
+
+    // Set some default fields
+    contact->FindField( aFieldId )->TextStorage()->SetTextL(aText );
+     // Set some default fields
+    contact->FindField( aFieldId2 )->TextStorage()->SetTextL(aText2 );
+     
+    // Store the contact to the phonebook
+    aContactEngine.AddNewContactL( *contact );
+    CleanupStack::PopAndDestroy( contact );*/
+    
+    /*CPbkContactItem* contact = aContactEngine.CreateEmptyContactL();
+    CleanupStack::PushL( contact );
+        
+    const CPbkFieldsInfo& fieldsInfo = aContactEngine.FieldsInfo();
+    // Try to get the storage field for this contact
+    TPbkContactItemField* itemField = contact->FindField( aFieldId );
+
+    if ( itemField == NULL )
+        {
+        CPbkFieldInfo* fieldInfo = fieldsInfo.Find( aFieldId );
+        // Add field to this contact
+        if ( fieldInfo )
+            {
+            CleanupStack::PushL( fieldInfo );
+            // Contact takes ownership of the field.
+            contact->AddFieldL( *fieldInfo );
+            CleanupStack::Pop( fieldInfo );
+            itemField = contact->FindField( aFieldId );
+            if ( itemField )
+                {
+                itemField->TextStorage()->SetTextL( aText );
+                }
+            else
+                {
+                EUNIT_ASSERT( !itemField );
+                }
+            }
+        else
+            {
+            EUNIT_ASSERT( !fieldInfo );
+            }
+        }
+    else
+        {
+        // Set some default fields
+        itemField->TextStorage()->SetTextL(aText );
+        }
+    // Store the contact to the phonebook
+    aContactEngine.AddNewContactL( *contact );
+    CleanupStack::PopAndDestroy( contact );*/
+    
+    CPbkContactItem* contact = aContactEngine.CreateEmptyContactL();
+    CleanupStack::PushL( contact );
+        
+    AddFields( aContactEngine, *contact, aText, aFieldId );
+    AddFields( aContactEngine, *contact, aText2, aFieldId2 );
+    // Store the contact to the phonebook
+    aContactEngine.AddNewContactL( *contact );
+    CleanupStack::PopAndDestroy( contact );
+    
+    } 
+
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_IsExistAlreadyL()
     {
+    _LIT( KTestUri1, "sip:1@test.net");
+    _LIT( KTestUri2, "sip:2@test.net");
+    _LIT( KTestUri3, "sip:3@test.net");
+    _LIT( KTestUri5, "sip:5@test.net");
+    
+    TBufC16<16> str1(KTestUri1);
+    HBufC16* ptr1;
+    ptr1 = str1.AllocLC(); 
+    
+    TBufC16<16> str2(KTestUri2);
+    HBufC16* ptr2;
+    ptr2 = str2.AllocLC(); 
+    
+    TBufC16<16> str3(KTestUri3);
+    HBufC16* ptr3;
+    ptr3 = str3.AllocLC(); 
+    
+    CDesCArrayFlat* array = new( ELeave ) CDesCArrayFlat(1);
+    CleanupStack::PushL(array);
+    array->AppendL(*ptr1);
+    array->AppendL(*ptr2);
+    array->AppendL(*ptr3);
+    
+    TBool exist = EFalse;
+
+    // Test 1 :
+    exist = iContactAvailability->IsExistAlready(*array,KTestUri1);
+    EUNIT_ASSERT(exist);
+    // Test 2 :
+    exist = iContactAvailability->IsExistAlready(*array,KTestUri5);
+    EUNIT_ASSERT(!exist);  
+
+    array->Reset();
+    CleanupStack::PopAndDestroy(array);
+    CleanupStack::PopAndDestroy(ptr3);
+    CleanupStack::PopAndDestroy(ptr2);
+    CleanupStack::PopAndDestroy(ptr1);
     }
 
 void UT_CMusAvaContactAvailability::UT_CMusAvaController_UpdateContactNameLL()
     {
+    CPbkContactItem*  contactItem = NULL;
+
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( contactEngine );
+
+    // dummy initialization, other ways CPbkContactEngine leaks memory
+    CPbkContactItem* pbkItem = NULL;
+    TRAP_IGNORE( pbkItem = contactEngine->ReadContactL( 1 ) );
+    delete pbkItem;
+    
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+
+    //contact firstname  && iBeginWithFirstName = ETrue
+    TPbkContactItemField* fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
+    TPbkContactItemField* fieldMobile1 = contactItem->FindField(EPbkFieldIdFirstName);
+    fieldMobile1->TextStorage()->SetTextL( KFirstName() );
+    
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iConcreteSettings->SetTelNumberL( KPlusNumber() );
+        
+    iContactAvailability->iBeginWithFirstName = ETrue;
+    TRAPD( error, 
+        iContactAvailability->UpdateContactNameL( contactItem->ContactItem() ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( error == KErrNone );
+    EUNIT_ASSERT( iContactAvailability->iContactName->Compare( KFirstName ) == NULL );
+
+    CleanupStack::PopAndDestroy( contactItem );
+    CContactIdArray* array = NULL;
+    iContactAvailability->ContactArrayL( array, *contactEngine );
+    CleanupStack::PushL( array );
+    contactEngine->DeleteContactsL( *array, ETrue );
+    CleanupStack::PopAndDestroy( array );
+    
+    //contact firstname  && iBeginWithFirstName = EFalse
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
+    fieldMobile1 = contactItem->FindField(EPbkFieldIdFirstName);
+    fieldMobile1->TextStorage()->SetTextL( KFirstName() );
+    
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iConcreteSettings->SetTelNumberL( KPlusNumber() );
+        
+    iContactAvailability->iBeginWithFirstName = EFalse;
+    TRAP( error, 
+        iContactAvailability->UpdateContactNameL( contactItem->ContactItem() ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( error == KErrNone );
+    EUNIT_ASSERT( iContactAvailability->iContactName->Compare( KFirstName ) == NULL );
+
+    CleanupStack::PopAndDestroy( contactItem );
+    array = NULL;
+    iContactAvailability->ContactArrayL( array, *contactEngine );
+    CleanupStack::PushL( array );
+    contactEngine->DeleteContactsL( *array, ETrue );
+    CleanupStack::PopAndDestroy( array );
+    
+    //contact lastname && iBeginWithFirstName = ETrue
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
+    fieldMobile1 = contactItem->FindField(EPbkFieldIdLastName);
+    fieldMobile1->TextStorage()->SetTextL( KLastName() );
+    
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iConcreteSettings->SetTelNumberL( KPlusNumber() );
+        
+    iContactAvailability->iBeginWithFirstName = ETrue;
+    TRAP( error, 
+        iContactAvailability->UpdateContactNameL( contactItem->ContactItem() ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( error == KErrNone );
+    EUNIT_ASSERT( iContactAvailability->iContactName->Compare( KLastName ) == NULL );
+
+    CleanupStack::PopAndDestroy( contactItem );
+    array = NULL;
+    iContactAvailability->ContactArrayL( array, *contactEngine );
+    CleanupStack::PushL( array );
+    contactEngine->DeleteContactsL( *array, ETrue );
+    CleanupStack::PopAndDestroy( array );
+    
+    //contact lastname && iBeginWithFirstName = EFalse
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+ 
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
+    fieldMobile1 = contactItem->FindField(EPbkFieldIdLastName);
+    fieldMobile1->TextStorage()->SetTextL( KLastName() );
+    
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iConcreteSettings->SetTelNumberL( KPlusNumber() );
+        
+    iContactAvailability->iBeginWithFirstName = EFalse;
+    TRAP( error, 
+         iContactAvailability->UpdateContactNameL( contactItem->ContactItem() ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( error == KErrNone );
+    EUNIT_ASSERT( iContactAvailability->iContactName->Compare( KLastName ) == NULL );
+
+    CleanupStack::PopAndDestroy( contactItem );
+    array = NULL;
+    iContactAvailability->ContactArrayL( array, *contactEngine );
+    CleanupStack::PushL( array );
+    contactEngine->DeleteContactsL( *array, ETrue );
+    CleanupStack::PopAndDestroy( array );
+    
+    //contact firstname && lastname && iBeginWithFirstName = ETrue
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
+    fieldMobile1 = contactItem->FindField(EPbkFieldIdFirstName);
+    fieldMobile1->TextStorage()->SetTextL( KFirstName() );
+    
+    TPbkContactItemField* fieldMobile2 = contactItem->FindField(EPbkFieldIdLastName);
+    fieldMobile2->TextStorage()->SetTextL( KLastName() );
+    
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iConcreteSettings->SetTelNumberL( KPlusNumber() );
+        
+    iContactAvailability->iBeginWithFirstName = ETrue;
+    TRAP( error, 
+         iContactAvailability->UpdateContactNameL( contactItem->ContactItem() ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( error == KErrNone );
+    EUNIT_ASSERT( iContactAvailability->iContactName->Compare( KFirstLastName ) == NULL );
+//
+    CleanupStack::PopAndDestroy( contactItem );
+    array = NULL;
+    iContactAvailability->ContactArrayL( array, *contactEngine );
+    CleanupStack::PushL( array );
+    contactEngine->DeleteContactsL( *array, ETrue );
+    CleanupStack::PopAndDestroy( array );
+    
+    //contact firstname && lastname && iBeginWithFirstName = EFalse
+    EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
+
+    fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
+    fieldMobile1 = contactItem->FindField(EPbkFieldIdFirstName);
+    fieldMobile1->TextStorage()->SetTextL( KFirstName() );
+    
+    fieldMobile2 = contactItem->FindField(EPbkFieldIdLastName);
+    fieldMobile2->TextStorage()->SetTextL( KLastName() );
+    
+    contactEngine->AddNewContactL( *contactItem );
+    EUNIT_ENABLE_ALLOC_DECORATOR;
+
+    iConcreteSettings->SetTelNumberL( KPlusNumber() );
+        
+    iContactAvailability->iBeginWithFirstName = EFalse;
+    TRAP( error, 
+         iContactAvailability->UpdateContactNameL( contactItem->ContactItem() ) );
+    if ( error == KErrNoMemory ) User::Leave( error );
+    EUNIT_ASSERT( error == KErrNone );
+    EUNIT_ASSERT( iContactAvailability->iContactName->Compare( KLastFirstName ) == NULL );
+
+    CleanupStack::PopAndDestroy( contactItem );
+    array = NULL;
+    iContactAvailability->ContactArrayL( array, *contactEngine );
+    CleanupStack::PushL( array );
+    contactEngine->DeleteContactsL( *array, ETrue );
+    CleanupStack::PopAndDestroy( array );
+    
+    // contact name only contain 1 character
+    _LIT(KNameWithOneChar,"M");
+    for (int i = 0; i < 1; ++i )
+        {
+        EUNIT_DISABLE_ALLOC_DECORATOR;
+        contactItem= contactEngine->CreateEmptyContactL();
+        CleanupStack::PushL( contactItem ); 
+
+        fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+        fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+            
+        fieldMobile1 = contactItem->FindField(EPbkFieldIdFirstName);
+        fieldMobile1->TextStorage()->SetTextL( KNameWithOneChar() );
+            
+        contactEngine->AddNewContactL( *contactItem );
+        EUNIT_ENABLE_ALLOC_DECORATOR;
+
+        iConcreteSettings->SetTelNumberL( KPlusNumber() );
+                
+        iContactAvailability->iBeginWithFirstName = i;
+        TRAP( error, 
+               iContactAvailability->UpdateContactNameL( contactItem->ContactItem() ) );
+        if ( error == KErrNoMemory ) User::Leave( error );
+        EUNIT_ASSERT( error == KErrNone );
+        EUNIT_ASSERT( iContactAvailability->iContactName->Compare( KNameWithOneChar ) == 0 );
+
+        CleanupStack::PopAndDestroy( contactItem );
+        array = NULL;
+        iContactAvailability->ContactArrayL( array, *contactEngine );
+        CleanupStack::PushL( array );
+        contactEngine->DeleteContactsL( *array, ETrue );
+        CleanupStack::PopAndDestroy( array );
+        }
+    
+    CleanupStack::PopAndDestroy( contactEngine );
     }
- 
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE( 
@@ -376,13 +1515,6 @@
     "DoExecuteL_2",
     "FUNCTIONALITY",
     SetupL, UT_CMusAvaController_DoExecuteL2_L, Teardown) 
-
-EUNIT_TEST(
-    "DoExecuteL_3 - test ",
-    "CMusAvaContactAvailability",
-    "DoExecuteL_3",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAvaController_DoExecuteL3_L, Teardown)
     
 EUNIT_TEST(
     "Name - test ",
@@ -503,6 +1635,12 @@
     "FUNCTIONALITY",
     SetupL, UT_CMusAvaController_UpdateContactNameLL, Teardown)
 
+EUNIT_TEST(
+    "UpdateContactNameL - test ",
+    "CMusAvaContactAvailability",
+    "UpdateContactNameL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusAvaController_CallConnectedLL, Teardown)    
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaDefaultImp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaDefaultImp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -33,6 +33,8 @@
 
 //  EXTERNAL INCLUDES
 #include <digia/eunit/eunitmacros.h>
+#include <CPbkContactItem.h>
+#include <CPbkContactEngine.h>
 #include <sipstrings.h>
 #include <digia/eunit/eunitdecorators.h>
 
@@ -383,13 +385,26 @@
         }
     
     EUNIT_DISABLE_ALLOC_DECORATOR;
+    CPbkContactEngine* contactEngine = CPbkContactEngine::NewL();
     EUNIT_ENABLE_ALLOC_DECORATOR;
+    CleanupStack::PushL( contactEngine );
 
     // dummy initialization, other ways CPbkContactEngine leaks memory
+    CPbkContactItem* pbkItem = NULL;
+    TRAP_IGNORE( pbkItem = contactEngine->ReadContactL( 1 ) );
+    delete pbkItem;
+    
+    CPbkContactItem*  contactItem= contactEngine->CreateEmptyContactL();
+    CleanupStack::PushL( contactItem ); 
 
     //contact  
+    TPbkContactItemField* fieldMobile = contactItem->FindField(EPbkFieldIdPhoneNumberMobile);
+    fieldMobile->TextStorage()->SetTextL( KPlusNumber() );
+    
     EUNIT_DISABLE_ALLOC_DECORATOR;
+    contactEngine->AddNewContactL( *contactItem );
     EUNIT_ENABLE_ALLOC_DECORATOR;
+    CleanupStack::PopAndDestroy( contactItem );
     
     iConcreteSettings->SetTelNumberL( KPlusNumber() );
     
@@ -400,6 +415,7 @@
     EUNIT_ASSERT( iDefaultImp->AvailabilityState(
         MMusAvaObserver::EMusAvaInviteHandler) 
         == MMusAvaObserver::EMusAvaStatusAvailable );
+    CleanupStack::PopAndDestroy( contactEngine );
    
    }
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaDefaultOptionHandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaDefaultOptionHandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -93,11 +93,6 @@
     TRAP_IGNORE( SIPStrings::OpenL() )
     CSipSseTestTls::OpenL();
     iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-        MusSettingsKeys::EFastModeOff );
-
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-         MusSettingsKeys::EFastModeOff );
     MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EStandard );
     MultimediaSharingSettings::SetEdgeDtmSupportSettingL( MusSettingsKeys::EDtmModeAllowed );
     iAvailabilityObserver = CMusAvaAvailabilityObserverImp::NewL();
@@ -115,9 +110,6 @@
     TRAP_IGNORE( SIPStrings::OpenL() )
     CSipSseTestTls::OpenL();
     iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-        MusSettingsKeys::EFastModeOff );
-
     MultimediaSharingSettings::SetOperatorVariantSettingL( MusSettingsKeys::EOperatorSpecific );
     MultimediaSharingSettings::SetEdgeDtmSupportSettingL( MusSettingsKeys::EDtmModeAllowed );
     iAvailabilityObserver = CMusAvaAvailabilityObserverImp::NewL();
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaNetworkAvailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaNetworkAvailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -32,7 +32,7 @@
 #include "mussesseioninformationapi.h"
 
 _LIT( KTelNumber, "12345" );
-_LIT( KSipUri, "sip:uri@host" );
+_LIT( KAnotherTelNumber, "54321" );
 
 // CONSTRUCTION
 UT_CMusAvaNetworkAvailability* UT_CMusAvaNetworkAvailability::NewL()
@@ -86,6 +86,12 @@
                        NMusSessionInformationApi::KMusCallDirection,
                        RProperty::EInt,
                        0 );
+    
+	
+    RProperty::Define( NMusSessionInformationApi::KCategoryUid,
+                       NMusSessionInformationApi::KMUSPrivacy,
+                       RProperty::EInt,
+                       0 );
                        
     }
 
@@ -117,6 +123,10 @@
     User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
                     	NMusSessionInformationApi::KMusCallEvent,
                     	0 ));
+
+    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                        NMusSessionInformationApi::KMUSPrivacy,
+                        0 ));
     
     iNetworkAvailability->DoExecuteL();    
     EUNIT_ASSERT_EQUALS( iNetworkAvailability->State(), 
@@ -128,50 +138,22 @@
                     	NMusSessionInformationApi::KMusCallEvent,
                     	1 ));
                     
-	User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                    	NMusSessionInformationApi::KMusTelNumber,
-                    	KTelNumber ));
-                    
-	User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                    NMusSessionInformationApi::KMusCallDirection,
-                    0 ));
+    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                    NMusSessionInformationApi::KMusTelNumber,
+                    KTelNumber ));
+                
+    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                NMusSessionInformationApi::KMusCallDirection,
+                0 ));
                                                                          
     iNetworkAvailability->DoExecuteL();
     EUNIT_ASSERT_EQUALS( iNetworkAvailability->State(), 
                          MMusAvaObserver::EMusAvaStatusAvailable );
     EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KTelNumber );
-    const MDesCArray& sipAddresses = iSettings->SipAddresses();
-    EUNIT_ASSERT_EQUALS( sipAddresses.MdcaCount(), 0 );
     EUNIT_ASSERT_EQUALS( iSettings->CallDirection(), 0 );
+    
     }
     
-void UT_CMusAvaNetworkAvailability::UT_CMusAvaNetworkAvailability_DoExecuteL_SipUriL()
-    {
-    // one call, SIP URI given
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                        NMusSessionInformationApi::KMusCallEvent,
-                        1 ));
-                    
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                        NMusSessionInformationApi::KMusTelNumber,
-                        KSipUri ));
-                    
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                    NMusSessionInformationApi::KMusCallDirection,
-                    0 ));
-                                                                         
-    iNetworkAvailability->DoExecuteL();
-    EUNIT_ASSERT_EQUALS( iNetworkAvailability->State(), 
-                         MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KNullDesC );
-
-    const MDesCArray& sipAddresses = iSettings->SipAddresses();
-    EUNIT_ASSERT_EQUALS( sipAddresses.MdcaCount(), 1 );
-    EUNIT_ASSERT_EQUALS( sipAddresses.MdcaPoint( 0 ), KSipUri );
-    
-    EUNIT_ASSERT_EQUALS( iSettings->CallDirection(), 0 );
-    }
-
 void UT_CMusAvaNetworkAvailability::UT_CMusAvaNetworkAvailability_StopL()
     {
     iNetworkAvailability->Stop();
@@ -190,20 +172,26 @@
     User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
                    		NMusSessionInformationApi::KMusCallDirection,
                     	0 ));
-                    	                                                     
-    iNetworkAvailability->CallConnectedL( KTelNumber, EFalse );
+
+    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                        NMusSessionInformationApi::KMUSPrivacy,
+                        0 ));
+    
+    iNetworkAvailability->iConfcall = ETrue;
+    iNetworkAvailability->iSettings.SetOptionSentNumber( KTelNumber );
+    iNetworkAvailability->CallConnectedL( KTelNumber );
     EUNIT_ASSERT_EQUALS( iNetworkAvailability->State(), 
                          MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KTelNumber );
+    
     
-
-    // Test SIP URI
-    iNetworkAvailability->CallConnectedL( KSipUri, ETrue );
-    // Tel number should not have been modified
-    EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KTelNumber );
-    const MDesCArray& sipAddresses = iSettings->SipAddresses();
-    EUNIT_ASSERT_EQUALS( sipAddresses.MdcaCount(), 1 );
-    EUNIT_ASSERT_EQUALS( sipAddresses.MdcaPoint( 0 ), KSipUri );
+    iNetworkAvailability->iSettings.SetOptionSentNumber( KAnotherTelNumber );
+    iNetworkAvailability->CallConnectedL( KTelNumber );   
+    EUNIT_ASSERT_EQUALS( iNetworkAvailability->State(), 
+                         MMusAvaObserver::EMusAvaStatusInProgress );
+    EUNIT_ASSERT( iNetworkAvailability->iSettings.OptionSentTelNumber().Length() == 0 );
+    
+    
+    EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KTelNumber );    
     }
     
 void UT_CMusAvaNetworkAvailability::UT_CMusAvaNetworkAvailability_ConferenceCallLL()
@@ -218,21 +206,17 @@
     User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
                    		NMusSessionInformationApi::KMusCallDirection,
                     	0 ));
+    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                        NMusSessionInformationApi::KMUSPrivacy,
+                        0 ));
     
-    iNetworkAvailability->CallHoldL( KTelNumber, EFalse );
+    
+    iNetworkAvailability->CallHoldL( KTelNumber );
     EUNIT_ASSERT_EQUALS( iNetworkAvailability->State(), 
                          MMusAvaObserver::EMusAvaStatusCallOnHold );
-    EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KTelNumber );
+    EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KTelNumber );    
+    }
     
-    // Test SIP URI
-    iNetworkAvailability->CallConnectedL( KSipUri, ETrue );    
-    // Tel number should not have been modified
-    EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KTelNumber );
-    const MDesCArray& sipAddresses = iSettings->SipAddresses();
-    EUNIT_ASSERT_EQUALS( sipAddresses.MdcaCount(), 1 );
-    EUNIT_ASSERT_EQUALS( sipAddresses.MdcaPoint( 0 ), KSipUri );
-    }
-
 void UT_CMusAvaNetworkAvailability::UT_CMusAvaNetworkAvailability_NoActiveCallLL()
     {
     iNetworkAvailability->NoActiveCallL();
@@ -241,17 +225,6 @@
     EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KNullDesC );    
     }                
 
-void UT_CMusAvaNetworkAvailability::UT_CMusAvaNetworkAvailability_SetRemoteHostLL()
-    {
-    _LIT( KMusTestPhoneNum, "12341234" );
-    iNetworkAvailability->SetRemoteHostL( KMusTestPhoneNum(), EFalse );
-    EUNIT_ASSERT_EQUALS( iSettings->TelNumber(), KMusTestPhoneNum );
-    EUNIT_ASSERT_EQUALS( iSettings->ContactResolvingUri(), KNullDesC );
-    
-    _LIT( KMusTestSipUri, "sip:12341234@1.2.3.4" );
-    iNetworkAvailability->SetRemoteHostL( KMusTestSipUri(), ETrue );
-    EUNIT_ASSERT_EQUALS( iSettings->ContactResolvingUri(), KMusTestSipUri );
-    }                
 
 
 //  TEST TABLE
@@ -269,13 +242,6 @@
     SetupL, UT_CMusAvaNetworkAvailability_DoExecuteLL, Teardown)
 
 EUNIT_TEST(
-    "DoExecuteL - test SIP URI ",
-    "CMusAvaNetworkAvailability",
-    "DoExecuteL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAvaNetworkAvailability_DoExecuteL_SipUriL, Teardown)
-
-EUNIT_TEST(
     "Stop - test ",
     "CMusAvaNetworkAvailability",
     "Stop",
@@ -316,13 +282,6 @@
     "NoActiveCallL",
     "FUNCTIONALITY",
     SetupL, UT_CMusAvaNetworkAvailability_NoActiveCallLL, Teardown )      
-
-EUNIT_TEST(
-    "SetRemoteHostL - test ",
-    "CMusAvaNetworkAvailability",
-    "SetRemoteHostL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAvaNetworkAvailability_SetRemoteHostLL, Teardown )  
     
 
 EUNIT_END_TEST_TABLE
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaOptionHandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaOptionHandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -42,7 +42,6 @@
 #include "musavasip.h"
 #include "CSipSseTestTls.h"
 #include "musavacapabilitytesthelper.h"
-#include "musavasettingsobserverimp.h"
 
 
 // CONSTRUCTION
@@ -87,9 +86,7 @@
     {
     iSharedObject = CMusAvaSharedObject::GetSingletonL();
     iAvailabilityObserver = CMusAvaAvailabilityObserverImp::NewL();
-    iSettingsObserver = CMusAvaSettingsObserverImp::NewL();
     iConcreteSettings = CMusAvaSettingsImp::NewL();
-    iConcreteSettings->SetObserver( *iSettingsObserver );
     iOptionHandler = CMusAvaOptionHandler::NewL( *iAvailabilityObserver,
                                     *iConcreteSettings );
 
@@ -98,9 +95,6 @@
     CSIP& sip = iSharedObject->MusAvaSip().Sip();
     CSipSseTestTls::OpenL();
     iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-        MusSettingsKeys::EFastModeOff );
-
     iSharedObject->MusAvaSip().CreateProfileL();
     iProfile = iSharedObject->MusAvaSip().Profile();
     iSharedObject->MusAvaSip().ConnectionL( );
@@ -131,9 +125,6 @@
         iStorage = NULL;
         }
     delete iOptionHandler;
-    delete iSettingsObserver;
-    
-    PropertyHelper::Close();
     }
 
 void UT_CMusAvaOptionHandler::UT_CMusAvaOptionHandler_NewLL(  )
@@ -331,143 +322,6 @@
     
     }
 
-void UT_CMusAvaOptionHandler::UT_CMusAvaOptionHandler_DoSetStateL()
-    {
-    // Set some state which does not cause special handling
-    iOptionHandler->iFastModeCapable = EFalse;
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaStatusOptionsSent );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusOptionsSent );
-    
-    // Set special handling state, but fast mode is not enabled
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( !iSettingsObserver->iApplicationStarted );
-        
-    // Set special handling state, fast capable but mode is not enabled
-    iOptionHandler->iFastModeCapable = ETrue;
-    iConcreteSettings->SetFastMode( MusSettingsKeys::EFastModeOff );
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( !iSettingsObserver->iApplicationStarted );
-    }
-
-void UT_CMusAvaOptionHandler::UT_CMusAvaOptionHandler_DoSetStateFastModeL()
-    {
-    iOptionHandler->iFastModeCapable = ETrue;
-    iConcreteSettings->SetFastMode( MusSettingsKeys::EFastModeOn );
-    iOptionHandler->iSettings.SetCallDirection( 1 );
-    
-    // State which does not have special handling
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaFailureCode );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaFailureCode );
-    EUNIT_ASSERT( !iOptionHandler->iFastModeAvailabilityDelayed );
-    
-    // OptionsNotSent handling
-    //
-        
-    // MT, not answered
-    iOptionHandler->iSettings.SetCallDirection( 2 );
-    iOptionHandler->iCapabilityQueryAnswered = EFalse;
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusOptionsNotSent );
-    EUNIT_ASSERT( !iOptionHandler->iFastModeAvailabilityDelayed );
-        
-    // MT, answered (makes state available delayed)
-    iOptionHandler->iCapabilityQueryAnswered = ETrue;
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaStatusOptionsNotSent );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusOptionsNotSent );
-    EUNIT_ASSERT( iOptionHandler->iFastModeAvailabilityDelayed );
-    
-    // Available handling
-    //
-    
-    // MO, start app
-    iOptionHandler->iSettings.SetCallDirection( 1 );
-    iSettingsObserver->iApplicationStarted = EFalse;
-    iOptionHandler->iFastModeAvailabilityDelayed = EFalse;
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( !iOptionHandler->iFastModeAvailabilityDelayed );
-    EUNIT_ASSERT( iSettingsObserver->iApplicationStarted );
-    
-    // App already started by going to available state, do not do twice
-    iSettingsObserver->iApplicationStarted = EFalse;
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( !iOptionHandler->iFastModeAvailabilityDelayed );
-    EUNIT_ASSERT( !iSettingsObserver->iApplicationStarted );
-     
-    // MT, delayed availability publishing (state not changed yet)
-    iOptionHandler->iSettings.SetCallDirection( 2 );
-    iOptionHandler->iFastModeAvailabilityDelayed = EFalse;
-    iSettingsObserver->iApplicationStarted = EFalse;
-    iOptionHandler->iState = MMusAvaObserver::EMusAvaStatusOptionsNotSent;
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusOptionsNotSent );
-    EUNIT_ASSERT( iOptionHandler->iFastModeAvailabilityDelayed );
-    EUNIT_ASSERT( !iSettingsObserver->iApplicationStarted );
-    
-    // Invite ends availability delaying
-    iOptionHandler->PrepareForReceivedInviteL();
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusAvailable );
-    EUNIT_ASSERT( !iOptionHandler->iFastModeAvailabilityDelayed );
-    
-    // No effect if no delay pending
-    iOptionHandler->iState = MMusAvaObserver::EMusAvaStatusOptionsNotSent;
-    iOptionHandler->PrepareForReceivedInviteL();
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusOptionsNotSent );
-    
-    // OptionNotAvailable handling
-    //
-    
-    // Normal handling when no pending availabilty publishing nor state is
-    // not already available
-    iOptionHandler->iFastModeAvailabilityDelayed = EFalse;
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaOptionNotAvailable );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaOptionNotAvailable );
-    
-    // If already set to available by succesfull answer, sending failure
-    // does not clear availability
-    iOptionHandler->iState = MMusAvaObserver::EMusAvaStatusAvailable;
-    iOptionHandler->DoSetState( MMusAvaObserver::EMusAvaOptionNotAvailable );
-    EUNIT_ASSERT( iOptionHandler->iState == MMusAvaObserver::EMusAvaStatusAvailable );
-    }
-
-void UT_CMusAvaOptionHandler::UT_CMusAvaOptionHandler_FastModeResolvedL()
-    {
-    iOptionHandler->iFastModeCapable = ETrue;
-    
-    // Normal case  
-    iOptionHandler->iSettings.SetFastMode( MusSettingsKeys::EFastModeOff );
-    iOptionHandler->FastModeResolved( MusSettingsKeys::EFastModeOn );
-    EUNIT_ASSERT( iOptionHandler->iSettings.FastMode() == MusSettingsKeys::EFastModeOn )
-    
-    // MO side fast mode negotiation has failed, value is not set
-    iOptionHandler->iSettings.SetFastMode( MusSettingsKeys::EFastModeOff );
-    iOptionHandler->iSettings.SetCallDirection( 1 );
-    iOptionHandler->iState = MMusAvaObserver::EMusAvaOptionNotAvailable;
-    iOptionHandler->FastModeResolved( MusSettingsKeys::EFastModeOn );
-    EUNIT_ASSERT( iOptionHandler->iSettings.FastMode() == MusSettingsKeys::EFastModeOff )
-    }
-
-void UT_CMusAvaOptionHandler::UT_CMusAvaOptionHandler_CapabilityQueryAnsweredL()
-    {
-    iOptionHandler->iFastModeCapable = ETrue;
-    
-    // If fast mode MO side, no special handling for answer
-    iOptionHandler->CapabilityQueryAnswered( ETrue );
-    EUNIT_ASSERT( iOptionHandler->iCapabilityQueryAnswered )
-    EUNIT_ASSERT( !iOptionHandler->iFastModeAvailabilityDelayed );
-    
-    // If fast mode MT side, MT can start waiting for invite already after answering
-    iOptionHandler->iCapabilityQueryAnswered = EFalse;
-    iOptionHandler->iSettings.SetFastMode( MusSettingsKeys::EFastModeOn );
-    iOptionHandler->iSettings.SetCallDirection( 2 );
-    iOptionHandler->CapabilityQueryAnswered( ETrue );
-    EUNIT_ASSERT( iOptionHandler->iCapabilityQueryAnswered )
-    EUNIT_ASSERT( iOptionHandler->iFastModeAvailabilityDelayed );
-    }
-
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE( 
@@ -542,38 +396,6 @@
     SetupL,UT_CMusAvaOptionHandler_VideoCodecsResolvedLL, 
     Teardown) 
 
-EUNIT_TEST(
-    "DoSetState - test ",
-    "CMusAvaOptionHandler",
-    "DoSetState",
-    "FUNCTIONALITY",
-    SetupL,UT_CMusAvaOptionHandler_DoSetStateL, 
-    Teardown) 
-
-EUNIT_TEST(
-    "DoSetState - fastmode test ",
-    "CMusAvaOptionHandler",
-    "DoSetState",
-    "FUNCTIONALITY",
-    SetupL,UT_CMusAvaOptionHandler_DoSetStateFastModeL, 
-    Teardown) 
-
-EUNIT_TEST(
-    "FastModeResolved - test ",
-    "CMusAvaOptionHandler",
-    "FastModeResolved",
-    "FUNCTIONALITY",
-    SetupL,UT_CMusAvaOptionHandler_FastModeResolvedL, 
-    Teardown) 
-
-EUNIT_TEST(
-    "CapabilityQueryAnswered - test ",
-    "CMusAvaOptionHandler",
-    "CapabilityQueryAnswered",
-    "FUNCTIONALITY",
-    SetupL,UT_CMusAvaOptionHandler_CapabilityQueryAnsweredL, 
-    Teardown) 
-
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaRegisterAvailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaRegisterAvailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -219,6 +219,12 @@
      
     EUNIT_ASSERT( iAvailabilityObserver->iStatus ==  MMusAvaObserver::EMusAvaStatusNotRegistered );                
     EUNIT_ASSERT( iAvailabilityObserver->iName == MMusAvaObserver::EMusAvaNameRegistration );
+    EUNIT_ASSERT( iSharedObj->MusAvaSip().iSipConnection == NULL );
+   
+    iRegisterAvailability->ProfileRegistryEventOccurred( 1, MSIPProfileRegistryObserver::EProfileRegistered );   
+    EUNIT_ASSERT( iAvailabilityObserver->iStatus ==  MMusAvaObserver::EMusAvaStatusAvailable );                
+    EUNIT_ASSERT( iAvailabilityObserver->iName == MMusAvaObserver::EMusAvaNameRegistration );
+    EUNIT_ASSERT( iSharedObj->MusAvaSip().iSipConnection != NULL );
              
     iRegisterAvailability->ProfileRegistryEventOccurred( 1, MSIPProfileRegistryObserver::EProfileDestroyed );   
     EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotRegistered ); 
@@ -270,19 +276,45 @@
 
 void UT_CMusAvaRegisterAvailability::UT_CMusAvaRegisterAvailability_ProfileRegistryErrorOccurredL()
     {
+    iRegisterAvailability->iOperatorVariant = MusSettingsKeys::EOperatorSpecific;
     iRegisterAvailability->ProfileRegistryErrorOccurred(5, -5 );
-
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotExecuted );
+    iRegisterAvailability->ProfileRegistryErrorOccurred(5, KErrGeneral );
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotExecuted );
+    
+    iRegisterAvailability->iOperatorVariant = MusSettingsKeys::EStandard;
+    iRegisterAvailability->ProfileRegistryErrorOccurred(5, -5 );
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotExecuted );
+    iRegisterAvailability->ProfileRegistryErrorOccurred(5, KErrGeneral );
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotExecuted );
+        
     // Test Profile
     TRAPD( error, iSharedObj->MusAvaSip().CreateProfileL() );
     if ( error == KErrNoMemory ) User::Leave( error );
     EUNIT_ASSERT ( error == KErrNone );
     //Profile created
     iRegisterAvailability->ProfileRegistryErrorOccurred(5, -5 );
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotExecuted );
+    
+    iRegisterAvailability->iOperatorVariant = MusSettingsKeys::EOperatorSpecific;
+    iRegisterAvailability->ProfileRegistryErrorOccurred(5, KErrGeneral );
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotExecuted );
+    
+    iRegisterAvailability->iOperatorVariant = MusSettingsKeys::EStandard;
+    iRegisterAvailability->ProfileRegistryErrorOccurred(5, KErrGeneral );
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotExecuted );
     
     MultimediaSharingSettings::SetSipProfileSettingL( 1 );
     
     iRegisterAvailability->ProfileRegistryErrorOccurred(1, -5 );
     EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotRegistered );
+    
+    iRegisterAvailability->ProfileRegistryErrorOccurred(1, KErrGeneral );
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusAvaStatusNotRegistered );
+    //Operator variant. SIP profile disabled.
+    iRegisterAvailability->iOperatorVariant = MusSettingsKeys::EOperatorSpecific;
+    iRegisterAvailability->ProfileRegistryErrorOccurred(1, KErrGeneral );
+    EUNIT_ASSERT( iRegisterAvailability->State() ==  MMusAvaObserver::EMusActivationError );
     } 
 
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaSettingAvailability.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaSettingAvailability.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -132,13 +132,7 @@
 
     MultimediaSharingSettings::SetActivationSettingL(MusSettingsKeys::EActiveInHomeNetworks);
     iSettingAvailability->CheckActivationState();
-    EUNIT_GET_ALLOC_DECORATOR_FAILCOUNT( count );
-    if ( count > 0 && iSettingAvailability->iState 
-        == MMusAvaObserver::EMusActivationError )
-        {
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( iSettingAvailability->iState == MMusAvaObserver::EMusAvaStatusAvailable );
+    EUNIT_ASSERT( iSettingAvailability->iState == MMusAvaObserver::EMusActivationError );
     
     MultimediaSharingSettings::SetActivationSettingL(MusSettingsKeys::ENever);    
     iSettingAvailability->CheckActivationState();
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaSettingsImp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaSettingsImp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -197,6 +197,28 @@
     EUNIT_ASSERT( iSettingsImp->iTelNumber->Compare( KNumber ) == 0 );    
     }
 
+
+void UT_CMusAvaSettingsImp::UT_CMusAvaSettingsImp_SetOptionSentNumber()
+	{
+    _LIT( KNumber ,   "123456789" );
+    iSettingsImp->SetOptionSentNumber( KNumber );
+    EUNIT_ASSERT( iSettingsImp->iOptionSentTelNumber->Compare( KNumber ) == 0 ); 
+	}
+
+const UT_CMusAvaSettingsImp::UT_CMusAvaSettingsImp_OptionSentTelNumber()
+	{
+	EUNIT_ASSERT( iSettingsImp->OptionSentTelNumber().Length() == 0 );
+	}
+
+void UT_CMusAvaSettingsImp::UT_CMusAvaSettingsImp_ReleaseOptionSentNumber()
+	{
+    _LIT( KNumber ,   "123456789" );
+    iSettingsImp->SetOptionSentNumber( KNumber );
+    EUNIT_ASSERT( iSettingsImp->iOptionSentTelNumber->Compare( KNumber ) == 0 );    
+    iSettingsImp->ReleaseOptionSentNumber(); 
+    EUNIT_ASSERT( iSettingsImp->iOptionSentTelNumber->Length() == 0 )
+	}
+
 void UT_CMusAvaSettingsImp::UT_CMusAvaSettingsImp_SetSipAddressProposalLL( )
     {
     _LIT( KNumber ,   "123456789" );
@@ -514,6 +536,28 @@
     "Sip",
     "FUNCTIONALITY",
     SetupL, UT_CMusAvaSettingsImp_CopyDescArrayLL, Teardown)    
+    
+EUNIT_TEST(
+    "SetOptionSentNumber - test ",
+    "CMusAvaSettingsImp",
+    "SetOptionSentNumber",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusAvaSettingsImp_SetOptionSentNumber, Teardown) 
+    
+EUNIT_TEST(
+    "OptionSentTelNumber - test ",
+    "CMusAvaSettingsImp",
+    "OptionSentTelNumber",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusAvaSettingsImp_OptionSentTelNumber, Teardown) 
+    
+EUNIT_TEST(
+    "ReleaseOptionSentNumber - test ",
+    "CMusAvaSettingsImp",
+    "ReleaseOptionSentNumber",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusAvaSettingsImp_ReleaseOptionSentNumber, Teardown) 
+    
 
 EUNIT_END_TEST_TABLE
 
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaTerminal.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_CMusAvaTerminal.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -40,6 +40,7 @@
 #include "musavasharedobject.h"
 #include "mussettings.h"
 
+_LIT8( KCapabilityTestOriginatorSIPAddressUri8, "sip:user@domain.com");
 
 // CONSTRUCTION
 UT_CMusAvaTerminal* UT_CMusAvaTerminal::NewL()
@@ -117,21 +118,13 @@
         }
     
     CSipSseTestTls::OpenL();
-    iStorage = CSipSseTestTls::Storage();
-    iStorage->Set( MusSettingsKeys::KFastStartupMode, 
-        MusSettingsKeys::EFastModeOff );
     }
 
 
 void UT_CMusAvaTerminal::Teardown(  )
     {
-    if ( iStorage )
-        {
-        iStorage->Clear();
-        CSipSseTestTls::Close();
-        iStorage = NULL;
-        }
 
+    CSipSseTestTls::Close();
     delete iTerminal;
     delete iOptionHandler;
     delete iConcreteSettings;
@@ -226,7 +219,7 @@
     if ( !iProfile->iArray )
         {
         iProfile->iArray = new ( ELeave ) CDesC8ArrayFlat( 1 );
-        iProfile->iArray->AppendL( _L8("sip:user@domain.com") );
+        iProfile->iArray->AppendL( KCapabilityTestOriginatorSIPAddressUri8 );
         }
     
     EUNIT_ASSERT( iExchange->Terminals().Count() == 0 );
@@ -265,6 +258,8 @@
     EUNIT_ASSERT( terminal.iQueries == 1 );
     EUNIT_ASSERT( terminal.iQuery == query );
     
+
+    CMusAvaCapabilityQuery* tmpQuery = query;
     query = CMusAvaCapabilityQuery::NewL( *iCapability,
                                         *iSIPConnection,
                                         *iProfile,
@@ -272,12 +267,22 @@
     CleanupStack::PushL( query );
     EUNIT_ASSERT( iExchange->Terminals().Count() == 1 );
     EUNIT_ASSERT( terminal.iQueries == 2 );
-    
+ 
+
     //Second query cannot be executed
     EUNIT_ASSERT_SPECIFIC_LEAVE( terminal.ExecuteQueryL( query ),
                                  KErrAlreadyExists )
     EUNIT_ASSERT( terminal.iQuery != query );
+
+    
+    //Uri identical case
+	terminal.iQuery = NULL;
+	query->iRemoteUri.Copy( KCapabilityTestOriginatorSIPAddressUri8 );
+	EUNIT_ASSERT_SPECIFIC_LEAVE( terminal.ExecuteQueryL( query ),
+								 KErrNotSupported )      
+        
     CleanupStack::PopAndDestroy( query );
+    delete tmpQuery;
     }
 
 
@@ -454,7 +459,7 @@
     
     CleanupStack::PopAndDestroy( options );
 
-    // with Asserted Identity
+    // with Asserted Identity, check also that SDP of received request is used
     options =   
         CapabilityTestHelper::OptionsRequestL( KCapabilityTestAddress_A,
                                          KCapabilityTestAddress_B,
@@ -462,15 +467,41 @@
                                          KCapabilitySwisFeature,
                                          KCapabilityTestAcceptHeader,
                                          KCapabilityTestTerminalID_B,
-                                         KCapabilityPAssertedIdentity );
+                                         KCapabilityPAssertedIdentity,
+                                         KCapabilityTestSDP);
     CleanupStack::PushL( options );        
-    iTerminal->QueryRequestedL( *options );            
+    iTerminal->QueryRequestedL( *options );   
+
+    
     EUNIT_ASSERT( iConcreteSettings->SipAddresses().MdcaCount() == 1 );    
+    EUNIT_ASSERT_EQUALS( iConcreteSettings->iVideoCodecs->MdcaCount(), 1 );
+    EUNIT_ASSERT_EQUALS( iConcreteSettings->iVideoCodecs->MdcaPoint(0), _L("H263-2000/90000") );
     CleanupStack::PopAndDestroy( options );
   
-
     CSipSseTestTls* server = CSipSseTestTls::Storage();
     CSipSseTestTls::Storage()->Clear();
+    iTerminal->iRequestedQuery = NULL;
+    EUNIT_ASSERT( iTerminal->RequestedQuery() == NULL );
+    
+    // with Asserted Identity, check also that SDP of received request is used
+   options =   
+        CapabilityTestHelper::OptionsRequestL( KCapabilityTestAddress_A,
+                                         KCapabilityTestAddress_B,
+                                         KCapabilitySwisFeature,
+                                         KCapabilitySwisFeature,
+                                         KCapabilityTestAcceptHeader,
+                                         KCapabilityTestTerminalID_B,
+                                         KCapabilityPAssertedIdentity,
+                                         KCapabilityTestSDP264And263);
+    CleanupStack::PushL( options );        
+    iTerminal->QueryRequestedL( *options );   
+    EUNIT_ASSERT( iConcreteSettings->SipAddresses().MdcaCount() == 1 );    
+    EUNIT_ASSERT_EQUALS( iConcreteSettings->iVideoCodecs->MdcaCount(), 2 );
+    EUNIT_ASSERT_EQUALS( iConcreteSettings->iVideoCodecs->MdcaPoint(0), _L("H264/90000") );
+    EUNIT_ASSERT_EQUALS( iConcreteSettings->iVideoCodecs->MdcaPoint(1), _L("H263-2000/90000") );
+    CleanupStack::PopAndDestroy( options );
+    
+    CSipSseTestTls::Storage()->Clear();
     
     iTerminal->iRequestedQuery = NULL;
     EUNIT_ASSERT( iTerminal->RequestedQuery() == NULL );
@@ -481,7 +512,7 @@
                                          KCapabilityTestDataFeature,
                                          KCapabilitySwisFeature,
                                          KCapabilityTestAcceptHeader,
-                                         KCapabilityTestTerminalID_B );
+                                         KCapabilityTestTerminalID_B);
     CleanupStack::PushL( options );
     
     iTerminal->QueryRequestedL( *options );
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_availabilityDllMain.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/UT_availabilityDllMain.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -46,7 +46,6 @@
 #include "UT_CMusAvaSipProfileRegistryObserver.h"
 #include "UT_CMusAvaSipheaderUtil.h"
 #include "UT_CMusAvaClientResolverUtil.h"
-#include "UT_CMusAvaCallEventMonitor.h"
 
 
 //  EXTERNAL INCLUDES
@@ -139,13 +138,18 @@
     
     rootSuite->AddL( UT_CMusAvaClientResolverUtil::NewLC() );
     CleanupStack::Pop();
-
-	rootSuite->AddL( UT_CMusAvaCallEventMonitor::NewLC() );
-    CleanupStack::Pop();
-
+    	
     CleanupStack::Pop(); // rootSuite
 
     return rootSuite;
     }
 
+
+
 //  END OF FILE
+
+
+
+
+
+
--- a/mmsharing/mmshavailability/tsrc/ut_availability/src/musavacapabilitytesthelper.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshavailability/tsrc/ut_availability/src/musavacapabilitytesthelper.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -26,7 +26,7 @@
                                            const TDesC8& aAcceptContact, 
                                            const TDesC8& aContact,
                                            const TDesC8& aAccept,
-                                           const TDesC8& aUserAgent )
+                                           const TDesC8& aUserAgent)
     {
     
     CSIPServerTransaction* srvtransaction = 
@@ -113,8 +113,7 @@
     CleanupStack::Pop( fromheader );
     requestelements->SetToHeaderL(toheader); 
     CleanupStack::Pop( toheader );
-
-    
+  
     requestelements->SetMethodL( SIPStrings::StringF( SipStrConsts::EOptions ) );
     
     srvtransaction->SetRequestElements( requestelements );
@@ -133,7 +132,8 @@
                                            const TDesC8& aContact,
                                            const TDesC8& aAccept,
                                            const TDesC8& aUserAgent,
-                                           const TDesC8& aAssertId )
+                                           const TDesC8& aAssertId,
+                                           const TDesC8& aSdp)
     {
     
     CSIPServerTransaction* srvtransaction = 
@@ -233,6 +233,19 @@
     
     requestelements->SetMethodL( SIPStrings::StringF( SipStrConsts::EOptions ) );
     
+    CSIPMessageElements& message = requestelements->MessageElements();
+    if ( aSdp.Length() > 0 )
+        {
+        CSIPContentTypeHeader* contenttype = 
+            CSIPContentTypeHeader::NewLC( KMUSAVASIPMediaTypeApplication,
+                                         KMUSAVASIPMediaSubTypeSDP );
+        HBufC8* content = aSdp.AllocLC();
+        
+        message.SetContentL( content, contenttype );
+        CleanupStack::Pop( content );
+        CleanupStack::Pop( contenttype );      
+        }
+    
     srvtransaction->SetRequestElements( requestelements );
     CleanupStack::Pop( requestelements );
     CleanupStack::Pop( srvtransaction );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/bwins/musengineu.def	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,75 @@
+EXPORTS
+	?SetAudioRoutingObserver@CMusEngSession@@QAEXPAVMMusEngAudioRoutingObserver@@@Z @ 1 NONAME ; void CMusEngSession::SetAudioRoutingObserver(class MMusEngAudioRoutingObserver *)
+	?ParseUriL@TMusEngUriParser@@QAEXXZ @ 2 NONAME ; void TMusEngUriParser::ParseUriL(void)
+	?EnableLoudspeakerL@CMusEngSession@@QAEXHH@Z @ 3 NONAME ; void CMusEngSession::EnableLoudspeakerL(int, int)
+	?CancelInviteL@CMusEngMceOutSession@@QAEXXZ @ 4 NONAME ; void CMusEngMceOutSession::CancelInviteL(void)
+	?SetClipL@CMusEngClipSession@@QAEXABVTDesC16@@@Z @ 5 NONAME ; void CMusEngClipSession::SetClipL(class TDesC16 const &)
+	?VolumeL@CMusEngSession@@QBEHXZ @ 6 NONAME ; int CMusEngSession::VolumeL(void) const
+	?IsMicMutedL@CMusEngSession@@QAEHXZ @ 7 NONAME ; int CMusEngSession::IsMicMutedL(void)
+	?FastRewindL@CMusEngClipSession@@QAEXH@Z @ 8 NONAME ; void CMusEngClipSession::FastRewindL(int)
+	?ZoomDefaultL@CMusEngLiveSession@@QAEXXZ @ 9 NONAME ; void CMusEngLiveSession::ZoomDefaultL(void)
+	?GetUri16L@TMusEngUriParser@@QAEPAVHBufC16@@H@Z @ 10 NONAME ; class HBufC16 * TMusEngUriParser::GetUri16L(int)
+	?VolumeUpL@CMusEngSession@@UAEXXZ @ 11 NONAME ; void CMusEngSession::VolumeUpL(void)
+	?SetVolumeChangeObserver@CMusEngSession@@QAEXPAVMMusEngVolumeChangeObserver@@@Z @ 12 NONAME ; void CMusEngSession::SetVolumeChangeObserver(class MMusEngVolumeChangeObserver *)
+	?UriType@TMusEngUriParser@@QAE?AW4TMusEngUriType@1@XZ @ 13 NONAME ; enum TMusEngUriParser::TMusEngUriType TMusEngUriParser::UriType(void)
+	?IsMutedL@CMusEngMceSession@@QAEHXZ @ 14 NONAME ; int CMusEngMceSession::IsMutedL(void)
+	?DurationL@CMusEngClipSession@@QAE?AVTTimeIntervalSeconds@@XZ @ 15 NONAME ; class TTimeIntervalSeconds CMusEngClipSession::DurationL(void)
+	??0TMusEngUriParser@@QAE@ABVTDesC16@@@Z @ 16 NONAME ; TMusEngUriParser::TMusEngUriParser(class TDesC16 const &)
+	?AcceptInvitationL@CMusEngReceiveSession@@QAEXABH@Z @ 17 NONAME ; void CMusEngReceiveSession::AcceptInvitationL(int const &)
+	?CurrentZoomL@CMusEngLiveSession@@QBEHXZ @ 18 NONAME ; int CMusEngLiveSession::CurrentZoomL(void) const
+	?MinBrightnessL@CMusEngLiveSession@@QBEHXZ @ 19 NONAME ; int CMusEngLiveSession::MinBrightnessL(void) const
+	?GetUri8L@TMusEngUriParser@@QAEPAVHBufC8@@XZ @ 20 NONAME ; class HBufC8 * TMusEngUriParser::GetUri8L(void)
+	?NewL@CMusEngLiveSession@@SAPAV1@ABVTRect@@AAVMMusEngSessionObserver@@AAVMMusEngOutSessionObserver@@AAVMMusEngLiveSessionObserver@@I@Z @ 21 NONAME ; class CMusEngLiveSession * CMusEngLiveSession::NewL(class TRect const &, class MMusEngSessionObserver &, class MMusEngOutSessionObserver &, class MMusEngLiveSessionObserver &, unsigned int)
+	?UnmuteL@CMusEngMceSession@@UAEXXZ @ 22 NONAME ; void CMusEngMceSession::UnmuteL(void)
+	?MaxBrightnessL@CMusEngLiveSession@@QBEHXZ @ 23 NONAME ; int CMusEngLiveSession::MaxBrightnessL(void) const
+	?MinZoomL@CMusEngLiveSession@@QBEHXZ @ 24 NONAME ; int CMusEngLiveSession::MinZoomL(void) const
+	?VolumeDownL@CMusEngSession@@UAEXXZ @ 25 NONAME ; void CMusEngSession::VolumeDownL(void)
+	?OrientationL@CMusEngMceSession@@QAE?AW4TDisplayOrientation@1@XZ @ 26 NONAME ; enum CMusEngMceSession::TDisplayOrientation CMusEngMceSession::OrientationL(void)
+	?SetSupportedVideoCodecListL@CMusEngMceOutSession@@QAEXABVTDesC16@@@Z @ 27 NONAME ; void CMusEngMceOutSession::SetSupportedVideoCodecListL(class TDesC16 const &)
+	?MuteL@CMusEngMceSession@@UAEXXZ @ 28 NONAME ; void CMusEngMceSession::MuteL(void)
+	?IsRecording@CMusEngLiveSession@@QAEHXZ @ 29 NONAME ; int CMusEngLiveSession::IsRecording(void)
+	?SetVolumeL@CMusEngSession@@UAEXH@Z @ 30 NONAME ; void CMusEngSession::SetVolumeL(int)
+	?DecreaseBrightnessL@CMusEngLiveSession@@QAEXXZ @ 31 NONAME ; void CMusEngLiveSession::DecreaseBrightnessL(void)
+	?CancelTranscodeL@CMusEngClipSession@@QAEXXZ @ 32 NONAME ; void CMusEngClipSession::CancelTranscodeL(void)
+	?IsAudioRoutingHeadset@CMusEngSession@@QBEHXZ @ 33 NONAME ; int CMusEngSession::IsAudioRoutingHeadset(void) const
+	?PauseL@CMusEngClipSession@@UAEXXZ @ 34 NONAME ; void CMusEngClipSession::PauseL(void)
+	?BrightnessDefaultL@CMusEngLiveSession@@QAEXXZ @ 35 NONAME ; void CMusEngLiveSession::BrightnessDefaultL(void)
+	?FastForwardL@CMusEngClipSession@@QAEXH@Z @ 36 NONAME ; void CMusEngClipSession::FastForwardL(int)
+	?SetZoomL@CMusEngLiveSession@@QAEXH@Z @ 37 NONAME ; void CMusEngLiveSession::SetZoomL(int)
+	?SetRectL@CMusEngSession@@QAEXABVTRect@@@Z @ 38 NONAME ; void CMusEngSession::SetRectL(class TRect const &)
+	?NewL@CMusEngClipSession@@SAPAV1@ABVTRect@@AAVMMusEngSessionObserver@@AAVMMusEngOutSessionObserver@@AAVMMusEngClipSessionObserver@@I@Z @ 39 NONAME ; class CMusEngClipSession * CMusEngClipSession::NewL(class TRect const &, class MMusEngSessionObserver &, class MMusEngOutSessionObserver &, class MMusEngClipSessionObserver &, unsigned int)
+	?BrightnessAutoL@CMusEngLiveSession@@QAEXXZ @ 40 NONAME ; void CMusEngLiveSession::BrightnessAutoL(void)
+	?IncreaseBrightnessL@CMusEngLiveSession@@QAEXXZ @ 41 NONAME ; void CMusEngLiveSession::IncreaseBrightnessL(void)
+	?InviteL@CMusEngMceOutSession@@QAEXABVTDesC16@@@Z @ 42 NONAME ; void CMusEngMceOutSession::InviteL(class TDesC16 const &)
+	?SetOrientationL@CMusEngMceSession@@QAEXW4TDisplayOrientation@1@@Z @ 43 NONAME ; void CMusEngMceSession::SetOrientationL(enum CMusEngMceSession::TDisplayOrientation)
+	?IsLoudSpeakerEnabled@CMusEngSession@@QBEHXZ @ 44 NONAME ; int CMusEngSession::IsLoudSpeakerEnabled(void) const
+	?ContainsAudioL@CMusEngMceSession@@QAEHXZ @ 45 NONAME ; int CMusEngMceSession::ContainsAudioL(void)
+	?NewL@CMusEngReceiveSession@@SAPAV1@ABVTRect@@AAVMMusEngSessionObserver@@AAVMMusEngReceiveSessionObserver@@@Z @ 46 NONAME ; class CMusEngReceiveSession * CMusEngReceiveSession::NewL(class TRect const &, class MMusEngSessionObserver &, class MMusEngReceiveSessionObserver &)
+	?VolumeUpL@CMusEngMceSession@@UAEXXZ @ 47 NONAME ; void CMusEngMceSession::VolumeUpL(void)
+	?IsPlayingL@CMusEngClipSession@@UAEHXZ @ 48 NONAME ; int CMusEngClipSession::IsPlayingL(void)
+	?PlayL@CMusEngClipSession@@UAEXXZ @ 49 NONAME ; void CMusEngClipSession::PlayL(void)
+	?ZoomInL@CMusEngLiveSession@@QAEXXZ @ 50 NONAME ; void CMusEngLiveSession::ZoomInL(void)
+	?PauseL@CMusEngLiveSession@@UAEXXZ @ 51 NONAME ; void CMusEngLiveSession::PauseL(void)
+	?GetSessionTime@CMusEngMceSession@@QBE?AVTTimeIntervalSeconds@@XZ @ 52 NONAME ; class TTimeIntervalSeconds CMusEngMceSession::GetSessionTime(void) const
+	?SetVolumeL@CMusEngMceSession@@UAEXH@Z @ 53 NONAME ; void CMusEngMceSession::SetVolumeL(int)
+	?Rect@CMusEngSession@@QBE?AVTRect@@XZ @ 54 NONAME ; class TRect CMusEngSession::Rect(void) const
+	?IsDisplayEnabledL@CMusEngMceSession@@QAEHXZ @ 55 NONAME ; int CMusEngMceSession::IsDisplayEnabledL(void)
+	?IsAudioRoutingLoudSpeaker@CMusEngSession@@QBEHXZ @ 56 NONAME ; int CMusEngSession::IsAudioRoutingLoudSpeaker(void) const
+	?SetBrightnessL@CMusEngLiveSession@@QBEXH@Z @ 57 NONAME ; void CMusEngLiveSession::SetBrightnessL(int) const
+	?TranscodeL@CMusEngClipSession@@QAEXABV?$TBuf@$0BAA@@@@Z @ 58 NONAME ; void CMusEngClipSession::TranscodeL(class TBuf<256> const &)
+	?MaxZoomL@CMusEngLiveSession@@QBEHXZ @ 59 NONAME ; int CMusEngLiveSession::MaxZoomL(void) const
+	?VolumeDownL@CMusEngMceSession@@UAEXXZ @ 60 NONAME ; void CMusEngMceSession::VolumeDownL(void)
+	?ZoomOutL@CMusEngLiveSession@@QAEXXZ @ 61 NONAME ; void CMusEngLiveSession::ZoomOutL(void)
+	?ConnectionActive@CMusEngMceSession@@QBEHXZ @ 62 NONAME ; int CMusEngMceSession::ConnectionActive(void) const
+	?PositionL@CMusEngClipSession@@QAE?AVTTimeIntervalSeconds@@XZ @ 63 NONAME ; class TTimeIntervalSeconds CMusEngClipSession::PositionL(void)
+	?AudioRoutingCanBeChanged@CMusEngSession@@QBEHXZ @ 64 NONAME ; int CMusEngSession::AudioRoutingCanBeChanged(void) const
+	?MuteMicL@CMusEngSession@@QAEXH@Z @ 65 NONAME ; void CMusEngSession::MuteMicL(int)
+	?NewL@CMusEngLiveSession@@SAPAV1@ABVTDesC16@@ABVTRect@@AAVMMusEngSessionObserver@@AAVMMusEngOutSessionObserver@@AAVMMusEngLiveSessionObserver@@I@Z @ 66 NONAME ; class CMusEngLiveSession * CMusEngLiveSession::NewL(class TDesC16 const &, class TRect const &, class MMusEngSessionObserver &, class MMusEngOutSessionObserver &, class MMusEngLiveSessionObserver &, unsigned int)
+	?EnableDisplayL@CMusEngMceSession@@UAEXH@Z @ 67 NONAME ; void CMusEngMceSession::EnableDisplayL(int)
+	?CurrentBrightnessL@CMusEngLiveSession@@QBEHXZ @ 68 NONAME ; int CMusEngLiveSession::CurrentBrightnessL(void) const
+	?RecordL@CMusEngLiveSession@@QAEXH@Z @ 69 NONAME ; void CMusEngLiveSession::RecordL(int)
+	?IsPlayingL@CMusEngLiveSession@@UAEHXZ @ 70 NONAME ; int CMusEngLiveSession::IsPlayingL(void)
+	?TerminateL@CMusEngMceSession@@QAEXXZ @ 71 NONAME ; void CMusEngMceSession::TerminateL(void)
+	?PlayL@CMusEngLiveSession@@UAEXXZ @ 72 NONAME ; void CMusEngLiveSession::PlayL(void)
+	?SetPositionL@CMusEngClipSession@@QAEXABVTTimeIntervalSeconds@@@Z @ 73 NONAME ; void CMusEngClipSession::SetPositionL(class TTimeIntervalSeconds const &)
+
--- a/mmsharing/mmshengine/data/20021341.rss	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "registryinfov2.rh"
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-    dll_uid = 0x20021341;
-    interfaces = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x20021340;
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = 0x20021341;
-                    version_no = 1;
-                    default_data = "MultimediaSharing";
-                    }            
-                };
-            }
-        };
-    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/eabi/musengineu.def	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,94 @@
+EXPORTS
+	_ZN14CMusEngSession10SetVolumeLEi @ 1 NONAME
+	_ZN14CMusEngSession11IsMicMutedLEv @ 2 NONAME
+	_ZN14CMusEngSession11VolumeDownLEv @ 3 NONAME
+	_ZN14CMusEngSession18EnableLoudspeakerLEii @ 4 NONAME
+	_ZN14CMusEngSession23SetAudioRoutingObserverEP27MMusEngAudioRoutingObserver @ 5 NONAME
+	_ZN14CMusEngSession23SetVolumeChangeObserverEP27MMusEngVolumeChangeObserver @ 6 NONAME
+	_ZN14CMusEngSession8MuteMicLEi @ 7 NONAME
+	_ZN14CMusEngSession8SetRectLERK5TRect @ 8 NONAME
+	_ZN14CMusEngSession9VolumeUpLEv @ 9 NONAME
+	_ZN16TMusEngUriParser7UriTypeEv @ 10 NONAME
+	_ZN16TMusEngUriParser8GetUri8LEv @ 11 NONAME
+	_ZN16TMusEngUriParser9GetUri16LEi @ 12 NONAME
+	_ZN16TMusEngUriParser9ParseUriLEv @ 13 NONAME
+	_ZN16TMusEngUriParserC1ERK7TDesC16 @ 14 NONAME
+	_ZN16TMusEngUriParserC2ERK7TDesC16 @ 15 NONAME
+	_ZN17CMusEngMceSession10SetVolumeLEi @ 16 NONAME
+	_ZN17CMusEngMceSession10TerminateLEv @ 17 NONAME
+	_ZN17CMusEngMceSession11VolumeDownLEv @ 18 NONAME
+	_ZN17CMusEngMceSession12OrientationLEv @ 19 NONAME
+	_ZN17CMusEngMceSession14ContainsAudioLEv @ 20 NONAME
+	_ZN17CMusEngMceSession14EnableDisplayLEi @ 21 NONAME
+	_ZN17CMusEngMceSession15SetOrientationLENS_19TDisplayOrientationE @ 22 NONAME
+	_ZN17CMusEngMceSession17IsDisplayEnabledLEv @ 23 NONAME
+	_ZN17CMusEngMceSession5MuteLEv @ 24 NONAME
+	_ZN17CMusEngMceSession7UnmuteLEv @ 25 NONAME
+	_ZN17CMusEngMceSession8IsMutedLEv @ 26 NONAME
+	_ZN17CMusEngMceSession9VolumeUpLEv @ 27 NONAME
+	_ZN18CMusEngClipSession10IsPlayingLEv @ 28 NONAME
+	_ZN18CMusEngClipSession10TranscodeLERK4TBufILi256EE @ 29 NONAME
+	_ZN18CMusEngClipSession11FastRewindLEi @ 30 NONAME
+	_ZN18CMusEngClipSession12FastForwardLEi @ 31 NONAME
+	_ZN18CMusEngClipSession12SetPositionLERK20TTimeIntervalSeconds @ 32 NONAME
+	_ZN18CMusEngClipSession16CancelTranscodeLEv @ 33 NONAME
+	_ZN18CMusEngClipSession4NewLERK5TRectR22MMusEngSessionObserverR25MMusEngOutSessionObserverR26MMusEngClipSessionObserverj @ 34 NONAME
+	_ZN18CMusEngClipSession5PlayLEv @ 35 NONAME
+	_ZN18CMusEngClipSession6PauseLEv @ 36 NONAME
+	_ZN18CMusEngClipSession8SetClipLERK7TDesC16 @ 37 NONAME
+	_ZN18CMusEngClipSession9DurationLEv @ 38 NONAME
+	_ZN18CMusEngClipSession9PositionLEv @ 39 NONAME
+	_ZN18CMusEngLiveSession10IsPlayingLEv @ 40 NONAME
+	_ZN18CMusEngLiveSession11IsRecordingEv @ 41 NONAME
+	_ZN18CMusEngLiveSession12ZoomDefaultLEv @ 42 NONAME
+	_ZN18CMusEngLiveSession15BrightnessAutoLEv @ 43 NONAME
+	_ZN18CMusEngLiveSession18BrightnessDefaultLEv @ 44 NONAME
+	_ZN18CMusEngLiveSession19DecreaseBrightnessLEv @ 45 NONAME
+	_ZN18CMusEngLiveSession19IncreaseBrightnessLEv @ 46 NONAME
+	_ZN18CMusEngLiveSession4NewLERK5TRectR22MMusEngSessionObserverR25MMusEngOutSessionObserverR26MMusEngLiveSessionObserverj @ 47 NONAME
+	_ZN18CMusEngLiveSession4NewLERK7TDesC16RK5TRectR22MMusEngSessionObserverR25MMusEngOutSessionObserverR26MMusEngLiveSessionObserverj @ 48 NONAME
+	_ZN18CMusEngLiveSession5PlayLEv @ 49 NONAME
+	_ZN18CMusEngLiveSession6PauseLEv @ 50 NONAME
+	_ZN18CMusEngLiveSession7RecordLEi @ 51 NONAME
+	_ZN18CMusEngLiveSession7ZoomInLEv @ 52 NONAME
+	_ZN18CMusEngLiveSession8SetZoomLEi @ 53 NONAME
+	_ZN18CMusEngLiveSession8ZoomOutLEv @ 54 NONAME
+	_ZN20CMusEngMceOutSession13CancelInviteLEv @ 55 NONAME
+	_ZN20CMusEngMceOutSession27SetSupportedVideoCodecListLERK7TDesC16 @ 56 NONAME
+	_ZN20CMusEngMceOutSession7InviteLERK7TDesC16 @ 57 NONAME
+	_ZN21CMusEngReceiveSession17AcceptInvitationLERKi @ 58 NONAME
+	_ZN21CMusEngReceiveSession4NewLERK5TRectR22MMusEngSessionObserverR29MMusEngReceiveSessionObserver @ 59 NONAME
+	_ZNK14CMusEngSession20IsLoudSpeakerEnabledEv @ 60 NONAME
+	_ZNK14CMusEngSession21IsAudioRoutingHeadsetEv @ 61 NONAME
+	_ZNK14CMusEngSession24AudioRoutingCanBeChangedEv @ 62 NONAME
+	_ZNK14CMusEngSession4RectEv @ 63 NONAME
+	_ZNK14CMusEngSession7VolumeLEv @ 64 NONAME
+	_ZNK17CMusEngMceSession14GetSessionTimeEv @ 65 NONAME
+	_ZNK17CMusEngMceSession16ConnectionActiveEv @ 66 NONAME
+	_ZNK18CMusEngLiveSession12CurrentZoomLEv @ 67 NONAME
+	_ZNK18CMusEngLiveSession14MaxBrightnessLEv @ 68 NONAME
+	_ZNK18CMusEngLiveSession14MinBrightnessLEv @ 69 NONAME
+	_ZNK18CMusEngLiveSession14SetBrightnessLEi @ 70 NONAME
+	_ZNK18CMusEngLiveSession18CurrentBrightnessLEv @ 71 NONAME
+	_ZNK18CMusEngLiveSession8MaxZoomLEv @ 72 NONAME
+	_ZNK18CMusEngLiveSession8MinZoomLEv @ 73 NONAME
+	_ZTI14CMusEngSession @ 74 NONAME
+	_ZTI17CMusEngMceSession @ 75 NONAME
+	_ZTI18CMusEngClipSession @ 76 NONAME
+	_ZTI18CMusEngLiveSession @ 77 NONAME
+	_ZTI20CMusEngMceOutSession @ 78 NONAME
+	_ZTI21CMusEngReceiveSession @ 79 NONAME
+	_ZTI21CMusEngTelephoneUtils @ 80 NONAME
+	_ZTI21CMusSipProfileHandler @ 81 NONAME
+	_ZTI27CMusEngSessionDurationTimer @ 82 NONAME
+	_ZTV14CMusEngSession @ 83 NONAME
+	_ZTV17CMusEngMceSession @ 84 NONAME
+	_ZTV18CMusEngClipSession @ 85 NONAME
+	_ZTV18CMusEngLiveSession @ 86 NONAME
+	_ZTV20CMusEngMceOutSession @ 87 NONAME
+	_ZTV21CMusEngReceiveSession @ 88 NONAME
+	_ZTV21CMusEngTelephoneUtils @ 89 NONAME
+	_ZTV21CMusSipProfileHandler @ 90 NONAME
+	_ZTV27CMusEngSessionDurationTimer @ 91 NONAME
+	_ZNK14CMusEngSession25IsAudioRoutingLoudSpeakerEv @ 92 NONAME
+
--- a/mmsharing/mmshengine/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -18,6 +18,4 @@
 #include <platform_paths.hrh>
 
 PRJ_MMPFILES
-musengineplugin.mmp
-
-
+musengine.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/group/musengine.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description:
+*
+*/
+
+// using relative paths for sourcepath and user includes
+// exports are unfrozen
+
+#include <platform_paths.hrh>
+
+#include "../../../inc/musuid.hrh"
+
+// Capability assignment.
+CAPABILITY 	CAP_GENERAL_DLL
+
+// Vendor ID assignment.
+VENDORID	VID_DEFAULT
+
+
+TARGET        musengine.dll
+TARGETTYPE    dll
+UID           0x1000008d KMusEngineUid // 0x10282392
+
+//DOCUMENT	  Generic_Symbian_DLL_ReadMe.txt
+
+SOURCEPATH  	../src
+SOURCE      	musengsession.cpp
+SOURCE      	musengmcesession.cpp
+SOURCE      	musengmceoutsession.cpp
+SOURCE          musenglivesession.cpp
+SOURCE          musengreceivesession.cpp
+SOURCE      	musengtelephoneutils.cpp
+SOURCE      	musengsessiondurationtimer.cpp
+SOURCE          musengclipsession.cpp
+SOURCE          musenguriparser.cpp
+SOURCE          musengmceutils.cpp
+SOURCE			musengorientationhandler.cpp
+
+// SIP API
+SOURCE		    mussipprofilehandler.cpp
+
+
+USERINCLUDE 	../inc
+USERINCLUDE 	../../mmshshared/inc
+USERINCLUDE   ../../inc
+USERINCLUDE   ../../../inc
+
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY     euser.lib
+LIBRARY     bafl.lib
+LIBRARY     inetprotutil.lib
+LIBRARY	    phoneclient.lib
+LIBRARY	    centralrepository.lib
+
+LIBRARY	    sipprofilecli.lib
+LIBRARY	    sipclient.lib
+LIBRARY     sipcodec.lib
+LIBRARY     mceclient.lib  
+LIBRARY     drmcommon.lib
+LIBRARY     charconv.lib
+LIBRARY     telephonyaudiorouting.lib
+LIBRARY     efsrv.lib
+LIBRARY     cenrepnotifhandler.lib	
+
+DEBUGLIBRARY		flogger.lib
+
+PAGED
--- a/mmsharing/mmshengine/group/musengineplugin.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-* 
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET         musengineplugin.dll
-TARGETTYPE     PLUGIN
-UID            0x10009D8D 0x20021341
-VENDORID       VID_DEFAULT
-CAPABILITY     CAP_ECOM_PLUGIN
-
-SOURCEPATH     ../data
-START RESOURCE 20021341.rss
-TARGET         musengineplugin.rsc
-END
-
-SOURCEPATH  	../src
-SOURCE      	musenginepluginentry.cpp
-SOURCE      	musengsessionmanager.cpp
-SOURCE      	musengmcesession.cpp
-SOURCE      	musengmceoutsession.cpp
-SOURCE          musenglivesession.cpp
-SOURCE          musengreceivesession.cpp
-SOURCE          musengtwowaysession.cpp
-SOURCE          musengtwowayrecvsession.cpp
-SOURCE      	musengtelephoneutils.cpp
-SOURCE      	musengsessiondurationtimer.cpp
-SOURCE	        musengclipsession.cpp
-SOURCE          musenguriparser.cpp
-SOURCE          musengmceutils.cpp
-SOURCE          mussipprofilehandler.cpp
-SOURCE          musengcamerahandler.cpp
-SOURCE          musengvideoplayerbase.cpp
-SOURCE          musenglocalvideoplayer.cpp
-SOURCE          musenglivevideoplayer.cpp
-SOURCE          musengremotevideoplayer.cpp
-SOURCE          musengclipvideoplayer.cpp
-
-SOURCEPATH  	../../mmshshared/src
-SOURCE			muspropertywatch.cpp
-
-USERINCLUDE 	../inc
-USERINCLUDE 	../../mmshshared/inc
-USERINCLUDE     ../../inc
-USERINCLUDE     ../../../inc
-
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE 	/epoc32/include/ecom
-
-LIBRARY         euser.lib
-LIBRARY         bafl.lib
-LIBRARY         inetprotutil.lib
-LIBRARY		phoneclient.lib
-LIBRARY		centralrepository.lib
-LIBRARY		sipprofilecli.lib
-LIBRARY		sipclient.lib
-LIBRARY         sipcodec.lib
-LIBRARY 	mceclient.lib  
-LIBRARY 	drmcommon.lib
-LIBRARY		charconv.lib
-LIBRARY         telephonyaudiorouting.lib
-LIBRARY         cntmodel.lib ecom.lib
-DEBUGLIBRARY    flogger.lib
--- a/mmsharing/mmshengine/inc/musengaudioroutingobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengaudioroutingobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -19,13 +19,13 @@
 #ifndef MUSENGAUDIOROUTINGOBSERVER_H
 #define MUSENGAUDIOROUTINGOBSERVER_H
 
-// INCLUDES
-#include <e32std.h>
 
 // CLASS DECLARATION
 
 /**
-* An interface to get notifcations when the audio routing changes
+* An interface to be implemented by users of Multimedia Sharing Engine if 
+* they wish to be notified about changes in audio routing.
+*
 */
 class MMusEngAudioRoutingObserver
     {
@@ -33,10 +33,21 @@
     public:
 
         /**
-        * The audio routing has changed.
+        * Indicates that some other application has changed audio routing.
+        * @param aShowNote ETrue if notification of current change should be
+        *        shown.
+        *
         */
-        virtual void AudioRoutingChanged() = 0;
+        virtual void AudioRoutingChanged( TBool aShowNote ) = 0;
+
+        /**
+        * Observer is required to give information whether audio route change
+        * is allowed currently.
+        * @param ETrue if change is allowed, otherwise EFalse
+        *
+        */
+        virtual TBool AudioRouteChangeAllowed() const = 0;
         
     };
 
-#endif // MUSENGAUDIOROUTINGOBSERVER_H
+#endif // INCLUDE GUARD
\ No newline at end of file
--- a/mmsharing/mmshengine/inc/musengcamerahandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGCAMERAHANDLER_H
-#define MUSHENGCAMERAHANDLER_H
-
-// USER
-#include "musunittesting.h"
-#include "mussettings.h"
-
-// SYSTEM
-#include <lccameracontrol.h>
-#include <lcbrightnesscontrol.h>
-#include <lczoomcontrol.h>
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class CMceCameraSource;
-class CMceSession;
-
-// CLASS
-
-class TMusEngCameraHandler :    
-    public MLcCameraControl,
-    public MLcBrightnessControl,
-    public MLcZoomControl
-    {
-    MUS_UNITTEST( UT_CMusEngOutSession )
-    MUS_UNITTEST( UT_CMusEngLiveSession )
-    MUS_UNITTEST( UT_CMusEngTwoWaySession )
-    MUS_UNITTEST( UT_CMusEngTwoWayRecvSession )
-    MUS_UNITTEST( UT_TMusEngCameraHandler )       
-        
-    public: // From MLcCameraControl
-        
-        TInt LcCameraCountL();
-
-        TInt CurrentLcCameraIndex();
-        
-        void ToggleLcCameraL();       
-
-    public: // From MLcBrightnessControl
-        
-        TInt MinLcBrightnessL();
-
-        TInt MaxLcBrightnessL();
-
-        TInt LcBrightnessL();
-
-        void SetLcBrightnessL( TInt aValue );
-        
-        void IncreaseLcBrightnessL();
-        
-        void DecreaseLcBrightnessL();
-        
-    public: // From MLcZoomControl
-        
-        TInt MinLcZoomL();
-
-        TInt MaxLcZoomL();
-
-        TInt LcZoomValueL();
-
-        void SetLcZoomValueL( TInt aValue );
-        
-        void LcZoomInL();
-        
-        void LcZoomOutL();     
-    
-    public:
-        
-        /**
-        * Resumes previously paused session. 
-        * Continues using viewfinder and enables streaming video.
-        *
-        */
-        void PlayL();
-        
-        /**
-        * Pauses session.
-        * Holds display and disables streaming video to network.
-        *
-        */
-        void PauseL();
-        
-        /**
-        * Tells whether session is paused or not
-        */
-        TBool IsPlayingL();
-                       
-    public:
-        
-        TMusEngCameraHandler();
-        
-        void SetSession( CMceSession* aSession );
-        
-        void InitializeL( CMceCameraSource& aCamera );
-        
-        void InitializeZoomStepSize();
-        
-        void ReadCameraUsageKeyL();
-        
-        TInt ZoomStepSize( TInt64& aTime );
-
-    private:
-    
-        enum TCurrentCamera
-            {
-            ECameraNotAvailable = KErrNotFound,
-            EBackCamera = 0, 
-            EFrontCamera = 1
-            };         
-   
-    private: // New functions
-        
-        TInt CamerasAvailableL( TCurrentCamera& aCurrentCamera );
-
-        void ChangeCameraL( TCurrentCamera aCurrentCamera );
-        
-        void ChangeActiveCameraL( TCurrentCamera aNewCamera );
-        
-    private: // Data
-        
-        CMceSession* iSession; // Not owned
-        
-        TCameraInfo iCameraInfo;
-
-        TInt iDefaultBrightness;
-        
-        TInt64 iZoomInTime;
-        
-        TInt64 iZoomOutTime;        
-                      
-        TInt iSmallZoomStep;
-        
-        TInt iBigZoomStep;
-        
-        TCurrentCamera iCurrentCamera;
-        
-        MusSettingsKeys::TUseCamera iCameraUsage;    
-    };
-
-#endif
-
--- a/mmsharing/mmshengine/inc/musengclipsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengclipsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -23,35 +23,116 @@
 #include "musengmceoutsession.h"
 #include "musunittesting.h"
 
+
 class MMusEngClipSessionObserver;
 class CMusEngLiveSession;
 class CMceFileSource;
 class CMceAudioStream;
 class CMceVideoStream;
 class CMceAudioCodec;
-class CMusEngClipVideoPlayer;
-
 
 class CMusEngClipSession : public CMusEngMceOutSession
     {
     MUS_UNITTEST( UT_CMusEngClipSession )
-    MUS_UNITTEST( UT_CMusEngMceSession )
     
-    public: // Constructors and destructor
+    public:
 
         /**
-        * Constructor
+        *
         */
-        static CMusEngClipSession* NewL();
+        IMPORT_C static CMusEngClipSession* NewL( 
+                                const TRect& aRect,
+                                MMusEngSessionObserver& aSessionObserver,
+                                MMusEngOutSessionObserver& aOutSessionObserver,
+                                MMusEngClipSessionObserver& aClipSessionObserver,
+                                TUint aSipProfileId = 0 );
                                                   
         /**
-        * Destructor
+        *
         */
         ~CMusEngClipSession();
 
-    public: // from MLcSession
-    
-        MLcVideoPlayer* LocalVideoPlayer();
+
+    public: // new API
+        
+        /**
+        * Sets file to be shared during session.
+        * @pre File cannot be DRM protected
+        * @post InviteL can be called
+        * @leave One of the system wide error codes
+        * @param aFileName Name of the file to be shared
+        */
+        IMPORT_C void SetClipL( const TDesC& aFileName );
+        
+        /**
+        * Starts or stops fast forwarding the clip. Clip is left paused after
+        * stopping the fast forwarding.
+        * @pre Session is ongoing
+        * @param aUseFFWD ETrue to start FFWD, EFalse to stop it.
+        */
+        IMPORT_C void FastForwardL( TBool aUseFFWD );
+
+        /**
+        * Starts or stops fast rewinding the clip. Clip is left paused after
+        * stopping the fast rewinding.
+        * @pre Session is ongoing
+        * @param aUseFRWD ETrue to start FRWD, EFalse to stop it.
+        */
+        IMPORT_C void FastRewindL( TBool aUseFRWD );
+
+        /**
+        * Returns current position as time interval.
+        */
+        IMPORT_C TTimeIntervalSeconds PositionL();
+
+        /**
+        * Returns duration of current clip as time interval
+        */
+        IMPORT_C TTimeIntervalSeconds DurationL();
+
+        /**
+        *
+        */
+        IMPORT_C void SetPositionL (const TTimeIntervalSeconds &aPosition);
+
+        /**
+        * Starts transcoding of file. After the transcoding is complete,
+        * file to be shared is changed into the transcoded file.
+        * @pre MMusEngClipSessionObserver::TranscodingNeeded is called
+        * @param aFileName Name of the transcoding output file.
+        */
+        IMPORT_C void TranscodeL( const TFileName& aFileName );
+
+        /**
+        * Cancels transcoding of file. 
+        * @pre TranscodeL has been called succesfully and transcoding 
+        *      is not completed
+        */
+        IMPORT_C void CancelTranscodeL();
+
+
+    public: // implementation of virtual API from CMusEngMceOutSession
+
+        /**
+        * Resumes previously paused session. 
+        * Continues showing file on display, resumes clip's audio, continues
+        * playing file and enables streaming to network.
+        * @leave KErrNotReady if called during FFWD or FRWD
+        */
+        IMPORT_C void PlayL();
+
+        /**
+        * Pauses session.
+        * Holds display, mutes clip's audio, pauses file and 
+        * disables all streaming to network.
+        * @leave KErrNotReady if called during FFWD or FRWD
+        */
+        IMPORT_C void PauseL();
+
+        /**
+        * Tells whether session is paused or not
+        */
+        IMPORT_C TBool IsPlayingL();
 
 
     protected: // implementation of virtual helper from CMusEngMceOutSession
@@ -92,26 +173,86 @@
 
     private:
 
-        CMusEngClipSession();
+        /**
+        *
+        */
+        CMusEngClipSession( MMusEngSessionObserver& aSessionObserver,
+                            MMusEngOutSessionObserver& aOutSessionObserver,
+                            MMusEngClipSessionObserver& aClipSessionObserver,
+                            const TRect& aRect );
 
-        void ConstructL();
+        /**
+        * @leave KErrPermissionDenied if file is DRM protected
+        */
+        void ConstructL( TUint aSipProfileId );
 
 
     private: // HELPERS
+
+        /**
+        *
+        */
+        TBool IsProtectedFileL( const TDesC& aClipFile );
         
         void AddAmrCodecL( CMceAudioStream& aAudioStream );
         
-        void AddVideoCodecL( CMceVideoStream& aVideoStream );
+        void AddVideoCodecL( CMceVideoStream& aVideoStream, TBool aIgnoreNegotiated = EFalse );
+        
+        TBool HasClipEnded();
         
+        TBool IsRewindFromEnd();
+
+        /**
+        * Returns current position as microseconds.
+        */
+        TTimeIntervalMicroSeconds PositionMicroSecondsL();
+
+        /**
+        * Constructs audio stream structure during session completion and adds
+        * it to session.
+        * @param aLocalBundle All local streams are supposed to be added to
+        *        this bundle
+        * @pre iSession != NULL
+        */
         void ConstructAudioStructureL( CMceStreamBundle& aLocalBundle );
         
-        void DetermineBufferingPeriod( CMceMediaStream& aStream );    
+        void DetermineBufferingPeriod( CMceMediaStream& aStream );
+            
+        TBool IsH264Supported() const;
+        
+        void HandleTranscodingFailureL( TInt aError );
+        
+        TInt DoCompleteTranscoding();
+        
+        void DeleteTranscodingDestinationFileL();
 
     private: // Data
+    
+        /**
+        * Reference to live session observer interface.
+        */
+        MMusEngClipSessionObserver& iClipSessionObserver;
         
-        CMusEngClipVideoPlayer* iClipVideoPlayer;
+        TFileName iFileName;
+        
+        TBool iTranscodingOngoing;
+        
+        TTime iFFWDStartTime;
+        TTime iFRWDStartTime;
+        
         TTime iBufferingStartedTime;
+        TTimeIntervalMicroSeconds iBufferingPeriod;
+        
+        TTimeIntervalMicroSeconds iDelayFileEndingPos; 
+        TTimeIntervalMicroSeconds iPreviousPos;
+        TBool iClipEnded;
+        
+        TFileName iTranscodingDestFileName;
+        TBool iRewindedToBeginning;
+        TBool iTranscodingRequiredDueMissingOptions;
+        TBool iPause;
+        
     };
 
-#endif // MUSHENGCLIPSESSION_H
+#endif
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/inc/musengclipsessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSENGCLIPSESSIONOBSERVER_H
+#define MUSENGCLIPSESSIONOBSERVER_H
+
+// INCLUDES
+#include <e32def.h>
+
+// CLASS DECLARATION
+
+/**
+*  An interface to be implemented by users of Multimedia Sharing Engine 
+*  if they wish to receive clip sharing specific events.
+*
+*  This observer is set using CMusEngClipSession::SetSessionObserver function.
+*
+*/
+class MMusEngClipSessionObserver
+    {
+    public: 
+    
+        /**
+	    * Indicates that shared clip has ended.
+	    */
+        virtual void EndOfClip() = 0;        
+        
+        /**
+	    * Indicates that chosen clip must be transcoded before sharing.
+	    * @param aDueUnknownRemoteCapabilities, ETrue if transcoding is needed because
+	    *  it is unknown whether remote end can support current format of clip.
+	    */
+        virtual void TranscodingNeeded(TBool aDueUnknownRemoteCapabilities) = 0;
+        
+        /**
+	    * Indicates that transcoding has progressed.
+	    * @param aPercentage Percentage of completion
+	    */
+        virtual void TranscodingProgressed( TInt aPercentage ) = 0;
+        
+        /**
+	    * Indicates that transcoding has successfully complited
+	    * but session establishment is not yet proceeding.
+	    */
+        virtual void TranscodingCompletedInit() = 0;
+        
+        /**
+	    * Indicates that transcoding has successfully complited
+	    * and session establishment continues.
+	    */
+        virtual void TranscodingCompletedFinalize() = 0;
+        
+        /**
+	    * Indicates that transcoding has failed.
+	    */
+        virtual void TranscodingFailed() = 0;
+        
+        /**
+	    * Handle specific case that rewinding from end of file.
+	    */
+        virtual void RewindFromEndL() = 0;
+    };
+
+#endif
--- a/mmsharing/mmshengine/inc/musengclipvideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGCLIPVIDEOPLAYER_H
-#define MUSHENGCLIPVIDEOPLAYER_H
-
-// INCLUDES
-#include "musenglocalvideoplayer.h"
-#include "musunittesting.h"
-#include <lcsourcefilecontrol.h>
-
-// CLASS DECLARATION
-class CMusEngClipVideoPlayer : 
-    public CMusEngLocalVideoPlayer,
-    public MLcSourceFileControl
-    {
-    MUS_UNITTEST( UT_CMusEngClipVideoPlayer )
-    
-    public: // Constructors and destructor
-        
-        static CMusEngClipVideoPlayer* NewL( 
-            MMusEngDisplayHandler& aDisplayHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-        ~CMusEngClipVideoPlayer();
-        
-    public: // New functions
-        
-        TBool HasClipEnded();
-        
-        void SetBufferingPeriod( const TTimeIntervalMicroSeconds& aPeriod );
-        
-    public: // From MLcVideoPlayer
-        
-        TBool LcIsPlayingL();
-        
-        void LcPlayL();
-        
-        void LcPauseL();
-        
-        MLcSourceFileControl* LcSourceFileControl();
-        
-    public: // From MLcSourceFileControl      
-        
-        void SetLcFileNameL( const TFileName& aFileName );
-        
-        TFileName& LcFileName();
-
-        void LcFastForwardL( TBool aUseFFWD );
-
-        void LcFastRewindL( TBool aUseFRWD );
-        
-        TTimeIntervalSeconds LcFileDurationL();
-
-        TTimeIntervalSeconds LcFilePositionL();
-
-        void SetLcFilePositionL( const TTimeIntervalSeconds& aPosition );        
-        
-    private: // Constructors
-        
-        CMusEngClipVideoPlayer(
-            MMusEngDisplayHandler& aDisplayHandler,
-            MLcAudioControl& aLcAudioControl );       
-        
-    private: // Helper functions
-        
-        TBool IsProtectedFileL( const TDesC& aClipFile );
-        
-        TTimeIntervalMicroSeconds PositionMicroSecondsL( 
-            TBool aActualPosition = EFalse );
-        
-        TTimeIntervalMicroSeconds GetVideoSinkRelativeFilePos( 
-            const TTimeIntervalMicroSeconds& aActualPosition,
-            const TTimeIntervalMicroSeconds& aDuration );        
-        
-    private: // Data
-            
-        TFileName iFileName;
-        TTime iFFWDStartTime;
-        TTime iFRWDStartTime;
-        TTimeIntervalMicroSeconds iBufferingPeriod;
-        TTimeIntervalMicroSeconds iDelayFileEndingPos;
-        TTimeIntervalMicroSeconds iPreviousPos;
-        TBool iRewindedToBeginning;
-    };
-
-#endif // MUSHENGCLIPVIDEOPLAYER_H
-
-// End of file
-
--- a/mmsharing/mmshengine/inc/musengdisplayhandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGDISPLAYHANDLER_H
-#define MUSHENGDISPLAYHANDLER_H
-
-
-#include <e32std.h>
-
-// CLASS DECLARATION
-
-/**
-* An Interface for display services
-*
-* @lib museng.lib
-* @since S60 v3.2
-*/
-class MMusEngDisplayHandler
-    {
-
-    public:
-        
-        /*
-        * Defines possible rotations 
-        */
-        enum TDisplayOrientation
-            {
-            EPortrait, // Normal
-            ELandscape // 90 degree's clockwise rotation
-            };
-
-        /**
-        * Returns currently assigned drawing area
-        *
-        * @return TRect This session drawing area rectangle
-        */
-        virtual TRect Rect() const = 0;
-
-        /**
-        * Sets new drawing area
-        *
-        * @param TRect This session new drawing area rectangle
-        */
-        virtual void SetRectL( const TRect& aRect ) = 0;
-        
-        /**
-        * Sets secondary rect (e.g. viewfinder in twoway session)
-        * @param TRect This session new secondary drawing area rectangle
-        */
-        virtual void SetSecondaryRectL( const TRect& aSecondaryRect ) = 0;
-        
-        /**
-        * Gets secondary rect.
-        * @return TRect This session secondary drawing area rectangle
-        */
-        virtual TRect SecondaryRect() const = 0;
-        
-        /**
-        * Enables or disables display. Call to this function is considered
-        * as a permission or denial to draw to the display.
-        */
-        virtual void EnableDisplayL( TBool aEnable ) = 0;
-        
-        /**
-        * Check whether display is enabled 
-        */
-        virtual TBool IsDisplayEnabled() = 0;
-        
-        /**
-        * Returns current display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Current display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        virtual TDisplayOrientation OrientationL() = 0;
-        
-        /**
-        * Sets display orientation.
-        *
-        * @pre Session is ongoing
-        * @return Sets display orientation 
-        * @leave KErrNotReady if precondition is not fullfilled
-        */
-        virtual void SetOrientationL( TDisplayOrientation aOrientation ) = 0;
-        
-        /**
-        * Check if display is actively displaying content
-        * @return ETrue if is displaying content, otherwise EFalse
-        */
-        virtual TBool IsDisplayActive() = 0;
-    };
-
-#endif
--- a/mmsharing/mmshengine/inc/musenglivesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musenglivesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,37 +16,66 @@
 */
 
 
-#ifndef MUSENGLIVESESSION_H
-#define MUSENGLIVESESSION_H
+#ifndef MUSHENGLIVESESSION_H
+#define MUSHENGLIVESESSION_H
 
 // USER
 #include "musengmceoutsession.h"
 #include "musunittesting.h"
-#include "mussettings.h"
-#include "musengcamerahandler.h"
 
 // SYSTEM
-#include <lcvideoplayer.h>
+#include <ecam.h>
 
 // FORWARD DECLARATIONS
 class MMusEngLiveSessionObserver;
-class CMusEngLiveVideoPlayer;
-
+class CMusEngOrientationHandler;
 
-class CMusEngLiveSession : 
-    public CMusEngMceOutSession
+class CMusEngLiveSession : public CMusEngMceOutSession
     {
-    MUS_UNITTEST( UT_CMusEngMceSession )
     MUS_UNITTEST( UT_CMusEngOutSession )
     MUS_UNITTEST( UT_CMusEngLiveSession )
-    
+    MUS_UNITTEST( UT_CMusEngOrientationHandler )
+
     public:
+
+        /**
+        * Creates new MultimediaSharing Live session.
+        *
+        * @param aFileName Media filename
+        * @param aRect UI drawing area. It is allowed handle from engine
+        * @param aSessionObserver Interface for session specific callbacks
+        * @param aOutSessionObserver Interface for outsession specific callbacks
+        * @param aLiveSessionObserver interface for live session specific
+        *        callbacks
+        * @param aSipProfileId SIP profile to be used, 0 is default profile
+        * @return CMusEngLiveSession* New instanse of specified class
+        */
+        IMPORT_C static CMusEngLiveSession* NewL( 
+							const TDesC& aFileName,
+                            const TRect& aRect,
+                            MMusEngSessionObserver& aSessionObserver,
+                            MMusEngOutSessionObserver& aOutSessionObserver,
+                            MMusEngLiveSessionObserver& aLiveSessionObserver,
+                            TUint aSipProfileId = 0);
                             
         /**
         * Creates new MultimediaSharing Live session.
+        *
+        * @param aRect UI drawing area. It is allowed handle from engine
+        * @param aSessionObserver Interface for session specific callbacks
+        * @param aOutSessionObserver Interface for outsession specific callbacks
+        * @param aLiveSessionObserver interface for live session specific
+        *        callbacks
+        * @param aSipProfileId SIP profile to be used, 0 is default profile
         * @return CMusEngLiveSession* New instanse of specified class
         */
-        static CMusEngLiveSession* NewL();
+        IMPORT_C static CMusEngLiveSession* NewL( 
+                            const TRect& aRect,
+                            MMusEngSessionObserver& aSessionObserver,
+                            MMusEngOutSessionObserver& aOutSessionObserver,
+                            MMusEngLiveSessionObserver& aLiveSessionObserver,
+                            TUint aSipProfileId = 0 );
+
 
     public:
 
@@ -55,10 +84,169 @@
         */
         ~CMusEngLiveSession();
 
-    public: // from MLcSession
-    
-        MLcVideoPlayer* LocalVideoPlayer();  
+
+
+    public: // NEW LIVE SESSION SPECIFIC API FUNCTIONS
+
+        /**
+        * Gets current zoom factor
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C TInt CurrentZoomL() const;
+        
+        /**
+        * Sets new zoom factor
+        * 
+        * @pre Session is established
+        * @pre MinZoomL <= aNewZoomFactor <= MaxZoomL
+        * @leave KErrNotReady if session is not established
+        */
+        IMPORT_C void SetZoomL( TInt aNewZoomFactor );
+        
+        /**
+        * Gets minimum zoom factor
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C TInt MinZoomL() const;
+
+        /**
+        * Gets maximum zoom factor
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C TInt MaxZoomL() const;
         
+        /**
+        * Increases zoom factor by one.
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C void ZoomInL();
+
+        /**
+        * Decreases zoom factor by one.
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C void ZoomOutL();
+
+        /**
+        * Sets zoom factor to default.
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C void ZoomDefaultL();
+
+        /**
+        * Sets current brightness
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C void SetBrightnessL( TInt aBrightness ) const;
+
+
+        /**
+        * Gets current brightness
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C TInt CurrentBrightnessL() const;
+
+        /**
+        * Gets maximum brightness
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C TInt MaxBrightnessL() const;
+
+        /**
+        * Gets minimum brightness
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C TInt MinBrightnessL() const;
+
+        /**
+        * Increases brightness by one.
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C void IncreaseBrightnessL();
+
+        /**
+        * Decreases brightness by one.
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C void DecreaseBrightnessL();
+
+        /**
+        * Sets brightness factor to default.
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C void BrightnessDefaultL();
+
+        /**
+        * Sets brightness to automatic.
+        * 
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        */
+        IMPORT_C void BrightnessAutoL();
+
+        /**
+        * Starts or pauses recording
+        */
+        IMPORT_C void RecordL( TBool aRecord );
+
+        /**
+        * Tells whether recording is paused or not
+        */
+        IMPORT_C TBool IsRecording();
+        
+        
+    public: // implementation of virtual API from CMusEngMceOutSession
+
+        /**
+        * Resumes previously paused session. 
+        * Continues using viewfinder and enables streaming video.
+        *
+        */
+        IMPORT_C void PlayL();
+
+        /**
+        * Pauses session.
+        * Holds display and disables streaming video to network.
+        *
+        */
+        IMPORT_C void PauseL();
+
+        /**
+        * Tells whether session is paused or not
+        */
+        IMPORT_C TBool IsPlayingL();
+        
+        void EnableDisplayL( TBool aEnable );
+        
+        void RefreshOrientationL();
+
+
     protected: // inherited from CMusEngMceOutSession
 
         /**
@@ -68,7 +256,15 @@
 		void CompleteSessionStructureL( CMceStreamBundle& aLocalBundle );
 
 
-    protected: // overrides ancestor class versions
+    private: // overrides ancestor class versions
+    
+        /**
+        * The state of the session has changed
+        * @param aSession, the session that has changed.
+        */
+        virtual void HandleSessionStateChanged( CMceSession& aSession,
+                                                TInt aStatusCode,
+                                                const TDesC8& aReasonPhrase );
                                                 
         /**
         * Sets Multimediasharing specific video codec settings like video 
@@ -76,8 +272,7 @@
         * in session. This function overrides function in ancestor classes. 
         * Function calls also overridden version.
         */ 
-        virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                        TMceSourceType aSourceType );
+        virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec );
         
         /**
         * Sets Multimediasharing specific audio codec settings. This functions 
@@ -92,7 +287,7 @@
         virtual void DoCodecSelectionL( CMceVideoStream& aVideoStream );
    
 
-    protected: // from MMceStreamObserver, 
+    private: // from MMceStreamObserver, 
              // overrides the function in CMusEngMceSession
 
         /**
@@ -105,24 +300,124 @@
                                  CMceMediaSink& aSink );    
                                  
 
-    protected:
+    private:
 
         /**
         * Constructor
         */
-        CMusEngLiveSession();
+        CMusEngLiveSession( MMusEngSessionObserver& aSessionObserver,
+                            MMusEngOutSessionObserver& aOutSessionObserver,
+                            MMusEngLiveSessionObserver& aLiveSessionObserver,
+        					const TRect& aRect,
+        					const TDesC& aRecordedFile = KNullDesC );
 
         /**
         * Second-phase constructor
         */
-        void ConstructL();
+        void ConstructL( TUint aSipProfileId );
+
+    
+    private: // Helpers
+    
+        /**
+        * Reads from CenRep and sets encoding device for a codec.
+        */
+        void SetEncodingDeviceL( CMceVideoCodec& aVideoCodec );
 
+        /**
+        * Sets configuration key for a codec
+        */
+        void SetCodecConfigKeyL( CMceVideoCodec& aVideoCodec );
+    
+        /**
+        * Reads proper configuration key for a codec. NULL if not available.
+        * Ownership is transferred.
+        */
+        HBufC8* ReadCodecConfigKeyL( const CMceVideoCodec& aVideoCodec ) const;
+        
+        /**
+        * Constructs and stores to cenrep a concatenation of all AVC config keys.
+        */
+        void StoreEncoderConfigInfoL() const;
+        
+        /**
+        * Returns config key id for the provided codec. Ownership is transferred
+        */
+        const TPtrC8 ConfigKeyIdL( const CMceVideoCodec& aVideoCodec ) const;
+        
+
+        /**
+        *    Calculate the zoom step size based time escaped. 
+        * 
+        * @param aTime, start time. pass iZoomInTime or iZoomOutTime as parameter
+        * @return TInt, return calculate result of the step size  
+        */
+        TInt ZoomStepSize( TInt64& aTime );
+        
+        /**
+         *  Calculates iMinZoomStep and iMaxZoomStep zoom step sizes,
+         *  should be called before first ZoomIn()/ZoomOut() call
+         */
+        void InitializeZoomStepSize();
+        
+        
+    private:
 
-    protected:
+        /**
+        * Reference to live session observer interface.
+        */
+        MMusEngLiveSessionObserver& iLiveSessionObserver;
+
+        /**
+        *
+        */
+        TCameraInfo iCameraInfo;
+
+        /**
+        *
+        */
+        TInt iDefaultZoomFactor;
+
+        /**
+        *
+        */
+        TInt iDefaultBrightness;
+
+        /**
+        * File name for recording. If KNullDesC no recording performed.
+        */
+        TFileName iRecordedFile;
         
-        TMusEngCameraHandler iCameraHandler;
-        CMusEngLiveVideoPlayer* iLiveVideoPlayer;
+        /**
+        * If true, configuration key of current AVC codec must be written to
+        * CenRep after session establishment.
+        */
+        TBool iStoreEncoderConfigInfo;
+        
+        /**
+        * latest Zoomin time
+        */
+
+        TInt64 iZoomInTime;
+
+        /**
+        * latest Zoomout time
+        */
+        TInt64 iZoomOutTime;        
+                       
+        /**
+        *
+        */
+        TInt iSmallZoomStep;
+
+        /**
+        *
+        */
+        TInt iBigZoomStep;
+        
+        CMusEngOrientationHandler* iOrientationHandler;
+        
     };
 
-#endif // MUSENGLIVESESSION_H
+#endif
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/inc/musenglivesessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSHENGLIVESESSIONOBSERVER_H
+#define MUSHENGLIVESESSIONOBSERVER_H
+
+
+
+// CLASS DECLARATION
+
+/**
+*  An interface to be implemented by clients of Multimedia Sharing Engine if 
+*  they wish to receive events about live sharing specific event.
+*/
+class MMusEngLiveSessionObserver
+    {
+    
+    public:
+    
+        /**    
+    	* Indicates that disk has run out of space during recording.
+    	*/
+    	virtual void DiskFull() = 0;
+    	
+    	/**
+    	 * Orientation refresh ended.
+    	 */
+    	virtual void OrientationRefreshEnded() = 0;
+		
+    };
+
+#endif
--- a/mmsharing/mmshengine/inc/musenglivevideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGLIVEVIDEOPLAYER_H
-#define MUSHENGLIVEVIDEOPLAYER_H
-
-// INCLUDES
-#include "musenglocalvideoplayer.h"
-#include <lcdestinationfilecontrol.h>
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class TMusEngCameraHandler;
-
-// CLASS DECLARATION
-class CMusEngLiveVideoPlayer : 
-    public CMusEngLocalVideoPlayer,
-    public MLcDestinationFileControl
-    {
-    public: // Constructors and destructor
-        
-        static CMusEngLiveVideoPlayer* NewL( 
-            MMusEngDisplayHandler& aDisplayHandler,
-            TMusEngCameraHandler& aCameraHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-        ~CMusEngLiveVideoPlayer();
-        
-    public: // From MLcVideoPlayer
-        
-        TBool LcIsPlayingL();
-        
-        void LcPlayL( TLcVideoPlayerSource aSource=ECameraSource );
-        
-        void LcPauseL();
-
-        MLcCameraControl* LcCameraControl();
-        
-        MLcDestinationFileControl* LcDestinationFileControl();
-            
-        MLcZoomControl* LcZoomControl();
-    
-        MLcBrightnessControl* LcBrightnessControl(); 
-        
-    public: // From MLcDestinationFileControl
-
-        void SetLcFileNameL( const TFileName& aFileName );
-        
-        TFileName& LcFileName();
-
-        void LcRecordL( TBool aRecord );
-
-        TBool LcIsRecording();
-        
-    private: // Constructors
-        
-        CMusEngLiveVideoPlayer(
-            MMusEngDisplayHandler& aDisplayHandler,
-            TMusEngCameraHandler& aCameraHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-    private: // Data
-        
-        TFileName iFileName;
-        TMusEngCameraHandler& iCameraHandler;
-    };
-
-#endif // MUSHENGLIVEVIDEOPLAYER_H
--- a/mmsharing/mmshengine/inc/musenglocalvideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGLOCALVIDEOPLAYER_H
-#define MUSHENGLOCALVIDEOPLAYER_H
-
-// INCLUDES
-#include "musengvideoplayerbase.h"
-
-// CLASS DECLARATION
-class CMusEngLocalVideoPlayer : public CMusEngVideoPlayerBase
-    {
-    public: // Constructors and destructor
-        
-        ~CMusEngLocalVideoPlayer();
-        
-    public: // from CMusEngVideoPlayerBase
-        
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        void SetLcWindowRectL( TRect aRect );
-        
-        TRect LcWindowRect();
-        
-    protected: // Constructors
-        
-        CMusEngLocalVideoPlayer(
-            MMusEngDisplayHandler& aDisplayHandler,
-            MLcAudioControl& aLcAudioControl );
-    };
-
-#endif // MUSHENGLOCALVIDEOPLAYER_H
--- a/mmsharing/mmshengine/inc/musengmceoutsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengmceoutsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -23,8 +23,9 @@
 #include "musengmcesession.h"
 #include "musunittesting.h"
 
+
 // FORWARD DECLARATIONS
-class MLcUiProvider;
+class MMusEngOutSessionObserver;
 class CMceStreamBundle;
 
 // CLASS DECLARATION
@@ -45,14 +46,54 @@
         */
         ~CMusEngMceOutSession();
 
-    public: // From MLcSession
-        
-        const TDesC& RemoteDisplayName();
+
+    public: // NEW API FUNCTIONS
+
+        /**
+        * Sends invite to specified address. Session establishment is done in 
+        * pause mode meaning that no RTP will be sent to network as a 
+        * consequence of established session. PlayL() can be called any time 
+        * during session establishment or after that in order to allow 
+        * RTP sending.
+        * @leave KErrAlreadyExists if session establishment is already 
+        *        in progress
+        */
+        IMPORT_C void InviteL( const TDesC& aRecipient );
+
+        /**
+        * Cancels Invite.
+        * @pre Invite is sent
+        */
+        IMPORT_C void CancelInviteL( );
         
-        void EstablishLcSessionL();
-        
-        void TerminateLcSessionL();        
-        
+        /**
+        * If codecs supported by recipient are known e.g. because of OPTIONS
+        * query, they can be communicated to engine via this function
+        * @param aVideoCodecs Comma separated list of supported codecs 
+        */
+        IMPORT_C void SetSupportedVideoCodecListL( const TDesC& aVideoCodecs );
+
+
+    public: // VIRTUAL API
+     
+        /**
+        * Resumes previously paused session. Exact behavior depends on 
+        * exact session type.
+        */
+        virtual void PlayL() = 0;
+
+        /**
+        * Pauses session. Exact behavior depends on exact session type.
+        */
+        virtual void PauseL() = 0;
+
+        /**
+        * Tells whether session is paused or not
+        * @pre Call of InviteL has been completed
+        */
+        virtual TBool IsPlayingL() = 0;
+
+
     protected: // Must be implemented in derived class
 
         /**
@@ -62,7 +103,6 @@
         virtual void CompleteSessionStructureL( 
                                         CMceStreamBundle& aLocalBundle ) = 0;
     
-        virtual void AddDisplayL( CMceMediaStream& aStream );
     
     protected: // May be overridden in derived classes
          
@@ -75,15 +115,7 @@
         */
         virtual void EstablishSessionL();
         
-        TBool IsH264Supported() const;
 
-        /**
-         *
-         */        
-        virtual void CreateMceSessionStructureL( TBool aForceSdpBandwidth =  
-                                                  EFalse );
-
-         
     protected: // helper function inherited from CMusEngMceSession
 
         /**
@@ -97,8 +129,7 @@
         * session. This function overrides function in base class and may 
         * be further overridden. Function calls also overridden version.
         */ 
-        void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec, 
-                                TMceSourceType aSourceType );
+        void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec );
         
         /**
         * Sets Multimediasharing specific audio codec settings like audio and
@@ -114,66 +145,60 @@
         /**
         * Constructor
         */
-        CMusEngMceOutSession();
+        CMusEngMceOutSession( const TRect& aRect,
+                              MMusEngSessionObserver& aSessionObserver,
+                              MMusEngOutSessionObserver& aOutSessionObserver );
 
         /**
         * Second-phase constructor
         */
-        void ConstructL();
+        void ConstructL( TUint aSipProfileId );
 
-        
-    private: // from MMusSipProfileUser, overrides base class definition
-            
-        virtual void ProfileRegistered();
- 
-        
-     private:
-        
-        void DoInviteL( const TDesC& aRecipient = KNullDesC );
-       
-        HBufC* ResolveRecipientLC();  
-        
-        static TInt AsyncBrakeCompleted( TAny* aPtr );
-        
-        static TInt RegistrationTimerExpired( TAny* aPtr );
+
+    private:
 
-        static TInt InvitationResponseTimerExpired( TAny* aPtr );
+        /**
+        *
+        */
+        void CreateMceSessionStructureL();  
         
-        void InitRecipientNotFoundHandling();
-
-        void HandleRecipientNotFound();
+        /**
+        * Add privacy sip header if call privacy is switched on else otherwise.
+        */
+        void AddPrivacyHeaderL( CDesC8Array& aHeaders );
         
-        TBool DoSyncRetryL();
+        
+    protected: // DATA
 
-        void SplitL( const TDesC& aDes, const TDesC& aChar, CDesCArray* aArray );
+        /**
+        * Callback reference to outsession observer interface.
+        */
+        MMusEngOutSessionObserver& iOutSessionObserver;
         
-        HBufC* ReadDescPropertyL( TUint aKey );
-
-        TBool IgnoreErrorNote();
+        /**
+        * ETrue if operator specific behavior is expected
+        */
+        TBool iPrivate; 
         
-        HBufC* RemoteAddressL() const;
+        /**
+        * ETrue if private number is turn on
+        */
+        TBool iPrivateNumber;
         
-        void InputRecipientL( TDes& aRecipientAddress );
     
     protected: // DATA
     
-        HBufC* iRemoteDisplayName;
-        HBufC8* iRecipient;      
+        /**
+        * Recipient of session to be constructed
+        */
+        HBufC8* iRecipient;
+        
         HBufC8* iVideoCodecList;
-        TInt iTriedInvitations;
-        HBufC* iRemoteSipAddressProposal;
-        CDeltaTimer* iDeltaTimer;
-        TCallBack iAsyncBrakeCallBack;
-        TDeltaTimerEntry iAsyncBrakeEntry;
-        TCallBack iRegistrationCallBack;
-        TCallBack iInvitationResponseCallBack;
-        TDeltaTimerEntry iRegistrationEntry;
-        TDeltaTimerEntry iInvitationResponseEntry;
-        TBool iRegistrationPending;
-        TBool iAddressQueried;
+        
         
     private:
     
         MUS_UNITTEST ( UT_CMusEngOutSession )
+
     };
 #endif //MUSHENGMCESESSION_H
--- a/mmsharing/mmshengine/inc/musengmcesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengmcesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,27 +16,22 @@
 */
 
 
-#ifndef MUSENGMCESESSION_H
-#define MUSENGMCESESSION_H
+#ifndef MUSHENGMCESESSION_H
+#define MUSHENGMCESESSION_H
 
 // USER
+#include "musengsession.h"
 #include "musengsessiondurationtimerobserver.h"
 #include "musunittesting.h"
 #include "mussipprofileuser.h"
-#include "musengdisplayhandler.h"
-#include "musengaudioroutingobserver.h"
 
 // SYSTEM
-#include <lcsession.h>
-#include <lcaudiocontrol.h>
 #include <mcesessionobserver.h>
 #include <mceinsessionobserver.h>
 #include <mcestreamobserver.h>
 #include <mcertpobserver.h>
 #include <mcetransactiondatacontainer.h>
-#include <mcemediasource.h>
 
-// FORWARD DECLARATIONS
 class CMceManager;
 class CMceSession;
 class CMceVideoStream;
@@ -44,10 +39,8 @@
 class CMceVideoCodec;
 class CMceAudioCodec;
 class CMusEngSessionDurationTimer;
+class MMusEngSessionObserver;
 class CMusSipProfileHandler;
-class CMusEngTelephoneUtils;
-class MMusEngAudioRoutingObserver;
-class MLcSessionObserver;
 
 // CONSTANTS
 
@@ -58,20 +51,14 @@
 _LIT8( KMusEngSessionSdpLineXApplication, "a=X-application:com.nokia.rtvs\r\n" );
 _LIT8( KMusEngSessionSdpLineApplication , "a=application:com.gsma.rts\r\n" );
 _LIT8( KMusEngSessionSdpLineType, "a=type:videolive\r\n" );
-_LIT8( KMusEngSessionSdpLineBandwidthLine  , "b=AS:" );
+_LIT8( KMusEngSessionSdpLineBandwidthLine  , "b=AS" );
 _LIT8( KMusEngSessionSdpLineBandwidthField  , "b=AS:85\r\n" );
-_LIT8( KMusEngSessionSdpLineTiasLine  , "b=TIAS:" );
 _LIT8( KMusPPreferredIdentity, "P-Preferred-Identity" );
-_LIT8( KMusEngNewLine  , "\r\n" );
+_LIT8( KMusPrivacyHeader, "Privacy" );
+_LIT8( KMusAnonymousHeader, "\"Anonymous\" <sip:anonymous@anonymous.invalid>" );
 
-const TInt KMusTiasMultiplier = 1000;
-const TUint8 KMusEngRtpKeepAliveTimer = 5;
-const TUint8 KMusEngKeepAlivePayloadTypeVideoH263 = 96;
-const TUint8 KMusEngKeepAlivePayloadTypeAudio = 97;
-const TUint8 KMusEngKeepAlivePayloadTypeVideoAvc = 98;
-
-// Value for uninitialized rect
-const TInt KMusEngRectNotInit = 1000;
+const TInt KMusEngMaxVolume = 10;
+const TInt KMusEngMinVolume = 0;
 
 // CLASS DECLARATION
 
@@ -85,18 +72,26 @@
 *
 * @lib musengine.lib
 */
-class CMusEngMceSession : public CBase,
-                          public MLcSession,
-                          public MLcAudioControl,
+class CMusEngMceSession : public CMusEngSession,
                           public MMceSessionObserver,
                           public MMceInSessionObserver,
                           public MMceStreamObserver,
                           public MMceRtpObserver,
                           public MMusEngSessionDurationTimerObserver,
-                          public MMusSipProfileUser,
-                          public MMusEngDisplayHandler,
-                          public MMusEngAudioRoutingObserver
+                          public MMusSipProfileUser
     {
+    
+    public: 
+    
+        /*
+        * Defines possible rotations 
+        */
+        enum TDisplayOrientation
+            {
+            EPortrait, // Normal
+            ELandscape // 90 degree's clockwise rotation
+            };
+        
     public:
 
         /**
@@ -104,35 +99,51 @@
         */
         ~CMusEngMceSession();
 
-        
-    public: //  from MMusEngDisplayHandler
+
+    public: // API FUNCTIONS
+
+        /**
+        * Terminates session. 
+        *
+        * @pre Session is established
+        * @post Session is ready to be deleted
+        * @leave KErrNotReady if precondition is not fullfilled
+        */
+        IMPORT_C void TerminateL();
 
         /**
-        * Returns currently assigned drawing area
+        * Get session time return estabilished session time
+        *
+        * @return TTime returns time if connection established else < 0
+        */
+        IMPORT_C TTimeIntervalSeconds GetSessionTime() const;
+
+        /**
+        * Returns current connection state
         *
-        * @return TRect This session drawing area rectangle
+        * @return TBool returns current connection state
         */
-        TRect Rect() const;
+        IMPORT_C TBool ConnectionActive() const;
+
+        /**
+        * Returns presence or absence of audio in session.
+        *
+        * @pre Session is ongoing
+        * @return ETrue if session contains audio.
+        * @leave KErrNotReady if precondition is not fullfilled
+        */
+        IMPORT_C TBool ContainsAudioL();
         
         /**
-        * Sets new drawing area
+        * Returns state of local playback meaning if playback is muted or not.
         *
-        * @param TRect This session new drawing area rectangle
+        * @pre Session is ongoing
+        * @return ETrue if session does not contain audio or contained 
+        *         audio is muted.
+        * @leave KErrNotReady if precondition is not fullfilled
         */
-        void SetRectL( const TRect& aRect );
-        
-        /**
-        * Sets secondary rect (e.g. viewfinder in twoway session)
-        * @param TRect This session new secondary drawing area rectangle
-        */
-        void SetSecondaryRectL( const TRect& aSecondaryRect );
-        
-        /**
-        * Gets secondary rect.
-        * @return TRect This session secondary drawing area rectangle
-        */
-        virtual TRect SecondaryRect() const;
-            
+        IMPORT_C TBool IsMutedL();
+
         /**
         * Returns current display orientation.
         *
@@ -140,7 +151,7 @@
         * @return Current display orientation 
         * @leave KErrNotReady if precondition is not fullfilled
         */
-        TDisplayOrientation OrientationL();
+        IMPORT_C TDisplayOrientation OrientationL();
         
         /**
         * Sets display orientation.
@@ -149,106 +160,79 @@
         * @return Sets display orientation 
         * @leave KErrNotReady if precondition is not fullfilled
         */
-        void SetOrientationL( TDisplayOrientation aOrientation );
+        IMPORT_C void SetOrientationL( TDisplayOrientation aOrientation );
+        
+        /**
+        * Returns state of the screen device.
+        * 
+        * @pre Session is ongoing
+        */
+        IMPORT_C TBool IsDisplayEnabledL();
+
+    public: // VIRTUAL API
+
+        // No virtual api
+
+
+    public: //  from CMusEngSession  
+
+        /**
+        * Increases volume level by one
+        *
+        * @pre Session is ongoing
+        */
+        IMPORT_C void VolumeUpL();
+
+        /**
+        * Decreases volume level by one
+        *
+        * @pre Session is ongoing
+        */
+        IMPORT_C void VolumeDownL();
+        
+        /**
+        * Set volume value
+        * @pre Session is ongoing
+        * @param aVal the value of volume 
+        */
+        IMPORT_C void SetVolumeL( TInt aVal );
 
         /**
         * Permission to draw on screen device.
         * 
         * @pre Session is ongoing
         */
-        void EnableDisplayL( TBool aEnable );
-        
+        IMPORT_C void EnableDisplayL( TBool aEnable );
+
         /**
-        * Implements virtual from MMusEngDisplayHandler
-        *
-        * @pre Session is ongoing
-        */
-        TBool IsDisplayEnabled();
-        
-        /**
-        * Implements virtual from MMusEngDisplayHandler
+        * Implements virtual from CMusEngSession
         *
         * @pre Session is ongoing
         */
-        TBool IsDisplayActive();
-
-        
-    public: // From MMusEngAudioRoutingObserver
-        
-        void AudioRoutingChanged();        
-        
-        
-    public: // From MLcSession
-        
-        virtual TLcSessionState LcSessionState() const;
-        
-        void SetLcSessionObserver( MLcSessionObserver* aObserver );
+        IMPORT_C void MuteL();
 
-        void SetLcUiProvider( MLcUiProvider* aUiProvider );        
-        
-        virtual MLcVideoPlayer* RemoteVideoPlayer();
-    
-        virtual MLcVideoPlayer* LocalVideoPlayer();       
-       
-        virtual const TDesC& LocalDisplayName();
-    
-        virtual const TDesC& RemoteDisplayName();
-
-        TInt SetParameter( TInt aId, TInt aValue );
-
-        TInt ParameterValue( TInt aId );    
-        
-        TBool IsBackgroundStartup();
-        
-        TInt SetForegroundStatus( TBool aIsForeground );
-        
-        const TDesC& RemoteDetails();
+        /**
+        * Implements virtual from CMusEngSession
+        *
+        * @pre Session is ongoing
+        */
+        IMPORT_C void UnmuteL();
         
-        void UpdateLcSessionL();
-        
-        TBool SendDialTone( TChar aKey);
-        
-        
-    public: // From MLcAudioControl
+        void RefreshOrientationL();
         
-        TBool IsLcAudioMutedL();
-
-        void MuteLcAudioL( TBool aMute );       
-
-        TBool IsLcMicMutedL();    
-
-        void MuteLcMicL( TBool aMute );
-        
-        TBool IsEnablingLcLoudspeakerAllowed();
 
-        void EnableLcLoudspeakerL( TBool aEnabled );
-        
-        TBool IsLcLoudspeakerEnabled();
-
-        TInt LcVolumeL();
-     
-        void SetLcVolumeL( TInt aValue );    
-    
-        void IncreaseLcVolumeL();
-        
-        void DecreaseLcVolumeL();        
-
-    public:
-        
-        MLcSessionObserver* LcSessionObserver();
-        
-        MLcUiProvider* LcUiProvider();
-        
     protected: // CONSTRUCTORS
 
         /**
         * Constructor
         *
         */
-        CMusEngMceSession();
+        CMusEngMceSession( const TRect& aRect,
+                           MMusEngSessionObserver& aSessionObserver );
 
         /**
         * Second-phase constructor
+        *
         */
         void ConstructL();
         
@@ -274,8 +258,7 @@
         * gets called for every video codec in session. To be overridden in 
         * sibling classes if needed.
         */ 
-        virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                        TMceSourceType aSourceType );
+        virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec );
         
         /**
         * Sets Multimediasharing specific audio codec settings like audio MMF 
@@ -291,27 +274,13 @@
         */
         virtual void DoCodecSelectionL( CMceVideoStream& aVideoStream );
         
-        virtual void RectChangedL();
         
     protected: // HELPER FUNCTIONS
 
-        void InformObserverAboutSessionStateChange();
-        
-        void InformObserverAboutSessionUpdate();
-        
-        void InformObserverAboutSessionFailure( TInt aReason );
-        
-        void InformObserverAboutPlayerStateChange( MLcVideoPlayer* aPlayer );
-        
-        void InformObserverAboutPlayerUpdate( MLcVideoPlayer* aPlayer );
-        
-        void InformObserverAboutPlayerFailure( 
-            MLcVideoPlayer* aPlayer, 
-            TInt aReason );
-        
-        void InformUiProviderAboutReceivingStart();
-        
-        MLcUiProvider& LcUiProviderL();
+        /**
+        *
+        */
+        void RectChangedL();
   
         /**
         * Sets session specific SDP lines to a session.
@@ -354,9 +323,15 @@
         void Reject( CMceInSession& aSession,
                      const TDesC8& aReason = KNullDesC8(),
                      TUint32 aCode = 0 );
-        
-        void SaveContactL( const TDesC8& aAddress );
-            
+
+    protected:  // from CMusEngSession
+	
+        /**
+        *
+        */
+        void VolumeChanged( TInt aVolume, TBool aAudioRouteChanged );
+             
+    
     protected: // from MMceInSessionObserver
     
         /**
@@ -510,30 +485,14 @@
         void SsrcRemoved( CMceMediaStream& aStream,
                           CMceRtpSource& aSource,
                           TUint aSsrc );       
-    
-        
-    private: // from MMusSipProfileUser
+                          
+	private: // from MMusSipProfileUser
         
-        virtual TBool IsRoamingBetweenAPsAllowed();
-        
-        virtual void ProfileRegistered();
-        
-        
+        TBool IsRoamingBetweenAPsAllowed();
+      			
     private: // HELPER FUNCTIONS
 
         /**
-        * Adds b=AS and b=TIAS lines to the array
-        */
-        void AddSdpBandwidthAttributesL( CDesC8Array& aSdpLinesArray,
-                                         TInt aBandwidthAs );
-
-        /**
-        * Checks whether AS or TIAS bandwidth attributes present in the array 
-        */
-        TBool IsBandwidthAttributeSet( MDesC8Array* aSdpLinesArray );
-
-
-        /**
         * Callback
         */
         void UpdateTimerEvent();
@@ -559,58 +518,19 @@
                                      const CMceVideoCodec& aBestBitrateVideoCodec );
                                      
         void DoCodecModeBasedRemovalL( CMceVideoStream& aVideoStream );
-  
         /**
-        * Get session time return estabilished session time
-        * @return TTime returns time if connection established else < 0
-        */
-        TTimeIntervalSeconds GetSessionTime() const;        
-        
-    protected:
-        
-        /**
-        * Reads from CenRep and sets encoding device for a codec.
-        */
-        void SetEncodingDeviceL( CMceVideoCodec& aVideoCodec );
+         * This function currently used to remove the AVC codec support based on
+         * cenrep encoder device uid value.
+         */
+        void DoCodecConfigurationBasedRemovalL( CMceVideoStream& aVideoStream );
+
+
+    protected: // MEMBERS
 
         /**
-        * Sets configuration key for a codec
-        */
-        void SetCodecConfigKeyL( CMceVideoCodec& aVideoCodec );
-    
-        /**
-        * Reads proper configuration key for a codec. NULL if not available.
-        * Ownership is transferred.
-        */
-        HBufC8* ReadCodecConfigKeyL( const CMceVideoCodec& aVideoCodec ) const;
-        
-        /**
-        * Constructs and stores to cenrep a concatenation of all AVC config keys.
-        */
-        void StoreEncoderConfigInfoL() const;
-        
-        /**
-        * Returns config key id for the provided codec. Ownership is transferred
+        * Callback reference to session observer interface.
         */
-        const TPtrC8 ConfigKeyIdL( const CMceVideoCodec& aVideoCodec ) const;
-
-            
-    protected: // Data
-
-        /**
-        * Drawing area rect.
-        */
-        TRect iRect;
-
-        /**
-        * Telephone utilities.
-        */
-        CMusEngTelephoneUtils* iTelephoneUtils;        
-        
-        /**
-         * UID used to identify application, needed to create MCE manager
-         */
-        TUid iMceManagerUid;
+        MMusEngSessionObserver& iSessionObserver;
         
         /**
         * Class for connecting to MCE server.
@@ -639,44 +559,14 @@
         */
         TBool iOperatorVariant;
 
-        /**
+		/**
         * The handler for the SIP profile related to this session
         */
         CMusSipProfileHandler* iSipProfileHandler;
 
-        /**
-        * Session state for MLcSession 
-        */
-        MLcSession::TLcSessionState iLcSessionState;       
-        
-        /**
-        * If true, configuration key of current AVC codec must be written to
-        * CenRep after session establishment.
-        */
-        TBool iStoreEncoderConfigInfo;
-        
-        /**
-        * Remote details 
-        */
-        HBufC* iRemoteDetails;
-        
-    private: // New functions
-        
-        void StreamStreaming( CMceMediaStream& aStream );
-                
-    private: // Data
+    private:
 
         /**
-        * The session observer, if present.
-        */
-        MLcSessionObserver* iLcSessionObserver;
-
-        /**
-        * The UI provider, if present.
-        */        
-        MLcUiProvider* iLcUiProvider;        
-        
-        /**
         * It is assumed, that user has only one instance of this class.
         * The same instance is passed between MCE and user, but the data
         * inside of this container is just updated for each event.
@@ -688,7 +578,7 @@
         */
         TTime iStartTime;
 
-        CMusEngSessionDurationTimer* iUpdateTimer;
+        CMusEngSessionDurationTimer*   iUpdateTimer;
         
         /**
         * Value indicating seconds gone since last received RTCP sender or 
@@ -701,18 +591,11 @@
         * muted as part of disabling bundled display sink 
         */
         TBool iExplicitlyMuted;
-        
-        /**
-        * Value indicates whether session was started in background mode.
-        * (see IsBackgroundStartup()). Once application comes to foreground, 
-        * iBackground is set to EFalse
-        */
-        TBool iBackground;
-        
+
+
     MUS_UNITTEST( UT_CMusEngSession )
     MUS_UNITTEST( UT_CMusEngMceSession )
     MUS_UNITTEST( UT_CMusEngReceiveSession )
-    MUS_UNITTEST( UT_CMusEngSessionManager )
     };
     
-#endif // MUSENGMCESESSION_H
+#endif //MUSHENGMCESESSION_H
--- a/mmsharing/mmshengine/inc/musengmceutils.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengmceutils.h	Wed Sep 01 12:31:01 2010 +0100
@@ -24,7 +24,6 @@
 
 #include <mcemediastream.h>
 #include <mcemediasink.h>
-#include <mcemediasource.h>
 
 
 class CMceSession;
@@ -34,7 +33,6 @@
 class CMceVideoStream;
 class CMceSpeakerSink;
 
-const TUint KMusEngNoAssociatedSourceType = KMaxTUint;
 
 /**
 * Static class including utility methods to locate and manipulate MCE 
@@ -55,14 +53,6 @@
         static TBool IsVideoInStream( CMceMediaStream& aStream );
 
         /**
-        * Tells if a stream is a video stream with rtp sink.
-        *
-        * @param aStream Stream to be investigated
-        * @return ETrue if parameter is a video stream with a RTP sink
-        */
-        static TBool IsVideoOutStream( CMceMediaStream& aStream );
-        
-        /**
         * Tells if a stream is an audio stream with rtp source.
         *
         * @param aStream Stream to be investigated
@@ -103,62 +93,44 @@
         /**
         * Gets handle to a media sink of spesified type contained by
         * a mediastream. If there are several sink instances, first one is 
-        * returned. If associated source type is defined, sink in stream having
-        * the source is tried to be searched. If no such match, first matching 
-        * sink is returned. Ownership is not transferred.
+        * returned. Ownership is not transferred.
         *
         * @return Media sink of the spesified type. NULL if none exists
         */
-        static CMceMediaSink* GetMediaSink( 
-                CMceMediaStream& aStream, 
-                TMceSinkType aType,
-                TMceSourceType aAssociatedSourceType = KMusEngNoAssociatedSourceType );
+        static CMceMediaSink* GetMediaSink( CMceMediaStream& aStream, 
+                                            TMceSinkType aType );
         
         /**
         * Gets handle to a media sink of spesified type contained by
         * a mediastream. If there are several sink instances, first one is 
-        * returned. If associated source type is defined, sink in stream having
-        * the source is tried to be searched. If no such match, first matching 
-        * sink is returned. Ownership is not transferred.
+        * returned. Ownership is not transferred.
         *
         * @return Media sink of the spesified type.
         * @leave KErrNotFound if there is no sink of spesified type
         */
-        static CMceMediaSink* GetMediaSinkL( 
-                CMceMediaStream& aStream, 
-                TMceSinkType aType,
-                TMceSourceType aAssociatedSourceType = KMusEngNoAssociatedSourceType );
+        static CMceMediaSink* GetMediaSinkL( CMceMediaStream& aStream, 
+                                             TMceSinkType aType );
 
         /**
         * Gets handle to a media sink of spesified type contained by
         * a session. If there are several sink instances, first one is 
-        * returned. If associated source type is defined, sink in stream having
-        * the source is tried to be searched. If no such match, first matching 
-        * sink is returned. Ownership is not transferred.
+        * returned. Ownership is not transferred.
         *
         * @return Media sink of the spesified type. NULL if none exists
         */
-        static CMceMediaSink* GetMediaSink( 
-                CMceSession& aSession, 
-                TMceSinkType aType,
-                TMceSourceType aAssociatedSourceType = KMusEngNoAssociatedSourceType,
-                TBool aStrictMatch = EFalse );
+        static CMceMediaSink* GetMediaSink( CMceSession& aSession, 
+                                            TMceSinkType aType );
         
         /**
         * Gets handle to a media sink of spesified type contained by
         * a session. If there are several sink instances, first one is 
-        * returned. If associated source type is defined, sink in stream having
-        * the source is tried to be searched. If no such match, first matching 
-        * sink is returned. Ownership is not transferred.
+        * returned. Ownership is not transferred.
         *
         * @return Media sink of the spesified type.
         * @leave KErrNotFound if there is no sink of spesified type
         */
-        static CMceMediaSink* GetMediaSinkL( 
-                CMceSession& aSession, 
-                TMceSinkType aType,
-                TMceSourceType aAssociatedSourceType = KMusEngNoAssociatedSourceType,
-                TBool aStrictMatch = EFalse );
+        static CMceMediaSink* GetMediaSinkL( CMceSession& aSession, 
+                                             TMceSinkType aType );
         
         /**
         * Gets handle to a speaker sink contained by specified stream 
@@ -189,44 +161,19 @@
         *
         * @return Display sink, NULL if none exists
         */
-        static CMceDisplaySink* GetDisplay( CMceSession& aSession,
-                                            TBool aPreferViewFinder = ETrue );        
+        static CMceDisplaySink* GetDisplay( CMceSession& aSession );        
 
         /**
         * Gets handle to a display sink. If there are several display
-        * sink instances view finder is preferred with default arguments.
+        * sink instances, first one is returned.
         * Ownership is not transferred.
         *
         * @return Display sink
         * @leave KErrNotFound if there is no display
         */
-        static CMceDisplaySink* GetDisplayL( CMceSession& aSession, 
-                                             TBool aPreferViewFinder = ETrue );     
+        static CMceDisplaySink* GetDisplayL( CMceSession& aSession );     
 
         /**
-        * Gets handle to a display sink. Ownership is not transferred.
-        *
-        * @return Display sink, NULL if none exists
-        */
-        static CMceDisplaySink* GetReceivingDisplay( CMceSession& aSession );          
-        
-        /**
-        * Gets handle to a receiving display sink. Ownership is not transferred.
-        *
-        * @return Display sink
-        * @leave KErrNotFound if there is no display
-        */
-        static CMceDisplaySink* GetReceivingDisplayL( CMceSession& aSession );    
-        
-        /**
-        * Gets handle to a viewfinder display sink. Ownership is not transferred.
-        *
-        * @return Display sink
-        * @leave KErrNotFound if there is no display
-        */
-        static CMceDisplaySink* GetVfDisplay( CMceSession& aSession );
-        
-        /**
         * Adds display sink to specified stream if one does not exist already.
         * Display rect is set in both cases to a specified one.
         * Display is disabled by default.
@@ -238,8 +185,7 @@
         */
         static void AddDisplayL( CMceMediaStream& aStream, 
                                  CMceManager& aManager, 
-                                 const TRect& aDisplayRect,
-                                 TBool aDisable = EFalse );
+                                 const TRect& aDisplayRect );
 
         /**
         * Adds speaker sink to specified stream if one does not exist already.
@@ -257,18 +203,6 @@
         */
         static void DisableStreamL( CMceMediaStream& aStream );
         
-        /**
-        * Enables or disables display sink. If the state is already correct,
-        * nothing is done.
-        */
-        static void DoEnableDisplayL( CMceDisplaySink& aDisplay, TBool aEnable );
-        
-        /**
-        * Enables inactivity timer if possible.
-        */
-        static TInt EnableInactivityTimer( CMceSession& aSession, 
-                                           TUint32 aInactivityTimeout );
-        
     };
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/inc/musengorientationhandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef MUSENGORIENTATIONHANDLER_H
+#define MUSENGORIENTATIONHANDLER_H
+
+
+// INTERNAL INCLUDE
+#include "musunittesting.h"
+
+// SYSTEM INCLUDE
+#include <e32base.h>
+
+class CMusEngLiveSession;
+class MMusEngLiveSessionObserver;
+
+/**
+*
+* @lib musengine.lib
+*/
+NONSHARABLE_CLASS(CMusEngOrientationHandler) : public CTimer
+                              
+    {
+    MUS_UNITTEST( UT_CMusEngOrientationHandler )
+    
+    public:
+
+		/**
+        * Creates new instance of CMusEngOrientationHandler
+        */
+        static CMusEngOrientationHandler* NewL( CMusEngLiveSession& aSession,
+                                                MMusEngLiveSessionObserver& aSessionObserver );
+
+        /**
+        * Destructor
+        *
+        */
+        ~CMusEngOrientationHandler();
+
+
+    public: // API
+        
+        void RefreshOrientationL();
+        void UpdateL();
+        
+    protected:
+        
+        void RunL();
+        TInt RunError( TInt aError );
+
+    private:
+        
+        CMusEngOrientationHandler( CMusEngLiveSession& aSession,
+                                   MMusEngLiveSessionObserver& aSessionObserver );
+        void ConstructL();
+        
+        void DoDelayedResumeL();
+
+    private: // DATA
+        
+        CMusEngLiveSession& iSession;
+        MMusEngLiveSessionObserver& iSessionObserver;
+        TBool iRefreshBeginStateCamera;
+        TBool iRefreshBeginStateDisplay;
+
+    };
+
+#endif // MUSENGORIENTATIONHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/inc/musengoutsessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSENGOUTSESSIONOBSERVER_H
+#define MUSENGOUTSESSIONOBSERVER_H
+
+// INCLUDES
+
+// CLASS DECLARATION
+
+/**
+* An interface to be implemented by users of Multimedia Sharing Engine if they 
+* wish to receive feedback from outsent INVITE. All the callback functions 
+* represent an answer from network to sent INVITE.
+*/
+class MMusEngOutSessionObserver
+    {
+    public:
+
+		/**    
+   		* Indicates that MT has rejected session. ( e.g. 603 DECLINE ).
+		*/
+     	virtual void SessionRejected() = 0;
+    	
+    	/**
+    	* The following functions represent a specific reason in answer
+    	* to sent INVITE.
+    	*/
+    	
+		virtual void SessionBadRequest() = 0; // 400 
+		virtual void SessionUnauthorized() = 0; // 401 
+		virtual void SessionPaymentRequired() = 0; // 402
+    	virtual void SessionRecipientNotFound() = 0; // 404 
+		virtual void SessionProxyAuthenticationRequired() = 0; // 407
+		virtual void SessionRequestTimeOut() = 0; // 408
+		virtual void SessionUnsupportedMediaType() = 0; // 415
+		virtual void SessionBusyHere() = 0; // 486
+		virtual void SessionRequestCancelled() = 0; // 487    	
+  	    virtual void SessionTemporarilyNotAvailable() = 0; // 480
+    };
+
+#endif
\ No newline at end of file
--- a/mmsharing/mmshengine/inc/musengreceivesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengreceivesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -19,20 +19,18 @@
 #ifndef MUSHENGREVEIVESESSION_H
 #define MUSHENGREVEIVESESSION_H
 
-// INCLUDES
+
+
 #include "musengmcesession.h"
 #include "musenguriparser.h"
 #include "musunittesting.h"
+
 #include <mcemediasink.h>
 
-// FORWARD DECLARATIONS
 class MMusEngReceiveSessionObserver;
 class CMceInSession;
-class CMusEngRemoteVideoPlayer;
 
-
-class CMusEngReceiveSession : 
-    public CMusEngMceSession
+class CMusEngReceiveSession : public CMusEngMceSession
     {
     MUS_UNITTEST( UT_CMusEngMceSession )
     MUS_UNITTEST( UT_CMusEngReceiveSession )
@@ -41,30 +39,36 @@
 
        /**
         * Creates new MultimediaSharing Receive session.
+        *
+        * @param aRect UI drawing area. It is allowed handle from engine
+        * @param aEngObserver Engine specific callbacks
+        * @param aSessionObserver Session specific callbacks
         * @return CMusEngReceiveSession* New instanse of specified class
         */
-        static CMusEngReceiveSession* NewL();
-        
+        IMPORT_C static CMusEngReceiveSession* NewL( 
+                    const TRect& aRect,
+                    MMusEngSessionObserver& aSessionObserver,
+                    MMusEngReceiveSessionObserver& aReceiveSessionObserver );
        /**
         * Destructor
         *
         * @since S60 v3.2
         */
         ~CMusEngReceiveSession();
-   
-    public: // From MLcSession
-        
-        TLcSessionState LcSessionState() const;
-        
-        void EstablishLcSessionL();
+      
         
-        void TerminateLcSessionL(); 
-        
-        MLcVideoPlayer* RemoteVideoPlayer();    
-        
-        const TDesC& RemoteDisplayName();         
-        
-    protected: // Overrides function in CMusEngMceSession
+    public: // API
+
+       /**
+        * Accept or deny processed invitation
+        *
+        * @param aAccept ETrue if session is to be accepted and EFalse if 
+        *        to be rejected.
+        */
+        IMPORT_C void AcceptInvitationL(const TBool& aAccept);
+   
+
+    private: // Overrides function in CMusEngMceSession
     
         /**
         * The state of the session has changed.
@@ -82,8 +86,7 @@
         * session. This function overrides function in base class. 
         * Function calls also overridden version.
         */ 
-        virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                        TMceSourceType aSourceType );
+        virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec );
         
         /**
         * Sets Multimediasharing specific audio codec settings like keepalive
@@ -101,9 +104,10 @@
         * @param aVideoStream
         */
         virtual void DoCodecSelectionL( CMceVideoStream& aVideoStream );
-        
-    protected: // from MMceInSessionObserver
-               // overrides the function in CMusEngMceSession
+                         
+                         
+    private: // from MMceInSessionObserver
+             // overrides the function in CMusEngMceSession
 
         /**
 	    * Incoming session invitation. The CMCEInSession is given to the
@@ -134,7 +138,7 @@
     				TMceTransactionDataContainer* aContainer );
 
 
-    protected: // from MMceStreamObserver, 
+    private: // from MMceStreamObserver, 
              // overrides the function in CMusEngMceSession
 
         /**
@@ -144,28 +148,25 @@
         * @param aStream, the stream that uses the source.
         */
         void StreamStateChanged( CMceMediaStream& aStream );
-    
-    protected: // from MMceRtpObserver
-
-        void InactivityTimeout( CMceMediaStream& aStream,
-                                CMceRtpSource& aSource );
 
 
-
-    protected: // CONSTRUCTORS
+    private: // CONSTRUCTORS
     
-        CMusEngReceiveSession();
+        CMusEngReceiveSession(  
+                        MMusEngSessionObserver& aSessionObserver,
+                        MMusEngReceiveSessionObserver& aReceiveSessionObserver,
+                        const TRect& aRect );
 
 		void ConstructL();
 		
-    protected: // HELPERS
+    private: // HELPERS
     
         CMceInSession* InSession();
         
         void PrepareToRequire100RelL( 
-            TMceTransactionDataContainer* aContainer );
+                        TMceTransactionDataContainer* aContainer);
         
-        virtual void CompleteSessionStructureL();
+        void CompleteSessionStructureL();
         
          /**
          * Parse P-Asserted-Identity header. 
@@ -173,50 +174,18 @@
          * if tel uri not found it suppose that telephone number
          * is in sip url. 
          */
-        void ParseAssertedIdentity( TMceTransactionDataContainer* aContainer );
-        /*
-         * Checks for buffering event happened & receiving already not started
-         *      If yes, start the RTP inactivity timer and indicate to observer
-         *              about videoplayer state change.
-         *      else will not do anything. Bascially ignores the event.
-         */
-        void ReceivingStarted();
+        void ParseAssertedIdentity(
+                        TMceTransactionDataContainer* aContainer );
         
-        /**
-        * Checks for receiving already started and display sink is enabled
-        *        If yes ETrue else otherwise.
-        */
-        TBool IsDisplayActive();
-        
-    protected: // DATA
+    private: // DATA
+    
+        MMusEngReceiveSessionObserver& iReceiveSessionObserver;
     
         // Set to ETrue if CMceInSession::RingL has already been called
         TBool iRingLCalled;
         
         // identity of originator parsed form P-Asserted-Identity field
         TBuf8<KMaxUriLength> iIdentity;
-        
-        HBufC8* iOriginator;
-        
-        HBufC* iRemoteDisplayName;
-       
-        /// The remote video player implementing MLcVideoPlayer
-        CMusEngRemoteVideoPlayer* iRemoteVideoPlayer;
-        
-        TUint32 iReceivingInactivityTimeout;
-        
-        TUint8 iKeepaliveTimer;
-        
-    private:
-        /* Flag for whether receiving started. It will go EFalse
-         * when RTP inactivity timeout happen.
-         */
-        TBool iReceiving;               
-        /* Flag to indicate buffering event happened. This flag is for
-         * optimization purpose since buffering event is the only place 
-         * we can be sure about some packets were received.
-         */
-        TBool iBuffered;
     };
 
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/inc/musengreceivesessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSHENGRECEIVESESSIONOBSERVER_H
+#define MUSHENGRECEIVESESSIONOBSERVER_H
+
+// INCLUDES
+
+#include <e32cmn.h>
+
+// CLASS DECLARATION
+
+/**
+* Observer interface to be implemented by clients interested about notifications
+* of receiving (MT) side session specific events.
+*/
+class MMusEngReceiveSessionObserver
+    {
+
+    public:
+    
+        /**
+        * There is new incoming session. 
+        * Session is not yet handled in any way and cannot yet be accepted
+        * or rejected. User should not be notified at this stage.
+        */
+        virtual void IncomingSessionPreNotification() = 0;
+        
+        /**
+        * There is new incoming session ready to be accepted or rejected.
+        * User can be notified.
+        */
+        virtual void IncomingSession( const TDesC& aOriginator, 
+                                      const TDesC& aOriginatorIdentity ) = 0;
+
+        /**
+        * Current receiving session is buffering received RTP.
+        */
+        virtual void StreamBuffering() = 0;
+        
+    };
+
+#endif
\ No newline at end of file
--- a/mmsharing/mmshengine/inc/musengremotevideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGREMOTEVIDEOPLAYER_H
-#define MUSHENGREMOTEVIDEOPLAYER_H
-
-// INCLUDES
-#include <e32base.h>
-#include "musengvideoplayerbase.h"
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class MLcWindow;
-class MLcAudioControl;
-
-// CLASS DECLARATION
-class CMusEngRemoteVideoPlayer : public CMusEngVideoPlayerBase
-    {
-    public: // Constructors and destructor
-        
-        static CMusEngRemoteVideoPlayer* NewL( MMusEngDisplayHandler& aDisplayHandler,
-                                               MLcAudioControl& aLcAudioControl );
-        
-        ~CMusEngRemoteVideoPlayer();
-     
-        
-    public: // from CMusEngVideoPlayerBase
-        
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        TBool LcIsPlayingL();
-        
-    private: // Constructors
-        
-        CMusEngRemoteVideoPlayer( MMusEngDisplayHandler& aDisplayHandler,
-                                  MLcAudioControl& aLcAudioControl );
-        void ConstructL();
-        
-    private: // Data
-  
-    };
-
-#endif // MUSHENGREMOTEVIDEOPLAYER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/inc/musengsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,231 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSENGSESSION_H
+#define MUSENGSESSION_H
+
+// USER INCLUDES
+#include "musunittesting.h"
+#include "musengvolumechangeobserver.h"
+
+//SYSTEM INCLUDES
+#include <e32base.h>
+
+
+// FORWARD DECLARATIONS
+class CMusEngTelephoneUtils;
+class CMusSipProfileHandler;
+class CRepository;
+class MMusEngAudioRoutingObserver;
+class MMusEngVolumeChangeObserver;
+
+// CLASS DECLARATION
+
+/**
+* Base class for Multimedia Sharing Engine sessions, inherited by
+* CMusEngMceSession.
+*
+* CMusEngSession encapsulates all common activities example using
+* resources.
+*
+* @lib musengine.lib
+*/
+class CMusEngSession : public CBase,
+                       public MMusEngVolumeChangeObserver
+    {
+    MUS_UNITTEST( UT_CMusEngSession )
+    
+    public:
+
+        /**
+        * Desctructor, finalize session
+        *
+        */
+        ~CMusEngSession();
+
+
+    public:  // API FUNCTIONS
+
+        /**
+        * Returns currently assigned drawing area
+        *
+        * @return TRect This session drawing area recttangle
+        */
+        IMPORT_C TRect Rect() const;
+
+        /**
+        * Sets new drawing area
+        *
+        * @param TRect This session new drawing area rectangle
+        */
+        IMPORT_C void SetRectL( const TRect& aRect );
+
+        /**
+        * Checks if audio routing can be changed using EnableLoudspeakerL
+        * 
+        * @return ETrue if audio routing can be changed using EnableLoudspeakerL
+        */
+        IMPORT_C TBool AudioRoutingCanBeChanged() const;
+        
+        /**
+		* Checks if audio routing is headset
+		* 
+		* @return ETrue if audio routing is headset
+		*/
+        IMPORT_C TBool IsAudioRoutingHeadset() const;
+		
+        /**
+		* Checks if audio routing is LoudSpeaker
+		* 
+		* @return ETrue if audio routing is LoudSpeaker and 
+		* currentMode != iAudioOutputAtStartup
+		*/
+        IMPORT_C TBool IsAudioRoutingLoudSpeaker() const;
+        /**
+        * Activates/deactivates loadspeaker
+        *
+        * @param TBool Enable or disable loudspeaker
+        * @param TBool Show activation dialog
+        */
+        IMPORT_C void EnableLoudspeakerL( TBool aEnable, TBool aShowDialog );
+
+        /**
+        * Checks is loudspeaker enabled or disabled.
+        *
+        * @return TBool true if enabled
+        */
+        IMPORT_C TBool IsLoudSpeakerEnabled() const;
+
+        /**
+        * Returns current volume level
+        */
+        IMPORT_C TInt VolumeL() const;
+
+        /**
+        * Mutes CS call microphone.
+        */
+        IMPORT_C void MuteMicL( TBool aMute );
+
+        /**
+        * Returns current CS call mic mute state.
+        */
+        IMPORT_C TBool IsMicMutedL();
+        
+        /**
+        * Sets audio routing observer. Can be set to NULL in order to indicate
+        * ending of observing changes in audio routing.
+        */
+        IMPORT_C void SetAudioRoutingObserver( 
+                                    MMusEngAudioRoutingObserver* aObserver );
+        
+        /**
+        * Sets volume level change observer. Can be set to NULL in order to indicate
+        * ending of observing changes in volume level.
+        */
+        IMPORT_C void SetVolumeChangeObserver( 
+                                    MMusEngVolumeChangeObserver* aObserver );
+
+    public:  // VIRTUAL API FUNCTIONS
+        
+        /**
+        * Increases volume level by one.
+        */
+        IMPORT_C virtual void VolumeUpL();
+
+        /**
+        * Decreases volume level by one.
+        */
+        IMPORT_C virtual void VolumeDownL();
+        
+        /**
+        * Set volume value
+        * @param aVal the value of volume 
+        */
+        IMPORT_C virtual void SetVolumeL( TInt aVal );
+        
+        /**
+        * Enables or disables display. Call to this function is considered
+        * as a permission or denial to draw to the display.
+        */
+        virtual void EnableDisplayL( TBool aEnable ) = 0;
+
+        /**
+        * Mutes current audio stream meaning that any audio is not played or
+        * sent to network.
+        */
+        virtual void MuteL() = 0;
+
+        /**
+        * Unmute current audio stream meaning that all the audio is played
+        * and if needed also sent to network.
+        */
+        virtual void UnmuteL() = 0;
+        
+        /**
+         *
+         */
+        virtual void RefreshOrientationL() = 0;
+
+
+	protected: // INTERNAL 
+
+        virtual void RectChangedL() = 0;
+
+
+        //from MMusEngVolumeChangeObserver
+        virtual void VolumeChanged( TInt aVolume, TBool aAudioRouteChanged );
+        
+    protected:
+
+        /**
+        * Constructor, private cannot be instantiate
+        *
+        * @param aRect reserved drawing area for this session
+        */
+        CMusEngSession( const TRect& aRect );
+
+
+    protected:
+
+        /**
+        * second-phase constructor, called by those session specific 
+        * constructors
+        */
+        void ConstructL();
+
+
+    private: // MEMBERS
+
+        /**
+        * Drawing area rect.
+        */
+        TRect iRect;
+
+        /**
+        * Telephone utilities.
+        */
+        CMusEngTelephoneUtils* iTelephoneUtils;
+        
+        /**
+        * Volume change observer
+        */
+        MMusEngVolumeChangeObserver* iVolumeObserver;
+
+    };
+
+#endif //MUSENGSESSION_H
--- a/mmsharing/mmshengine/inc/musengsessiondurationtimer.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengsessiondurationtimer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -87,6 +87,12 @@
         * @since S60 v3.2
         */
         void DoCancel();
+        
+		/**
+   		*
+        * @since S60 v3.2
+        */
+        TInt RunError( TInt aError );
 
 
     private: // DATA
--- a/mmsharing/mmshengine/inc/musengsessionmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef CMUSENGSESSIONMANAGER_H
-#define CMUSENGSESSIONMANAGER_H
-
-// INCLUDES
-#include "musunittesting.h"
-#include "muspropertyobserver.h"
-#include <lcengine.h>
-#include <musmanagercommon.h>
-
-// FORWARD DECLARATIONS
-class MLcSession;
-class CMusEngMceSession;
-class MLcUiProvider;
-class CMusPropertyWatch;
-
-
-class CMusEngSessionManager : public CLcEngine, public MMusPropertyObserver
-    {
-    public:
-    
-        static CMusEngSessionManager* NewL();
-        ~CMusEngSessionManager();
-    
-    public: // From CLcEngine
-    
-        MLcSession& Session();
-       
-        TBool IsFeatureSupported( TLcFeature aLcFeature );
-       
-    public: // From MMusPropertyObserver
-        
-        virtual void PropertyChanged( const TUint aKey, const TInt aValue );    
-            
-        virtual void HandlePropertyError( const TInt aReason );
-            
-    private: // Constructors
-
-        CMusEngSessionManager();
-        void ConstructL();
-       
-    private: // New functions
-        
-        CMusEngMceSession* CreateMusSessionL( 
-            MultimediaSharing::TMusUseCase aUseCase );
-        
-    private: // Data
-        
-        CMusEngMceSession* iSession;
-        
-        CMusPropertyWatch* iUseCaseWatch;
-        
-        MultimediaSharing::TMusUseCase iCurrentUseCase;
-        
-    MUS_UNITTEST( UT_CMusEngSessionManager )
-    };  
-    
-#endif // CMUSENGSESSIONMANAGER_H
-
-// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/inc/musengsessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSHENGSESSIONOBSERVER_H
+#define MUSHENGSESSIONOBSERVER_H
+
+
+#include <e32std.h>
+
+// CLASS DECLARATION
+
+/**
+* An interface to be implemented by users of Multimedia Sharing Engine if 
+* they wish to receive events from session and streaming state changes.
+*
+* @lib museng.lib
+* @since S60 v3.2
+*/
+class MMusEngSessionObserver
+    {
+
+    public:
+
+        /**
+        * Indicates that incoming or outgoing session has been established.
+        *
+        * @since S60 v3.2
+        */
+        virtual void SessionEstablished() = 0;
+
+        /**
+        * Indicates that session has been terminated.
+        * After this function call session object must deleted.
+        * Function is synchronous, use active object which actives
+        * delete.
+        *
+        * @since S60 v3.2
+        */
+        virtual void SessionTerminated() = 0;
+
+        /**
+        * Current session has lost network connection.
+        *
+        * @since S60 v3.2
+        */
+        virtual void SessionConnectionLost() = 0; 
+
+        /**
+        * Undefined exception has occurred. Session is useless and must be
+        * deleted. Function is synchronous, use active object which actives
+        * delete.
+        *
+        * @since S60 v3.2
+        */
+        virtual void SessionFailed() = 0;
+
+        /**
+        * Current stream state is changed to idle meaning that
+        * we are not sending or receiving RTP.
+        *
+        * @since S60 v3.2
+        */
+        virtual void StreamIdle() = 0;
+
+        /**
+        * Current session state is changed to idle.
+        *
+        * @since S60 v3.2
+        */
+        virtual void StreamStreaming() = 0;        
+
+        /**
+        * Update time information of this session
+        *
+        * @since S60 v3.2
+        */
+        virtual void SessionTimeChanged( const TTimeIntervalSeconds& aSeconds ) = 0;
+        
+        /**
+        * RTCP inactivity timeout has occurred.
+        *
+        * @since S60 v3.2
+        */
+        virtual void InactivityTimeout() = 0;
+    };
+
+#endif
\ No newline at end of file
--- a/mmsharing/mmshengine/inc/musengtelephoneutils.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengtelephoneutils.h	Wed Sep 01 12:31:01 2010 +0100
@@ -27,19 +27,22 @@
 #include <MTelephonyAudioRoutingObserver.h>
 #include <TelephonyAudioRouting.h>
 #include <RPhCltServer.h>
+#include <cenrepnotifyhandler.h>
 
 // FORWARD DECLARATIONS
 class CRepository;
 class CTelephonyAudioRouting;
 class CPhCltCommandHandler;
 class MMusEngAudioRoutingObserver;
+class MMusEngVolumeChangeObserver;
 
 /**
 * Utility class to handle all phone related requests:
 * Audio routing, volume control and microphone muting.
 */
 class CMusEngTelephoneUtils : public CActive,
-                              public MTelephonyAudioRoutingObserver
+                              public MTelephonyAudioRoutingObserver,
+                              public MCenRepNotifyHandlerCallback
     {
     MUS_UNITTEST( UT_CMusEngTelephoneUtils )
     MUS_UNITTEST( UT_CMusEngSession )
@@ -49,14 +52,14 @@
 		/**
    		*
         */
-		static CMusEngTelephoneUtils* NewL( 
-		    MMusEngAudioRoutingObserver& aAudioRoutingObserver );
+		static CMusEngTelephoneUtils* NewL();
 
 		/**
    		*
         */
 		~CMusEngTelephoneUtils();
 
+
 	public: // API
 	
 	    /**
@@ -64,12 +67,29 @@
         * 
         * @return ETrue if audio routing can be changed using LoudspeakerL
         */
-        TBool AudioRoutingCanBeChanged();
-
+        TBool AudioRoutingCanBeChanged() const;
+        
+        /**
+		* Checks if audio routing is headset
+		* 
+		* @return ETrue if audio routing is headset
+		*/
+        TBool IsAudioRoutingHeadset() const;
+        
+        /**
+		* Checks if audio routing is LoudSpeaker
+		* 
+		* @return ETrue if audio routing is LoudSpeaker and 
+		* currentMode != iAudioOutputAtStartup
+		*/
+        TBool IsAudioRoutingLoudSpeaker() const;
+        
 		/**
    		* Changes the audio routing between loudspeaker and handset.
+   		*  
+   		* @param aShowDialog if ETrue, user is notified about new audio routing
         */
-        void LoudspeakerL( TBool aEnable );
+        void LoudspeakerL( TBool aEnable, TBool aShowDialog );
 
 		/**
    		*
@@ -77,10 +97,15 @@
 		TBool IsLoudSpeakerEnabled() const;
 		
 		/**
-   		*
+   		* Returns current CS call volume level from central repository
         */
 		TInt GetVolumeL() const;
 
+        /**
+        * Returns locally cached CS call volume level
+        */
+		TInt GetVolume() const;
+		
 		/**
    		*
         */
@@ -94,7 +119,19 @@
         /**
         * Returns current CS call mic mute state.
         */
-        TBool IsMicMutedL();                                        
+        TBool IsMicMutedL();
+    
+        /**
+        * Sets audio routing observer. Can be set to NULL in order to indicate
+        * ending of observing changes in audio routing.
+        */
+        void SetAudioRoutingObserver( MMusEngAudioRoutingObserver* aObserver );
+                                        
+        /**
+        * Sets volume level observer. Can be set to NULL in order to indicate
+        * ending of observing changes in volume level.
+        */
+        void SetVolumeChangeObserver( MMusEngVolumeChangeObserver* aObserver );
     
     private: // inherited from CActive
 
@@ -102,6 +139,7 @@
    		*
         */
         void RunL();
+        TInt RunError( TInt aError );
         
 		/**
    		* Cancels outstanding request to phone client
@@ -115,28 +153,37 @@
          * Available outputs have changed
          */
         void AvailableOutputsChanged( 
-            CTelephonyAudioRouting& aTelephonyAudioRouting );
+                        CTelephonyAudioRouting& aTelephonyAudioRouting );
     
         /**
          * Some other application has changed audio output routing
          */
         void OutputChanged( 
-            CTelephonyAudioRouting& aTelephonyAudioRouting );
+                        CTelephonyAudioRouting& aTelephonyAudioRouting );
     
         /**
          * Our request to change audio output routing has completed
          */
         void SetOutputComplete( 
-            CTelephonyAudioRouting& aTelephonyAudioRouting,
-            TInt aError );
+                        CTelephonyAudioRouting& aTelephonyAudioRouting,
+                        TInt aError );
+    
+        /**
+        * Set output if setting is currently allowed. Leaves with KErrAccessDenied
+        * if setting is not allowed.
+        */
+        void DoSetOutputL( CTelephonyAudioRouting::TAudioOutput aAudioOutput );
+        
+    private:// From MCenRepNotifyHandlerCallback
+        
+        void HandleNotifyGeneric( TUint32 aId );
         
     private:
 
 		/**
    		* Default C++ constructor
         */
-		CMusEngTelephoneUtils( 
-		    MMusEngAudioRoutingObserver& aAudioRoutingObserver );
+		CMusEngTelephoneUtils();
 
 		/**
    		* 2nd phase constructor
@@ -153,10 +200,14 @@
         */
 		TInt ValidateVolume( const TInt aVolume ) const;
 		
-
+		/**
+		 * Checks current volume level and notifies observer, if volume changed
+		 * @param aAudioRouteChanged, ETrue if volume check should be done
+		 *        because of audio route change
+		 */
+		void UpdateCurrentVolume( TBool aAudioRouteChanged );
+		
     private: // DATA
-        
-        MMusEngAudioRoutingObserver& iAudioRoutingObserver;
 
         /**
         *  Stores the audio routing state at startup.
@@ -177,6 +228,27 @@
         * Command handler for muting the microphone
         */        
         CPhCltCommandHandler* iPhoneCommandHandler;
+        
+        /**
+        * Not owned.
+        */
+        MMusEngAudioRoutingObserver* iAudioRoutingObserver;
+
+        TBool iShowDialog;
+        
+        /**
+         * Central repository notifier instance. Owned.
+         */
+        CCenRepNotifyHandler* iNotifier;
+       
+        /**
+         * Volume change observer
+         * Used to inform session about volume updates
+         */
+        MMusEngVolumeChangeObserver* iVolumeObserver;
+        
+        TInt iCurrentVolume;
     };
 
-#endif // MUSENGTELEPHONEUTILS_H
+
+#endif // MUSENGTELEPHONEUTILS_H
\ No newline at end of file
--- a/mmsharing/mmshengine/inc/musengtwowayrecvsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYRECVSESSION_H
-#define MUSHENGTWOWAYRECVSESSION_H
-
-// USER
-#include "musengreceivesession.h"
-#include "musunittesting.h"
-#include "mussettings.h"
-#include "musengcamerahandler.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class CMceDisplaySink;
-class CMceStreamBundle;
-class CMusEngLiveVideoPlayer;
-
-
-class CMusEngTwoWayRecvSession : public CMusEngReceiveSession
-    {
-    MUS_UNITTEST( UT_CMusEngTwoWayRecvSession )
-
-    
-    public:
-        /**
-        * Creates new MultimediaSharing two-way receive session.
-        * @return CMusEngTwoWayRecvSession* New instanse of specified class
-        */
-        static CMusEngTwoWayRecvSession* NewL();
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngTwoWayRecvSession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-        
-        TBool IsDisplayEnabled();
-
-        CMusEngMceSession::TDisplayOrientation OrientationL();
-        
-        void SetOrientationL( TDisplayOrientation aOrientation );
-        
-    public:
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        void SetRectsL( const TRect& aRemoteRect,
-                                 const TRect& aLocalRect );
-   
-        /**
-        * Gets camera handler (can be used for zooming etc.) 
-        */
-        TMusEngCameraHandler& Camera();
- 
-    public: // from MLcSession
-    
-        MLcVideoPlayer* LocalVideoPlayer();        
-        
-    protected: // From CMusEngReceiveSession
-        
-        /**
-        * Sets local rect (viewfinder).
-        * 
-        */
-        void SetSecondaryRectL( const TRect& aSecondaryRect );
-        
-        /**
-        * Gets local rect (viewfinder).
-        * 
-        */
-        TRect SecondaryRect() const;
-        
-        void CompleteSessionStructureL();
-        
-        void RectChangedL();
-   
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngTwoWayRecvSession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-        
-    private:
-        
-        void CompleteSessionStructureAudioPartL( 
-                   const RPointerArray<CMceMediaStream>& aStreams, 
-                   CMceStreamBundle& aLocalBundle, 
-                   CMceMediaStream* aVideoInStream,
-                   CMceMediaStream* aVideoOutStream );
-          
-        void CompleteSessionStructureInStreamL( CMceMediaStream& aVideoInStream, 
-                                                CMceStreamBundle& aLocalBundle );
-          
-        void CompleteSessionStructureOutStreamL( CMceMediaStream& aVideoOutStream );
-        
-
-    private:
-        
-        TRect iLocalRect;
-        
-        TMusEngCameraHandler iCameraHandler;
-        
-        /// The live video player implementing MLcVideoPlayer
-        CMusEngLiveVideoPlayer* iLiveVideoPlayer;  
-        
-        TRect iSetRemoteRect;
-        TRect iSetLocalRect;
-       
-    };
-
-#endif
-
--- a/mmsharing/mmshengine/inc/musengtwowaysession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYSESSION_H
-#define MUSHENGTWOWAYSESSION_H
-
-// USER
-#include "musenglivesession.h"
-#include "musunittesting.h"
-#include "mussettings.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class MMusEngLiveSessionObserver;
-class CMceDisplaySink;
-class MMusEngTwoWaySessionObserver;
-class CMusEngRemoteVideoPlayer;
-
-
-class CMusEngTwoWaySession : public CMusEngLiveSession
-    {
-    MUS_UNITTEST( UT_CMusEngOutSession )
-    MUS_UNITTEST( UT_CMusEngTwoWaySession )
-
-    
-    public:
-        /**
-        * Creates new MultimediaSharing Live session.
-        * @return CMusEngTwoWaySession* New instanse of specified class
-        */
-        static CMusEngTwoWaySession* NewL();
-
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngTwoWaySession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-
-        void SetOrientationL( TDisplayOrientation aOrientation );
-        
-    public:
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        void SetRectsL( const TRect& aRemoteRect,
-                        const TRect& aLocalRect );
-
-    public: // From MLcSession
-        
-        MLcVideoPlayer* RemoteVideoPlayer();
-    
-    public: // from MLcFileControl
-
-        void EnableLcFileL( TBool aEnable );        
-        
-    protected: // inherited from CMusEngMceOutSession
-        
-        /**
-        * Sets local rect (viewfinder).
-        * 
-        */
-        void SetSecondaryRectL( const TRect& aSecondaryRect );
-        
-        /**
-        * Gets local rect (viewfinder).
-        * 
-        */
-        TRect SecondaryRect() const;
-        
-        /**
-        * 
-        */
-        TBool IsDisplayEnabled();
-        
-        /**
-        * Checks if displaying remote video.
-        *  
-        */
-        TBool IsDisplayActive();
-
-        void RectChangedL();
-        
-        /**
-        * @param aLocalBundle All local streams are supposed to be added to
-        *        this bundle
-        */
-		void CompleteSessionStructureL( CMceStreamBundle& aLocalBundle );
-		
-		void AddDisplayL( CMceMediaStream& aStream );
-
-        void CreateMceSessionStructureL( TBool aForceSdpBandwidth =  
-                                                 EFalse );
-
-
-    protected: // overrides ancestor class versions
-        
-        /**
-        * The state of the session has changed
-        * @param aSession, the session that has changed.
-        */
-        virtual void HandleSessionStateChanged( CMceSession& aSession,
-                                                TInt aStatusCode,
-                                                const TDesC8& aReasonPhrase );
-                                                  
-        /**
-        * Sets Multimediasharing specific video codec settings like video 
-        * bitrate maxbitrate. This functions gets called for every video codec 
-        * in session. This function overrides function in ancestor classes. 
-        * Function calls also overridden version.
-        */ 
-        virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                        TMceSourceType aSourceType );
-          
-    private: // from MMceStreamObserver, 
-             // overrides the function in CMusEngMceSession
-        
-        void StreamStateChanged( CMceMediaStream& aStream );
-
-        void  InactivityTimeout( CMceMediaStream& aStream,
-                                 CMceRtpSource& aSource );
-    
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngTwoWaySession();
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-
-    private:
-        
-        void ReceivingStarted();
-        
-    private: // Data
-        
-        TRect iLocalRect;
-        
-        TBool iReceiving;
-        
-        TBool iBuffered;
-        
-        /// The remote video player implementing MLcVideoPlayer
-        CMusEngRemoteVideoPlayer* iRemoteVideoPlayer;
-        
-        TRect iSetRemoteRect;
-        TRect iSetLocalRect;
-    };
-
-#endif
-
--- a/mmsharing/mmshengine/inc/musenguriparser.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/musenguriparser.h	Wed Sep 01 12:31:01 2010 +0100
@@ -54,12 +54,12 @@
 		/**
 		* Default constructor
 		*/
-     	TMusEngUriParser( const TDesC16& aUri );
+     	IMPORT_C TMusEngUriParser( const TDesC16& aUri );
      	
      	/**
 		* @returns Uri type
 		*/
-     	TMusEngUriType UriType();
+     	IMPORT_C TMusEngUriType UriType();
 
 		/**
 		* @returns Parsed and validated 8-bit version of contained URI
@@ -67,7 +67,7 @@
 		* @pre UriType() != ENotParsed
 		* @leave KErrNotReady if precondition is not fulfilled
 		*/
-     	HBufC8* GetUri8L();
+     	IMPORT_C HBufC8* GetUri8L();
      	
      	/**
      	* @param aPrefix if ETrue, also sip: or tel:prefix is returned
@@ -76,14 +76,14 @@
 		* @pre UriType() != ENotParsed
 		* @leave KErrNotReady if precondition is not fulfilled
 		*/
-     	HBufC16* GetUri16L( TBool aPrefix );
+     	IMPORT_C HBufC16* GetUri16L( TBool aPrefix );
      
      	/**
         * Parses and validates contained URI
         * @leave KErrCorrupt if URI is not valid SIP or TEL URI
         * @post UriType() != ENotParsed
         */
-        void ParseUriL();
+        IMPORT_C void ParseUriL();
         
      	
     private:
@@ -92,10 +92,11 @@
         void HandleTelUriL();
         void HandleLocalTelUriL();
         
-    private: // Data
+    
+		TBuf8<KMaxUriLength> iUri;
+
+        TMusEngUriType iUriType;
         
-		TBuf8<KMaxUriLength> iUri;
-        TMusEngUriType iUriType; 
     };
 
-#endif // MUSENGURIPARSER_H
+#endif
--- a/mmsharing/mmshengine/inc/musengvideoplayerbase.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGVIDEOPLAYERBASE_H
-#define MUSHENGVIDEOPLAYERBASE_H
-
-// INCLUDES
-#include <e32base.h>
-#include <lcvideoplayer.h>
-#include <lcwindow.h>
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class TMusEngCameraHandler;
-class MMusEngDisplayHandler;
-
-// CLASS DECLARATION
-class CMusEngVideoPlayerBase : 
-    public CBase, public MLcVideoPlayer, public MLcWindow
-    {
-    public: // Constructors and destructor
-        
-        ~CMusEngVideoPlayerBase();
-
-    public: // New functions
-        
-        void SetMceSession( CMceSession* aMceSession );
-        
-    public: // From MLcVideoPlayer
-    
-        virtual void LcPlayL( TLcVideoPlayerSource aSource=ECameraSource );
-        
-        virtual void LcPauseL();        
-        
-        MLcWindow* LcWindow();
-
-        virtual MLcCameraControl* LcCameraControl();
-        
-        virtual MLcSourceFileControl* LcSourceFileControl();
-        
-        virtual MLcDestinationFileControl* LcDestinationFileControl();
-        
-        MLcAudioControl* LcAudioControl();
-    
-        virtual MLcZoomControl* LcZoomControl();
-    
-        virtual MLcBrightnessControl* LcBrightnessControl();
-    
-    public: // from MLcWindow
-        
-        void EnableLcWindowL( TBool aEnable );
-        
-        TBool IsLcWindowEnabled();        
-        
-        void SetLcWindowRectL( TRect aRect );
-        
-        TRect LcWindowRect();
-        
-        void SetLcWindowOrientationL( 
-            TLcWindowOrientation aOrientation );
-        
-        TLcWindowOrientation LcWindowOrientationL();    
-        
-    protected: // Constructors
-        
-        CMusEngVideoPlayerBase(
-            MMusEngDisplayHandler& aDisplayHandler,
-            MLcAudioControl& aLcAudioControl );
-        
-    protected: // Data
-        
-        MMusEngDisplayHandler& iDisplayHandler;
-        MLcAudioControl& iLcAudioControl;
-        
-        CMceSession* iMceSession; // Not owned        
-    };
-
-#endif // MUSHENGVIDEOPLAYERBASE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/inc/musengvolumechangeobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSENGVOLUMECHANGEOBSERVER_H
+#define MUSENGVOLUMECHANGEOBSERVER_H
+
+// INCLUDES
+#include <e32def.h>
+
+// CLASS DECLARATION
+
+/**
+* An interface to be implemented by users of Multimedia Sharing Engine if 
+* they wish to be notified about volume level CenRep keys change
+*
+*/
+class MMusEngVolumeChangeObserver
+    {
+    public: 
+    
+        /**
+	    * Indicates that volume level was changed either by some other 
+	    * application or due to audio route change
+	    * @param aVolume new volume level
+	    * @param aAudioRouteChanged indicates whether volume level changed due
+	    *        to audio route change
+	    */
+        virtual void VolumeChanged( TInt aVolume, TBool aAudioRouteChanged ) = 0;        
+    };
+
+#endif
--- a/mmsharing/mmshengine/inc/mussipprofilehandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/mussipprofilehandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -12,12 +12,10 @@
 * Contributors:
 *
 * Description:
-*  Version     : %version: 6.1.4 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
 
-
 #ifndef MUSSIPPROFILEHANDLER_H
 #define MUSSIPPROFILEHANDLER_H
 
@@ -47,13 +45,14 @@
                               public MSIPProfileRegistryObserver,
                               public MSIPObserver,
                               public MSIPConnectionObserver,
-                              public MSipProfileAlrObserver                             
+                              public MSipProfileAlrObserver
+                              
     {
     MUS_UNITTEST( UT_CMusEngSipProfileHandler )
     
     public:
 
-        /**
+		/**
         * Creates new instance of CMusSipProfileHandler
         * @param aSipProfileId profile id of requested profile
         */
@@ -67,8 +66,8 @@
 
 
     public: // API
-        
-        /**
+
+		/**
         * Creates the SIP profile used.
         * @param aSipProfileId profile ID of requested SIP profile
         */
@@ -95,25 +94,22 @@
         * Should be called when a MuS session terminates.
         */
         void RefreshIapAvailabilities();
-        
-        /**
-         * @return ETrue if SIP profile returned by Profile() is registered
-         */
-        TBool IsRegistered();
 
-        
     private:
 
         /**
         * Constructor
+        *
         */
         CMusSipProfileHandler( MMusSipProfileUser& aUser );
 
         /**
         * Second-phase constructor
+        *
         */
         void ConstructL();
 
+
     private: // From MSIPProfileRegistryObserver
 
         /**
@@ -138,15 +134,15 @@
             TUint32 aProfileId,
             TInt aError );
 
-    private: // From MSIPObserver    
-
+	private: // From MSIPObserver
+ 	
         void IncomingRequest( TUint32 aIapId,
                               CSIPServerTransaction* aTransaction );
 
         void TimedOut( CSIPServerTransaction& aTransaction );
 
-    private: // MSIPConnectionObserver must be implemented to enable SIP profile
-        
+	private: // MSIPConnectionObserver must be implemented to enable SIP profile
+
         void IncomingRequest (CSIPServerTransaction* aTransaction );
 
         void IncomingRequest (CSIPServerTransaction* aTransaction,
@@ -172,10 +168,10 @@
         void ErrorOccured( TInt aError,
                            CSIPTransactionBase& aTransaction,
                            CSIPDialogAssocBase& aDialogAssoc );
-        
+
         void ErrorOccured( TInt aError, CSIPRefresh& aSIPRefresh );
 
-        void ErrorOccured( TInt aError, 
+        void ErrorOccured( TInt aError,
                            CSIPRegistrationBinding& aRegistration );
 
         void ErrorOccured( TInt aError, CSIPDialogAssocBase& aDialogAssoc );
@@ -183,10 +179,10 @@
         void InviteCompleted( CSIPClientTransaction& aTransaction );
 
         void InviteCanceled( CSIPServerTransaction& aTransaction );
-        
-        void ConnectionStateChanged( CSIPConnection::TState aState );     
-        
-    private: // From MSipProfileAlrObserver    
+
+        void ConnectionStateChanged( CSIPConnection::TState aState );
+
+	private: // From MSipProfileAlrObserver
         
         void AlrEvent( MSipProfileAlrObserver::TEvent aEvent,
                        TUint32 aProfileId,
@@ -196,20 +192,19 @@
         void AlrError( TInt aError,
                        TUint32 aProfileId,
                        TUint32 aSnapId,
-                       TUint32 aIapId );         
-  
-    private: // New functions
+                       TUint32 aIapId );
+                       
+	private: // New functions
         
         TUint32 ProfileId() const;
-        
+
     private: // DATA
-        
-        MMusSipProfileUser& iUser;
+    
+    	MMusSipProfileUser& iUser;
         CSIP* iSip;
         CSIPProfileRegistry* iProfileRegistry;
         CSipProfileAlrController* iProfileAlrController;
         CSIPProfile* iSipProfile;
     };
 
-
 #endif // MUSSIPPROFILEHANDLER_H
--- a/mmsharing/mmshengine/inc/mussipprofileuser.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/inc/mussipprofileuser.h	Wed Sep 01 12:31:01 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  
+* Description:
 *
 */
 
@@ -35,13 +35,7 @@
         * Checks whether roaming between access points is allowed.
         * @return ETrue is roaming is allowed, otherwise EFalse.
         */
-        virtual TBool IsRoamingBetweenAPsAllowed() = 0;
-        
-        /**
-        * Indicates that SIP profile has been registered.
-        */
-        virtual void ProfileRegistered() = 0;
-        
+        virtual TBool IsRoamingBetweenAPsAllowed() = 0;        
     };
 
 
--- a/mmsharing/mmshengine/src/musengcamerahandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,681 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengcamerahandler.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-
-// SYSTEM
-#include <mcemanager.h>
-#include <mcecamerasource.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcefilesink.h>
-#include <mcesession.h>
-
-const TInt KMaxBrightness = 100;
-const TInt KMinBrightness = -100;
-const TInt KBrightnessStepSize = 10;
-
-
-//Number of big and small zoom steps on Zoom scale
-const TInt KZoomBigStepCount = 15;
-const TInt KZoomSmallStepCount = KZoomBigStepCount*2;
-const TInt KZoomStepMinSize = 1;
-
-const TInt64 KZoomFasterTime = 333333; // 1/3 second
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TMusEngCameraHandler::TMusEngCameraHandler() :
-    iSession( NULL ),
-    iDefaultBrightness( 0 ),
-    iZoomInTime(0),
-    iZoomOutTime(0),
-    iSmallZoomStep( KZoomStepMinSize ),
-    iBigZoomStep( KZoomStepMinSize ),
-    iCurrentCamera( TMusEngCameraHandler::ECameraNotAvailable ),
-    iCameraUsage( MusSettingsKeys::EUseCameraSwapping )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcCameraCountL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcCameraCountL()" )
-    __ASSERT_ALWAYS( iSession != NULL, User::Leave( KErrNotReady ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    __ASSERT_ALWAYS( camera != NULL, User::Leave( KErrNotReady ) );
-    TInt camerasAvailable = camera->CamerasAvailable();
-    
-    if ( camerasAvailable > 1 && 
-         iCameraUsage != MusSettingsKeys::EUseCameraSwapping )
-        {
-        camerasAvailable = 1;
-        }
-         
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::LcCameraCountL()",
-            camerasAvailable );
-    return camerasAvailable;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::CurrentLcCameraIndex()
-    {
-    return iCurrentCamera;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::ToggleLcCameraL()
-    {
-    TCurrentCamera newCamera( TMusEngCameraHandler::EBackCamera );
-    if ( iCurrentCamera == TMusEngCameraHandler::EBackCamera )
-        {
-        newCamera = TMusEngCameraHandler::EFrontCamera;
-        }
-    ChangeCameraL( newCamera );   
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MinLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MinLcBrightnessL()" )
- 
-    // minimum brightness is not in camera info, but a constant
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MinLcBrightnessL(): %d",
-              KMinBrightness )
-
-    return KMinBrightness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MaxLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MaxLcBrightnessL()" )
-    
-    // maximum brightness is not in camera info, but a constant
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MaxLcBrightnessL(): %d",
-              KMaxBrightness )
-
-    return KMaxBrightness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcBrightnessL()" )
-    
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    TInt brightness = camera->BrightnessL();
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::LcBrightnessL(): %d",
-              brightness )
-
-    return brightness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetLcBrightnessL( TInt aValue )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> TMusEngCameraHandler::SetLcBrightnessL( %d )",
-              aValue )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    camera->SetBrightnessL( aValue );
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::SetLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::IncreaseLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::IncreaseLcBrightnessL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    TInt newBrightness = camera->BrightnessL() + KBrightnessStepSize;
-    
-    if ( newBrightness < KMaxBrightness )
-        {
-        camera->SetBrightnessL( newBrightness );
-        }
-    else
-        {
-        camera->SetBrightnessL( KMaxBrightness );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::IncreaseLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::DecreaseLcBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::DecreaseLcBrightnessL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    TInt newBrightness = camera->BrightnessL() - KBrightnessStepSize;
-
-    if ( newBrightness > KMinBrightness )
-        {
-        camera->SetBrightnessL( newBrightness );
-        }
-    else
-        {
-        camera->SetBrightnessL( KMinBrightness );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::DecreaseLcBrightnessL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MinLcZoomL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MinLcZoomL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    // Although we do not need camera for return value, we have to have it in
-    // order to have proper iCameraInfo
-    MusEngMceUtils::GetCameraL( *iSession );
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MinLcZoomL( %d )",
-              iCameraInfo.iMinZoom )
-
-    return iCameraInfo.iMinZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::MaxLcZoomL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MaxLcZoomL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    // Although we do not need camera for return value, we have to have it in
-    // order to have proper iCameraInfo
-    MusEngMceUtils::GetCameraL( *iSession );
-
-    TInt maxZoom = iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom;
-
-    MUS_LOG1( "mus: [ENGINE]     Max optical zoom( %d )",
-              iCameraInfo.iMaxZoom )
-    MUS_LOG1( "mus: [ENGINE]     Max digital zoom( %d )",
-              iCameraInfo.iMaxDigitalZoom )
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MaxLcZoomL( %d )",
-              maxZoom )
-
-    return maxZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::LcZoomValueL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomValueL" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    TInt currentZoom = camera->ZoomFactorL() + camera->DigitalZoomFactorL();
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::LcZoomValueL( %d )",
-              currentZoom )
-
-    return currentZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetLcZoomValueL( TInt aValue )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> TMusEngCameraHandler::SetLcZoomValueL( %d )", 
-              aValue )
-              
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    __ASSERT_ALWAYS( aValue <= MaxLcZoomL() && aValue >= MinLcZoomL(), 
-                     User::Leave( KErrArgument ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    if ( aValue <= iCameraInfo.iMaxZoom )
-        {
-        MUS_LOG( "mus: [ENGINE]     Optical zoom factor increased" )
-        camera->SetZoomFactorL( aValue ); 
-        }
-    
-    if ( aValue - iCameraInfo.iMaxZoom > 0 )
-        {
-        camera->SetDigitalZoomFactorL( aValue - iCameraInfo.iMaxZoom );
-        MUS_LOG1( "mus: [ENGINE]     Digital zoom factor increased to %d",
-                  aValue - iCameraInfo.iMaxZoom )
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngCameraHandler::SetLcZoomValueL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::LcZoomInL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomInL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    // First try to increase optical zoom factor. If in maximum value, try to
-    // increase digital zoom factor.
-    TInt stepSize = ZoomStepSize( iZoomInTime );
-    TInt zoomFactor = camera->ZoomFactorL();
-    TInt zoomDigitalFactor = camera->DigitalZoomFactorL();
- 
-    //increate optical zoom factor
-    if ( zoomFactor + stepSize <= iCameraInfo.iMaxZoom )
-        {
-        //optical zoom factor is enough
-        camera->SetZoomFactorL( zoomFactor + stepSize );
-        stepSize = 0;
-        }
-    else if (zoomFactor <  iCameraInfo.iMaxZoom)
-       {
-       stepSize -=  iCameraInfo.iMaxZoom - zoomFactor;
-       camera->SetZoomFactorL( iCameraInfo.iMaxZoom );
-       }
-
-    //increate digital zoom factor
-    if (stepSize > 0)
-        {
-        if ( zoomDigitalFactor + stepSize <= iCameraInfo.iMaxDigitalZoom )
-            {
-            camera->SetDigitalZoomFactorL( zoomDigitalFactor + stepSize );
-            }
-        else 
-            {
-            camera->SetDigitalZoomFactorL( iCameraInfo.iMaxDigitalZoom );
-            MUS_LOG( "mus: [ENGINE]     TMusEngCameraHandler::ZoomInL(): \
-                      Optical and digital zoom factors are in maximum value" )
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::LcZoomInL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::LcZoomOutL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::LcZoomOutL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    // First try to decrease digital zoom factor. If already zero, try to
-    // decrease optical zoom factor.
-    TInt stepSize = ZoomStepSize( iZoomOutTime );
-    TInt zoomFactor = camera->ZoomFactorL();
-    TInt zoomDigitalFactor = camera->DigitalZoomFactorL();
-    
-    //decreate digital zoom factor firstly
-    if ( zoomDigitalFactor - stepSize >= 0  )
-        {
-        //digital zoom factor is enough
-        camera->SetDigitalZoomFactorL( zoomDigitalFactor - stepSize );
-        stepSize = 0;
-        }
-    else if ( zoomDigitalFactor > 0 )
-        {
-        stepSize -= zoomDigitalFactor;
-        camera->SetDigitalZoomFactorL( 0 );
-        MUS_LOG("mus: [ENGINE] Digigal Factor to zero")
-        }
-   
-    //decreate optical zoom factor firstly
-    if ( stepSize > 0 )
-        {
-        if ( zoomFactor - stepSize > iCameraInfo.iMinZoom )
-            {
-            camera->SetZoomFactorL( zoomFactor - stepSize );
-            }
-        else 
-            {
-            MUS_LOG( "mus: [ENGINE]    TMusEngCameraHandler::LcZoomOutL():\
-                      Optical and digital zoom factors are in minimum value" )
-            camera->SetZoomFactorL( iCameraInfo.iMinZoom );
-            }
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::LcZoomOutL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetSession( CMceSession* aSession )
-    {
-    iSession = aSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::InitializeL( CMceCameraSource& aCamera )
-    {
-    aCamera.GetCameraInfo( iCameraInfo );
-    
-    InitializeZoomStepSize();
-    
-    iCurrentCamera = EBackCamera;
-    if ( iCameraUsage == MusSettingsKeys::EUseOnlySecondaryCamera )
-       {
-       iCurrentCamera = EFrontCamera;
-       }
-    aCamera.SetCameraIndexL( (TInt)iCurrentCamera );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::PlayL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::PlayL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    if ( !camera->IsEnabled() )
-        {
-        camera->EnableL();
-        }
-    else
-        {
-        MUS_LOG( "mus: [ENGINE]    Camera already enabled, ignore request" )
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::PlayL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Disable camera if not already disabled
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::PauseL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::PauseL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    if ( camera->IsEnabled() )
-        {
-        camera->DisableL();
-        }
-    else
-        {
-        MUS_LOG( "mus: [ENGINE]    Camera already disabled, ignore request" )
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::PauseL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool TMusEngCameraHandler::IsPlayingL()
-    {
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    return ( MusEngMceUtils::GetCameraL( *iSession )->IsEnabled() );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::InitializeZoomStepSize()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::InitializeZoomStepSize()" )
-    MUS_LOG2( "iMaxZoom = %d, iMinZoom = %d", iCameraInfo.iMaxZoom, iCameraInfo.iMinZoom);
-    MUS_LOG2( "iMaxDigitalZoom = %d, iMaxDigitalZoomFactor = %d", 
-            iCameraInfo.iMaxDigitalZoom, iCameraInfo.iMaxDigitalZoomFactor);
-
-    iBigZoomStep = ( iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom - 
-            iCameraInfo.iMinZoom ) / KZoomBigStepCount;
-            
-    if ( iBigZoomStep < KZoomStepMinSize )
-        iBigZoomStep = KZoomStepMinSize;
-
-    iSmallZoomStep = ( iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom - 
-            iCameraInfo.iMinZoom ) / KZoomSmallStepCount;
-    
-    if ( iSmallZoomStep < KZoomStepMinSize )
-        iSmallZoomStep = KZoomStepMinSize;
-
-    MUS_LOG2( "mus: [ENGINE]  iSmallZoomStep = %d, iBigZoomStep = %d", 
-            iSmallZoomStep, iBigZoomStep )
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::InitializeZoomStepSize()" )   
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::ReadCameraUsageKeyL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> TMusEngCameraHandler::ReadCameraUsageKeyL()" )
-
-    // We try to read camera usage. If we do not succeed, we use default
-    iCameraUsage = MusSettingsKeys::EUseCameraSwapping;
-    TRAPD( error, 
-            iCameraUsage = MultimediaSharingSettings::CameraUsageL() )
-    __ASSERT_ALWAYS( error == KErrNone || error == KErrNotFound, 
-                     User::Leave( error ) );
-    
-    MUS_LOG( "mus: [ENGINE] <- TMusEngCameraHandler::ReadCameraUsageKeyL()" )
-    
-    }
-
-// -----------------------------------------------------------------------------
-//  Calculate the zoom step based time escaped
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::ZoomStepSize( TInt64& aTime )
-    {
-    TTime now;
-    now.HomeTime();
-    TInt64 timeNow = now.Int64();   
-    TInt stepSize = ( ( timeNow - aTime ) <= KZoomFasterTime ) ? iBigZoomStep : iSmallZoomStep;
-    
-    aTime = now.Int64();
-    
-    MUS_LOG1( "mus: [ENGINE]  stepSize = %d", stepSize );    
-
-    return stepSize;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt TMusEngCameraHandler::CamerasAvailableL( 
-    TMusEngCameraHandler::TCurrentCamera& aCurrentCamera )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::CamerasAvailableL()" )
-    __ASSERT_ALWAYS( iSession != NULL, User::Leave( KErrNotReady ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    __ASSERT_ALWAYS( camera != NULL, User::Leave( KErrNotReady ) );
-    aCurrentCamera = iCurrentCamera;
-    TInt camerasAvailable = camera->CamerasAvailable();
-    
-    if ( camerasAvailable > 1 && 
-         iCameraUsage != MusSettingsKeys::EUseCameraSwapping )
-        {
-        camerasAvailable = 1;
-        }
-         
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::CamerasAvailable()" )
-    return camerasAvailable;  
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::ChangeCameraL( TCurrentCamera aCurrentCamera ) 
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::ChangeCameraL()" )
-    __ASSERT_ALWAYS( iSession != NULL, User::Leave( KErrNotReady ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    CMceDisplaySink* display = MusEngMceUtils::GetDisplayL( *iSession );
-    
-    if ( camera->CamerasAvailable() )
-        {
-        if ( TMusEngCameraHandler::EFrontCamera == aCurrentCamera &&
-             TMusEngCameraHandler::EFrontCamera != iCurrentCamera )
-            {
-            MUS_LOG( "mus: [ENGINE]  Set Front camera" )
-            iCurrentCamera = TMusEngCameraHandler::EFrontCamera;
-            ChangeActiveCameraL( iCurrentCamera );
-            }
-        else if ( TMusEngCameraHandler::EBackCamera == aCurrentCamera && 
-                  TMusEngCameraHandler::EBackCamera != iCurrentCamera )
-            {
-            MUS_LOG( "mus: [ENGINE]  Set Back camera " )
-            iCurrentCamera = TMusEngCameraHandler::EBackCamera;
-            ChangeActiveCameraL( iCurrentCamera );
-            }
-        else if ( TMusEngCameraHandler::ECameraNotAvailable == aCurrentCamera )
-            {
-            if ( iCurrentCamera  == TMusEngCameraHandler::EBackCamera )
-                {
-                iCurrentCamera  = TMusEngCameraHandler::EFrontCamera;
-                }
-            else
-                {
-                iCurrentCamera  = TMusEngCameraHandler::EBackCamera;
-                }
-            ChangeActiveCameraL( iCurrentCamera );
-            }
-        }
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::ChangeCameraL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//  Disable camera before it changes it. It enables camera after change. 
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::ChangeActiveCameraL( TCurrentCamera aNewCamera )
-    {
-    MUS_LOG( "mus: [ENGINE] ->  ChangeActiveCamera()" )
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    CMceDisplaySink* display = MusEngMceUtils::GetDisplayL( *iSession );
-    MUS_LOG( "mus: [ENGINE]  Camera enabled ?" )
-    if ( camera->IsEnabled() )
-        {
-        MUS_LOG( "mus: [ENGINE]  Is view finder enabled? " )
-            if ( display->IsEnabled() )
-                {
-                MUS_LOG( "mus: [ENGINE]  Disable view finder" )
-                display->DisableL();
-                }
-        MUS_LOG( "mus: [ENGINE]  Disable camera" )
-        camera->DisableL();
-        camera->SetCameraIndexL( aNewCamera );
-        camera->EnableL();
-        display->EnableL();
-        }
-    else
-        {
-        if ( display->IsEnabled() )
-            {
-            MUS_LOG( "mus: [ENGINE]  Disable view finder" )
-            display->DisableL();
-            }
-        MUS_LOG( "mus: [ENGINE]  set camera index" )        
-        camera->SetCameraIndexL( aNewCamera );
-        MUS_LOG( "mus: [ENGINE]  Enable camera" ) 
-        display->EnableL();
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  -> fetching new iCameraInfo..." )
-    camera->GetCameraInfo( iCameraInfo );
-    InitializeZoomStepSize();
-    }
--- a/mmsharing/mmshengine/src/musengclipsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musengclipsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,14 +18,14 @@
 
 // USER
 #include "musengclipsession.h"
+#include "musengclipsessionobserver.h"
+#include "musengsessionobserver.h"
 #include "musengmceoutsession.h"
 #include "musenglivesession.h"
 #include "musengmceutils.h"
 #include "musenglogger.h"
-#include "musengclipvideoplayer.h"
 
 // SYSTEM
-#include <lcsessionobserver.h>
 #include <mcemanager.h>
 #include <mcesession.h>
 #include <mcestreambundle.h>
@@ -39,49 +39,39 @@
 #include <mceamrcodec.h>
 #include <mcevideocodec.h>
 #include <DRMCommon.h>
+#include <f32file.h>
 
 
 // CONSTANTS
+
+const TInt64 KMicroSecondsInOneSecond = 1000000;
 const TInt KMusEngAmrBitRate = KMceAmrNbBitrate475;
 const TUint KMusEngAllowedAmrBitrates = KMceAllowedAmrNbBitrate475;
 
+const TInt KFastWindingFactor = 4;
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngClipSession* CMusEngClipSession::NewL()
+EXPORT_C CMusEngClipSession* CMusEngClipSession::NewL(
+                        const TRect& aRect,
+                        MMusEngSessionObserver& aSessionObserver,
+                        MMusEngOutSessionObserver& aOutSessionObserver,
+                        MMusEngClipSessionObserver& aClipSessionObserver,
+                        TUint aSipProfileId )
     {
-    CMusEngClipSession* self = new( ELeave )CMusEngClipSession();
+    CMusEngClipSession* self = new( ELeave ) CMusEngClipSession(
+                                                    aSessionObserver,
+                                                    aOutSessionObserver,
+                                                    aClipSessionObserver,
+                                                    aRect );
     CleanupStack::PushL( self );
-    self->ConstructL();
+    self->ConstructL( aSipProfileId );
     CleanupStack::Pop( self );
     return self;
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipSession::CMusEngClipSession()
-    : CMusEngMceOutSession()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::ConstructL(...)" )
-
-    CMusEngMceOutSession::ConstructL();
-    
-    iClipVideoPlayer = CMusEngClipVideoPlayer::NewL( *this, *this  );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::ConstructL(...)" )
-    }
 
 // -----------------------------------------------------------------------------
 //
@@ -90,31 +80,362 @@
 CMusEngClipSession::~CMusEngClipSession()
     {
     MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::~CMusEngClipSession()" )
-    
-    delete iClipVideoPlayer;
-    
     MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::~CMusEngClipSession()" )
     }
 
+
 // -----------------------------------------------------------------------------
-// From MLcSession
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::SetClipL( const TDesC& aFileName )
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::SetClipL(...)" )
+
+    __ASSERT_ALWAYS( !IsProtectedFileL( aFileName ),
+                     User::Leave( KErrPermissionDenied ) );
+    
+    if ( iSession )
+        {
+        CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+        file->UpdateL( aFileName );
+        }
+
+    iFileName = aFileName;
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::SetClipL(...)" )
+
+    }
+
+
+// -----------------------------------------------------------------------------
+// Since MCE does not at the moment support SetFastForwardL function, this
+// functionality is implemented by taking a timestamp when forwarding is
+// started and calculating a new position when it is ended.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::FastForwardL( TBool aUseFFWD )
+    {
+    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipSession::FastForward(%d)", aUseFFWD )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+
+    if ( aUseFFWD )
+        {
+        // Ignore if we are already fastforwarding
+        if ( iFFWDStartTime.Int64() > 0 )
+            {
+            return;
+            }
+
+        // Stop rewinding if ongoing, else just pause file source
+        if ( iFRWDStartTime.Int64() > 0 )
+            {
+            FastRewindL( EFalse );
+            }
+        else
+            {
+            file->DisableL();
+            }
+            
+        // Get timestamp for starttime
+        iFFWDStartTime.HomeTime();
+        }
+    else
+        {
+        // Leave if we are not fastforwarding
+        if ( iFFWDStartTime.Int64() == 0 )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+
+        // Set new position
+        file->SetPositionL( PositionMicroSecondsL() );
+        MUS_LOG( "                 SetPositionL returned without error " )
+        
+        // Reset timer
+        iFFWDStartTime = TTime( 0 );
+        }
+
+    MUS_LOG1( "mus: [ENGINE] <- CMusEngClipSession::FastForward(%d)", aUseFFWD )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Since MCE does not at the moment support SetFastRewindL function, this
+// functionality is implemented by taking a timestamp when rewinding is
+// started and calculating a new position when it is ended.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::FastRewindL( TBool aUseFRWD )
+    {
+    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipSession::FastRewind(%d)", aUseFRWD )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+
+    if ( aUseFRWD )
+        {
+        // Ignore if we are already fastrewinding
+        if ( iFRWDStartTime.Int64() > 0 )
+            {
+            return;
+            }
+
+        // Stop fastforwarding if ongoing, else just pause file source
+        if ( iFFWDStartTime.Int64() > 0 )
+            {
+            FastForwardL( EFalse );
+            }
+        else
+            {
+            file->DisableL();
+            }
+            
+        // Get timestamp for starttime
+        iFRWDStartTime.HomeTime();
+        }
+    else
+        {
+        // Leave if we are not fastrewinding
+        if ( iFRWDStartTime.Int64() == 0 )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+
+        // Set new position
+        file->SetPositionL( PositionMicroSecondsL() );
+        MUS_LOG( "                 SetPositionL returned without error " )
+        
+        // Reset timer
+        iFRWDStartTime = TTime( 0 );
+        }
+
+    MUS_LOG1( "mus: [ENGINE] <- CMusEngClipSession::FastRewind(%d)", aUseFRWD  )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TTimeIntervalSeconds CMusEngClipSession::PositionL()
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::PositionL()" )
+    
+    TTimeIntervalMicroSeconds currentPosition = PositionMicroSecondsL();
+    
+    MUS_LOG1( "mus: [ENGINE] <- CMusEngClipSession::PositionL(), pos:%d", 
+              currentPosition.Int64() )
+    return TTimeIntervalSeconds( static_cast<TInt>( 
+                    currentPosition.Int64() / KMicroSecondsInOneSecond ) );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
 // -----------------------------------------------------------------------------
 //
-MLcVideoPlayer* CMusEngClipSession::LocalVideoPlayer()
+EXPORT_C TTimeIntervalSeconds CMusEngClipSession::DurationL()
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::DurationL()" )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+
+    TTimeIntervalMicroSeconds duration = file->DurationL();
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::DurationL()" )
+    return TTimeIntervalSeconds(
+            static_cast<TInt>( duration.Int64() / KMicroSecondsInOneSecond ) );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::SetPositionL (
+                        const TTimeIntervalSeconds& aPosition )
+    {
+    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipSession::SetPositionL (%d)",
+              aPosition.Int() )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+
+    TTimeIntervalMicroSeconds position( 
+            KMicroSecondsInOneSecond * static_cast<TInt64>(aPosition.Int()) );
+
+    if ( position == 0 )
+        {
+        iRewindedToBeginning = ETrue;
+        }
+        
+    file->SetPositionL( position );
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::SetPositionL ()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::TranscodeL( const TFileName& aFileName )
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::TranscodeL(...)" )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+
+    const RPointerArray<CMceMediaStream>& streams = iSession->Streams();
+
+    for ( TInt i = 0; i < streams.Count(); ++i )
+        {
+        if ( streams[i]->State() == CMceMediaStream::ETranscodingRequired )
+            {
+            if ( streams[i]->Type() == KMceAudio )
+                {
+                AddAmrCodecL( static_cast<CMceAudioStream&>( *streams[i] ) );
+                }
+            else
+                {
+                AddVideoCodecL( static_cast<CMceVideoStream&>( *streams[i] ) );
+                }
+            }
+        }
+
+    // Set dest file already before transcoding as output file is deleted in failure case
+    iTranscodingDestFileName = aFileName; 
+    TRAPD( err, file->TranscodeL( aFileName ) );    
+    HandleTranscodingFailureL( err );
+    iTranscodingOngoing = ETrue;
+      
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::TranscodeL(...)" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::CancelTranscodeL()
     {
-    return iClipVideoPlayer;
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::CancelTranscodeL()" )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+
+    TRAPD( err, file->CancelTranscodeL() );
+    err = err; // Silence warning in UREL build
+    MUS_LOG1( "mus: [ENGINE] - cancel result %d", err )
+    // Even if cancel fails, try to delete the partial clip
+
+    MUS_LOG( "mus: [ENGINE] - delete the partially converted clip" )
+    
+    DeleteTranscodingDestinationFileL();
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::CancelTranscodeL()" )
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::PlayL()
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::PlayL()" )
+
+    __ASSERT_ALWAYS( iSession &&
+                     iFFWDStartTime.Int64() == 0 &&
+                     iFRWDStartTime.Int64() == 0, 
+                     User::Leave( KErrNotReady ) );                     
+
+    iPause = EFalse;
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+
+    if ( !file->IsEnabled() )
+        {
+        file->EnableL();
+        
+        iClipEnded = EFalse;
+        // No need to enable audio separarely
+        }
+    else
+        {
+        MUS_LOG( "mus: [ENGINE]    File is already enabled, ignore request" )
+        }
+        
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::PlayL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::PauseL()
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::PauseL()" )
+
+    __ASSERT_ALWAYS( iSession &&
+                     iFFWDStartTime.Int64() == 0 &&
+                     iFRWDStartTime.Int64() == 0, 
+                     User::Leave( KErrNotReady ) );  
+
+    
+    iPause = ETrue;
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+    
+    if ( file->IsEnabled() )
+        {
+        file->DisableL();
+
+        // No need to disable audio separarely
+        }
+    else
+        {
+        MUS_LOG( "mus: [ENGINE]    File is already disabled, ignore request" )
+        }
+        
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::PauseL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngClipSession::IsPlayingL()
+    {
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    
+    return ( MusEngMceUtils::GetFileSourceL( *iSession )->IsEnabled() );
+    }
+
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMusEngClipSession::CompleteSessionStructureL(
-    CMceStreamBundle& aLocalBundle )
+                                            CMceStreamBundle& aLocalBundle )
     {
     MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::CompleteSessionStructureL()" )
 
     __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    __ASSERT_ALWAYS( iFileName != KNullDesC(), User::Leave( KErrNotReady ) );
 
     // Create outgoing video stream
     CMceVideoStream* videoStream = CMceVideoStream::NewLC();
@@ -123,8 +444,8 @@
     videoStream->AddSinkL( rtpsink );
     CleanupStack::Pop( rtpsink );
 
-    CMceFileSource* fileSource = 
-        CMceFileSource::NewLC( *iManager, iClipVideoPlayer->LcFileName() );
+    CMceFileSource* fileSource = CMceFileSource::NewLC( *iManager,
+                                                        iFileName );
     fileSource->DisableL(); // Start session in pause mode.
     videoStream->SetSourceL( fileSource );
     CleanupStack::Pop( fileSource );
@@ -133,12 +454,11 @@
     CleanupStack::Pop( videoStream );
 
     ConstructAudioStructureL( aLocalBundle );
-    
-    iClipVideoPlayer->SetMceSession( iSession );
 
     MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::CompleteSessionStructureL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 // Checks that that there is no need for transcoding before calling
 // overridden base class variant of this function.
@@ -152,6 +472,9 @@
 
     const RPointerArray<CMceMediaStream>& streams = iSession->Streams();
 
+    TBool transcodingRequired = EFalse;
+    TBool transcodingRequiredDueUnknownCaps = EFalse;
+    
     if ( iVideoCodecList )
         {
         MUS_LOG_TDESC8( "iVideoCodecList: ", iVideoCodecList->Des() )
@@ -160,33 +483,58 @@
     CMceVideoStream* videoStream = NULL;
     for ( TInt i = 0; i < streams.Count(); ++i )
         {
-        if ( streams[i]->State() == CMceMediaStream::ETranscodingRequired )
+        videoStream = static_cast<CMceVideoStream*>( streams[i] );
+        
+        if ( iTranscodingRequiredDueMissingOptions )
             {
-            User::Leave( KErrNotSupported );
+            MUS_LOG( "      -> establish with current codec, remote capa unknown!!!" )
+            TBool ignoreOptionsQueryCodecs( ETrue );
+            AddVideoCodecL( *videoStream, ignoreOptionsQueryCodecs );  
             }
-        else if ( streams[i]->Type() == KMceVideo &&
-                  !IsH264Supported() )
+        else if ( streams[i]->State() == CMceMediaStream::ETranscodingRequired )
+            {
+            transcodingRequired = ETrue;
+            }
+        else if ( streams[i]->Type() == KMceVideo && !IsH264Supported() )
             {
             MUS_LOG( "                -> video stream found!!!" )
-            videoStream = static_cast<CMceVideoStream*>( streams[i] );
             
             //transcoding of H264 is not needed only if we know explicitly
-            //that the peer supports it (from OPTIONS response)
-                            
+            //that the peer supports it (from OPTIONS response)             
             const RPointerArray<CMceVideoCodec>& codecs = videoStream->Codecs();
             for ( TInt codecIndex = 0; codecIndex < codecs.Count(); ++codecIndex )
                 {
                 if ( codecs[codecIndex]->SdpName() == KMceSDPNameH264() )                     
                     {
-                    User::Leave( KErrNotSupported );
+                    transcodingRequired = ETrue;
+                    transcodingRequiredDueUnknownCaps = !iVideoCodecList;
+                    MUS_LOG( " -> Removing H264 codec from video stream" )
+                    videoStream->RemoveCodecL( *codecs[codecIndex] );
+                    codecIndex = 0;
                     }
-                }            
+                }
+            
+            if ( codecs.Count() == 0)
+                {
+                // At least one codec should be in the stream list. 
+                MUS_LOG( " -> Adding codec, since codecs list is empty " )
+                AddVideoCodecL( *videoStream );  
+                }                
             } 
         }
 
-    CMusEngMceOutSession::EstablishSessionL();
-    // Now session state is right to adjust volume
-    SetSpeakerVolumeL( LcVolumeL() );
+    iTranscodingRequiredDueMissingOptions = transcodingRequiredDueUnknownCaps;
+    
+    if ( transcodingRequired )
+        {
+        iClipSessionObserver.TranscodingNeeded(iTranscodingRequiredDueMissingOptions);
+        }
+    else
+        {                
+        CMusEngMceOutSession::EstablishSessionL();
+        // Now session state is right to adjust volume
+        SetSpeakerVolumeL( VolumeL() );
+        }
 
     MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::EstablishSessionL()" )
     }
@@ -229,11 +577,49 @@
     
     DetermineBufferingPeriod( aStream );
 
-    if ( iClipVideoPlayer->HasClipEnded() )
+    if ( aStream.State() == CMceMediaStream::ETranscoding )
+        {
+        CMceFileSource* file = static_cast<CMceFileSource*>(aStream.Source());
+        TInt progressPercentage = 0;
+        TRAP_IGNORE( progressPercentage = file->TranscodingProgressL() )
+        iClipSessionObserver.TranscodingProgressed( progressPercentage );
+        }
+    else if ( aStream.State() == CMceMediaStream::EInitialized )
+        {
+        if ( iTranscodingOngoing )
+            {
+            MUS_LOG( "mus: [ENGINE]     Transcoding completed." )
+            
+            // Filename has been updated in MCE side but unfortunately
+            // there's no getter for the filename in API.
+            iFileName = iTranscodingDestFileName;
+        
+            DoCompleteTranscoding();
+            }
+        }
+    else if ( aStream.State() == CMceMediaStream::ETranscodingRequired &&
+              iTranscodingOngoing )
+        {
+        MUS_LOG( "mus: [ENGINE]     Transcoding failed." )
+        
+        iClipSessionObserver.TranscodingFailed();
+        iTranscodingOngoing = EFalse;
+        iTranscodingRequiredDueMissingOptions = EFalse;
+        }
+    else if ( HasClipEnded() )
         {
         MUS_LOG( "mus: [ENGINE]     Clip ended." )
-        InformObserverAboutPlayerStateChange( iClipVideoPlayer );
+        
+        iDelayFileEndingPos = 0;
+        iClipEnded = ETrue;
+        
+        iClipSessionObserver.EndOfClip();
         }
+    else if ( IsRewindFromEnd() )
+    	{
+        TRAP_IGNORE( iClipSessionObserver.RewindFromEndL() );
+    	}
+    
     else
         {
         // Cannot handle, forward to the ancestor class
@@ -247,19 +633,77 @@
 //
 // -----------------------------------------------------------------------------
 //
+CMusEngClipSession::CMusEngClipSession(
+                        MMusEngSessionObserver& aSessionObserver,
+                        MMusEngOutSessionObserver& aOutSessionObserver,
+                        MMusEngClipSessionObserver& aClipSessionObserver,
+                        const TRect& aRect )
+    : CMusEngMceOutSession( aRect,
+                            aSessionObserver,
+                            aOutSessionObserver ),
+      iClipSessionObserver( aClipSessionObserver )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngClipSession::ConstructL( TUint aSipProfileId )
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::ConstructL(...)" )
+
+    CMusEngMceOutSession::ConstructL( aSipProfileId );
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::ConstructL(...)" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Check is file DRM protected.
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusEngClipSession::IsProtectedFileL( const TDesC& aClipFile )
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::IsProtectedFileL(...)" )
+
+    TBool isDRMProtected = EFalse;
+    DRMCommon* drmapi = DRMCommon::NewL();
+    CleanupStack::PushL( drmapi );
+
+    User::LeaveIfError( drmapi->Connect() );
+    //Check DRM file protection
+    User::LeaveIfError( drmapi->IsProtectedFile( aClipFile, isDRMProtected ) );
+    drmapi->Disconnect();
+
+    CleanupStack::PopAndDestroy( drmapi );
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::IsProtectedFileL(...)" )
+    return isDRMProtected;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 void CMusEngClipSession::AddAmrCodecL( CMceAudioStream& aAudioStream )
     {
     MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::AddAmrCodecL" )
 
     // Remove old codecs
+
     while ( aAudioStream.Codecs().Count() > 0 )
         {
         aAudioStream.RemoveCodecL( *aAudioStream.Codecs()[0] );
         }
 
     // Create AMR codec instance
+
     const RPointerArray<const CMceAudioCodec>& supportedCodecs =
-        iManager->SupportedAudioCodecs();
+                                            iManager->SupportedAudioCodecs();
 
     CMceAudioCodec* amr = NULL;
 
@@ -269,10 +713,12 @@
             {
             amr = supportedCodecs[i]->CloneL();
             CleanupStack::PushL( amr );
-            User::LeaveIfError( 
-                amr->SetAllowedBitrates( KMusEngAllowedAmrBitrates ) );
+
+            User::LeaveIfError(
+                    amr->SetAllowedBitrates( KMusEngAllowedAmrBitrates ) );
             User::LeaveIfError( amr->SetBitrate( KMusEngAmrBitRate ) );
             aAudioStream.AddCodecL( amr );
+
             CleanupStack::Pop( amr );
             break; // We must have only one codec
             }
@@ -283,12 +729,14 @@
     MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::AddAmrCodecL" )
     }
 
+
 // -----------------------------------------------------------------------------
 // Create codec instance, H264 is used only if other end supports it for sure,
 // otherwise H263 is used.
 // -----------------------------------------------------------------------------
 //
-void CMusEngClipSession::AddVideoCodecL( CMceVideoStream& aVideoStream )
+void CMusEngClipSession::AddVideoCodecL( 
+    CMceVideoStream& aVideoStream, TBool aIgnoreNegotiated )
     {
     MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::AddVideoCodecL" )
 
@@ -299,13 +747,13 @@
         aVideoStream.RemoveCodecL( *aVideoStream.Codecs()[0] );
         }
 
-    const RPointerArray< const CMceVideoCodec >& supportedCodecs =
-        iManager->SupportedVideoCodecs();
+    const RPointerArray<const CMceVideoCodec>& supportedCodecs =
+                                            iManager->SupportedVideoCodecs();
 
     CMceVideoCodec* addedCodec = NULL;
     
-    TPtrC8 addedCodecName = 
-            IsH264Supported() ? KMceSDPNameH264() : KMceSDPNameH2632000();
+    TPtrC8 addedCodecName = ( aIgnoreNegotiated || IsH264Supported() ) ? 
+        KMceSDPNameH264() : KMceSDPNameH2632000();
     
     MUS_LOG_TDESC8( "mus: [ENGINE] adding codec : ", addedCodecName ); 
             
@@ -327,12 +775,123 @@
     }
 
 // -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusEngClipSession::HasClipEnded()
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::HasClipEnded()" )
+
+    TBool hasClipEnded = EFalse;
+
+    if ( iSession )
+        {
+        
+        CMceVideoStream* videoOut = NULL;
+        
+        TRAPD( error, 
+               videoOut = MusEngMceUtils::GetVideoOutStreamL( *iSession ) );
+        if( error != KErrNone ) 
+            {
+            MUS_LOG1( "mus: [ENGINE]     Error in GetVideoOutStreamL #%d", error )
+            return hasClipEnded;
+            }
+
+        CMceFileSource* filesource = NULL;
+        TRAP( error, filesource = MusEngMceUtils::GetFileSourceL( *iSession ) )
+
+        if ( error == KErrNone )
+            {
+            TTimeIntervalMicroSeconds position;
+            TTimeIntervalMicroSeconds duration;
+            TRAP( error, position = filesource->PositionL() );
+            TRAPD( error1, duration = filesource->DurationL() );
+            if ( error != KErrNone || error1 != KErrNone )
+                {
+                return hasClipEnded;
+                }
+                
+            MUS_LOG2( "mus: [ENGINE]    position = %Ld, duration = %Ld", 
+                        position.Int64(), 
+                        duration.Int64() )
+                        
+            TRAP( error, hasClipEnded = 
+                        ( position.Int64() == 0 && 
+                          !filesource->IsEnabled() && 
+                          videoOut->State() == CMceMediaStream::EDisabled ) )
+            if(  hasClipEnded )
+                {
+                MUS_LOG( "mus: [ENGINE]     End of clip" )
+                }
+            }
+        }
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::HasClipEnded()" )
+    return hasClipEnded;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TTimeIntervalMicroSeconds CMusEngClipSession::PositionMicroSecondsL()
+    {
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iSession );
+
+    TTimeIntervalMicroSeconds position = file->PositionL();
+    TTimeIntervalMicroSeconds duration = file->DurationL();
+       
+    TTimeIntervalMicroSeconds calculatedPosition;
+    
+    // Adjust position if we are fastforwarding or -rewinding
+    if ( iFFWDStartTime.Int64() != 0 )
+        {
+        TTime now;
+        now.HomeTime();
+        calculatedPosition = KFastWindingFactor *
+                             now.MicroSecondsFrom( iFFWDStartTime ).Int64() +
+                             position.Int64();
+        if ( calculatedPosition > duration )
+            {
+            calculatedPosition = duration;
+            }
+        }
+    else if ( iFRWDStartTime.Int64() != 0 )
+        {
+        TTime now;
+        now.HomeTime();
+        calculatedPosition = position.Int64() -
+                             KFastWindingFactor *
+                             now.MicroSecondsFrom( iFRWDStartTime ).Int64();
+        if ( calculatedPosition < 0 )
+            {
+            calculatedPosition = 0;
+            }
+            
+        if ( calculatedPosition == 0 )
+            {
+            iRewindedToBeginning = ETrue;
+            }
+        }
+    else
+        {
+        calculatedPosition = position;
+        }
+        
+    return calculatedPosition;
+    }
+    
+
+// -----------------------------------------------------------------------------
 // If member file contains audio, add appropriate amount of audio streams to
 // session structure
 // -----------------------------------------------------------------------------
 //
 void CMusEngClipSession::ConstructAudioStructureL(
-    CMceStreamBundle& aLocalBundle )
+                                            CMceStreamBundle& aLocalBundle )
     {
     MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::ConstructAudioStructureL()" )
 
@@ -422,11 +981,11 @@
             const TInt KMusMinimumBufferingPeriod( 500000 );
             if ( bufferingPeriod > KMusMinimumBufferingPeriod )
                 {
-                iClipVideoPlayer->SetBufferingPeriod( bufferingPeriod );
+                iBufferingPeriod = bufferingPeriod;
                 }
                 
             MUS_LOG1( "mus: [ENGINE] current buffering period:%d", 
-                      bufferingPeriod.Int64() )
+                      iBufferingPeriod.Int64() )
             
             iBufferingStartedTime = 0;
             }
@@ -435,4 +994,131 @@
     MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::DetermineBufferingPeriod()" )
     }
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusEngClipSession::IsH264Supported() const
+    {
+    return ( iVideoCodecList && iVideoCodecList->FindF( KMceSDPNameH264() ) >= 0 );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngClipSession::HandleTranscodingFailureL( TInt aError )
+    {
+    if ( aError == KErrNone )
+        {
+        return;
+        }
+
+    TRAP_IGNORE( DeleteTranscodingDestinationFileL() )
+
+    User::LeaveIfError( aError );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusEngClipSession::DoCompleteTranscoding()
+    {
+    iTranscodingOngoing = EFalse;
+              
+    iClipSessionObserver.TranscodingCompletedInit();  
+      
+    TRAPD( error, EstablishSessionL() )
+    iTranscodingRequiredDueMissingOptions = EFalse;
+    if ( error != KErrNone )
+        {
+        iSessionObserver.SessionFailed();
+        }
+    
+    // Next call does not return before session establishment
+    iClipSessionObserver.TranscodingCompletedFinalize();            
+
+    return error;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngClipSession::DeleteTranscodingDestinationFileL()
+    {
+    RFs fs;
+    User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL( fs );
+
+    CFileMan* fileMan = CFileMan::NewL( fs );    
+    CleanupStack::PushL( fileMan );
+
+    MUS_LOG_TDESC8( "mus: [ENGINE] - deleting trascoding destination, filename",
+                    iTranscodingDestFileName )
+    TInt err = fileMan->Delete( iTranscodingDestFileName );
+    MUS_LOG1( "mus: [ENGINE] - file delete result %d", err )
+
+    CleanupStack::PopAndDestroy( fileMan );
+    CleanupStack::PopAndDestroy(); // fs
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusEngClipSession::IsRewindFromEnd()
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::IsRewindFromEnd()" )
+
+    TBool isRewindFromEnd = EFalse;
+
+    if ( iSession )
+        {
+        
+        CMceVideoStream* videoOut = NULL;
+        
+        TRAPD( error, 
+               videoOut = MusEngMceUtils::GetVideoOutStreamL( *iSession ) );
+        if( error != KErrNone ) 
+            {
+            MUS_LOG1( "mus: [ENGINE]     Error in GetVideoOutStreamL #%d", error )
+            return isRewindFromEnd;
+            }
+
+        CMceFileSource* filesource = NULL;
+        TRAP( error, filesource = MusEngMceUtils::GetFileSourceL( *iSession ) )
+
+        if ( error == KErrNone )
+            {
+            TTimeIntervalMicroSeconds position;
+            TTimeIntervalMicroSeconds duration;
+            TRAP( error, position = filesource->PositionL() );
+            TRAPD( error1, duration = filesource->DurationL() );
+            if ( error != KErrNone || error1 != KErrNone )
+                {
+                return isRewindFromEnd;
+                }
+                
+            MUS_LOG2( "mus: [ENGINE]    position = %Ld, duration = %Ld", 
+                        position.Int64(), 
+                        duration.Int64() )
+                        
+            TRAP( error, isRewindFromEnd = 
+                        ( position.Int64() != 0 && 
+                          !filesource->IsEnabled() && 
+                          videoOut->State() == CMceMediaStream::EDisabled &&
+                          !iPause ) )
+            if(  isRewindFromEnd )
+                {
+                MUS_LOG( "mus: [ENGINE]     Rewind from end of clip" )
+                }
+            }
+        }
+
+    MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::IsRewindFromEnd()" )
+    return isRewindFromEnd;
+    }
 // End of file
+
--- a/mmsharing/mmshengine/src/musengclipvideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,535 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musengclipvideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengmceutils.h"
-#include "musengdisplayhandler.h"
-#include "muslogger.h"
-
-// SYSTEM
-#include <mcesession.h>
-#include <mcevideostream.h>
-#include <mcefilesource.h>
-#include <DRMCommon.h>
-
-// CONSTANTS
-const TInt64 KMicroSecondsInOneSecond = 1000000;
-const TInt KFastWindingFactor = 4;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer* CMusEngClipVideoPlayer::NewL( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngClipVideoPlayer( 
-        aDisplayHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer::CMusEngClipVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngLocalVideoPlayer( aDisplayHandler, aLcAudioControl )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngClipVideoPlayer::~CMusEngClipVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::HasClipEnded()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::HasClipEnded" )
-
-    TBool hasClipEnded( EFalse );
-
-    if ( iMceSession )
-        {    
-        CMceVideoStream* videoOut = NULL;
-        
-        TRAPD( err, 
-               videoOut = MusEngMceUtils::GetVideoOutStreamL( *iMceSession ) );
-        if ( err != KErrNone ) 
-            {
-            MUS_LOG1( "mus: [ENGINE]     Error in GetVideoOutStreamL %d", err )
-            return EFalse;
-            }
-
-        CMceFileSource* filesource = NULL;
-        TRAP( err, filesource = MusEngMceUtils::GetFileSourceL( *iMceSession ) )
-
-        if ( err == KErrNone )
-            {
-            TTimeIntervalMicroSeconds position;
-            TTimeIntervalMicroSeconds duration;
-            TRAP( err, position = filesource->PositionL() );
-            TRAPD( err2, duration = filesource->DurationL() );
-            if ( err != KErrNone || err2 != KErrNone )
-                {
-                return EFalse;
-                }
-                
-            MUS_LOG2( "mus: [ENGINE]    position = %Ld, duration = %Ld", 
-                      position.Int64(), duration.Int64() )
-                        
-            hasClipEnded = 
-                ( position.Int64() == 0 && 
-                  !filesource->IsEnabled() && 
-                  videoOut->State() == CMceMediaStream::EDisabled );
-            }
-        }
-
-    if ( hasClipEnded )
-        {
-        iDelayFileEndingPos = 0;
-        }
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::HasClipEnded" )
-    
-    return hasClipEnded;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetBufferingPeriod( 
-    const TTimeIntervalMicroSeconds& aPeriod )
-    {
-    iBufferingPeriod = aPeriod;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::LcIsPlayingL()
-    {
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    return ( MusEngMceUtils::GetFileSourceL( *iMceSession )->IsEnabled() );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcPlayL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::LcPlayL" )
-    
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );    
-    
-    if ( !file->IsEnabled() )
-        {
-        file->EnableL();   
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::LcPlayL" )    
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcPauseL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::LcPauseL" )
-    
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );    
-    
-    if ( file->IsEnabled() )
-        {
-        file->DisableL();
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::LcPauseL" )   
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcSourceFileControl* CMusEngClipVideoPlayer::LcSourceFileControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetLcFileNameL( const TFileName& aFileName )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngClipVideoPlayer::SetLcFileNameL" )
-    
-    __ASSERT_ALWAYS( !IsProtectedFileL( aFileName ),
-                     User::Leave( KErrPermissionDenied ) );    
-
-    if ( iMceSession )
-        {
-        CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-        file->UpdateL( aFileName );
-        }
-    
-    iFileName = aFileName;
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngClipVideoPlayer::SetLcFileNameL" )    
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TFileName& CMusEngClipVideoPlayer::LcFileName()
-    {
-    return iFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// Since MCE does not at the moment support SetFastForwardL function, this
-// functionality is implemented by taking a timestamp when forwarding is
-// started and calculating a new position when it is ended.
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcFastForwardL( TBool aUseFFWD )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::FastForward( %d )", 
-              aUseFFWD )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    if ( aUseFFWD )
-        {
-        // Ignore if we are already fastforwarding
-        if ( iFFWDStartTime.Int64() > 0 )
-            {
-            return;
-            }
-
-        // Stop rewinding if ongoing, else just pause file source
-        if ( iFRWDStartTime.Int64() > 0 )
-            {
-            LcFastRewindL( EFalse );
-            }
-        else
-            {
-            file->DisableL();
-            }
-            
-        // Get timestamp for starttime
-        iFFWDStartTime.HomeTime();
-        }
-    else
-        {
-        // Leave if we are not fastforwarding
-        if ( iFFWDStartTime.Int64() == 0 )
-            {
-            User::Leave( KErrAlreadyExists );
-            }
-
-        // Set new position
-        file->SetPositionL( PositionMicroSecondsL( ETrue ) );
-        
-        // Reset timer
-        iFFWDStartTime = TTime( 0 );
-        }
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::FastForward" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// Since MCE does not at the moment support SetFastRewindL function, this
-// functionality is implemented by taking a timestamp when rewinding is
-// started and calculating a new position when it is ended.
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::LcFastRewindL( TBool aUseFRWD )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::FastRewind( %d )", 
-              aUseFRWD )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    if ( aUseFRWD )
-        {
-        // Ignore if we are already fastrewinding
-        if ( iFRWDStartTime.Int64() > 0 )
-            {
-            return;
-            }
-
-        // Stop fastforwarding if ongoing, else just pause file source
-        if ( iFFWDStartTime.Int64() > 0 )
-            {
-            LcFastForwardL( EFalse );
-            }
-        else
-            {
-            file->DisableL();
-            }
-            
-        // Get timestamp for starttime
-        iFRWDStartTime.HomeTime();
-        }
-    else
-        {
-        // Leave if we are not fastrewinding
-        if ( iFRWDStartTime.Int64() == 0 )
-            {
-            User::Leave( KErrAlreadyExists );
-            }
-
-        // Set new position
-        file->SetPositionL( PositionMicroSecondsL( ETrue ) );
-        
-        // Reset timer
-        iFRWDStartTime = TTime( 0 );
-        }
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::FastRewind" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalSeconds CMusEngClipVideoPlayer::LcFileDurationL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::DurationL" )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds duration = file->DurationL();
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::DurationL" )
-    
-    return TTimeIntervalSeconds( static_cast< TInt >( 
-        duration.Int64() / KMicroSecondsInOneSecond ) );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalSeconds CMusEngClipVideoPlayer::LcFilePositionL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::LcFilePositionL" )
-    
-    TTimeIntervalMicroSeconds currentPosition = PositionMicroSecondsL();
-    
-    MUS_LOG1( "mus: [ENGINE] <- CMusEngClipVideoPlayer::LcFilePositionL, %d", 
-              currentPosition.Int64() )
-    
-    return TTimeIntervalSeconds( static_cast< TInt >( 
-        currentPosition.Int64() / KMicroSecondsInOneSecond ) );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSourceFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngClipVideoPlayer::SetLcFilePositionL( 
-    const TTimeIntervalSeconds& aPosition )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngClipVideoPlayer::SetPositionL ( %d )",
-              aPosition.Int() )
-
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds position( 
-        KMicroSecondsInOneSecond * static_cast< TInt64 >( aPosition.Int() ) );
-
-    if ( position == 0 )
-        {
-        iRewindedToBeginning = ETrue;
-        }
-        
-    file->SetPositionL( position );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::SetPositionL ()" )
-    }
-
-// -----------------------------------------------------------------------------
-// Check is file DRM protected.
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngClipVideoPlayer::IsProtectedFileL( const TDesC& aClipFile )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngClipVideoPlayer::IsProtectedFileL(...)" )
-
-    TBool isDRMProtected = EFalse;
-    DRMCommon* drmapi = DRMCommon::NewL();
-    CleanupStack::PushL( drmapi );
-
-    User::LeaveIfError( drmapi->Connect() );
-    //Check DRM file protection
-    User::LeaveIfError( drmapi->IsProtectedFile( aClipFile, isDRMProtected ) );
-    drmapi->Disconnect();
-
-    CleanupStack::PopAndDestroy( drmapi );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngClipVideoPlayer::IsProtectedFileL(...)" )
-    return isDRMProtected;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalMicroSeconds CMusEngClipVideoPlayer::PositionMicroSecondsL( 
-    TBool aActualPosition )
-    {
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-
-    TTimeIntervalMicroSeconds position = file->PositionL();
-    TTimeIntervalMicroSeconds duration = file->DurationL();
-       
-    TTimeIntervalMicroSeconds calculatedPosition;
-    
-    // Adjust position if we are fastforwarding or -rewinding
-    if ( iFFWDStartTime.Int64() != 0 )
-        {
-        TTime now;
-        now.HomeTime();
-        calculatedPosition = KFastWindingFactor *
-                             now.MicroSecondsFrom( iFFWDStartTime ).Int64() +
-                             position.Int64();
-        if ( calculatedPosition > duration )
-            {
-            calculatedPosition = duration;
-            }
-        }
-    else if ( iFRWDStartTime.Int64() != 0 )
-        {
-        TTime now;
-        now.HomeTime();
-        calculatedPosition = position.Int64() -
-                             KFastWindingFactor *
-                             now.MicroSecondsFrom( iFRWDStartTime ).Int64();
-        if ( calculatedPosition < 0 )
-            {
-            calculatedPosition = 0;
-            }
-            
-        if ( calculatedPosition == 0 )
-            {
-            iRewindedToBeginning = ETrue;
-            }
-        }
-    else
-        {
-        calculatedPosition = position;
-        }
-    
-    if ( !aActualPosition )
-        {
-        calculatedPosition = 
-            GetVideoSinkRelativeFilePos( calculatedPosition, duration );
-        }
-        
-    return calculatedPosition;
-    }
-
-// -----------------------------------------------------------------------------
-// Modifies file position if position has reached end before clip has ended.
-// File position is not going in sync with local video playback as playback
-// buffers media before starting playing.
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalMicroSeconds CMusEngClipVideoPlayer::GetVideoSinkRelativeFilePos( 
-    const TTimeIntervalMicroSeconds& aActualPosition, 
-    const TTimeIntervalMicroSeconds& aDuration )
-    { 
-    MUS_LOG1( "mus: [ENGINE] PositionMicroSecondsL, pos before mod:%d", 
-              aActualPosition.Int64() )
-    
-    TTimeIntervalMicroSeconds tempCalculatedPosition( aActualPosition );
-    
-    if ( iDelayFileEndingPos != 0 )
-        {
-        iDelayFileEndingPos = aDuration;
-        tempCalculatedPosition = iDelayFileEndingPos;
-        }
-    else
-        {
-        // FRWD can go to zero even if clip has not ended, do not modify 
-        // time in such situation.
-        if ( aActualPosition == 0 && 
-             !HasClipEnded() && 
-             iFRWDStartTime.Int64() == 0 && 
-             !iRewindedToBeginning )
-            {
-            const TInt KMusDelayEndingModifier = 2;
-            iDelayFileEndingPos = aDuration.Int64() - 
-                iBufferingPeriod.Int64() / KMusDelayEndingModifier;
-            tempCalculatedPosition = iDelayFileEndingPos;
-            if ( iPreviousPos > tempCalculatedPosition )
-                {
-                tempCalculatedPosition = iPreviousPos;
-                }
-            }
-        else
-            {
-            iDelayFileEndingPos = 0;
-            }
-        
-        if ( iRewindedToBeginning && aActualPosition > 0 )
-            {
-            iRewindedToBeginning = EFalse;
-            }
-            
-        if ( tempCalculatedPosition < 0 )
-            {
-            tempCalculatedPosition = 0;
-            }
-        }
-    
-    iPreviousPos = tempCalculatedPosition;
-            
-    return tempCalculatedPosition;
-    }
-
-// End of file
--- a/mmsharing/mmshengine/src/musenginepluginentry.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "musengsessionmanager.h"
-#include <ecom/ecom.h>
-#include <ecom/implementationproxy.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TImplementationProxy KMusEnginePluginImplementationTable[] =
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x20021341, CMusEngSessionManager::NewL )
-    };
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
-    {
-    aTableCount = sizeof( KMusEnginePluginImplementationTable ) /
-                  sizeof( TImplementationProxy );
-
-    return KMusEnginePluginImplementationTable;
-    }
--- a/mmsharing/mmshengine/src/musenglivesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musenglivesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,14 +18,15 @@
 
 // USER
 #include "musenglivesession.h"
+#include "musengsessionobserver.h"
+#include "musenglivesessionobserver.h"
 #include "musunittesting.h"
 #include "musengmceutils.h"
 #include "musenglogger.h"
-#include "mussessionproperties.h"
-#include "musenglivevideoplayer.h"
+#include "mussettings.h"
+#include "musengorientationhandler.h"
 
 // SYSTEM
-#include <lcsessionobserver.h>
 #include <mcemanager.h>
 #include <mcecamerasource.h>
 #include <mcevideostream.h>
@@ -37,64 +38,632 @@
 #include <mceh263codec.h>
 #include <mceavccodec.h>
 
+const TInt KMaxBrightness = 100;
+const TInt KMinBrightness = -100;
+const TInt KBrightnessStepSize = 10;
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveSession* CMusEngLiveSession::NewL()
-    {
-    CMusEngLiveSession* self = new( ELeave )CMusEngLiveSession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
+// Names of AVC levels in string for config keys stored in CenRep 
+_LIT8( KMusAvcBitrateLevel1, "AvcBrL1=" );
+_LIT8( KMusAvcBitrateLevel1b, "AvcBrL1b=" );
+_LIT8( KMusAvcBitrateLevel1_1, "AvcBrL1_1=" );
+_LIT8( KMusAvcBitrateLevel1_2, "AvcBrL1_2=" );
+_LIT8( KMusAvcBitrateLevel1_3, "AvcBrL1_3=" );
+_LIT8( KMusAvcBitrateLevel2, "AvcBrL2=" );
+
+_LIT8( KMusEncoderInfoTokenizer, ";" );
+
+//Number of big and small zoom steps on Zoom scale
+const TInt KZoomBigStepCount = 15;
+const TInt KZoomSmallStepCount = KZoomBigStepCount*2;
+const TInt KZoomStepMinSize = 1;
+
+const TInt64 KZoomFasterTime = 333333; // 1/3 second
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngLiveSession::CMusEngLiveSession()
-    : CMusEngMceOutSession()
+EXPORT_C CMusEngLiveSession* CMusEngLiveSession::NewL(
+                        const TDesC& aFileName,
+                        const TRect& aRect,
+                        MMusEngSessionObserver& aSessionObserver,
+                        MMusEngOutSessionObserver& aOutSessionObserver,
+                        MMusEngLiveSessionObserver& aLiveSessionObserver,
+                        TUint aSipProfileId )
     {
+    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession( 
+                                                    aSessionObserver,
+                                                    aOutSessionObserver,
+                                                    aLiveSessionObserver, 
+                                                    aRect,
+                                                    aFileName );
+    CleanupStack::PushL( self );
+    self->ConstructL( aSipProfileId );
+    CleanupStack::Pop( self );
+    return self;
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngLiveSession::ConstructL()
+EXPORT_C CMusEngLiveSession* CMusEngLiveSession::NewL(
+                        const TRect& aRect,
+                        MMusEngSessionObserver& aSessionObserver,
+                        MMusEngOutSessionObserver& aOutSessionObserver,
+                        MMusEngLiveSessionObserver& aLiveSessionObserver,
+                        TUint aSipProfileId )
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ConstructL()" )
-    
-    iCameraHandler.ReadCameraUsageKeyL();
-    CMusEngMceOutSession::ConstructL();
-    
-    iLiveVideoPlayer = 
-        CMusEngLiveVideoPlayer::NewL( *this, iCameraHandler, *this );      
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ConstructL()" )
+    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession( 
+                                                    aSessionObserver,
+                                                    aOutSessionObserver,
+                                                    aLiveSessionObserver, 
+                                                    aRect );
+    CleanupStack::PushL( self );
+    self->ConstructL( aSipProfileId );
+    CleanupStack::Pop( self );
+    return self;
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 CMusEngLiveSession::~CMusEngLiveSession()
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::~CMusEngLiveSession()" )    
-    delete iLiveVideoPlayer;
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::~CMusEngLiveSession()" )
+        
+    delete iOrientationHandler;
+    
     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::~CMusEngLiveSession()" )
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::CurrentZoomL() const
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::CurrentZoomL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    TInt currentZoom = camera->ZoomFactorL() + camera->DigitalZoomFactorL();
+
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveSession::CurrentZoomL( %d )",
+              currentZoom )
+
+    return currentZoom;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::SetZoomL( TInt aNewZoomFactor )
+    {
+    MUS_LOG1( "mus: [ENGINE]  -> CMusEngLiveSession::SetZoomL( %d )", 
+              aNewZoomFactor )
+              
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    __ASSERT_ALWAYS( aNewZoomFactor <= MaxZoomL() &&
+                     aNewZoomFactor >= MinZoomL(), 
+                     User::Leave( KErrArgument ) );
+    
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    if ( aNewZoomFactor < iCameraInfo.iMaxZoom )
+        {
+        MUS_LOG( "mus: [ENGINE]     Optical zoom factor increased" )
+        camera->SetZoomFactorL( aNewZoomFactor ); 
+        }
+    
+    if ( aNewZoomFactor - iCameraInfo.iMaxZoom >= 0 )
+        {
+        camera->SetDigitalZoomFactorL( aNewZoomFactor - iCameraInfo.iMaxZoom );
+        MUS_LOG1( "mus: [ENGINE]     Digital zoom factor increased to %d",
+                  aNewZoomFactor - iCameraInfo.iMaxZoom )
+        }
+    
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::SetZoomL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::MinZoomL() const
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::MinZoomL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    // Although we do not need camera for return value, we have to have it in
+    // order to have proper iCameraInfo
+    MusEngMceUtils::GetCameraL( *iSession );
+
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveSession::MinZoomL( %d )",
+              iCameraInfo.iMinZoom )
+
+    return iCameraInfo.iMinZoom;
+    }
+    
+        
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::MaxZoomL() const
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::MaxZoomL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    // Although we do not need camera for return value, we have to have it in
+    // order to have proper iCameraInfo
+    MusEngMceUtils::GetCameraL( *iSession );
+
+    TInt maxZoom = iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom;
+
+    MUS_LOG1( "mus: [ENGINE]     Max optical zoom( %d )",
+              iCameraInfo.iMaxZoom )
+    MUS_LOG1( "mus: [ENGINE]     Max digital zoom( %d )",
+              iCameraInfo.iMaxDigitalZoom )
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveSession::MaxZoomL( %d )",
+              maxZoom )
+
+    return maxZoom;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomInL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ZoomInL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    // First try to increase optical zoom factor. If in maximum value, try to
+    // increase digital zoom factor.
+    TInt stepSize = ZoomStepSize( iZoomInTime );
+    TInt zoomFactor = camera->ZoomFactorL();
+    TInt zoomDigitalFactor = camera->DigitalZoomFactorL();
+ 
+    //increate optical zoom factor
+    if ( zoomFactor + stepSize <= iCameraInfo.iMaxZoom )
+        {
+        //optical zoom factor is enough
+        camera->SetZoomFactorL( zoomFactor + stepSize );
+        stepSize = 0;
+        }
+    else if (zoomFactor <  iCameraInfo.iMaxZoom)
+       {
+            stepSize -=  iCameraInfo.iMaxZoom - zoomFactor;
+            camera->SetZoomFactorL( iCameraInfo.iMaxZoom );
+       }
+
+    //increate digital zoom factor
+    if (stepSize > 0)
+        {
+        if ( zoomDigitalFactor + stepSize <= iCameraInfo.iMaxDigitalZoom )
+            {
+            camera->SetDigitalZoomFactorL( zoomDigitalFactor + stepSize );
+            }
+        else 
+            {
+            camera->SetDigitalZoomFactorL( iCameraInfo.iMaxDigitalZoom );
+            MUS_LOG( "mus: [ENGINE]     CMusEngLiveSession::ZoomInL(): Optical \
+                             and digital zoom factors are in maximum value" )
+            }
+        }
+    
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ZoomInL()" )
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomOutL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ZoomOutL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    // First try to decrease digital zoom factor. If already zero, try to
+    // decrease optical zoom factor.
+    TInt stepSize = ZoomStepSize( iZoomOutTime );
+    TInt zoomFactor = camera->ZoomFactorL();
+    TInt zoomDigitalFactor = camera->DigitalZoomFactorL();
+    
+    //decreate digital zoom factor firstly
+    if ( zoomDigitalFactor - stepSize >= 0  )
+        {
+        //digital zoom factor is enough
+        camera->SetDigitalZoomFactorL( zoomDigitalFactor - stepSize );
+        stepSize = 0;
+        }
+    else if ( zoomDigitalFactor > 0 )
+        {
+        stepSize -= zoomDigitalFactor;
+        camera->SetDigitalZoomFactorL( 0 );
+        MUS_LOG("mus: [ENGINE] Digigal Factor to zero")
+        }
+   
+    //decreate optical zoom factor firstly
+    if ( stepSize > 0 )
+        {
+        if ( zoomFactor - stepSize > iCameraInfo.iMinZoom )
+            {
+            camera->SetZoomFactorL( zoomFactor - stepSize );
+            }
+        else 
+            {
+            MUS_LOG( "mus: [ENGINE]    CMusEngLiveSession::ZoomOutL(): Optical and \
+                        digital zoom factors are in minimum value" )
+            camera->SetZoomFactorL( iCameraInfo.iMinZoom );
+            }
+        }
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ZoomOutL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomDefaultL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ZoomDefaultL()" )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    camera->SetZoomFactorL( iDefaultZoomFactor );
+    camera->SetDigitalZoomFactorL( 0 );
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ZoomDefaultL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::SetBrightnessL( TInt aBrightness ) const
+    {
+    MUS_LOG1( "mus: [ENGINE]  -> CMusEngLiveSession::SetBrightnessL( %d )",
+              aBrightness )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+    camera->SetBrightnessL( aBrightness );
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::SetBrightnessL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::CurrentBrightnessL() const
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::CurrentBrightnessL()" )
+    
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+    TInt currentBrightness = camera->BrightnessL();
+
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveSession::CurrentBrightnessL(): %d",
+              currentBrightness )
+
+    return currentBrightness;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::MaxBrightnessL() const
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::MaxBrightnessL()" )
+    
+    // maximum brightness is not in camera info, but a constant 100
+
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveSession::MaxBrightnessL(): %d",
+              KMaxBrightness )
+
+    return KMaxBrightness;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::MinBrightnessL() const
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::MinBrightnessL()" )
+ 
+    // maximum brightness is not in camera info, but a constant -100
+
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveSession::MinBrightnessL(): %d",
+              KMinBrightness )
+
+    return KMinBrightness;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::IncreaseBrightnessL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::IncreaseBrightnessL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    TInt newBrightness = camera->BrightnessL() + KBrightnessStepSize;
+    
+    if ( newBrightness < KMaxBrightness )
+        {
+        camera->SetBrightnessL( newBrightness );
+        }
+    else
+        {
+        camera->SetBrightnessL( KMaxBrightness );
+        }
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::IncreaseBrightnessL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::DecreaseBrightnessL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::DecreaseBrightnessL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    TInt newBrightness = camera->BrightnessL() - KBrightnessStepSize;
+
+    if ( newBrightness > KMinBrightness )
+        {
+        camera->SetBrightnessL( newBrightness );
+        }
+    else
+        {
+        camera->SetBrightnessL( KMinBrightness );
+        }
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::DecreaseBrightnessL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::BrightnessDefaultL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::BrightnessDefaultL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    camera->SetBrightnessL( iDefaultBrightness );
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::BrightnessDefaultL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::BrightnessAutoL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::BrightnessAutoL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    camera->SetBrightnessL( CCamera::EBrightnessAuto );
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::BrightnessAutoL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::RecordL( TBool aRecord )
+    {
+    MUS_LOG1( "mus: [ENGINE]  -> CMusEngLiveSession::RecordL( %d )", aRecord )    
+    
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceMediaSink* fileSink = MusEngMceUtils::GetMediaSink( *iSession, 
+                                                            KMceFileSink );
+    
+    __ASSERT_ALWAYS( fileSink, User::Leave( KErrNotReady ) );
+    
+    if( aRecord && !fileSink->IsEnabled() )
+        {
+        fileSink->EnableL();        
+        }
+    else if ( !aRecord && fileSink->IsEnabled() )
+        {
+        fileSink->DisableL();        
+        }
+    else
+        {
+        // NOP
+        }
+
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveSession::RecordL( %d )", aRecord ) 
+    }    
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngLiveSession::IsRecording()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::IsRecording()" )    
+    
+    TBool isRecording( EFalse );
+  
+    CMceMediaSink* fileSink = MusEngMceUtils::GetMediaSink( *iSession, 
+                                                            KMceFileSink );
+    if ( fileSink )
+        {
+        isRecording = fileSink->IsEnabled();
+        }
+        
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveSession::IsRecording(%d)",
+              isRecording )
+                 
+    return isRecording;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Enable camera if not already enabled
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::PlayL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::PlayL()" )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    if ( !camera->IsEnabled() )
+        {
+        camera->EnableL();
+        }
+    else
+        {
+        MUS_LOG( "mus: [ENGINE]    Camera already enabled, ignore request" )
+        }
+    
+    iOrientationHandler->UpdateL();
+        
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::PlayL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Disable camera if not already disabled
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::PauseL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::PauseL()" )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
+
+    if ( camera->IsEnabled() )
+        {
+        camera->DisableL();
+        }
+    else
+        {
+        MUS_LOG( "mus: [ENGINE]    Camera already disabled, ignore request" )
+        }
+
+    iOrientationHandler->UpdateL();
+    
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::PauseL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngLiveSession::IsPlayingL()
+    {
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    
+    return ( MusEngMceUtils::GetCameraL( *iSession )->IsEnabled() );
+    }
+
 // -----------------------------------------------------------------------------
-// From MLcSession
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::EnableDisplayL( TBool aEnable )
+{
+    CMusEngMceSession::EnableDisplayL( aEnable );
+    iOrientationHandler->UpdateL();
+}
+    
+// -----------------------------------------------------------------------------
+//
 // -----------------------------------------------------------------------------
 //
-MLcVideoPlayer* CMusEngLiveSession::LocalVideoPlayer()
+void CMusEngLiveSession::RefreshOrientationL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::RefreshOrientationL()" )
+        
+    iOrientationHandler->RefreshOrientationL();
+        
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::RefreshOrientationL()" )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::InitializeZoomStepSize()
     {
-    return iLiveVideoPlayer;
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::InitializeZoomStepSize()" )
+    
+    iBigZoomStep = ( iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom - 
+            iCameraInfo.iMinZoom ) / KZoomBigStepCount;
+            
+    if ( iBigZoomStep < KZoomStepMinSize )
+        iBigZoomStep = KZoomStepMinSize;
+
+    iSmallZoomStep = ( iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom - 
+            iCameraInfo.iMinZoom ) / KZoomSmallStepCount;
+    
+    if ( iSmallZoomStep < KZoomStepMinSize )
+        iSmallZoomStep = KZoomStepMinSize;
+
+    MUS_LOG2( "mus: [ENGINE]  iSmallZoomStep = %d, iBigZoomStep = %d", 
+            iSmallZoomStep, iBigZoomStep )
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::InitializeZoomStepSize()" )   
     }
 
 // -----------------------------------------------------------------------------
@@ -102,14 +671,12 @@
 // -----------------------------------------------------------------------------
 //
 void CMusEngLiveSession::CompleteSessionStructureL( 
-    CMceStreamBundle& /*aLocalBundle*/ )
+                                            CMceStreamBundle& /*aLocalBundle*/ )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::CompleteSessionStructureL()" )
 
     __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
 
-    iCameraHandler.SetSession( iSession );
-    
     // Create outgoing video stream
     CMceVideoStream* videoStream = CMceVideoStream::NewLC();
     
@@ -119,8 +686,10 @@
 
     CMceCameraSource* camera = CMceCameraSource::NewLC( *iManager );
     camera->DisableL(); // Start session in pause mode.
+    camera->GetCameraInfo( iCameraInfo );
+    iDefaultZoomFactor = camera->ZoomFactorL();
     
-    iCameraHandler.InitializeL( *camera );
+    InitializeZoomStepSize();
         
     videoStream->SetSourceL( camera );
     CleanupStack::Pop( camera );
@@ -129,12 +698,11 @@
     CleanupStack::Pop( videoStream );    
 
     // Construct recording stream if needed
-    if ( iLiveVideoPlayer->LcFileName().Length() > 0 )
+    if ( iRecordedFile != KNullDesC )
         {
         CMceVideoStream* streamForRecording = CMceVideoStream::NewLC();
         
-        CMceFileSink* fileSink = 
-            CMceFileSink::NewLC( iLiveVideoPlayer->LcFileName() );
+        CMceFileSink* fileSink = CMceFileSink::NewLC( iRecordedFile );
         fileSink->DisableL(); // Start in not recording mode
         streamForRecording->AddSinkL( fileSink );
         CleanupStack::Pop( fileSink );
@@ -143,22 +711,56 @@
         iSession->AddStreamL( streamForRecording );
         CleanupStack::Pop( streamForRecording );
         }
-    
-    iLiveVideoPlayer->SetMceSession( iSession );
-    
+
     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::CompleteSessionStructureL()" )
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::HandleSessionStateChanged( 
+                                                CMceSession& aSession,
+                                                TInt aStatusCode,
+                                                const TDesC8& aReasonPhrase )
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::HandleSessionStateChanged" )
+    
+    MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )
+    
+    if ( iSession && 
+         iSession == &aSession && 
+         aSession.State() == CMceSession::EEstablished &&
+         iStoreEncoderConfigInfo )
+        {
+        iStoreEncoderConfigInfo = EFalse;
+        TRAPD( error, StoreEncoderConfigInfoL() )
+        if ( error != KErrNone && error != KErrNotFound )
+            {
+            // Only acceptable error is absence of repository entry,
+            // otherwise we inform user about failed session.
+            iSessionObserver.SessionFailed();
+            }
+        }
+     
+    CMusEngMceSession::HandleSessionStateChanged( aSession,
+                                                  aStatusCode, 
+                                                  aReasonPhrase );
+    
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::HandleSessionStateChanged" )
+    }
+
+
 // -----------------------------------------------------------------------------
 // Sets video codec attributes
 // -----------------------------------------------------------------------------
 //
-void CMusEngLiveSession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                            TMceSourceType aSourceType )
+void CMusEngLiveSession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec )
     {
     MUS_LOG( "mus: [ENGINE] -> CMusEngLiveSession::AdjustVideoCodecL()" )
     
-    CMusEngMceOutSession::AdjustVideoCodecL( aVideoCodec, aSourceType );
+    CMusEngMceOutSession::AdjustVideoCodecL( aVideoCodec );
     
     // Starting with 80Kbps  will give better quality than starting with
     // 64kbps.And if network behaves bad than anyhow we will drop down or
@@ -184,7 +786,10 @@
         User::LeaveIfError( aVideoCodec.SetAllowedBitrates( 
                                         KMceAvcCodecProfileIdBaseline | 
                                         KMceAvcCodecProfileIopConstraintSet | 
-                                        KMceAvcBitrateLevel1b ) );                           
+                                        KMceAvcBitrateLevel1b ) );
+        
+        SetCodecConfigKeyL( aVideoCodec );
+        SetEncodingDeviceL( aVideoCodec );                             
         }
     else
         {
@@ -194,6 +799,7 @@
     MUS_LOG( "mus: [ENGINE] <- CMusEngLiveSession::AdjustVideoCodecL()" )
     }
     
+    
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -207,6 +813,7 @@
     MUS_LOG( "mus: [ENGINE] <- CMusEngLiveSession::AdjustAudioCodecL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -217,7 +824,9 @@
     
     CMusEngMceSession::DoCodecSelectionL( aVideoStream );
     
-    if ( iVideoCodecList && !IsH264Supported() )
+    if ( iVideoCodecList &&
+         iVideoCodecList->Length() > 0 &&
+         iVideoCodecList->FindF( KMceSDPNameH264 ) == KErrNotFound )
         {        
         // We know that recipient doesn't support AVC, so we do not offer it
         const RPointerArray<CMceVideoCodec>& codecs = aVideoStream.Codecs();
@@ -236,6 +845,7 @@
      
     MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::DoCodecSelectionL()" )
     }
+    
 
 // -----------------------------------------------------------------------------
 //
@@ -254,14 +864,14 @@
     MUS_ENG_LOG_STREAM_STATE( aStream )
     
     CMceVideoStream* recordingStream = 
-        MusEngMceUtils::GetRecordingStream( *iSession );
+                            MusEngMceUtils::GetRecordingStream( *iSession );
     
     if ( recordingStream &&
          recordingStream == &aStream &&
          aStream.State() == CMceMediaStream::ENoResources &&
          aSink.IsEnabled() == EFalse )
         {
-        InformObserverAboutSessionFailure( MLcSession::EDiskFull );
+        iLiveSessionObserver.DiskFull();
         }
     else
         {
@@ -271,3 +881,276 @@
     
     MUS_LOG( "mus: [ENGINE] <- CMusEngLiveSession::StreamStateChanged( sink )" )
     }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngLiveSession::CMusEngLiveSession(
+                        MMusEngSessionObserver& aSessionObserver,
+                        MMusEngOutSessionObserver& aOutSessionObserver,
+                        MMusEngLiveSessionObserver& aLiveSessionObserver,
+                        const TRect& aRect,
+                        const TDesC& aRecordedFile )
+    : CMusEngMceOutSession( aRect,
+                            aSessionObserver,
+                            aOutSessionObserver ),
+      iLiveSessionObserver( aLiveSessionObserver ),
+      iDefaultZoomFactor( -1 ),
+      iDefaultBrightness( 0 ),
+      iRecordedFile( aRecordedFile ),
+      iZoomInTime(0),
+      iZoomOutTime(0),
+      iSmallZoomStep( KZoomStepMinSize ),
+      iBigZoomStep( KZoomStepMinSize )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::ConstructL( TUint aSipProfileId )
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ConstructL()" )
+
+    CMusEngMceOutSession::ConstructL( aSipProfileId );
+
+    iOrientationHandler = CMusEngOrientationHandler::NewL( *this, iLiveSessionObserver );
+    
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ConstructL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::SetEncodingDeviceL( CMceVideoCodec& aVideoCodec )
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngLiveSession::SetEncodingDeviceL()" )
+
+    // We try to read encoding device UID. If we do not succeed, we use default
+    
+    const TUid KDefaultEncodingDevice( TUid::Uid( 0x20001C13 ) );
+    TUid encodingDevice( KDefaultEncodingDevice );
+    TRAPD( error, 
+           encodingDevice = MultimediaSharingSettings::EncodingDeviceL() )
+    __ASSERT_ALWAYS( error == KErrNone || error == KErrNotFound, 
+                     User::Leave( error ) );
+    aVideoCodec.SetPreferredEncodingDecodingDeviceL( encodingDevice );
+    
+    MUS_LOG( "mus: [ENGINE] <- CMusEngLiveSession::SetEncodingDeviceL()" )
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::SetCodecConfigKeyL( CMceVideoCodec& aVideoCodec )
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngLiveSession::SetCodecConfigKeyL()" )
+    
+    HBufC8* configKey( NULL );
+        
+    // We try to read config key. If we do not succeed, we prepare to
+    // write keys to CenRep for the next time.
+    TRAPD( error, configKey = ReadCodecConfigKeyL( aVideoCodec ) )
+    
+    if ( error == KErrNone )
+        {
+        // There is a repository for config keys
+        if ( configKey )
+            {
+            // ...and key is found.
+            CleanupStack::PushL( configKey );
+            aVideoCodec.SetConfigKeyL( *configKey );
+            CleanupStack::PopAndDestroy( configKey );
+            }
+        else
+            {
+            // ...but key is not found, so it must be written to CenRep when
+            // available. 
+            iStoreEncoderConfigInfo = ETrue;
+            }
+        }
+    else if ( error == KErrNotFound )
+        {
+        // There is no repository for config keys so there is no point
+        // trying to write anything there. Session setup can still continue.
+        MUS_LOG1( "mus: [ENGINE]    No repository for config keys [%d]", error )
+        }            
+    else
+        {
+        User::Leave( error );
+        }
+    
+    MUS_LOG( "mus: [ENGINE] <- CMusEngLiveSession::SetCodecConfigKeyL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+HBufC8* CMusEngLiveSession::ReadCodecConfigKeyL( 
+                                    const CMceVideoCodec& aVideoCodec ) const
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngLiveSession::ReadCodecConfigKeyL()" )
+    
+    HBufC8* key( NULL );
+ 
+    HBufC8* encoderInfo = MultimediaSharingSettings::EncoderConfigInfoLC();
+    __ASSERT_ALWAYS( encoderInfo, User::Leave( KErrNotFound ) );
+    
+    TPtrC8 keyId( ConfigKeyIdL( aVideoCodec ) ); 
+    
+    TInt tokenStartPosition( encoderInfo->FindC( keyId ) );
+    if ( tokenStartPosition > KErrNotFound )
+        {
+        TInt tokenLength( encoderInfo->Mid( tokenStartPosition ).FindC( 
+                                                KMusEncoderInfoTokenizer ) );
+        if ( tokenLength > KErrNotFound )
+            {
+            // Separate key from token by removing keyId
+            TInt keyStartPosition = tokenStartPosition + keyId.Length();
+            TInt keyLength = tokenLength - keyId.Length(); 
+            TPtrC8 keyPtr = encoderInfo->Mid( keyStartPosition, keyLength );
+            key = keyPtr.AllocL();
+            }
+        }
+    
+    CleanupStack::PopAndDestroy( encoderInfo );
+    
+    MUS_LOG( "mus: [ENGINE] <- CMusEngLiveSession::ReadCodecConfigKeyL()" )
+        
+    return key;   
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::StoreEncoderConfigInfoL() const
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngLiveSession::StoreEncoderConfigInfoL()" )
+    
+    HBufC8* configInfoInCenRep = MultimediaSharingSettings::EncoderConfigInfoLC();
+    __ASSERT_ALWAYS( configInfoInCenRep, User::Leave( KErrNotFound ) );
+    
+    TBuf8<NCentralRepositoryConstants::KMaxBinaryLength> keys;
+    keys.Append( *configInfoInCenRep );
+    
+    CMceVideoStream* stream = MusEngMceUtils::GetVideoOutStreamL( *iSession );
+    const RPointerArray<CMceVideoCodec>& codecs = stream->Codecs();
+    
+    for ( TInt codecIndex = 0; codecIndex < codecs.Count(); ++codecIndex )
+        {
+        if ( codecs[codecIndex]->SdpName().FindF( KMceSDPNameH264 ) >= 0 )
+            {
+            const TPtrC8 keyId = ConfigKeyIdL( *codecs[codecIndex] );
+            HBufC8* configKey = codecs[codecIndex]->ConfigKeyL();
+            CleanupStack::PushL( configKey );
+            
+            if ( configKey &&
+                 keys.FindF( keyId ) == KErrNotFound &&
+                 configInfoInCenRep->FindF( keyId ) == KErrNotFound )
+                {
+                
+                if ( keys.Length() + 
+                     keyId.Length() + 
+                     configKey->Length() +
+                     KMusEncoderInfoTokenizer().Length() <
+                     NCentralRepositoryConstants::KMaxBinaryLength )
+                    {
+                    keys.Append( keyId );                    
+                    keys.Append( *configKey );
+                    keys.Append( KMusEncoderInfoTokenizer );
+                    }
+                }
+                
+            CleanupStack::PopAndDestroy( configKey );
+            }
+        }
+    
+    MultimediaSharingSettings::SetEncoderConfigInfoL( keys );    
+    
+    CleanupStack::PopAndDestroy( configInfoInCenRep );
+        
+    MUS_LOG( "mus: [ENGINE] <- CMusEngLiveSession::StoreEncoderConfigInfoL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TPtrC8 CMusEngLiveSession::ConfigKeyIdL(
+                                    const CMceVideoCodec& aVideoCodec ) const
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngLiveSession::ConfigKeyIdL()" )
+    
+    // Currently works only for AVC
+    __ASSERT_ALWAYS( aVideoCodec.SdpName().FindF( KMceSDPNameH264 ) >= 0,
+                     User::Leave( KErrArgument ) );
+    
+    TPtrC8 configKeyTokenId;
+    
+    if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1 )
+        {
+        configKeyTokenId.Set( KMusAvcBitrateLevel1() );
+        }
+    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1b )
+        {
+        configKeyTokenId.Set( KMusAvcBitrateLevel1b() );
+        }
+    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1_1 )
+        {
+        configKeyTokenId.Set( KMusAvcBitrateLevel1_1() );
+        }
+    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1_2 )
+        {
+        configKeyTokenId.Set( KMusAvcBitrateLevel1_2() );
+        }
+    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1_3 )
+        {
+        configKeyTokenId.Set( KMusAvcBitrateLevel1_3() );
+        }
+    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel2 )
+        {
+        configKeyTokenId.Set( KMusAvcBitrateLevel2() );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+    
+    MUS_LOG( "mus: [ENGINE] <- CMusEngLiveSession::ConfigKeyIdL()" )
+
+    return configKeyTokenId;
+    }
+
+
+// -----------------------------------------------------------------------------
+//  Calculate the zoom step based time escaped
+// -----------------------------------------------------------------------------
+TInt CMusEngLiveSession::ZoomStepSize( TInt64& aTime )
+    {
+//    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ZoomStepSize()" )    
+    TTime now;
+    now.HomeTime();
+    TInt64 timeNow = now.Int64();   
+    TInt stepSize = ( ( timeNow - aTime ) <= KZoomFasterTime ) ? iBigZoomStep : iSmallZoomStep;
+    
+    aTime = now.Int64();
+    
+    MUS_LOG1( "mus: [ENGINE]  stepSize = %d", stepSize );    
+//    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ZoomStepSize()" )
+    return stepSize;
+    }
+
+
--- a/mmsharing/mmshengine/src/musenglivevideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglivevideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengmceutils.h"
-#include "musengdisplayhandler.h"
-
-// SYSTEM
-#include <mcesession.h>
-#include <mcefilesink.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer* CMusEngLiveVideoPlayer::NewL( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    TMusEngCameraHandler& aCameraHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngLiveVideoPlayer( 
-        aDisplayHandler, aCameraHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer::CMusEngLiveVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    TMusEngCameraHandler& aCameraHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngLocalVideoPlayer( aDisplayHandler, aLcAudioControl ),
-    iCameraHandler( aCameraHandler )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLiveVideoPlayer::~CMusEngLiveVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveVideoPlayer::LcIsPlayingL()
-    {
-    return iCameraHandler.IsPlayingL();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcPlayL( TLcVideoPlayerSource /*aSource*/ )
-    {
-    iCameraHandler.PlayL();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcPauseL()
-    {
-    iCameraHandler.PauseL();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngLiveVideoPlayer::LcCameraControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcDestinationFileControl* CMusEngLiveVideoPlayer::LcDestinationFileControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngLiveVideoPlayer::LcZoomControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngLiveVideoPlayer::LcBrightnessControl()
-    {
-    return &iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::SetLcFileNameL( const TFileName& aFileName )
-    {
-    iFileName = aFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-TFileName& CMusEngLiveVideoPlayer::LcFileName()
-    {
-    return iFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcDestinationFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveVideoPlayer::LcRecordL( TBool aRecord )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngLiveVideoPlayer::LcRecordL(( %d )", 
-              aRecord )    
-    
-    __ASSERT_ALWAYS( iMceSession, User::Leave( KErrNotReady ) );
-
-    CMceMediaSink* fileSink = 
-        MusEngMceUtils::GetMediaSink( *iMceSession, KMceFileSink );
-    
-    __ASSERT_ALWAYS( fileSink, User::Leave( KErrNotReady ) );
-    
-    if ( aRecord )
-        {
-        if ( !fileSink->IsEnabled() )
-            {
-            fileSink->EnableL();
-            }
-        }
-    else
-        {
-        if ( fileSink->IsEnabled() )
-            {
-            fileSink->DisableL();
-            }
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveVideoPlayer::LcRecordL" ) 
-    }    
-
-// -----------------------------------------------------------------------------
-// From MLcDestinationFileControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveVideoPlayer::LcIsRecording()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveVideoPlayer::LcIsRecording()" )    
-    
-    TBool isEnabled( EFalse );
-  
-    CMceMediaSink* fileSink = 
-        MusEngMceUtils::GetMediaSink( *iMceSession, KMceFileSink );
-    if ( fileSink )
-        {
-        isEnabled = fileSink->IsEnabled();
-        }
-        
-    MUS_LOG1( "mus: [ENGINE]  <- CMusEngLiveVideoPlayer::LcIsRecording( %d )",
-              isEnabled )
-                 
-    return isEnabled;
-    }
--- a/mmsharing/mmshengine/src/musenglocalvideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglocalvideoplayer.h"
-#include "musengmceutils.h"
-#include "musengdisplayhandler.h"
-
-// SYSTEM
-#include <mcesession.h>
-#include <mcevideostream.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLocalVideoPlayer::CMusEngLocalVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngVideoPlayerBase( aDisplayHandler, aLcAudioControl )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngLocalVideoPlayer::~CMusEngLocalVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState 
-CMusEngLocalVideoPlayer::LcVideoPlayerState() const
-    {
-    if ( !iMceSession )
-        {
-        return MLcVideoPlayer::EUnavailable;
-        }
-    CMceVideoStream* stream = NULL;
-    TRAPD( err, stream = MusEngMceUtils::GetVideoOutStreamL( *iMceSession ) )
-    TLcVideoPlayerState playerState = MLcVideoPlayer::EUnavailable;
-    if ( err == KErrNone && stream )
-          {
-          switch ( stream->State() )
-              {
-              case CMceMediaStream::EInitialized:
-                  {
-                  playerState = MLcVideoPlayer::EInit; 
-                  break;
-                  }
-              case CMceMediaStream::EBuffering:
-                  {
-                  playerState = MLcVideoPlayer::EBuffering; 
-                  break;
-                  }
-              case CMceMediaStream::EIdle:
-              case CMceMediaStream::EDisabled:
-                  {
-                  playerState = MLcVideoPlayer::EPaused; 
-                  break;
-                  }
-              case CMceMediaStream::EStreaming:
-                  {
-                  playerState = MLcVideoPlayer::EPlaying; 
-                  break;
-                  }
-              default: // Other MCE stream states: MLcVideoPlayer::EUnavailable
-                 {
-                 break;
-                 }
-              }
-          }
-    return playerState;
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngLocalVideoPlayer::SetLcWindowRectL( TRect aRect )
-    {
-    iDisplayHandler.SetSecondaryRectL( aRect );
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngLocalVideoPlayer::LcWindowRect()
-    {
-    return iDisplayHandler.SecondaryRect();
-    }
--- a/mmsharing/mmshengine/src/musengmceoutsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musengmceoutsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,17 +18,16 @@
 
 // USER
 #include "musengmceoutsession.h"
+#include "musengoutsessionobserver.h"
+#include "musenglivesessionobserver.h"
 #include "mussettings.h"
 #include "musengmceutils.h"
 #include "musenguriparser.h"
 #include "musenglogger.h"
+#include "mussesseioninformationapi.h"
 #include "mussipprofilehandler.h"
-#include "mussessionproperties.h"
-#include "musresourceproperties.h"
 
 // SYSTEM
-#include <lcsessionobserver.h>
-#include <lcuiprovider.h>
 #include <mcestreambundle.h>
 #include <mcemediastream.h>
 #include <mceoutsession.h>
@@ -41,14 +40,20 @@
 #include <mcedisplaysink.h>
 #include <mcevideocodec.h>
 #include <mceaudiocodec.h>
-#include <e32property.h>
 
 #include <sipprofile.h>
 #include <sipextensionheader.h>
 #include <sipaddress.h>
 #include <uri8.h>
+#include <e32property.h>
 
+
+
+const TInt KMusEngSipReasonCodeBadRequest = 400;
+const TInt KMusEngSipReasonCodeUnauthorized = 401;
+const TInt KMusEngSipReasonCodePaymentRequired = 402;
 const TInt KMusEngSipReasonCodeRecipientNotFound  = 404;
+const TInt KMusEngSipReasonCodeProxyAuthenticationRequired = 407;
 const TInt KMusEngSipReasonCodeRequestTimeout = 408;
 const TInt KMusEngSipReasonCodeUnsupportedMediaType = 415;
 const TInt KMusEngSipReasonCodeUnsupportedUriScheme = 416;
@@ -59,6 +64,9 @@
 const TInt KMusEngSipReasonCodeDecline = 603;
 const TInt KMusEngSipReasonCodeNotAcceptable = 606;
 // The next code represents unofficial sip error code
+// "478 Unresolveable Destination, we were not able to process the URI (478/TM)
+const TInt KMusEngSipReasonCode478NotAbleToProcessURI = 478;
+// The next code represents unofficial sip error code
 // "479 Regretfuly, we were not able to process the URI (479/SL)
 const TInt KMusEngSipReasonCode479NotAbleToProcessURI = 479;
 
@@ -66,66 +74,7 @@
 const TUint8 KMusEngPayloadTypeAudio = 97;
 const TUint8 KMusEngPayloadTypeVideoAvc = 98;
 
-const TInt KMusEngSipAddressMaxLength = 256;
-const TInt KMusEngSipAddressesMaxAmount  =   8;
-_LIT( KMusEngCommaSymbol, "," );
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceOutSession::CMusEngMceOutSession()
-    : CMusEngMceSession(),
-      iTriedInvitations( 0 ),
-      iAsyncBrakeCallBack( AsyncBrakeCompleted, this ),
-      iRegistrationCallBack( RegistrationTimerExpired, this ),
-      iInvitationResponseCallBack( InvitationResponseTimerExpired, this )
-    {
-    iAsyncBrakeEntry.Set( iAsyncBrakeCallBack );
-    iRegistrationEntry.Set( iRegistrationCallBack );
-    iInvitationResponseEntry.Set( iInvitationResponseCallBack );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::ConstructL()" )
-    
-    CMusEngMceSession::ConstructL();
-    TInt sipProfileId;
-    TInt error = KErrNone;
-    error = ( RProperty::Get( NMusSessionApi::KCategoryUid, 
-                             NMusSessionApi::KSipProfileId, sipProfileId ) );
-    if ( error != KErrNone )
-       {
-       sipProfileId = KErrNone;
-       error = KErrNone;
-       }
-    iSipProfileHandler->CreateProfileL( sipProfileId );
-    iVideoCodecList = NULL;
-    TBuf<RProperty::KMaxPropertySize> buffer;
-    error = ( RProperty::Get( NMusSessionApi::KCategoryUid, 
-                                 NMusSessionApi::KVideoCodecs, buffer ) );
-    if ( error == KErrNone && buffer.Length() )
-        {
-        iVideoCodecList = 
-                    CnvUtfConverter::ConvertFromUnicodeToUtf8L( buffer );
-        }
-        
-    iDeltaTimer = CDeltaTimer::NewL( CActive::EPriorityStandard );
-    
-    /* Read the contact name set by availability plugin */    
-    error = RProperty::Get( NMusSessionApi::KCategoryUid,
-                                 NMusSessionApi::KContactName,
-                                 buffer );
-    iRemoteDisplayName = ( error == KErrNone && buffer.Length() ) 
-                         ? buffer.AllocL() : KNullDesC().AllocL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::ConstructL()" )
-    }
+using namespace NMusSessionInformationApi;
 
 // -----------------------------------------------------------------------------
 //
@@ -134,77 +83,105 @@
 CMusEngMceOutSession::~CMusEngMceOutSession()
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::~CMusEngMceOutSession()" )
- 
-    if ( iAddressQueried && iRecipient )
-        {
-        TRAP_IGNORE( SaveContactL( *iRecipient ) )
-        }
-    
-    delete iDeltaTimer;
+
     delete iRecipient;
     delete iVideoCodecList;
-    delete iRemoteSipAddressProposal;
-    delete iRemoteDisplayName;
+    
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::~CMusEngMceOutSession()" )
     }
 
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::EstablishLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::EstablishLcSessionL()")
-
-    iAddressQueried = EFalse;
-    if ( LcUiProvider() && !IsBackgroundStartup() )
-        {
-        LcUiProvider()->HandleForegroundStatus( ETrue );
-        }
-    TRAPD( err, DoInviteL() );
-        
-    // If address is in wrong format, Manual Address Entry Dialog is displayed
-    if ( ( err == KErrArgument ) && DoSyncRetryL() )
-        {  
-        err = KErrNone; // Doing retry
-        }
-    
-    User::LeaveIfError( err );
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::EstablishLcSessionL")
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::TerminateLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::TerminateLcSessionL" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    if( iSession->State() == CMceSession::EOffering )
-        {
-        static_cast< CMceOutSession* >( iSession )->CancelL();
-        }
-    else
-        {
-        iSession->TerminateL();
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::TerminateLcSessionL" )
-    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceOutSession::AddDisplayL( CMceMediaStream& aStream )
+EXPORT_C void CMusEngMceOutSession::InviteL( const TDesC& aRecipient )
     {
-    MusEngMceUtils::AddDisplayL( aStream, *iManager, Rect() );
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::InviteL()")
+
+    if ( iSession )
+        {
+        MUS_ENG_LOG_SESSION_STATE( *iSession ) 
+
+        if ( iSession->State() == CMceSession::EIdle ||
+             iSession->State() == CMceSession::ETerminated )
+            {
+            // This is the case when last invite has ended up to an error,
+            // last sharing has ended normally, or construction of the session
+            // stucture has not been completed. Delete old session and try to
+            // continue normally.
+            delete iSession;
+            iSession = NULL;
+            MUS_LOG( "mus: [ENGINE]     Existing session deleted")
+            }
+        else
+            {
+            // Session is already ongoing. Leave.
+            User::Leave( KErrAlreadyExists );
+            }
+
+        }
+
+    MUS_LOG_TDESC( "mus: [ENGINE]      CMusEngMceOutSession::InviteL() recipient=",
+                   aRecipient )
+
+    // delete possibly existing recipient
+    delete iRecipient;
+    iRecipient = NULL;  
+    
+    TMusEngUriParser parser( aRecipient ); 
+    parser.ParseUriL();    
+    iRecipient = parser.GetUri8L();
+
+    CreateMceSessionStructureL();
+
+    EstablishSessionL();
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::InviteL()")
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceOutSession::CancelInviteL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::CancelInviteL()" )
+
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    
+    MUS_ENG_LOG_SESSION_STATE( *iSession ) 
+
+    if( iSession->State() == CMceSession::EOffering )
+        {
+        MUS_LOG( "mus: [ENGINE]     CMceOutSession->CancelL()" )
+        static_cast<CMceOutSession*>( iSession )->CancelL();
+        }
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::CancelInviteL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceOutSession::SetSupportedVideoCodecListL( 
+                                                const TDesC& aVideoCodecs )
+    {
+    MUS_LOG_TDESC( "mus: [ENGINE]  -> CMusEngMceOutSession::SetSupportedVideoCodecListL: ",
+                   aVideoCodecs )
+
+    HBufC8* newVideoCodecList = 
+                    CnvUtfConverter::ConvertFromUnicodeToUtf8L( aVideoCodecs );
+    delete iVideoCodecList;
+    iVideoCodecList = newVideoCodecList;
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::SetSupportedVideoCodecListL" )
+    }
+
+
 // -----------------------------------------------------------------------------
 // Calls MCE function EstablishL with feature tag in Accept-Contact header.
 // Adjusts stream and codec values.
@@ -237,13 +214,18 @@
         CleanupStack::PopAndDestroy( headInText );
         }
       
-      
+     /* Add the privacy header if cs call privacy setting is switched on */
+    if ( iPrivate && iPrivateNumber )
+        {
+        AddPrivacyHeaderL( *headers );
+        }
     static_cast<CMceOutSession*>( iSession )->EstablishL( 0, headers );
     CleanupStack::Pop( headers );
     
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::EstablishSessionL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 // Handle MCE session termination. Called by MCE observer function of the
 // base class.
@@ -256,18 +238,41 @@
 
     switch ( aStatusCode )
         {
-        case KMusEngSipReasonCodeRecipientNotFound : 
+
+        case KMusEngSipReasonCodeBadRequest :
+            {
+            iOutSessionObserver.SessionBadRequest();
+            break;
+            }
+        case KMusEngSipReasonCodeUnauthorized :
+            {
+            iOutSessionObserver.SessionUnauthorized();
+            break;
+            }
+        case KMusEngSipReasonCodePaymentRequired :
+            {
+            iOutSessionObserver.SessionPaymentRequired();
+            break;
+            }
+        case KMusEngSipReasonCodeRecipientNotFound :
+        	//lint -fallthrough
+        case KMusEngSipReasonCode478NotAbleToProcessURI:
             //lint -fallthrough
         case KMusEngSipReasonCode479NotAbleToProcessURI:
             //lint -fallthrough
         case KMusEngSipReasonCodeUnsupportedUriScheme : 
             {
-            InitRecipientNotFoundHandling();
+            iOutSessionObserver.SessionRecipientNotFound();
+            break;
+            }
+        case KMusEngSipReasonCodeProxyAuthenticationRequired :
+            {
+            iOutSessionObserver.SessionProxyAuthenticationRequired();
             break;
             }
         case KMusEngSipReasonCodeRequestTimeout :
             {
-            InformObserverAboutSessionFailure( MLcSession::ENoAnswer );
+            iOutSessionObserver.SessionRequestTimeOut();
             break;
             }
         case KMusEngSipReasonCodeUnsupportedMediaType :
@@ -276,7 +281,7 @@
             //lint -fallthrough
         case KMusEngSipReasonCodeNotAcceptable:
             {
-            InformObserverAboutSessionFailure( MLcSession::ESessionRejected );
+            iOutSessionObserver.SessionUnsupportedMediaType();
             break;
             }
         case KMusEngSipReasonCodeBusyHere :
@@ -284,30 +289,27 @@
             // Operator variant uses 486 to rejection instead of 603
             if ( iOperatorVariant )
                 {
-                InformObserverAboutSessionFailure( 
-                    MLcSession::ESessionRejected );
+                iOutSessionObserver.SessionRejected();
                 }
             else
                 {
-                InformObserverAboutSessionFailure( 
-                    MLcSession::ERecipientBusy );
+                iOutSessionObserver.SessionBusyHere();
                 }
             break;
             }
         case KMusEngSipReasonCodeRequestCancelled :  
             {
-            InformObserverAboutSessionFailure( MLcSession::ESessionCancelled );
+            iOutSessionObserver.SessionRequestCancelled();
             break;
             }
         case KMusEngSipReasonCodeDecline :
             {
-            InformObserverAboutSessionFailure( MLcSession::ESessionRejected );
+            iOutSessionObserver.SessionRejected();
             break;
             }
         case KMusEngSipReasonCodeTemporarilyNotAvailable :
             {
-            InformObserverAboutSessionFailure( 
-                MLcSession::ERecipientTemporarilyNotAvailable );
+            iOutSessionObserver.SessionTemporarilyNotAvailable();
             break;
             }
         default:
@@ -322,16 +324,16 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::HandleTermination()" )
     }
 
+
 // -----------------------------------------------------------------------------
 // Sets payload type and calls overridden base class version
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceOutSession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                              TMceSourceType aSourceType )
+void CMusEngMceOutSession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::AdjustVideoCodecL()" )
     
-    CMusEngMceSession::AdjustVideoCodecL( aVideoCodec, aSourceType );
+    CMusEngMceSession::AdjustVideoCodecL( aVideoCodec );
     
     if ( aVideoCodec.SdpName() == KMceSDPNameH263() ||
          aVideoCodec.SdpName() == KMceSDPNameH2632000() )
@@ -352,6 +354,7 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::AdjustVideoCodecL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 // Sets payload type and calls overridden base class version
 // -----------------------------------------------------------------------------
@@ -365,64 +368,71 @@
     User::LeaveIfError( aAudioCodec.SetPayloadType( KMusEngPayloadTypeAudio ) );
     
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::AdjustAudioCodecL()" )
-    }  
+    }
+        
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngMceOutSession::CMusEngMceOutSession( 
+                                const TRect& aRect,
+                                MMusEngSessionObserver& aSessionObserver,
+                                MMusEngOutSessionObserver& aOutSessionObserver )
+    : CMusEngMceSession( aRect, aSessionObserver ),      
+      iOutSessionObserver( aOutSessionObserver )
+    {
+    }
+
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceOutSession::ProfileRegistered()
+void CMusEngMceOutSession::ConstructL( TUint aSipProfileId )
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::ProfileRegistered()" )
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::ConstructL()" )
+
+    CMusEngMceSession::ConstructL();
+    iSipProfileHandler->CreateProfileL( aSipProfileId );
     
-    if ( iRegistrationPending )
-        {
-        iDeltaTimer->Remove( iRegistrationEntry );
-        iRegistrationPending = EFalse;
-        
+    // Check if feature specific behavior is expected
+    iPrivate = ( MultimediaSharingSettings::PrivacySetting());
         
-        HBufC* resolvedRecipient = NULL;
-        TRAPD( error, resolvedRecipient = RemoteAddressL() )
-        if ( error != KErrNone )
-            {
-            InformObserverAboutSessionFailure( error );
-            }
-        else
-            {
-            TRAP( error, DoInviteL( *resolvedRecipient ) )
-            delete resolvedRecipient; 
-            if ( error != KErrNone )
-                {
-                InformObserverAboutSessionFailure( error );
-                }
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::ProfileRegistered()" )
+    NMusSessionInformationApi::TMusClirSetting clir;
+    // Ignore RProperty::Get return value.Incase of error it should behave default.
+    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                    NMusSessionInformationApi::KMusClirSetting,
+                    reinterpret_cast<TInt&>( clir ) );
+    iPrivateNumber = ( clir == NMusSessionInformationApi::ESendOwnNumber )? EFalse: ETrue;
+      
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::ConstructL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-TBool CMusEngMceOutSession::IsH264Supported() const
-    {
-    return ( iVideoCodecList && iVideoCodecList->FindF( KMceSDPNameH264() ) >= 0 );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::CreateMceSessionStructureL( TBool aForceSdpBandwidth )
+void CMusEngMceOutSession::CreateMceSessionStructureL()
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::CreateMceSessionStructureL()" )
 
-    CSIPProfile* profile = iSipProfileHandler->Profile();
+ 	CSIPProfile* profile = iSipProfileHandler->Profile();
     __ASSERT_ALWAYS( profile != NULL, User::Leave( KErrNotReady ) );
 
     // Create session
-    iSession = CMceOutSession::NewL( *iManager, *profile, *iRecipient );
+    if ( iPrivate && iPrivateNumber )
+        {
+        HBufC8* originator = KMusAnonymousHeader().AllocLC();
+        iSession = CMceOutSession::NewL( *iManager, *profile, *iRecipient, originator );
+        CleanupStack::Pop();
+        }
+    else
+        {
+        iSession = CMceOutSession::NewL( *iManager, *profile, *iRecipient );
+        }
+
 
     // Remove QoS-lines if needed
     if ( profile->Type().iSIPProfileClass == 
@@ -435,7 +445,7 @@
         MUS_LOG( "mus: [ENGINE]     Usage of preconditions denied" )
         }
         
-    SetSessionSdpLinesL( *iSession, aForceSdpBandwidth );
+    SetSessionSdpLinesL( *iSession );
 
     // Create bundle for local streams
     
@@ -451,11 +461,11 @@
 
     CMceVideoStream* videoOut = MusEngMceUtils::GetVideoOutStreamL( *iSession );
     
-    SetMediaSdpLinesL( *videoOut, aForceSdpBandwidth );
+    SetMediaSdpLinesL( *videoOut );
 		
     streamForDisplay->SetSourceL( videoOut->Source() );
 
-    AddDisplayL( *streamForDisplay );
+    MusEngMceUtils::AddDisplayL( *streamForDisplay, *iManager, Rect() );
 
     iSession->AddStreamL( streamForDisplay );
     CleanupStack::Pop( streamForDisplay );    
@@ -475,386 +485,22 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::CreateMceSessionStructureL()" )
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::DoInviteL( const TDesC& aRecipient )
-    {
-    MUS_LOG_TDESC( "mus: [ENGINE]  -> CMusEngMceOutSession::DoInviteL(): ",
-                   aRecipient ) 
-
-    HBufC* resolvedRecipient = NULL;
-    if ( aRecipient.Length() > 0 )
-        {
-        resolvedRecipient = aRecipient.AllocLC();
-        }
-    else
-        {
-        resolvedRecipient = ResolveRecipientLC();
-        }
-    
-    // delete possibly existing recipient
-    delete iRecipient;
-    iRecipient = NULL;  
-    
-    TMusEngUriParser parser( *resolvedRecipient ); 
-    parser.ParseUriL();    
-    iRecipient = parser.GetUri8L();    
-    
-    /* Set the display name to recipient address if displayname is empty */
-    if ( !iRemoteDisplayName || iRemoteDisplayName->Length() == 0 )
-        {
-        HBufC* tmp = parser.GetUri16L( ETrue );
-        delete iRemoteDisplayName;
-        iRemoteDisplayName = tmp;
-        }
-    
-    CleanupStack::PopAndDestroy( resolvedRecipient );
-    
-    if ( iSession )
-        {
-        MUS_ENG_LOG_SESSION_STATE( *iSession ) 
-        
-        if ( iSession->State() == CMceSession::EIdle ||
-             iSession->State() == CMceSession::ETerminated )
-            {
-            // This is the case when last invite has ended up to an error,
-            // last sharing has ended normally, or construction of the session
-            // stucture has not been completed. Delete old session and try to
-            // continue normally.
-            delete iSession;
-            iSession = NULL;
-            MUS_LOG( "mus: [ENGINE]     Existing session deleted")
-            }
-        else
-            {
-            // Session is already ongoing. Leave.
-            User::Leave( KErrAlreadyExists );
-            }
-      }
-    
-    const TUint KMusEngOneMinuteTimeout = 60000000;
-    if ( iSipProfileHandler->IsRegistered() )
-        {
-        CreateMceSessionStructureL();   
-        EstablishSessionL();
-	// Start one minute expiration timer
-        TTimeIntervalMicroSeconds32 interval( KMusEngOneMinuteTimeout );
-        iDeltaTimer->Remove( iInvitationResponseEntry );
-        iDeltaTimer->Queue( interval, iInvitationResponseEntry );
-        }
-    else
-        {
-        iRegistrationPending = ETrue;
-        // Start one minute expiration timer
-        TTimeIntervalMicroSeconds32 interval( KMusEngOneMinuteTimeout );
-        iDeltaTimer->Remove( iRegistrationEntry );
-        iDeltaTimer->Queue( interval, iRegistrationEntry );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::DoInviteL()" )
-    }
 
 // -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HBufC* CMusEngMceOutSession::ResolveRecipientLC()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::ResolveRecipientLC()" )
-    
-    HBufC* resolvedRecipient = NULL;
-    TRAPD( err, 
-        resolvedRecipient = 
-            ReadDescPropertyL( NMusSessionApi::KRemoteSipAddress ) );
-    if ( err != KErrNone )
-        {
-        __ASSERT_ALWAYS( err != KErrNoMemory, User::Leave( KErrNoMemory ) );
-        resolvedRecipient = KNullDesC().AllocL();
-        }
-    CleanupStack::PushL( resolvedRecipient );
-    
-    delete iRemoteSipAddressProposal;
-    iRemoteSipAddressProposal = NULL;
-    TRAP( err, 
-        iRemoteSipAddressProposal = 
-            ReadDescPropertyL( NMusSessionApi::KRemoteSipAddressProposal ) );
-    if ( err != KErrNone )
-        {
-        __ASSERT_ALWAYS( err != KErrNoMemory, User::Leave( KErrNoMemory ) );
-        iRemoteSipAddressProposal = KNullDesC().AllocL();
-        }
-    
-    if ( resolvedRecipient->Length() > 0 )
-        {
-        if ( resolvedRecipient->Find( KMusEngCommaSymbol ) != KErrNotFound )
-            {
-            // Split the addresses using KMusCommaSymbol as a separator
-            CDesCArray* addresses =
-                new( ELeave )CDesCArrayFlat( KMusEngSipAddressesMaxAmount );
-            CleanupStack::PushL( addresses );
-            SplitL( *resolvedRecipient, KMusEngCommaSymbol, addresses );          
-            
-            // Show List Query Dialog
-            CleanupStack::Pop( addresses );
-            CleanupStack::PopAndDestroy( resolvedRecipient );
-            CleanupStack::PushL( addresses );
-            resolvedRecipient = HBufC::NewLC( KMusEngSipAddressMaxLength );
-            TPtr ptrRetryAddr( resolvedRecipient->Des() ); 
-            if ( !LcUiProviderL().SelectRecipient( *addresses, ptrRetryAddr ) )
-                {
-                // Address not selected from provided list
-                User::Leave( KErrNotFound );
-                }
-            CleanupStack::Pop( resolvedRecipient );
-            CleanupStack::PopAndDestroy( addresses );
-            CleanupStack::PushL( resolvedRecipient );
-            }
-        }
-    else
-        {
-        __ASSERT_ALWAYS( ++iTriedInvitations < 2, User::Leave( KErrNotFound ) );
-        
-        CleanupStack::PopAndDestroy( resolvedRecipient );
-        resolvedRecipient = NULL;
-        resolvedRecipient = HBufC::NewLC( KMusEngSipAddressMaxLength );
-        __ASSERT_ALWAYS( 
-            iRemoteSipAddressProposal->Length() < KMusEngSipAddressMaxLength,
-            User::Leave( KErrOverflow ) );
-        resolvedRecipient->Des().Copy( *iRemoteSipAddressProposal );
-        TPtr ptrRetryAddr( resolvedRecipient->Des() );
-        InputRecipientL( ptrRetryAddr );
-        iAddressQueried = ETrue;
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::ResolveRecipientLC()" )
-    
-    return resolvedRecipient;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceOutSession::AsyncBrakeCompleted( TAny* aPtr )
-    {
-    if ( aPtr )
-        {
-        reinterpret_cast<CMusEngMceOutSession*>( aPtr )->HandleRecipientNotFound();
-        }
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceOutSession::RegistrationTimerExpired( TAny* aPtr )
-    {
-    if ( aPtr )
-        {
-        CMusEngMceOutSession* session = 
-            reinterpret_cast< CMusEngMceOutSession* >( aPtr );
-        session->InformObserverAboutSessionFailure( KErrGeneral );
-        }
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-//
+// Add Privacy header if own phone number/id should not be sent to remote party
 // -----------------------------------------------------------------------------
 //
-TInt CMusEngMceOutSession::InvitationResponseTimerExpired( TAny* aPtr )
-    {
-    if ( aPtr )
-        {
-        CMusEngMceOutSession* session = 
-            reinterpret_cast< CMusEngMceOutSession* >( aPtr );
-        if ( !session->IgnoreErrorNote() )
-            {
-            session->InformObserverAboutSessionFailure( MLcSession::ENoAnswer );
-            }
-        }
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceOutSession::IgnoreErrorNote()
-    {
-    TBool ignore = ETrue;
-    if ( iSession && 
-          ( iSession->State() == CMceSession::EOffering || 
-         iSession->State() == CMceSession::EProceeding ) )
-        {
-        ignore = EFalse;
-        }
-     return ignore;   
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::InitRecipientNotFoundHandling()
+void CMusEngMceOutSession::AddPrivacyHeaderL( CDesC8Array& aHeaders )
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::InitRecipientNotFoundHandling()" )
-    
-    iDeltaTimer->Remove( iAsyncBrakeEntry );
-    const TUint KMusEngAsyncBrakeTimeout = 1;
-    TTimeIntervalMicroSeconds32 interval( KMusEngAsyncBrakeTimeout );
-    iDeltaTimer->Queue( interval, iAsyncBrakeEntry );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::InitRecipientNotFoundHandling()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::HandleRecipientNotFound()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::HandleRecipientNotFound()" )
-    
-    TInt err( KErrNotFound );
-    
-    TBool retry( EFalse );
-    TRAP( err, retry = DoSyncRetryL() );
-    
-    if ( err != KErrNone || !retry )
-        {
-        InformObserverAboutSessionFailure( MLcSession::ERecipientNotFound );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::HandleRecipientNotFound()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceOutSession::DoSyncRetryL()
-    {
-    __ASSERT_ALWAYS( iRemoteSipAddressProposal, User::Leave( KErrNotFound ) );
-    __ASSERT_ALWAYS( 
-        iRemoteSipAddressProposal->Length() < KMusEngSipAddressMaxLength,
-        User::Leave( KErrOverflow ) );    
-    
-    TBool retry( EFalse );
-    
-    if ( ++iTriedInvitations < 2 )
-        {        
-        TBuf<KMusEngSipAddressMaxLength> retryAddress;
-        retryAddress.Copy( *iRemoteSipAddressProposal );
-        InputRecipientL( retryAddress );
-        DoInviteL( retryAddress );
-
-        retry = ETrue;
-        iAddressQueried = ETrue;
-        }
-    return retry;
+    MUS_LOG( "mus: [ENGINE]  -> AddPrivacyHeaderL()" )
+    _LIT8( KMusPrivacyHeaderValue, "id" );
+    CSIPExtensionHeader* header = CSIPExtensionHeader::NewLC( 
+                                  KMusPrivacyHeader, KMusPrivacyHeaderValue );
+    HBufC8* headInText = header->ToTextL();
+    MUS_LOG_TDESC8( " mus: [ENGINE] Privacy header : ", headInText->Des() );
+    CleanupStack::PopAndDestroy( header );
+    CleanupStack::PushL( headInText );
+    aHeaders.AppendL( *headInText );
+    CleanupStack::PopAndDestroy( headInText );
+    MUS_LOG( "mus: [ENGINE]  <- AddPrivacyHeaderL()" )
     }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::SplitL( const TDesC& aDes,
-                                   const TDesC& aChar,
-                                   CDesCArray* aArray )
-    {
-    TInt charPos( 0 );
-    TPtrC ptr( aDes );
-    TBool found = EFalse;
-    while( ( charPos = ptr.Find( aChar ) ) > 0 )
-        {
-        found = ETrue;
-        TPtrC str = ptr.Left( charPos );
-        aArray->AppendL( str );
-        ptr.Set( ptr.Right( ptr.Length() - str.Length() - 1 ) );
-        }
-    if ( found && ptr.Length() > 0 )
-        {
-        aArray->AppendL( ptr );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HBufC* CMusEngMceOutSession::ReadDescPropertyL( TUint aKey )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngMceOutSession::ReadDescPropertyL: aKey: [%d]",
-                            aKey );
-
-    TBuf<RProperty::KMaxPropertySize> buffer;
-
-    User::LeaveIfError( RProperty::Get( NMusSessionApi::KCategoryUid,
-                                        aKey,
-                                        buffer ) );
-    HBufC* desc = buffer.AllocL();
-    MUS_LOG_TDESC( "mus: [ENGINE]    <- CMusEngMceOutSession::ReadDescPropertyL: val: ",
-                            (*desc) );
-    return desc;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HBufC* CMusEngMceOutSession::RemoteAddressL() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceOutSession::RemoteAddressL()" )
-    
-    __ASSERT_ALWAYS( iRecipient, User::Leave( KErrNotReady ) );
-    
-    HBufC* remoteAddr = HBufC::NewLC( iRecipient->Length() );
-    TPtr ptrRemoteAddr( remoteAddr->Des() );
-    User::LeaveIfError( 
-        CnvUtfConverter::ConvertToUnicodeFromUtf8( 
-            ptrRemoteAddr, *iRecipient ) );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceOutSession::RemoteAddressL()" )
-    
-    CleanupStack::Pop( remoteAddr );
-    return remoteAddr;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession, Should return the displayname of the remote terminal
-// If found in phone book than contactname else user entered sip address
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceOutSession::RemoteDisplayName()
-    {      
-    if ( !iRemoteDisplayName )
-        {
-        return KNullDesC;
-        }
-    return *iRemoteDisplayName;
-    }
-
-// -----------------------------------------------------------------------------
-// Query to the user for sip address of the remote party.
-// If the user entered a new sip address then reset the displayname 
-// to user entered sip address.
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceOutSession::InputRecipientL( TDes& aRecipientAddress )
-    {   
-    if ( !LcUiProviderL().InputRecipient( aRecipientAddress ) )
-       {
-       User::Leave( KErrCancel );
-       }    
-    /* displayname is no longer valid since user entered a new sip address
-     * and displayname will be set to sip address when invitation sent.
-     */
-    delete iRemoteDisplayName;
-    iRemoteDisplayName = NULL;
-    }
-
-// End of file
--- a/mmsharing/mmshengine/src/musengmcesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musengmcesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -20,18 +20,14 @@
 #include "mussettings.h"
 #include "musengmcesession.h"
 #include "musengsessiondurationtimer.h"
+#include "musengsessionobserver.h"
 #include "musengmceutils.h"
 #include "musuid.hrh"
 #include "musenglogger.h"
+#include "musengclipsessionobserver.h"
 #include "mussipprofilehandler.h"
-#include "mussessionproperties.h"
-#include "musenguriparser.h"
-#include "musengtelephoneutils.h"
 
 // SYSTEM
-#include <lcsessionobserver.h>
-#include <lcuiprovider.h>
-#include <lcvideoplayer.h>
 #include <mcedefs.h>
 #include <mcemanager.h>
 #include <mceinsession.h>
@@ -41,16 +37,10 @@
 #include <mcedisplaysink.h>
 #include <mcespeakersink.h>
 #include <mcefilesource.h>
-#include <mcecamerasource.h>
 #include <mcertpsource.h>
 #include <mceaudiocodec.h>
-#include <mceavccodec.h>
+#include <mcevideocodec.h>
 #include <AudioPreference.h>
-#include <e32property.h>
-#include <cntitem.h>
-#include <cntfield.h>
-#include <cntdef.h>
-#include <cntfldst.h>
 
 
 const TInt KMusEngTimerInterval = 1000000; // 1 second
@@ -68,64 +58,6 @@
 #define MUS_CODEC_ARR_CONST_CAST( codecArr ) \
 ( const_cast< RPointerArray< CMceVideoCodec >& >( codecArr ) )
 
-// Names of AVC levels in string for config keys stored in CenRep 
-_LIT8( KMusAvcBitrateLevel1, "AvcBrL1=" );
-_LIT8( KMusAvcBitrateLevel1b, "AvcBrL1b=" );
-_LIT8( KMusAvcBitrateLevel1_1, "AvcBrL1_1=" );
-_LIT8( KMusAvcBitrateLevel1_2, "AvcBrL1_2=" );
-_LIT8( KMusAvcBitrateLevel1_3, "AvcBrL1_3=" );
-_LIT8( KMusAvcBitrateLevel2, "AvcBrL2=" );
-
-_LIT8( KMusEncoderInfoTokenizer, ";" );
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::CMusEngMceSession()
-    : iSecondsFromLastRtcpReport ( 0 ),
-      // Although speaker is constructed as muted, it is not explicitly muted
-      iExplicitlyMuted( EFalse ),
-      iBackground( ETrue )
-    {
-    iMceManagerUid.iUid = KMusUiUid;
-    iBackground = IsBackgroundStartup();
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::ConstructL()" )
-    
-    iTelephoneUtils = CMusEngTelephoneUtils::NewL( *this );
-
-    // Creating new MCE Manager and set all needed observers to this class.
-    iManager = CMceManager::NewL( iMceManagerUid,
-                                  &iTransactionDataContainer );
-    iManager->SetSessionObserver( this );
-    iManager->SetInSessionObserver( this );
-    iManager->SetMediaObserver( this );
-    iManager->SetRtpObserver( this );
-
-    // Check if operator specific behavior is expected
-    iOperatorVariant = ( MultimediaSharingSettings::OperatorVariantSettingL() ==
-                         MusSettingsKeys::EOperatorSpecific );
-    
-    // Update timer initialization
-    iUpdateTimer = CMusEngSessionDurationTimer::NewL( *this );
-    
-    iSipProfileHandler = CMusSipProfileHandler::NewL( *this );
-    
-    iRemoteDetails = HBufC::NewL( RProperty::KMaxPropertySize );
-    iRemoteDetails->Des().Copy( KNullDesC );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::ConstructL()" )
-    }
-
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -133,70 +65,107 @@
 CMusEngMceSession::~CMusEngMceSession()
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::~CMusEngMceSession()" )
-    
     delete iSipProfileHandler;
     delete iSession;
     delete iManager;
     delete iUpdateTimer;
-    delete iTelephoneUtils;
-    delete iRemoteDetails;
-    
-    RProperty::Set( NMusSessionApi::KCategoryUid, 
-                    NMusSessionApi::KFastMode, 
-                    MusSettingsKeys::EFastModeDisabled );
-    
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::~CMusEngMceSession()" )
     }
 
+
 // -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
+//
 // -----------------------------------------------------------------------------
 //
-TRect CMusEngMceSession::Rect() const
+EXPORT_C void CMusEngMceSession::TerminateL()
     {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::Rect()" )
-    return iRect;
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::TerminateL()" )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    iSession->TerminateL();
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::TerminateL()" )
     }
 
+
 // -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
+// Returns estabilished session time. If not established return
+// value is < 0
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceSession::SetRectL( const TRect& aRect )
+EXPORT_C TTimeIntervalSeconds CMusEngMceSession::GetSessionTime() const
     {
-    MUS_LOG( "mus: [ENGINE]  CMusEngSession::SetRectL()" )
-    iRect = aRect;
-    RectChangedL();
+    if ( iSession && iSession->State() == CMceSession::EEstablished )
+        {
+        TTime time;
+        TTimeIntervalSeconds seconds;
+        time.HomeTime();
+
+        time.SecondsFrom( iStartTime, seconds );
+
+        return seconds;
+        }
+
+    return TTimeIntervalSeconds( KErrNotReady );
+
     }
 
+
 // -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
+//
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceSession::SetSecondaryRectL( const TRect& aSecondaryRect )
+EXPORT_C TBool CMusEngMceSession::ConnectionActive() const
     {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::SetSecondaryRectL()" )
-    
-    // Same rect is set by primary and secondary setters
-    iRect = aSecondaryRect;
-    RectChangedL();
+    if ( iSession )
+        {
+        return iSession->ConnectionActive();
+        }
+    return EFalse;
     }
 
+
 // -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
+//
 // -----------------------------------------------------------------------------
 //
-TRect CMusEngMceSession::SecondaryRect() const
+EXPORT_C TBool CMusEngMceSession::ContainsAudioL()
     {
-    MUS_LOG( "mus: [ENGINE]  CMusEngMceSession::SecondaryRect()" )
-    return iRect;
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+                                            
+    for ( TInt i = 0; i < iSession->Streams().Count(); ++i )
+        {
+        if ( iSession->Streams()[i]->Type() == KMceAudio )
+            {
+            return ETrue;
+            }
+        }
+
+    return EFalse;
+    }
+       
+        
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngMceSession::IsMutedL()
+    {
+    // Precondition checked in ContainsAudioL
+    
+    if ( ContainsAudioL() && !iExplicitlyMuted )
+        {
+        return EFalse;
+        }
+    
+    return ETrue;
     }
 
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
+
 // -----------------------------------------------------------------------------
 //
-MMusEngDisplayHandler::TDisplayOrientation CMusEngMceSession::OrientationL()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMusEngMceSession::TDisplayOrientation 
+                                            CMusEngMceSession::OrientationL()
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::RotationL()" )
     
@@ -229,7 +198,8 @@
 //
 // -----------------------------------------------------------------------------
 //        
-void CMusEngMceSession::SetOrientationL( TDisplayOrientation aOrientation )
+EXPORT_C void CMusEngMceSession::SetOrientationL( 
+                                        TDisplayOrientation aOrientation )
     {
     MUS_LOG1( "mus: [ENGINE]  -> CMusEngMceSession::SetOrientationL() %d", 
               aOrientation )
@@ -250,11 +220,55 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::SetOrientationL()" )
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::VolumeUpL()
+    {
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMusEngSession::VolumeUpL();
+
+    SetSpeakerVolumeL( VolumeL() );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::VolumeDownL()
+    {
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMusEngSession::VolumeDownL();
+
+    SetSpeakerVolumeL( VolumeL() );
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::SetVolumeL( TInt aVal )
+    {
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    CMusEngSession::SetVolumeL( aVal );
+
+    SetSpeakerVolumeL( VolumeL() );
+    }
+
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceSession::EnableDisplayL( TBool aEnable )
+EXPORT_C void CMusEngMceSession::EnableDisplayL( TBool aEnable )
     {
     MUS_LOG1( "mus: [ENGINE]     -> CMusEngMceSession::EnableDisplay() %d", 
               aEnable )
@@ -311,418 +325,112 @@
 // 
 // -----------------------------------------------------------------------------
 //
-TBool CMusEngMceSession::IsDisplayEnabled()
-    {
-    TBool enabled( EFalse );
-    if ( iSession )
-        {
-        CMceDisplaySink* display = 
-           MusEngMceUtils::GetDisplay( *iSession, ETrue );
-        if ( display )
-           {
-           enabled = display->IsEnabled();
-           }
-        }
-    return enabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngDisplayHandler
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsDisplayActive()
+EXPORT_C TBool CMusEngMceSession::IsDisplayEnabledL()
     {
-    return ( IsDisplayEnabled() );
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusEngAudioRoutingObserver
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::AudioRoutingChanged()
-    {
-    InformObserverAboutPlayerUpdate( LocalVideoPlayer() );
-    InformObserverAboutPlayerUpdate( RemoteVideoPlayer() );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession 
-// -----------------------------------------------------------------------------
-//
-MLcSession::TLcSessionState CMusEngMceSession::LcSessionState() const
-    {
-    TLcSessionState lcSessionState = MLcSession::EUninitialized;
-
-    if ( iSession )
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    if ( iSession->State() == CMceSession::ETerminated || 
+         iSession->State() == CMceSession::EIdle )
         {
-        switch( iSession->State() )
-            {
-            case CMceSession::EIdle: 
-                {
-                lcSessionState = MLcSession::EInitialized;
-                break;
-                }
-            case CMceSession::EIncoming:
-            case CMceSession::EProceeding:
-            case CMceSession::EReserving:
-                {
-                lcSessionState = MLcSession::EReceived;
-                break;
-                }
-            
-            case CMceSession::EOffering:
-            case CMceSession::EAnswering:
-                {
-                lcSessionState = MLcSession::EOpening;
-                break;
-                }
-            case CMceSession::EEstablished:
-                {
-                lcSessionState = MLcSession::EOpen;
-                break;
-                }
-            case CMceSession::ECancelling:
-            case CMceSession::ETerminating:
-                {
-                lcSessionState = MLcSession::EClosing;
-                break;
-                }
-            case CMceSession::ETerminated:
-                {
-                lcSessionState = MLcSession::EClosed;
-                break;
-                }
-            default:
-               {
-               lcSessionState = MLcSession::EUninitialized;
-               break;
-               }
-            }
+        return EFalse;   
         }
-    return  lcSessionState;
+    CMceDisplaySink* display = MusEngMceUtils::GetDisplayL( *iSession );
+    return display->IsEnabled();
     }
 
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcSessionObserver( MLcSessionObserver* aObserver )
-    {
-    iLcSessionObserver = aObserver;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcUiProvider( MLcUiProvider* aUiProvider )
-    {
-    iLcUiProvider = aUiProvider;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngMceSession::RemoteVideoPlayer()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngMceSession::LocalVideoPlayer()
-    {
-    return NULL;
-    }
 
 // -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::LocalDisplayName()
-    {
-    return KNullDesC;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::RemoteDisplayName()
-    {
-    return KNullDesC;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::SetParameter( TInt /*aId*/, TInt /*aValue*/ )
-    {
-    return KErrNotSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::ParameterValue( TInt /*aId*/ )
-    {
-    return KErrNotSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsBackgroundStartup()
-    {
-    TInt fastMode;
-    TInt error = RProperty::Get( NMusSessionApi::KCategoryUid, 
-                                 NMusSessionApi::KFastMode, 
-                                 fastMode );
-    
-    return ( error == KErrNone && 
-             iBackground &&
-             fastMode == MusSettingsKeys::EFastModeOn );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
+// Mutes playback of sended audio streams. Audio data is still streamed.
 // -----------------------------------------------------------------------------
 //
-TInt CMusEngMceSession::SetForegroundStatus( TBool aIsForeground )
+EXPORT_C void CMusEngMceSession::MuteL()
     {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngMceSession::SetForegroundStatus() %d", 
-              aIsForeground )
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::Mute()" )
 
-    if ( aIsForeground )
-        {
-        // Only clear the bg info, do not ever enable it again
-        iBackground = EFalse;
-        }
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+
+    DoMuteSpeakerL( ETrue );
     
-    return KErrNone;
-    }
- 
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//   
-const TDesC& CMusEngMceSession::RemoteDetails()
-    {
-    // Don't care about error, empty value will be used in that case
-    TPtr ptrDetails( iRemoteDetails->Des() );
-    RProperty::Get( NMusSessionApi::KCategoryUid,
-                    NMusSessionApi::KTelNumber,
-                    ptrDetails ); 
-    return *iRemoteDetails;
+    // Mark speaker as explicitly muted instead of muted because of disabling
+    // bundled display
+    iExplicitlyMuted = ETrue; 
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::Mute()" )
     }
 
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//   
-void CMusEngMceSession::UpdateLcSessionL()
-    {
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-        
-    //In Mus engine, every update of player has immediate effect. Thus, this method
-    //is empty.
-    }
 
 // -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::SendDialTone( TChar /*aKey*/)
-    {
-    // Handle Key once implemented
-    return ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcAudioMutedL()
-    {
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-              
-    TBool containsAudio( EFalse );
-    for ( TInt i = 0; i < iSession->Streams().Count(); ++i )
-        {
-        if ( iSession->Streams()[i]->Type() == KMceAudio )
-            {
-            containsAudio = ETrue;
-            }
-        }    
-    
-    if ( containsAudio && !iExplicitlyMuted )
-        {
-        return EFalse;
-        }
-    
-    return ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::MuteLcAudioL( TBool aMute )
-    {
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    DoMuteSpeakerL( aMute );
-    iExplicitlyMuted = aMute;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
+// Unmutes playback of sended audio streams.
 // -----------------------------------------------------------------------------
 //
-TBool CMusEngMceSession::IsLcMicMutedL()
-    {
-    return iTelephoneUtils->IsMicMutedL();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::MuteLcMicL( TBool aMute )
+EXPORT_C void CMusEngMceSession::UnmuteL()
     {
-    iTelephoneUtils->MuteMicL( aMute );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsEnablingLcLoudspeakerAllowed()
-    {
-    return iTelephoneUtils->AudioRoutingCanBeChanged();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::EnableLcLoudspeakerL( TBool aEnabled )
-    {
-    TRAPD( error, iTelephoneUtils->LoudspeakerL( aEnabled ) )
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::Unmute()" )
 
-    if ( error != KErrNone )
-        {
-        // This is writed for emulator use
-        if ( error != KErrNotSupported )
-            {
-            MUS_LOG1( "mus: [ENGINE] CMusEngSession::EnableLoudspeakerL() Leave: #%d",
-                      error )
-            User::Leave( error );
-            }
-        // Not leave in emulator if KErrNotSupported
-        #if (!defined (__WINS__) && !defined(__WINSCW__))
-        User::Leave( error );
-        #endif
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcLoudspeakerEnabled()
-    {
-    return iTelephoneUtils->IsLoudSpeakerEnabled();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::LcVolumeL()
-    {
-    return iTelephoneUtils->GetVolumeL();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcVolumeL( TInt aValue )
-    {
-    iTelephoneUtils->SetVolumeL( aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::IncreaseLcVolumeL()
-    {
     __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
 
-    TInt currentVolume = iTelephoneUtils->GetVolumeL();
-    iTelephoneUtils->SetVolumeL( currentVolume  + 1 );
-    SetSpeakerVolumeL( LcVolumeL() );
-    }
+    DoMuteSpeakerL( EFalse );
 
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::DecreaseLcVolumeL()
-    {
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    // Mark speaker as explicitly unmuted instead of unmuted because of 
+    // enabling bundled display
+    iExplicitlyMuted = EFalse;
 
-    TInt currentVolume = iTelephoneUtils->GetVolumeL();
-    iTelephoneUtils->SetVolumeL( currentVolume - 1 );
-    SetSpeakerVolumeL( LcVolumeL() );
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::Unmute()" )
     }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-MLcSessionObserver* CMusEngMceSession::LcSessionObserver()
+void CMusEngMceSession::RefreshOrientationL()
+{
+    MUS_LOG( "mus: [ENGINE]  <-> CMusEngMceSession::RefreshOrientationL()" )
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngMceSession::CMusEngMceSession( const TRect& aRect,
+                                      MMusEngSessionObserver& aSessionObserver )
+    : CMusEngSession( aRect ),
+      iSessionObserver( aSessionObserver ),
+      iSecondsFromLastRtcpReport ( 0 ),
+      // Although speaker is constructed as muted, it is not explicitly muted
+      iExplicitlyMuted( EFalse ) 
     {
-    return iLcSessionObserver;
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-MLcUiProvider* CMusEngMceSession::LcUiProvider()
+void CMusEngMceSession::ConstructL()
     {
-    return iLcUiProvider;
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::ConstructL()" )
+    CMusEngSession::ConstructL(); // Base class ConstructL -first
+
+    // Creating new MCE Manager and set all needed observers to this class.
+    iManager = CMceManager::NewL( TUid::Uid( KMusUiUid ),
+                                  &iTransactionDataContainer );
+
+    iManager->SetSessionObserver( this );
+    iManager->SetInSessionObserver( this );
+    iManager->SetMediaObserver( this );
+    iManager->SetRtpObserver( this );
+
+    // Check if operator specific behavior is expected
+    iOperatorVariant = ( MultimediaSharingSettings::OperatorVariantSettingL() ==
+                         MusSettingsKeys::EOperatorSpecific );
+    
+    // Update timer initialization
+    iUpdateTimer = CMusEngSessionDurationTimer::NewL( *this );
+    	
+  	iSipProfileHandler = CMusSipProfileHandler::NewL( *this );
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::ConstructL()" )
     }
 
-// -----------------------------------------------------------------------------
-// Returns estabilished session time. If not established return
-// value is < 0
-// -----------------------------------------------------------------------------
-//
-TTimeIntervalSeconds CMusEngMceSession::GetSessionTime() const
-    {
-    if ( iSession && iSession->State() == CMceSession::EEstablished )
-        {
-        TTime time;
-        TTimeIntervalSeconds seconds;
-        time.HomeTime();
-
-        time.SecondsFrom( iStartTime, seconds );
-
-        return seconds;
-        }
-
-    return TTimeIntervalSeconds( KErrNotReady );
-    }
 
 // -----------------------------------------------------------------------------
 //
@@ -743,160 +451,15 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::RectChangedL()" )
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionStateChange()
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->StateChanged( *this );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionUpdate()
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->Updated( *this );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutSessionFailure( TInt aReason )
-    {
-    if ( iLcSessionObserver )
-        {
-        iLcSessionObserver->Failed( *this, aReason );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerStateChange( 
-    MLcVideoPlayer* aPlayer )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->StateChanged( *aPlayer );
-        }
-    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformUiProviderAboutReceivingStart()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::InformUiProviderAboutReceivingStart()" )
-    if ( iBackground && iLcUiProvider )
-        {
-        MUS_LOG( "mus: [ENGINE]     receiving started in BG mode, switching to FG" )
-        iLcUiProvider->HandleForegroundStatus( ETrue );
-        }
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::InformUiProviderAboutReceivingStart()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerUpdate( 
-    MLcVideoPlayer* aPlayer )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->Updated( *aPlayer );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::InformObserverAboutPlayerFailure( 
-    MLcVideoPlayer* aPlayer, 
-    TInt aReason )
-    {
-    if ( iLcSessionObserver && aPlayer )
-        {
-        iLcSessionObserver->Failed( *aPlayer, aReason );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MLcUiProvider& CMusEngMceSession::LcUiProviderL()
-    {
-    __ASSERT_ALWAYS( iLcUiProvider, User::Leave( KErrNotReady ) );
-    return *iLcUiProvider;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::AddSdpBandwidthAttributesL( CDesC8Array& aSdpLinesArray,
-                                                    TInt aBandwidthAs )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::AddSdpBandwidthAttributesL()" )
-    const TInt KMusNumberMaxLength = 10;
-    HBufC8* bandwidth = HBufC8::NewLC( 
-            KMusEngSessionSdpLineTiasLine().Length() + KMusNumberMaxLength );
-    
-    bandwidth->Des().Copy( KMusEngSessionSdpLineBandwidthLine() );
-    bandwidth->Des().AppendNum( aBandwidthAs );
-    bandwidth->Des().Append( KMusEngNewLine() );
-    aSdpLinesArray.AppendL( *bandwidth );
-    
-    bandwidth->Des().Copy( KMusEngSessionSdpLineTiasLine() );
-    bandwidth->Des().AppendNum( aBandwidthAs * KMusTiasMultiplier );
-    bandwidth->Des().Append( KMusEngNewLine() );
-    aSdpLinesArray.AppendL( *bandwidth );
-    
-    CleanupStack::PopAndDestroy( bandwidth );  
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::AddSdpBandwidthAttributesL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsBandwidthAttributeSet( MDesC8Array* aSdpLinesArray )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::IsBandwidthAttributeSet()" )
-    TBool ret =
-        ContainsText( aSdpLinesArray, KMusEngSessionSdpLineTiasLine() ) ||
-        ContainsText( aSdpLinesArray, KMusEngSessionSdpLineBandwidthLine() );
-    MUS_LOG1( "mus: [ENGINE]  <- CMusEngMceSession::IsBandwidthAttributeSet(): %d",
-            ret )
-    return ret;
-    }
 
 // -----------------------------------------------------------------------------
 // Setting session level sdp lines. Bandwith attribute is always used in
-// operator variant mode and at receiver side (using force) when TIAS
-// usage is disabled. However, bandwidth attribute is preferred to be used 
-// at media level (see SetMediaSdpLinesL method). It is set to session level
-// only if other side is using also session level bandwidth. Media level
-// preference exists because some other manufacturer's videosharing does not
-// understand session level bandwidth attribute.
-// In non-operator variant mode and when TIAS usage is enabled, both AS and 
-// TIAS are added to session level only if the other side is using session 
-// level bandwidth.
+// operator variant mode and at receiver side (using force). 
+// However, bandwidth attribute is preferred to be used at media level
+// (see SetMediaSdpLinesL method). It is set to session level only if other
+// side is using also session level bandwidth. Media level preference exists
+// because some other manufacturer's videosharing does not understand session
+// level bandwidth attribute.
 // -----------------------------------------------------------------------------
 //
 void CMusEngMceSession::SetSessionSdpLinesL( 
@@ -909,17 +472,8 @@
     CleanupDeletePushL( oldSessionSdpLines );
     TBool bandwidthAtSessionLevel( ContainsText( oldSessionSdpLines, 
                                    KMusEngSessionSdpLineBandwidthLine() ) );
-    TBool tiasAtSessionLevel( ContainsText( oldSessionSdpLines, 
-                                   KMusEngSessionSdpLineTiasLine() ) );    
     CleanupStack::PopAndDestroy( oldSessionSdpLines );
-  
-    TInt bandwidthAs = 0;
-    TRAPD( err, bandwidthAs = 
-                MultimediaSharingSettings::VideoBandwidthSettingL() );
-    __ASSERT_ALWAYS( err == KErrNone || err == KErrNotFound,
-                     User::Leave( err ) );
-    TBool useTias = ( bandwidthAs > 0 );
-
+    
     CDesC8Array* newSessionSDPLines = 
                     new ( ELeave ) CDesC8ArrayFlat( KMusEngArrayGranularity3 );
     CleanupStack::PushL( newSessionSDPLines );
@@ -931,22 +485,15 @@
         }
     else
     	{
-    	newSessionSDPLines->AppendL( KMusEngSessionSdpLineXApplication() );    	
+    	newSessionSDPLines->AppendL( KMusEngSessionSdpLineXApplication() );	
     	}
-        
-    if ( bandwidthAtSessionLevel && ( iOperatorVariant || 
-         ( aForceBandwidthLine && !useTias ) ) )
-        {        
-        MUS_LOG( "mus: [ENGINE] setting bandwidth to session level" )
+    
+    if ( bandwidthAtSessionLevel && ( iOperatorVariant || aForceBandwidthLine ) )
+	    {
+	    MUS_LOG( "mus: [ENGINE] setting bandwidth to session level" )
         newSessionSDPLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-        }
-    else if ( !iOperatorVariant && useTias && aForceBandwidthLine &&
-            ( bandwidthAtSessionLevel || tiasAtSessionLevel ) )
-        {
-        MUS_LOG( "mus: [ENGINE] setting b=AS and b=TIAS to session level" )
-        AddSdpBandwidthAttributesL( *newSessionSDPLines, bandwidthAs );
-        }
-   
+	    }
+    	        
     aSession.SetSessionSDPLinesL( newSessionSDPLines );
     
     CleanupStack::Pop( newSessionSDPLines );
@@ -954,14 +501,9 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::SetSessionSdpLinesL()" )
     }
 
-
 // -----------------------------------------------------------------------------
-// Setting media level sdp lines. In operator variant mode or when TIAS usage
-// is disabled bandwidth is not set to media level if it is used already at 
-// session level. In non operator variant and TIAS enabled case both AS and
-// TIAS attributes are set to media level if: 1)it is an outcoming sessions
-// or 2) incoming session had bandwidth attributes on media level or didn't
-// have bandwidth attributes at all
+// Setting media level sdp lines. Bandwidth is not set to media level if
+// it is used already at session level.
 // -----------------------------------------------------------------------------
 //
 void CMusEngMceSession::SetMediaSdpLinesL( 
@@ -974,49 +516,22 @@
     CleanupDeletePushL( sessionSdpLines );
     TBool bandwidthAtSessionLevel( ContainsText( sessionSdpLines, 
                                    KMusEngSessionSdpLineBandwidthLine() ) );
-
-    TInt bandwidthAs = 0;
-    TRAPD( error, bandwidthAs = 
-                  MultimediaSharingSettings::VideoBandwidthSettingL() );
-    __ASSERT_ALWAYS( error == KErrNone || error == KErrNotFound,
-                     User::Leave( error ) );
-    TBool useTias = ( bandwidthAs > 0 );
-    TBool tiasOrAsAtSessionLevel = EFalse;
-    TBool tiasOrAsAtMediaLevel = EFalse;
-    if ( useTias )
+    CleanupStack::PopAndDestroy( sessionSdpLines );
+    
+    if ( !bandwidthAtSessionLevel && ( iOperatorVariant || aForceBandwidthLine ) )
         {
-        tiasOrAsAtSessionLevel = IsBandwidthAttributeSet( sessionSdpLines );
-        MDesC8Array* mediaSdpLines = aStream.MediaAttributeLinesL();
-        tiasOrAsAtMediaLevel = IsBandwidthAttributeSet( mediaSdpLines );
-        delete mediaSdpLines;        
+    	MUS_LOG( "mus: [ENGINE] setting bandwidth to media level" )
+		
+		//Add media attribute to sdp
+		const TInt KMusMediaSdpLinesGranularity = 1;
+		CDesC8Array* headers = 
+		    new ( ELeave ) CDesC8ArrayFlat( KMusMediaSdpLinesGranularity );
+		CleanupStack::PushL( headers );
+		headers->AppendL( KMusEngSessionSdpLineBandwidthField() );
+		aStream.SetMediaAttributeLinesL( headers );   
+		CleanupStack::Pop( headers );
         }
-
-    CleanupStack::PopAndDestroy( sessionSdpLines );
-
-    TBool setTiasAtMediaLevel = ( tiasOrAsAtMediaLevel || 
-                                ( aForceBandwidthLine && 
-                                  !tiasOrAsAtSessionLevel ) );
-  
-    const TInt KMusMediaSdpLinesGranularity = 2;
-    CDesC8Array* headers = 
-        new ( ELeave ) CDesC8ArrayFlat( KMusMediaSdpLinesGranularity );
-    CleanupStack::PushL( headers );
-    
-    if ( !bandwidthAtSessionLevel && ( iOperatorVariant || 
-         ( aForceBandwidthLine && !useTias ) ) )
-        {
-        MUS_LOG( "mus: [ENGINE] setting bandwidth to media level" )
-        headers->AppendL( KMusEngSessionSdpLineBandwidthField() );
-        }
-    else if ( !iOperatorVariant && useTias && setTiasAtMediaLevel )
-        {
-        MUS_LOG( "mus: [ENGINE] setting b=AS and b=TIAS to media level" )
-        AddSdpBandwidthAttributesL( *headers, bandwidthAs );
-        }
-
-    aStream.SetMediaAttributeLinesL( headers );   
-    CleanupStack::Pop( headers );
-
+		
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::SetMediaSdpLinesL()" )
     }
     
@@ -1035,18 +550,31 @@
             {
             CMceSpeakerSink* speaker = 
                 MusEngMceUtils::GetSpeaker( *( iSession->Streams()[i] ) );
-            
+
             if ( speaker &&        
-                 aNewVolume >= 1 &&
-                 aNewVolume <= speaker->MaxVolumeL() )
+                 aNewVolume >= KMusEngMinVolume &&
+                 aNewVolume <= KMusEngMaxVolume )
                 {
-                speaker->SetVolumeL( aNewVolume );
+                // MCE might have different scale for volume than MUS
+                // so adjust MUS volume to MCE scale before setting.
+                TInt maxVol = speaker->MaxVolumeL();
+                TInt setVol = maxVol * aNewVolume / KMusEngMaxVolume;
+                setVol = Max(setVol, 1);
+                
+                MUS_LOG2(
+"mus: [ENGINE]  -> CMusEngMceSession::SetSpeakerVolumeL() orig:%d, adjusted:%d", 
+aNewVolume, setVol );
+                
+                if ( setVol <= maxVol )
+                    {
+                    speaker->SetVolumeL( setVol );
+                    }
                 }
-
             }
         }
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1072,7 +600,8 @@
                 {
                 AdjustVideoStreamL( static_cast<CMceVideoStream&>
                                         ( videoStream->BoundStreamL() ) );
-                } 
+                }
+            
             }
         else // audio
             {
@@ -1091,8 +620,10 @@
         }
     
     MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::AdjustStreamsAndCodecsL" )
+    
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1106,16 +637,16 @@
     DoCodecSelectionL( aVideoStream );
     
     const RPointerArray<CMceVideoCodec>& codecs = aVideoStream.Codecs();
-    
-    __ASSERT_ALWAYS( aVideoStream.Source(), User::Leave( KErrArgument ) );
+        
     for ( TInt codecIndex = 0; codecIndex < codecs.Count(); ++codecIndex )
         {
-        AdjustVideoCodecL( *codecs[codecIndex], aVideoStream.Source()->Type() );
+        AdjustVideoCodecL( *codecs[codecIndex] );
         }
     
     MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::AdjustVideoStreamL" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1135,6 +666,7 @@
     
     MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::AdjustAudioStreamL" )
     }
+    
 
 // -----------------------------------------------------------------------------
 // Calls CMceInSession::RejectL() inside TRAP_IGNORE
@@ -1163,15 +695,16 @@
             TRAP_IGNORE( aSession.RejectL() )
             }
         }
-    }  
+    }
+    
 
 // -----------------------------------------------------------------------------
 // By default rejects all incoming sessions immediately without notifying UI
 // -----------------------------------------------------------------------------
 //
 void CMusEngMceSession::IncomingSession( 
-    CMceInSession* aSession,
-    TMceTransactionDataContainer* /*aContainer*/ )
+                      CMceInSession* aSession,
+                      TMceTransactionDataContainer* /*aContainer*/ )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::IncomingSession()" )
     
@@ -1185,14 +718,15 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::IncomingSession()" )
     }
 
+
 // -----------------------------------------------------------------------------
 // By default rejects all incoming updates immediately without notifying UI
 // -----------------------------------------------------------------------------
 //
 void CMusEngMceSession::IncomingUpdate( 
-    CMceSession& aOrigSession, 
-    CMceInSession* aUpdatedSession,
-    TMceTransactionDataContainer* /*aContainer*/ )
+                     CMceSession& aOrigSession, 
+                     CMceInSession* aUpdatedSession,
+                     TMceTransactionDataContainer* /*aContainer*/ )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::IncomingUpdate()" )
                                     
@@ -1214,7 +748,8 @@
         } 
     
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::IncomingUpdate()" )    
-    }  
+    }
+    
 
 // -----------------------------------------------------------------------------
 //
@@ -1250,12 +785,20 @@
             }
         case CMceMediaStream::EIdle: // Stream is not receiving RTP
             {
-            // NOP
+            iSessionObserver.StreamIdle();
             break;
             }
         case CMceMediaStream::EStreaming: // Stream is streaming
             {
-            StreamStreaming( aStream );
+            // If streaming stream is complete video out- or instream, inform UI 
+            if ( aStream.Type() == KMceVideo &&
+                 aStream.Source() && 
+                 aStream.Sinks().Count() >= 0 &&
+                 ( aStream.Source()->Type() == KMceRTPSource ||
+                   aStream.Sinks()[0]->Type() == KMceRTPSink ) )
+                {
+                iSessionObserver.StreamStreaming();
+                }
             break;
             }
         case CMceMediaStream::EDisabled: // Stream is explicitly disabled
@@ -1289,6 +832,7 @@
                 
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1302,6 +846,7 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::StreamStateChanged( src )" )       
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1315,13 +860,14 @@
     MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::StreamStateChanged( sink )" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMusEngMceSession::SessionStateChanged(
-    CMceSession& aSession,
-    TMceTransactionDataContainer* aContainer )
+                        CMceSession& aSession,
+                        TMceTransactionDataContainer* aContainer )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::SessionStateChanged()" )
         
@@ -1329,7 +875,7 @@
         {
         // Container should never be NULL, but if it is, handle as
         // internal error
-        InformObserverAboutSessionFailure( KErrGeneral );
+        iSessionObserver.SessionFailed();
         return;
         }
 
@@ -1349,7 +895,8 @@
         }
     
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::SessionStateChanged()" )
-    }     
+    }
+            
     
 // -----------------------------------------------------------------------------
 //
@@ -1367,7 +914,7 @@
             {
             MUS_LOG( "mus: [ENGINE]     CMusEngMceSession::\
                      SessionConnectionStateChanged: Notify observer" )
-            InformObserverAboutSessionFailure( MLcSession::EConnectionLost );
+            iSessionObserver.SessionConnectionLost();
             }
         }
 
@@ -1375,11 +922,17 @@
              SessionConnectionStateChanged()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
+
+#if ( defined( _DEBUG ) && !defined( UNIT_TESTING ) ) 
 void CMusEngMceSession::Failed( CMceSession& aSession, TInt aError )
+#else
+void CMusEngMceSession::Failed( CMceSession& aSession, TInt /*aError*/ )
+#endif
     {
     MUS_LOG1( "mus: [ENGINE]     -> CMusEngMceSession::Failed() error #%d", 
               aError )
@@ -1387,19 +940,20 @@
     if ( iSession && iSession == &aSession )
         {
         MUS_LOG( "mus: [ENGINE]    CMusEngMceSession::Failed: Notify observer" )
-        InformObserverAboutSessionFailure( aError );
+        iSessionObserver.SessionFailed();
         }
 
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::Failed()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMusEngMceSession::UpdateFailed(
-    CMceSession& aSession,
-    TMceTransactionDataContainer* aContainer )
+                   CMceSession& aSession,
+                   TMceTransactionDataContainer* aContainer )
     {
     MUS_LOG( "mus: [ENGINE] -> CMusEngMceSession::UpdateFailed()" )
 
@@ -1407,7 +961,7 @@
         {
         // Container should never be NULL, but if it is, handle as
         // internal error
-        InformObserverAboutSessionFailure( KErrGeneral );
+        iSessionObserver.SessionFailed();
         return;
         }
 
@@ -1415,12 +969,13 @@
         {
         MUS_LOG( "mus: [ENGINE]     CMusEngMceSession::UpdateFailed: \
                  Notify observer" )
-        InformObserverAboutSessionFailure( KErrGeneral );
+        iSessionObserver.SessionFailed();
         }
 
     MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::UpdateFailed()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1462,7 +1017,8 @@
                 }
             }
         }
-    }					             
+    }	             
+					             
 
 // -----------------------------------------------------------------------------
 //
@@ -1479,12 +1035,13 @@
     
     if ( aStream.Type() == KMceVideo )
         {
-        InformObserverAboutPlayerStateChange( RemoteVideoPlayer() );
+        iSessionObserver.StreamIdle();
         }
     
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::InactivityTimeout()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1497,6 +1054,7 @@
     // NOP, We are not at all interested about SSRCs
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1509,6 +1067,7 @@
     // NOP, We are not at all interested about SSRCs
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1525,14 +1084,6 @@
     return allowed;
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::ProfileRegistered()
-    {
-    // NOP in base class
-    }
 
 // -----------------------------------------------------------------------------
 //
@@ -1551,47 +1102,58 @@
         switch ( aSession.State() )
             {
             case CMceSession::EIdle:
+                {
+                MUS_LOG( "mus: [ENGINE] Unexpected asynchronous \
+                         state transition, consider session as failed." )
+                iSessionObserver.SessionFailed();
+                break;
+                }
+            case CMceSession::EOffering :
+                {
+                break;
+                }
             case CMceSession::EIncoming:
                 {
                 MUS_LOG( "mus: [ENGINE] Unexpected asynchronous \
                          state transition, consider session as failed." )
-                InformObserverAboutSessionFailure( KErrGeneral );
+                iSessionObserver.SessionFailed();
+                break;
+                }
+            case CMceSession::EReserving :
+                {
+                // UpdateL called to incoming session during
+                // session establishment
+                break;
+                }
+            case CMceSession::EAnswering :  // Answering an incoming call
+                {
+                break;
+                }
+            case CMceSession::EProceeding :
+                {
                 break;
                 }
             case CMceSession::EEstablished:
                 {
-                if ( iStoreEncoderConfigInfo )
-                    {
-                    iStoreEncoderConfigInfo = EFalse;
-                    TRAPD( error, StoreEncoderConfigInfoL() )
-                    if ( error != KErrNone && error != KErrNotFound )
-                        {
-                        // Only acceptable error is absence of repository entry,
-                        // otherwise we inform user about failed session.
-                        InformObserverAboutSessionFailure( error );
-                        return;
-                        }
-                    }
-                
                 // Check that session timer is not already running, which is 
                 // the case when refreshing the session with session timer 
                 if ( !iUpdateTimer->IsActive() )
                     {
                     iStartTime.HomeTime(); // Start counting session duration              
                     iUpdateTimer->Start( KMusEngTimerInterval );
-                    InformObserverAboutSessionStateChange();
+                    iSessionObserver.SessionEstablished();
                     }
-                
+                    
                 break;
                 }
-            case CMceSession::EOffering:
-            case CMceSession::EReserving:
-            case CMceSession::EAnswering:
-            case CMceSession::EProceeding:              
             case CMceSession::ECancelling:
+                {
+                // MCE has for some reason started to cancel session
+                break;
+                }
             case CMceSession::ETerminating:
                 {
-                // NOP
+                // MCE has for some reason started to terminate session
                 break;
                 }
             case CMceSession::ETerminated:
@@ -1611,6 +1173,7 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::HandleSessionStateChanged" )
     }
 
+
 // -----------------------------------------------------------------------------
 // This function should be called only if sibling classes cannot handle
 // termination reason by themselves.
@@ -1621,28 +1184,28 @@
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::HandleTermination()" )
 
-    iSipProfileHandler->RefreshIapAvailabilities();
-    
+	iSipProfileHandler->RefreshIapAvailabilities();
+
     switch ( aStatusCode )
         {
         case 0:
             {
             // Normal session termination or session by another end.
-            InformObserverAboutSessionStateChange();
+            iSessionObserver.SessionTerminated();
             break;
             }
         case KMusEngSipReasonCodeOk:
             {
             // Normal session termination by this end: We have sent BYE
             // and now received 200 OK to it.
-            InformObserverAboutSessionStateChange();
+            iSessionObserver.SessionTerminated();
             break;
             }
         default:
             {
             // Termination reason cannot be determined, handle as internal
             // error.
-            InformObserverAboutSessionFailure( KErrGeneral );
+            iSessionObserver.SessionFailed();
             break;
             }
         }
@@ -1650,27 +1213,22 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::HandleTermination()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceSession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                           TMceSourceType aSourceType )
+void CMusEngMceSession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::AdjustVideoCodecL()" )
     
     aVideoCodec.SetMMFPriorityL( KAudioPrioritySwisPlayback );
     aVideoCodec.SetMMFPriorityPreferenceL( KAudioPrefSwisPlayback );
+    MUS_LOG( "mus: [ENGINE]     Video MMF priority and preference set" )
 
-    if ( aVideoCodec.SdpName() == KMceSDPNameH264() &&
-         aSourceType == KMceCameraSource )
-        {
-        SetCodecConfigKeyL( aVideoCodec );
-        SetEncodingDeviceL( aVideoCodec );     
-        }
-    
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::AdjustVideoCodecL()" )
     }
+
  
 // -----------------------------------------------------------------------------
 // 1. Sets MMF audio priority and preference
@@ -1687,6 +1245,7 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::AdjustAudioCodecL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 // Remove multiples of H.263 codec, prefer H263-2000 over H263-1998.
 // Additionally select just the one with best quality from selected mode.
@@ -1741,14 +1300,18 @@
                 } 
             }
         }        
-    if ( bestBitrateCodec )
+    if ( bestBitrateCodec != NULL )
         {
         DoBitrateBasedRemovalL( aVideoStream, *bestBitrateCodec );
         }
    
+    /* Codec removal based on configuration */
+    DoCodecConfigurationBasedRemovalL( aVideoStream );
+    
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::DoCodecSelectionL()" )
     }
     
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -1757,11 +1320,12 @@
     {
     // Update timer is used also to detect RTCP inactivity
     ++iSecondsFromLastRtcpReport;
+    
+    iSessionObserver.SessionTimeChanged( GetSessionTime() );
 
     if ( iSecondsFromLastRtcpReport >= KMusEngRtcpInactivityThreshold )
         {
-        MUS_LOG( "mus: [ENGINE] CMusEngMceSession::UpdateTimerEvent() ->EMediaInactivityTimeout" )
-        InformObserverAboutSessionFailure( MLcSession::EMediaInactivityTimeout );
+        iSessionObserver.InactivityTimeout();    
         // Disable calling multiple times by reseting timer
         iSecondsFromLastRtcpReport = 0;
         }
@@ -1769,6 +1333,7 @@
     iUpdateTimer->Start( KMusEngTimerInterval );
     }
 
+
 // -----------------------------------------------------------------------------
 // Enables or disables all the speaker sinks of all the audio streams
 // -----------------------------------------------------------------------------
@@ -1781,7 +1346,8 @@
 
     for ( TInt i = 0; i < streams.Count(); ++i )
         {
-        CMceSpeakerSink* speaker = MusEngMceUtils::GetSpeaker( *streams[i] );
+        CMceSpeakerSink* speaker = 
+                MusEngMceUtils::GetSpeaker( *streams[i] );
             
         if ( speaker )
             {
@@ -1829,6 +1395,7 @@
         }
     return EFalse;
     }
+    
 
 // -----------------------------------------------------------------------------
 // 
@@ -1888,253 +1455,44 @@
     }
 
 // -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetEncodingDeviceL( CMceVideoCodec& aVideoCodec )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngMceSession::SetEncodingDeviceL()" )
-
-    // We try to read encoding device UID. If we do not succeed, we use default
-    
-    const TUid KDefaultEncodingDevice( TUid::Uid( 0x20001C13 ) );
-    TUid encodingDevice( KDefaultEncodingDevice );
-    TRAPD( error, 
-           encodingDevice = MultimediaSharingSettings::EncodingDeviceL() )
-    __ASSERT_ALWAYS( error == KErrNone || error == KErrNotFound, 
-                     User::Leave( error ) );
-    aVideoCodec.SetPreferredEncodingDecodingDeviceL( encodingDevice );
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::SetEncodingDeviceL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
+// 
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceSession::SetCodecConfigKeyL( CMceVideoCodec& aVideoCodec )
+void CMusEngMceSession::DoCodecConfigurationBasedRemovalL( CMceVideoStream& aVideoStream )
     {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngMceSession::SetCodecConfigKeyL()" )
-    
-    HBufC8* configKey( NULL );
-        
-    // We try to read config key. If we do not succeed, we prepare to
-    // write keys to CenRep for the next time.
-    TRAPD( error, configKey = ReadCodecConfigKeyL( aVideoCodec ) )
-    
-    if ( error == KErrNone )
-        {
-        // There is a repository for config keys
-        if ( configKey )
-            {
-            // ...and key is found.
-            CleanupStack::PushL( configKey );
-            aVideoCodec.SetConfigKeyL( *configKey );
-            CleanupStack::PopAndDestroy( configKey );
-            }
-        else
-            {
-            // ...but key is not found, so it must be written to CenRep when
-            // available. 
-            iStoreEncoderConfigInfo = ETrue;
-            }
-        }
-    else if ( error == KErrNotFound )
-        {
-        // There is no repository for config keys so there is no point
-        // trying to write anything there. Session setup can still continue.
-        MUS_LOG1( "mus: [ENGINE]    No repository for config keys [%d]", error )
-        }            
-    else
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::DoCodecConfigurationBasedRemovalL()" )
+    if( MultimediaSharingSettings::IsAvcDisabled())
         {
-        User::Leave( error );
-        }
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::SetCodecConfigKeyL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HBufC8* CMusEngMceSession::ReadCodecConfigKeyL( 
-    const CMceVideoCodec& aVideoCodec ) const
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngMceSession::ReadCodecConfigKeyL()" )
-    
-    HBufC8* key( NULL );
- 
-    HBufC8* encoderInfo = MultimediaSharingSettings::EncoderConfigInfoLC();
-    __ASSERT_ALWAYS( encoderInfo, User::Leave( KErrNotFound ) );
-    
-    TPtrC8 keyId( ConfigKeyIdL( aVideoCodec ) ); 
-    
-    TInt tokenStartPosition( encoderInfo->FindC( keyId ) );
-    if ( tokenStartPosition > KErrNotFound )
-        {
-        TInt tokenLength( encoderInfo->Mid( tokenStartPosition ).FindC( 
-                                                KMusEncoderInfoTokenizer ) );
-        if ( tokenLength > KErrNotFound )
+        RPointerArray<CMceVideoCodec>& codecs = 
+            MUS_CODEC_ARR_CONST_CAST( aVideoStream.Codecs() );            
+        TInt codecIndex = 0;
+        while ( codecIndex < codecs.Count() )
             {
-            // Separate key from token by removing keyId
-            TInt keyStartPosition = tokenStartPosition + keyId.Length();
-            TInt keyLength = tokenLength - keyId.Length(); 
-            TPtrC8 keyPtr = encoderInfo->Mid( keyStartPosition, keyLength );
-            key = keyPtr.AllocL();
+            CMceVideoCodec& currentCodec = *codecs[codecIndex++];            
+            if ( !currentCodec.SdpName().CompareF( KMceSDPNameH264 ) )
+                {
+                MUS_LOG( "mus: [ENGINE]  - Removing avc from supported codec list" )
+                aVideoStream.RemoveCodecL( currentCodec );
+                codecs = MUS_CODEC_ARR_CONST_CAST( aVideoStream.Codecs() );
+                codecIndex = 0;
+                }
             }
-        }
-    
-    CleanupStack::PopAndDestroy( encoderInfo );
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::ReadCodecConfigKeyL()" )
-        
-    return key;   
+        }    
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::DoCodecConfigurationBasedRemovalL()" )
     }
 
 // -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::StoreEncoderConfigInfoL() const
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngMceSession::StoreEncoderConfigInfoL()" )
-    
-    HBufC8* configInfoInCenRep = MultimediaSharingSettings::EncoderConfigInfoLC();
-    __ASSERT_ALWAYS( configInfoInCenRep, User::Leave( KErrNotFound ) );
-    
-    TBuf8<NCentralRepositoryConstants::KMaxBinaryLength> keys;
-    keys.Append( *configInfoInCenRep );
-    
-    CMceVideoStream* stream = MusEngMceUtils::GetVideoOutStreamL( *iSession );
-    const RPointerArray<CMceVideoCodec>& codecs = stream->Codecs();
-    
-    for ( TInt codecIndex = 0; codecIndex < codecs.Count(); ++codecIndex )
-        {
-        if ( codecs[codecIndex]->SdpName().FindF( KMceSDPNameH264 ) >= 0 )
-            {
-            const TPtrC8 keyId = ConfigKeyIdL( *codecs[codecIndex] );
-            HBufC8* configKey = codecs[codecIndex]->ConfigKeyL();
-            CleanupStack::PushL( configKey );
-            
-            if ( configKey &&
-                 keys.FindF( keyId ) == KErrNotFound &&
-                 configInfoInCenRep->FindF( keyId ) == KErrNotFound )
-                {
-                
-                if ( keys.Length() + 
-                     keyId.Length() + 
-                     configKey->Length() +
-                     KMusEncoderInfoTokenizer().Length() <
-                     NCentralRepositoryConstants::KMaxBinaryLength )
-                    {
-                    keys.Append( keyId );                    
-                    keys.Append( *configKey );
-                    keys.Append( KMusEncoderInfoTokenizer );
-                    }
-                }
-                
-            CleanupStack::PopAndDestroy( configKey );
-            }
-        }
-    
-    MultimediaSharingSettings::SetEncoderConfigInfoL( keys );    
-    
-    CleanupStack::PopAndDestroy( configInfoInCenRep );
-        
-    MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::StoreEncoderConfigInfoL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
+// 
 // -----------------------------------------------------------------------------
 //
-const TPtrC8 CMusEngMceSession::ConfigKeyIdL( 
-                                    const CMceVideoCodec& aVideoCodec ) const
+void CMusEngMceSession::VolumeChanged( TInt aVolume, TBool aAudioRouteChanged )
     {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngMceSession::ConfigKeyIdL()" )
-    
-    // Currently works only for AVC
-    __ASSERT_ALWAYS( aVideoCodec.SdpName().FindF( KMceSDPNameH264 ) >= 0,
-                     User::Leave( KErrArgument ) );
-    
-    TPtrC8 configKeyTokenId;
-    
-    if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1 )
-        {
-        configKeyTokenId.Set( KMusAvcBitrateLevel1() );
-        }
-    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1b )
-        {
-        configKeyTokenId.Set( KMusAvcBitrateLevel1b() );
-        }
-    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1_1 )
+    MUS_LOG1( "mus: [ENGINE]  -> CMusEngMceSession::VolumeChanged(): %d", aVolume )
+    if ( iSession )
         {
-        configKeyTokenId.Set( KMusAvcBitrateLevel1_1() );
-        }
-    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1_2 )
-        {
-        configKeyTokenId.Set( KMusAvcBitrateLevel1_2() );
-        }
-    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel1_3 )
-        {
-        configKeyTokenId.Set( KMusAvcBitrateLevel1_3() );
+        CMusEngSession::VolumeChanged( aVolume, aAudioRouteChanged );
+        TRAP_IGNORE( SetSpeakerVolumeL( aVolume ) );
         }
-    else if ( aVideoCodec.AllowedBitrates() & KMceAvcBitrateLevel2 )
-        {
-        configKeyTokenId.Set( KMusAvcBitrateLevel2() );
-        }
-    else
-        {
-        User::Leave( KErrNotFound );
-        }
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngMceSession::ConfigKeyIdL()" )
-
-    return configKeyTokenId;
-    }
 
-// -----------------------------------------------------------------------------
-// Contact address is saved if all following apply:
-// - standard variant
-// - only one contact entry (mus mgr doesn't provide contact id if multiple
-//   contact entries for other end is found)
-// - no existing sip address info for contact
-// - address is valid sip or tel uri
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SaveContactL( const TDesC8& /*aAddress*/ )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngMceSession::SaveContactL" );
-    
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::SaveContactL" );
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::VolumeChanged()" )
     }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::StreamStreaming( CMceMediaStream& aStream )
-    {
-    if ( aStream.State() == CMceMediaStream::EStreaming &&
-         aStream.Type() == KMceVideo )
-        {
-        MLcVideoPlayer* videoPlayer = NULL;
-        if ( aStream.Source() && 
-             aStream.Source()->Type() == KMceRTPSource )
-            {
-            videoPlayer = RemoteVideoPlayer();
-            }
-        else if ( aStream.Sinks().Count() >= 0 &&
-                  aStream.Sinks()[0]->Type() == KMceRTPSink )
-            {
-            videoPlayer = LocalVideoPlayer();
-            }
-        else
-            {
-            }
-        InformObserverAboutPlayerStateChange( videoPlayer );
-        }
-    }
-
-// End of file
--- a/mmsharing/mmshengine/src/musengmceutils.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musengmceutils.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -51,23 +51,6 @@
              aStream.Source()->Type() == KMceRTPSource );
     }
 
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is a video stream with RTP sink
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsVideoOutStream( CMceMediaStream& aStream )
-    {
-    TBool isOutStream( EFalse );
-    if ( aStream.Type() == KMceVideo )
-        {
-        CMceMediaSink* rtpSink = MusEngMceUtils::GetMediaSink(
-                                                   aStream,
-                                                   KMceRTPSink );
-        
-        isOutStream = ( rtpSink != NULL );
-        }
-    return isOutStream;
-    }
 
 // -----------------------------------------------------------------------------
 // Tells if parameter stream is an audio stream with RTP source
@@ -95,22 +78,21 @@
 
     for ( TInt i = 0; i < streams.Count(); ++i )
         {
-        if ( MusEngMceUtils::IsVideoOutStream( *streams[i] ) )      
+        if ( streams[i]->Type() == KMceVideo )
             {
-            __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
-            
-            videoOut = static_cast<CMceVideoStream*>( streams[i] );
-            }
+            CMceMediaSink* rtpSink = MusEngMceUtils::GetMediaSink(
+                                            *streams[i],
+                                            KMceRTPSink );
+            if ( rtpSink )
+                {
+                __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
+
+                videoOut = static_cast<CMceVideoStream*>( streams[i] );
+                }
             
-            // Check if bound stream is a video stream with RTP sink.
-        if ( streams[i]->BoundStream() &&
-             MusEngMceUtils::IsVideoOutStream( streams[i]->BoundStreamL() ) )
-            {
-            __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
-            
-            videoOut = static_cast<CMceVideoStream*>( 
-                                   &streams[i]->BoundStreamL() );
-            }   
+            // There is no need to investigate bound stream since
+            // outstream is always constructed by Mus instead of MCE
+            }
         }
 
     __ASSERT_ALWAYS( videoOut, User::Leave( KErrNotFound ) );
@@ -196,15 +178,12 @@
 // -----------------------------------------------------------------------------
 //
 CMceMediaSink* MusEngMceUtils::GetMediaSink( CMceMediaStream& aStream,
-                                             TMceSinkType aType,
-                                             TMceSourceType aAssociatedSourceType )
+                                             TMceSinkType aType )
     {
     const RPointerArray<CMceMediaSink>& sinks = aStream.Sinks();
     for ( TInt i = 0; i < sinks.Count(); ++i )
         {
-        if ( sinks[i]->Type() == aType && 
-           ( aAssociatedSourceType == KMusEngNoAssociatedSourceType || 
-             aStream.Source()->Type() == aAssociatedSourceType ) )
+        if ( sinks[i]->Type() == aType )
             {
             return sinks[i];
             }
@@ -219,11 +198,10 @@
 // -----------------------------------------------------------------------------
 //
 CMceMediaSink* MusEngMceUtils::GetMediaSinkL( CMceMediaStream& aStream,
-                                              TMceSinkType aType,
-                                              TMceSourceType aAssociatedSourceType )
+                                              TMceSinkType aType )
     {
 
-    CMceMediaSink* sink = MusEngMceUtils::GetMediaSink( aStream, aType, aAssociatedSourceType );
+    CMceMediaSink* sink = MusEngMceUtils::GetMediaSink( aStream, aType );
 
     __ASSERT_ALWAYS( sink, User::Leave( KErrNotFound ) );
 
@@ -236,14 +214,11 @@
 // -----------------------------------------------------------------------------
 //
 CMceMediaSink* MusEngMceUtils::GetMediaSink( CMceSession& aSession,
-                                             TMceSinkType aType,
-                                             TMceSourceType aAssociatedSourceType,
-                                             TBool aStrictMatch )
+                                             TMceSinkType aType )
     {
     CMceMediaSink* sink = NULL;
 
-    TRAP_IGNORE( sink = MusEngMceUtils::GetMediaSinkL( 
-            aSession, aType, aAssociatedSourceType, aStrictMatch ) )
+    TRAP_IGNORE( sink = MusEngMceUtils::GetMediaSinkL( aSession, aType ) )
 
     return sink;
     }
@@ -254,9 +229,7 @@
 // -----------------------------------------------------------------------------
 //
 CMceMediaSink* MusEngMceUtils::GetMediaSinkL( CMceSession& aSession,
-                                              TMceSinkType aType,
-                                              TMceSourceType aAssociatedSourceType,
-                                              TBool aStrictMatch )
+                                              TMceSinkType aType )
     {
     CMceMediaSink* sink = NULL;
     
@@ -264,7 +237,7 @@
 
     for ( TInt i = 0; i < streams.Count(); ++i )
         {
-        sink = MusEngMceUtils::GetMediaSink( *streams[i], aType, aAssociatedSourceType );
+        sink = MusEngMceUtils::GetMediaSink( *streams[i], aType );
         if ( sink )
             {
             return sink;
@@ -273,20 +246,13 @@
         if ( streams[i]->BoundStream() )
             {
             sink = MusEngMceUtils::GetMediaSink( streams[i]->BoundStreamL(), 
-                                                 aType,
-                                                 aAssociatedSourceType );
+                                                 aType );
             if ( sink )
                 {
                 return sink;
                 }
             }
         }
-    
-    if ( !sink && aAssociatedSourceType != KMusEngNoAssociatedSourceType && !aStrictMatch )
-        {
-        // No preferred match, try without source preference
-        sink = GetMediaSinkL( aSession, aType );
-        }
 
     __ASSERT_ALWAYS( sink, User::Leave( KErrNotFound ) );
 
@@ -376,15 +342,12 @@
 // Gets handle to a display sink.
 // -----------------------------------------------------------------------------
 //
-CMceDisplaySink* MusEngMceUtils::GetDisplay( 
-    CMceSession& aSession, TBool aPreferViewFinder  )
+CMceDisplaySink* MusEngMceUtils::GetDisplay( CMceSession& aSession )
     {
     MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetDisplay()" )
     MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetDisplay()" )
-    TMceSourceType preferredSource = 
-        aPreferViewFinder ? KMceCameraSource : KMusEngNoAssociatedSourceType;
     return static_cast<CMceDisplaySink*>(
-            MusEngMceUtils::GetMediaSink( aSession, KMceDisplaySink, preferredSource ) );
+            MusEngMceUtils::GetMediaSink( aSession, KMceDisplaySink ) );
 
     }
 
@@ -393,12 +356,11 @@
 // Gets handle to a display sink.
 // -----------------------------------------------------------------------------
 //
-CMceDisplaySink* MusEngMceUtils::GetDisplayL( 
-    CMceSession& aSession, TBool aPreferViewFinder )
+CMceDisplaySink* MusEngMceUtils::GetDisplayL( CMceSession& aSession )
     {
     MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetDisplayL()" )
 
-    CMceDisplaySink* display = MusEngMceUtils::GetDisplay( aSession, aPreferViewFinder );
+    CMceDisplaySink* display = MusEngMceUtils::GetDisplay( aSession );
 
     __ASSERT_ALWAYS( display, User::Leave( KErrNotFound ) );
 
@@ -406,51 +368,6 @@
     return display;
     }
 
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying received video.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetReceivingDisplay( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetReceivingDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetReceivingDisplay()" )
-    
-    // Search display which is connected with rtp source
-    TMceSourceType preferredSource = KMceRTPSource;
-    return static_cast<CMceDisplaySink*>( MusEngMceUtils::GetMediaSink( 
-                aSession, KMceDisplaySink, preferredSource, ETrue ) );
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying received video.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetReceivingDisplayL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetReceivingDisplayL()" )
-
-    CMceDisplaySink* display = GetReceivingDisplay( aSession );
-    __ASSERT_ALWAYS( display != NULL, User::Leave( KErrNotFound ) );
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetReceivingDisplay()" )
-    
-    return display;
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying viewfinder content.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetVfDisplay( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVfDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVfDisplay()" )
-    
-    // Search display which is connected with camera
-    TMceSourceType preferredSource = KMceCameraSource;
-    return static_cast<CMceDisplaySink*>( MusEngMceUtils::GetMediaSink( 
-                aSession, KMceDisplaySink, preferredSource, ETrue ) );
-    }
 
 // -----------------------------------------------------------------------------
 // Adds display sink to specified stream if one does not exist already.
@@ -459,8 +376,7 @@
 //
 void MusEngMceUtils::AddDisplayL( CMceMediaStream& aStream, 
                                   CMceManager& aManager,
-                                  const TRect& aDisplayRect,
-                                  TBool aDisabled )
+                                  const TRect& aDisplayRect )
     {
     MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::AddDisplayL()" )
     
@@ -478,11 +394,6 @@
         CleanupStack::Pop( display );
         }
 
-    if ( aDisabled )
-        {
-        MUS_LOG( "mus: [ENGINE]     Initially disabled display" )
-        display->DisableL();
-        }
     display->SetDisplayRectL( aDisplayRect );
     
     MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::AddDisplayL()" )
@@ -538,63 +449,9 @@
     MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::DisableStreamL()" )
     }
 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::DoEnableDisplayL( CMceDisplaySink& aDisplay, TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> MusEngMceUtils::DoEnableDisplayL() %d", 
-              aEnable )
-    
-    if ( aEnable )
-        {
-        if ( !aDisplay.IsEnabled() )
-            {
-            aDisplay.EnableL();
-            MUS_LOG( "                  Display enabled" )
-            }
-        else
-            {
-            MUS_LOG( "                  Display already enabled, ignore" )
-            }
-        }
-    else
-        {
-        if ( aDisplay.IsEnabled() )
-            {
-            aDisplay.DisableL();
-            MUS_LOG( "                  Display disabled" )
-            }
-        else
-            {
-            MUS_LOG( "                  Display already disabled, ignore" )
-            }
-        }  
-        
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::DoEnableDisplayL()")
-    }
+
+
 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TInt MusEngMceUtils::EnableInactivityTimer( 
-    CMceSession& aSession, 
-    TUint32 aInactivityTimeout )
-    {
-    TInt err( KErrNotFound );
-    CMceVideoStream* stream = NULL;
-    TRAP_IGNORE( stream = MusEngMceUtils::GetVideoInStreamL( aSession ) )
-    if ( stream )
-        {
-        // Instream has always RTP source
-        err = KErrNone;
-        CMceRtpSource* rtpSource = static_cast<CMceRtpSource*>( stream->Source() );
-        TRAP( err, rtpSource->EnableInactivityTimerL( aInactivityTimeout ) ) 
-        }
-    
-    return err;
-    }
-      
-// End of file
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/src/musengorientationhandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,173 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+// USER
+#include "musengorientationhandler.h"
+#include "muslogger.h"
+#include "musenglivesession.h"
+#include "musenglivesessionobserver.h"
+
+// SYSTEM
+
+const TInt KMusEngDelayedResume = 500000; // 500 ms
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngOrientationHandler* CMusEngOrientationHandler::NewL( 
+    CMusEngLiveSession& aSession, MMusEngLiveSessionObserver& aSessionObserver )
+    {
+    CMusEngOrientationHandler* self = 
+        new (ELeave) CMusEngOrientationHandler( aSession, aSessionObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngOrientationHandler::~CMusEngOrientationHandler()
+    {
+    MUS_LOG( "mus: [ENGINE]     CMusEngOrientationHandler::~CMusEngOrientationHandler()" )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngOrientationHandler::RefreshOrientationL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngOrientationHandler::RefreshOrientationL()" )
+    if ( !IsActive() )
+        {
+        TBool refreshBeginStateCamera = iSession.IsPlayingL();
+        TBool refreshBeginStateDisplay = iSession.IsDisplayEnabledL();
+            
+        if ( refreshBeginStateCamera )
+             {
+             MUS_LOG( "mus: [MUSENG]  -> Playing, pause/stop to restart camera" );
+             iSession.PauseL();
+             } 
+         
+        if ( refreshBeginStateDisplay )
+             {
+             MUS_LOG( "mus: [MUSENG]  -> display is enabled, disable/enable it");
+             iSession.EnableDisplayL(EFalse);
+             }
+        iRefreshBeginStateCamera = refreshBeginStateCamera;
+        iRefreshBeginStateDisplay = refreshBeginStateDisplay;
+        }
+    
+    DoDelayedResumeL();
+    
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngOrientationHandler::RefreshOrientationL()" )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngOrientationHandler::UpdateL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngOrientationHandler::UpdateL()" )
+    iRefreshBeginStateCamera = iSession.IsPlayingL();
+    iRefreshBeginStateDisplay = iSession.IsDisplayEnabledL();
+    MUS_LOG2( "mus: [ENGINE]  <- CMusEngOrientationHandler::UpdateL(), cam:%d disp:%d", 
+        iRefreshBeginStateCamera, iRefreshBeginStateDisplay )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngOrientationHandler::RunL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngOrientationHandler::RunL()" )
+
+    TBool refreshBeginStateCamera = iRefreshBeginStateCamera;
+    TBool refreshBeginStateDisplay = iRefreshBeginStateDisplay;
+       
+    iSessionObserver.OrientationRefreshEnded();
+    
+    if ( refreshBeginStateDisplay )
+        {
+        MUS_LOG( "mus: [ENGINE] enable display after delayed orientation" )
+        iSession.EnableDisplayL(ETrue);
+        }
+    
+    if ( refreshBeginStateCamera )
+        {
+        MUS_LOG( "mus: [ENGINE] enable camera after delayed orientation" )
+        iSession.PlayL();
+        }
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngOrientationHandler::RunL()" )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusEngOrientationHandler::RunError( TInt aError )
+    {
+    MUS_LOG( "mus: [ENGINE]  <-> CMusEngOrientationHandler::RunError()" )
+    aError = KErrNone;
+    return aError;
+    }
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngOrientationHandler::DoDelayedResumeL()
+    {
+    if ( IsActive() )
+        {
+        Cancel();
+        }
+    After( KMusEngDelayedResume );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngOrientationHandler::CMusEngOrientationHandler( 
+    CMusEngLiveSession& aSession, MMusEngLiveSessionObserver& aSessionObserver )
+    : CTimer( CActive::EPriorityStandard ), iSession( aSession ), 
+      iSessionObserver( aSessionObserver )
+    {
+    CActiveScheduler::Add(this);
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngOrientationHandler::ConstructL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngOrientationHandler::ConstructL()" )
+        
+    CTimer::ConstructL();
+    
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngOrientationHandler::ConstructL()" )
+    }
+
--- a/mmsharing/mmshengine/src/musengreceivesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musengreceivesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,15 +18,16 @@
 
 
 // USER INCLUDES
+
 #include "musengreceivesession.h"
+#include "musengsessionobserver.h"
+#include "musengreceivesessionobserver.h"
 #include "musengmceutils.h"
 #include "musenglogger.h"
+#include "mussettings.h"
 #include "mussipprofilehandler.h"
-#include "mussessionproperties.h"
-#include "musengremotevideoplayer.h"
 
 // SYSTEM INCLUDES
-#include <lcsessionobserver.h>
 #include <mcemanager.h>
 #include <mceinsession.h>
 #include <mcestreambundle.h>
@@ -38,20 +39,25 @@
 #include <mcespeakersink.h>
 #include <mceaudiocodec.h>
 #include <mceavccodec.h>
-#include <e32property.h>
 
 #include <utf.h>
 
+
+const TUint8 KMusEngRtpKeepAliveTimer = 5; // this should be 30 sec, this a temporary fix
+const TUint8 KMusEngKeepAlivePayloadTypeVideoH263 = 96;
+const TUint8 KMusEngKeepAlivePayloadTypeAudio = 97;
+const TUint8 KMusEngKeepAlivePayloadTypeVideoAvc = 98;
+
 const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
 // Using following value increases treshold buffer to 1 second from 
 // default 100 ms
 const TInt KMusEngJitterBufferTreshold = 50;
 const TInt KMusEngTresholdToSecondsFactor = 20;
-const TInt KMusEngTwoSecondInMilliSeconds = 2000; 
+const TInt KMusEngOneSecondInMilliSeconds = 1000; 
 // Use inactivity timer value that is a little bigger than treshold in seconds
 const TUint KMusEngInactivityTimer = KMusEngTresholdToSecondsFactor * 
                                      KMusEngJitterBufferTreshold + 
-                                     KMusEngTwoSecondInMilliSeconds;
+                                     KMusEngOneSecondInMilliSeconds;
 
 _LIT8( KMusEngSwisIdentifier, "Require: precondition" );
 _LIT8( KMusEngAssertedIdentity, "P-Asserted-Identity" );
@@ -64,11 +70,28 @@
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngReceiveSession* CMusEngReceiveSession::NewL()
+CMusEngReceiveSession::~CMusEngReceiveSession()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::~CMusEngReceiveSession()" )
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::~CMusEngReceiveSession()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMusEngReceiveSession* CMusEngReceiveSession::NewL(
+                        const TRect& aRect,
+                        MMusEngSessionObserver& aSessionObserver,
+                        MMusEngReceiveSessionObserver& aReceiveSessionObserver )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::NewL(...)" )
 
-    CMusEngReceiveSession* self = new( ELeave )CMusEngReceiveSession();
+    CMusEngReceiveSession* self = new( ELeave ) CMusEngReceiveSession( 
+                                                        aSessionObserver, 
+                                                        aReceiveSessionObserver,
+                                                        aRect );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -77,101 +100,27 @@
     return self;
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngReceiveSession::CMusEngReceiveSession()
-    : CMusEngMceSession()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngReceiveSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::ConstructL()" )
-
-    CMusEngMceSession::ConstructL();
-    
-    iOriginator = HBufC8::NewL( KMaxUriLength );
-    
-    iRemoteDisplayName = HBufC::NewL( KMaxUriLength );
-
-    iRemoteVideoPlayer = CMusEngRemoteVideoPlayer::NewL( *this, *this );
-    
-    iReceivingInactivityTimeout = KMusEngInactivityTimer;
-    
-    iKeepaliveTimer = KMusEngRtpKeepAliveTimer;
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::ConstructL()" )
-    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngReceiveSession::~CMusEngReceiveSession()
+EXPORT_C void CMusEngReceiveSession::AcceptInvitationL(
+                        const TBool& aAccept )
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::~CMusEngReceiveSession()" )
-    
-    if ( iOriginator )
+    MUS_LOG1( "mus: [ENGINE]     -> CMusEngReceiveSession::\
+              AcceptInvitationL( %d )", aAccept )
+
+    __ASSERT_ALWAYS( iSession && iSession->State() == CMceSession::EProceeding,
+                     User::Leave( KErrNotReady ) );
+
+    // Accept or reject
+    if ( aAccept )
         {
-        TRAP_IGNORE( SaveContactL( *iOriginator ) )
-        }
-    delete iOriginator;
-    
-    delete iRemoteDisplayName;
-    
-    delete iRemoteVideoPlayer;
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::~CMusEngReceiveSession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcSession::TLcSessionState CMusEngReceiveSession::LcSessionState() const
-    {
-    TLcSessionState state = CMusEngMceSession::LcSessionState();
-    if ( !iSession && state == MLcSession::EUninitialized )
-        {
-        state = MLcSession::EReceived;
+        InSession()->AcceptL();
         }
-    return state;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngReceiveSession::EstablishLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::EstablishLcSessionL" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    InSession()->AcceptL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::EstablishLcSessionL" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngReceiveSession::TerminateLcSessionL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::EstablishLcSessionL" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    if ( iSession->State() == CMceSession::EIncoming ||
-         iSession->State() == CMceSession::EProceeding )
+    else
         {
-        // Reject
         if ( iOperatorVariant )
             {
             // In operator variant, session is rejected with 486 instead of 603.
@@ -184,45 +133,11 @@
             InSession()->RejectL();
             }
         }
-    else
-        {
-        iSession->TerminateL();
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::EstablishLcSessionL" )
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::\
+             AcceptInvitationL(...)" )
     }
 
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngReceiveSession::RemoteVideoPlayer()
-    {
-    return iRemoteVideoPlayer;
-    }
-    
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngReceiveSession::RemoteDisplayName()
-    {
-    TBuf<RProperty::KMaxPropertySize> buffer;
-
-    TInt error = RProperty::Get( NMusSessionApi::KCategoryUid,
-                                 NMusSessionApi::KContactName,
-                                 buffer );
-    if ( error == KErrNone && buffer.Length() )
-        {
-        iRemoteDisplayName->Des().Copy( buffer );
-        }
-    
-    else if ( iOriginator )
-        {
-        iRemoteDisplayName->Des().Copy(*iOriginator);   
-        }
-    return *iRemoteDisplayName;
-    }
 
 // -----------------------------------------------------------------------------
 // When reserving resources is ready, this function reports observer about
@@ -239,8 +154,7 @@
 
     MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )
 
-    if ( iSession && 
-         iSession == &aSession &&
+    if ( iSession && iSession == &aSession &&
          aSession.State() == CMceSession::EProceeding )
         {
         // Indicates that resource reservation is ready, user can be notified
@@ -251,9 +165,16 @@
             // Notify other end terminal
             TRAP_IGNORE( InSession()->RingL() )
             iRingLCalled = ETrue;
-            TPtr8 ptrOriginator( iOriginator->Des() );
-            ptrOriginator.Copy( iSession->Originator() );
-            InformObserverAboutSessionStateChange();
+            
+            // Notify user
+            TBuf16<KMaxUriLength> originator;
+            CnvUtfConverter::ConvertToUnicodeFromUtf8( originator,
+                                                       iSession->Originator() );
+                                                       
+            TBuf16<KMaxUriLength> identity;
+            CnvUtfConverter::ConvertToUnicodeFromUtf8( identity,
+                                                       iIdentity );                                                       
+            iReceiveSessionObserver.IncomingSession( originator, identity );
             }
         else
             {
@@ -273,19 +194,18 @@
              HandleSessionStateChanged()" )
     }
 
+
 // -----------------------------------------------------------------------------
 // Sets keepalive timer for video and calls base class variant of this function
 // -----------------------------------------------------------------------------
 //
-void CMusEngReceiveSession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                               TMceSourceType aSourceType )
+void CMusEngReceiveSession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::AdjustVideoCodecL()" )
     
-    CMusEngMceSession::AdjustVideoCodecL( aVideoCodec, aSourceType );
+    CMusEngMceSession::AdjustVideoCodecL( aVideoCodec );
     
-    MUS_LOG1( "mus: [ENGINE]     Keepalive timer:%d", iKeepaliveTimer )
-    aVideoCodec.SetKeepAliveTimerL( iKeepaliveTimer );
+    aVideoCodec.SetKeepAliveTimerL( KMusEngRtpKeepAliveTimer );
     if ( aVideoCodec.SdpName() == KMceSDPNameH263() ||
          aVideoCodec.SdpName() == KMceSDPNameH2632000() )
         {
@@ -305,6 +225,7 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::AdjustVideoCodecL()" )
     }
         
+
 // -----------------------------------------------------------------------------
 // Sets keepalive timer for audio and calls base class variant of this function
 // -----------------------------------------------------------------------------
@@ -315,13 +236,14 @@
 
     CMusEngMceSession::AdjustAudioCodecL( aAudioCodec );
     
-    aAudioCodec.SetKeepAliveTimerL( iKeepaliveTimer );
+    aAudioCodec.SetKeepAliveTimerL( KMusEngRtpKeepAliveTimer );
     aAudioCodec.SetKeepAlivePayloadTypeL( KMusEngKeepAlivePayloadTypeAudio );
     aAudioCodec.SetKeepAliveDataL( KNullDesC8() );
     
     MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::AdjustAudioCodecL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -337,7 +259,8 @@
     
     for ( TInt codecIndex = 0; codecIndex < codecs.Count(); ++codecIndex )
         {
-        if ( codecs[codecIndex]->SdpName() == KMceSDPNameH264() )
+        if ( codecs[codecIndex]->SdpName() == KMceSDPNameH264() && 
+             !MultimediaSharingSettings::IsAvcDisabled() )
             { 
             if ( codecs[codecIndex]->CodecMode() == KMceAvcModeSingleNal )
                 {
@@ -400,6 +323,7 @@
                
     MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::DoCodecSelectionL()" )
     }
+    
 
 // -----------------------------------------------------------------------------
 // If incoming session does not have valid structure and cannot be reconstructed
@@ -407,8 +331,8 @@
 // -----------------------------------------------------------------------------
 //
 void CMusEngReceiveSession::IncomingSession(
-    CMceInSession* aSession,
-    TMceTransactionDataContainer* aContainer )
+                      CMceInSession* aSession,
+                      TMceTransactionDataContainer* aContainer )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::IncomingSession(...)" )
 
@@ -426,6 +350,8 @@
         return;
         }
 
+    iReceiveSessionObserver.IncomingSessionPreNotification();
+
     delete iSession; // possibly existing terminated session
     iSession = aSession;
     
@@ -451,14 +377,15 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::IncomingSession()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMusEngReceiveSession::IncomingUpdate(
-    CMceSession& aOrigSession,
-    CMceInSession* aUpdatedSession,
-    TMceTransactionDataContainer* aContainer )
+                     CMceSession& aOrigSession,
+                     CMceInSession* aUpdatedSession,
+                     TMceTransactionDataContainer* aContainer )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::IncomingUpdate(...)" )
 
@@ -488,6 +415,7 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::IncomingUpdate(...)" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -507,20 +435,33 @@
          aStream.Source() &&
          aStream.Source()->Type() == KMceRTPSource )
         {
+        
         if ( aStream.State() == CMceMediaStream::EBuffering )
             {
-            iBuffered = ETrue;
-            InformObserverAboutPlayerStateChange( iRemoteVideoPlayer );
+            iReceiveSessionObserver.StreamBuffering();
             }
         else if ( aStream.State() == CMceMediaStream::EStreaming )
             {
-            ReceivingStarted();          
+            CMceRtpSource* rtpSource = 
+                            static_cast<CMceRtpSource*>( aStream.Source() );
+            TRAPD( err , 
+                  rtpSource->EnableInactivityTimerL( KMusEngInactivityTimer ) );
+            if ( err != KErrNone )
+                {
+                MUS_LOG1("mus: [ENGINE] EnableInactivityTimerL Fails %d",err)
+                iSessionObserver.SessionFailed();    
+                }
+            else
+                {
+                iSessionObserver.StreamStreaming();
+                }            
             }
         else
             {
             // Cannot handle, forward to CMusEngMceSession
             CMusEngMceSession::StreamStateChanged( aStream );
             }
+        
         }
     else
         {
@@ -531,6 +472,35 @@
     MUS_LOG( "mus: [ENGINE] <- CMusEngReceiveSession::StreamStateChanged()" )
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngReceiveSession::CMusEngReceiveSession(
+                        MMusEngSessionObserver& aSessionObserver,
+                        MMusEngReceiveSessionObserver& aReceiveSessionObserver,
+                        const TRect& aRect )
+    : CMusEngMceSession( aRect, aSessionObserver ),
+      iReceiveSessionObserver( aReceiveSessionObserver )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngReceiveSession::ConstructL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::ConstructL()" )
+
+    CMusEngMceSession::ConstructL();
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::ConstructL()" )
+    }
+
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -540,6 +510,7 @@
     return static_cast<CMceInSession*>(iSession);
     }
 
+
 // -----------------------------------------------------------------------------
 // Check if incoming session is originated from VideoSharing 2.2 client, 
 // which sends PRACK for 180 Ringing whether it is required or not. In 
@@ -548,7 +519,7 @@
 // -----------------------------------------------------------------------------
 //
 void CMusEngReceiveSession::PrepareToRequire100RelL( 
-    TMceTransactionDataContainer* aContainer)
+                    TMceTransactionDataContainer* aContainer)
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::PrepareToRequire100RelL()" )
     
@@ -567,13 +538,15 @@
                 iSession->SetModifierL( KMce100Rel, KMce100RelRequired );
                 MUS_LOG( "mus: [ENGINE]     Forced to require 100rel" )
                 }   
-            }     
+            }
+            
         }
     
     CleanupStack::PopAndDestroy( headers );
    
     MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::PrepareToRequire100RelL()" )
-    }      
+    }
+        
 
 // -----------------------------------------------------------------------------
 // Check that incoming session contains only incoming video and audio
@@ -700,15 +673,14 @@
     iSession->UpdateL();
 
     // Now session state is right to adjust volume
-    SetSpeakerVolumeL( LcVolumeL() );
+    SetSpeakerVolumeL( VolumeL() );
 
-    iSipProfileHandler->CreateProfileL( iSession->Profile() );
-    
-    iRemoteVideoPlayer->SetMceSession( iSession );
-    
+	iSipProfileHandler->CreateProfileL( iSession->Profile() );
+
     MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::CompleteSessionStructureL()" )
     }
     
+    
 // -----------------------------------------------------------------------------
 // Parse P-Asserted-Identity Header
 // -----------------------------------------------------------------------------
@@ -782,67 +754,3 @@
     delete headers;  
     MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::AssertedIdentity()" )      
     }
-
-// -----------------------------------------------------------------------------
-// RTP Inactivity timeout event
-// Once inactivity timeout occurs, state change is notified and receiving
-// and buffering statuses are cleared. That is safe to do as once receiving
-// again continues for real, buffering and streaming events will occur always 
-// sequentially. If buffering status would not be cleared, some unwanted
-// sreaming events would be passed towards client when it disables/enables
-// display sink of remote stream while inactivity timer has expired.
-// -----------------------------------------------------------------------------
-//
-void CMusEngReceiveSession::InactivityTimeout( CMceMediaStream& aStream,
-                                                  CMceRtpSource& /*aSource*/ )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::InactivityTimeout()" )
-    
-    if ( aStream.Type() == KMceVideo && iReceiving )
-        {
-        iReceiving = EFalse;
-        iBuffered = EFalse;
-        InformObserverAboutPlayerStateChange( iRemoteVideoPlayer );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::InactivityTimeout()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngReceiveSession::ReceivingStarted()
-    {
-    if ( iSession && iBuffered )
-        {
-        MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::ReceivingStarted()" )
-        
-        TInt err = MusEngMceUtils::EnableInactivityTimer( 
-                *iSession, iReceivingInactivityTimeout );
-        
-        if ( err != KErrNone )
-            {
-            MUS_LOG1("mus: [ENGINE] ReceivingStarted failed %d", err)
-            InformObserverAboutSessionFailure( err );
-            }
-        else
-            {
-            iReceiving = ETrue;
-            InformObserverAboutPlayerStateChange( iRemoteVideoPlayer );
-            InformUiProviderAboutReceivingStart();
-            }
-        
-        MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::ReceivingStarted()" )
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngReceiveSession::IsDisplayActive()
-    {
-    return ( IsDisplayEnabled() && iReceiving );
-    }
-// End of File
--- a/mmsharing/mmshengine/src/musengremotevideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengremotevideoplayer.h"
-#include "musengmceutils.h"
-#include "musengdisplayhandler.h"
-
-// SYSTEM
-#include <mcesession.h>
-#include <mcevideostream.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer* CMusEngRemoteVideoPlayer::NewL(
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl )
-    {
-    return new( ELeave )CMusEngRemoteVideoPlayer( 
-        aDisplayHandler, aLcAudioControl );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer::CMusEngRemoteVideoPlayer( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    CMusEngVideoPlayerBase( aDisplayHandler, aLcAudioControl )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngRemoteVideoPlayer::~CMusEngRemoteVideoPlayer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState 
-CMusEngRemoteVideoPlayer::LcVideoPlayerState() const
-    {
-    if ( !iMceSession )
-        {
-        return MLcVideoPlayer::EUnavailable;
-        }
-    CMceVideoStream* stream = NULL;
-    TRAPD( err, stream = MusEngMceUtils::GetVideoInStreamL( *iMceSession ) )
-    TLcVideoPlayerState playerState = MLcVideoPlayer::EUnavailable;
-    if ( err == KErrNone && stream )
-          {
-          switch ( stream->State() )
-              {
-              case CMceMediaStream::EInitialized:
-                  {
-                  playerState = MLcVideoPlayer::EInit; 
-                  break;
-                  }
-              case CMceMediaStream::EBuffering:
-                  {
-                  playerState = MLcVideoPlayer::EBuffering; 
-                  break;
-                  }
-              case CMceMediaStream::EIdle:
-              case CMceMediaStream::EDisabled:
-                  {
-                  playerState = MLcVideoPlayer::EPaused; 
-                  break;
-                  }
-              case CMceMediaStream::EStreaming:
-                  {
-                  // MCE stream state does not contain RTP activity information
-                  playerState = iDisplayHandler.IsDisplayActive() ?
-                      MLcVideoPlayer::EPlaying : MLcVideoPlayer::EPaused;
-                  break;
-                  }
-              default: // Other MCE stream states: MLcVideoPlayer::EUnavailable
-                 {
-                 break;
-                 }
-              }
-          }
-    return playerState;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngRemoteVideoPlayer::LcIsPlayingL()
-    {
-    if ( !iMceSession )
-        {
-        return EFalse;
-        }    
-    CMceMediaStream* stream = MusEngMceUtils::GetVideoInStreamL( *iMceSession );
-    TBool isPlaying( EFalse );
-    
-    if ( iMceSession->State() == CMceSession::EEstablished &&
-         stream && 
-         stream->State() == CMceMediaStream::EStreaming )
-        {
-        isPlaying = ETrue;
-        }
-
-    return isPlaying;
-    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/src/musengsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,245 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+// USER INCLUDES
+#include "musengsession.h"
+#include "musengsessionobserver.h"
+#include "musengtelephoneutils.h"
+#include "muslogger.h"
+
+// SYSTEM INCLUDES
+
+#include <e32cmn.h>
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngSession::~CMusEngSession() // destruct - virtual, so no export
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngSession::~CMusEngSession()" )
+    delete iTelephoneUtils;
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngSession::~CMusEngSession()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TRect CMusEngSession::Rect() const
+    {
+    MUS_LOG( "mus: [ENGINE]  CMusEngSession::Rect()" )
+    return iRect;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::SetRectL( const TRect& aRect )
+    {
+    MUS_LOG( "mus: [ENGINE]  CMusEngSession::SetRect()" )
+    iRect = aRect;
+    RectChangedL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngSession::AudioRoutingCanBeChanged() const
+    {
+    return iTelephoneUtils->AudioRoutingCanBeChanged();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngSession::IsAudioRoutingHeadset() const
+    {
+    return iTelephoneUtils->IsAudioRoutingHeadset();
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngSession::IsAudioRoutingLoudSpeaker() const
+    {
+    return iTelephoneUtils->IsAudioRoutingLoudSpeaker();
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::EnableLoudspeakerL( TBool aEnable,
+                                                  TBool aShowDialog )
+    {
+    TRAPD( error, iTelephoneUtils->LoudspeakerL( aEnable, aShowDialog ) )
+
+    if ( error != KErrNone )
+        {
+        // This is writed for emulator use
+        if ( error != KErrNotSupported )
+            {
+            MUS_LOG1( "mus: [ENGINE]     CMusEngSession::EnableLoudspeakerL() Leave: #%d",
+                      error)
+            User::Leave( error );
+            }
+        // Not leave in emulator if KErrNotSupported
+        #if (!defined (__WINS__) && !defined(__WINSCW__))
+        User::Leave( error );
+        #endif
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngSession::IsLoudSpeakerEnabled() const
+    {
+    return iTelephoneUtils->IsLoudSpeakerEnabled();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngSession::VolumeL() const
+    {
+    return iTelephoneUtils->GetVolume();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::MuteMicL( TBool aMute )
+    {
+    iTelephoneUtils->MuteMicL( aMute );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngSession::IsMicMutedL()
+    {
+    return iTelephoneUtils->IsMicMutedL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::SetAudioRoutingObserver( 
+                                    MMusEngAudioRoutingObserver* aObserver )
+    {
+    iTelephoneUtils->SetAudioRoutingObserver( aObserver );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::SetVolumeChangeObserver( 
+                                   MMusEngVolumeChangeObserver* aObserver )
+    {
+    iVolumeObserver = aObserver;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Increases CS call volume level by one.
+// Leaves if error occurs when accessing central repository.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::VolumeUpL( )
+    {
+    TInt currentVolume = iTelephoneUtils->GetVolume();
+    iTelephoneUtils->SetVolumeL( currentVolume  + 1 );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Decreases CS call volume level by one.
+// Leaves if error occurs when accessing central repository.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::VolumeDownL( )
+    {
+    TInt currentVolume = iTelephoneUtils->GetVolume();
+    iTelephoneUtils->SetVolumeL( currentVolume - 1 );
+    }
+
+// -----------------------------------------------------------------------------
+// Set CS call volume value
+// Leaves if error occurs when accessing central repository.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::SetVolumeL( TInt aVal )
+    {
+    iTelephoneUtils->SetVolumeL( aVal );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngSession::CMusEngSession( const TRect& aRect )
+    :iRect( aRect )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngSession::ConstructL() // second-phase constructor
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngSession::ConstructL()" )
+    iTelephoneUtils = CMusEngTelephoneUtils::NewL();
+    iTelephoneUtils->SetVolumeChangeObserver( this );
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngSession::ConstructL()" )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngSession::VolumeChanged( TInt aVolume, TBool aAudioRouteChanged )
+    {
+    if ( iVolumeObserver )         
+        {
+        iVolumeObserver->VolumeChanged( aVolume, aAudioRouteChanged );
+        }
+    }
--- a/mmsharing/mmshengine/src/musengsessiondurationtimer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musengsessiondurationtimer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -99,6 +99,17 @@
         }
     }
 
+// -------------------------------------------------------------------------
+//  If RunL() leaves,It should be handled here.
+// -------------------------------------------------------------------------
+//
+TInt CMusEngSessionDurationTimer::RunError( TInt aError )
+    {    
+    // Nothing can be done here.
+    aError = KErrNone;
+
+    return aError;
+    }
 
 // -----------------------------------------------------------------------------
 // 
--- a/mmsharing/mmshengine/src/musengsessionmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "musengsessionmanager.h"
-#include "musenglivesession.h"
-#include "musengclipsession.h"
-#include "musengreceivesession.h"
-#include "musengtwowaysession.h"
-#include "musengtwowayrecvsession.h"
-#include "mussessionproperties.h"
-#include "muspropertywatch.h"
-#include <lcsession.h>
-#include <lcuiprovider.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionManager* CMusEngSessionManager::NewL()
-    {
-    CMusEngSessionManager* self = new( ELeave )CMusEngSessionManager();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-        
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-CMusEngSessionManager::~CMusEngSessionManager()
-    {
-    delete iUseCaseWatch;
-    delete iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionManager::CMusEngSessionManager()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionManager::ConstructL()
-    {
-    TInt useCase;
-    User::LeaveIfError( RProperty::Get( NMusSessionApi::KCategoryUid, 
-                                        NMusSessionApi::KUseCase, 
-                                        useCase ) );    
-    iSession = CreateMusSessionL( 
-        static_cast< MultimediaSharing::TMusUseCase >( useCase ) );
-    
-    iUseCaseWatch = CMusPropertyWatch::NewL( 
-        *this, NMusSessionApi::KCategoryUid, NMusSessionApi::KUseCase );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MLcSession& CMusEngSessionManager::Session()
-    {
-    return *iSession;
-    }
-
-// -----------------------------------------------------------------------------
-// If usecase changes while background startup is active, client is
-// notified about change by bringing it to foreground and changing current
-// active session. Old session is terminated immediately after notification.
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionManager::PropertyChanged( 
-    const TUint /*aKey*/, 
-    const TInt aValue )
-    {
-    MUS_LOG1( "mus: [ENGINE] -> CMusEngSessionManager::PropertyChanged, val:%d", 
-              aValue )
-    
-    if ( iSession->IsBackgroundStartup() && aValue != iCurrentUseCase )
-        {
-        MUS_LOG( "mus: [ENGINE]    Usecase changed!" )
-        MLcUiProvider* uiProvider = iSession->LcUiProvider();
-        if ( uiProvider )
-            {
-            CMusEngMceSession* newSession = NULL;
-            TRAP_IGNORE( newSession = CreateMusSessionL( 
-                    static_cast< MultimediaSharing::TMusUseCase >( aValue ) ) );
-            if ( newSession )
-                {
-                MUS_LOG( "mus: [ENGINE]     Set new active session" )
-                CMusEngMceSession* oldSession = iSession;
-                iSession = newSession;
-                iSession->SetForegroundStatus( ETrue );
-                uiProvider->HandleForegroundStatus( ETrue );
-                delete oldSession;
-                }
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngSessionManager::PropertyChanged" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionManager::HandlePropertyError( const TInt /*aReason*/ )
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngSessionManager::IsFeatureSupported( TLcFeature aLcFeature )
-    {
-    return ( aLcFeature == ELcShowInvitingNote ||
-             aLcFeature == ELcShowWaitingNote ||
-             aLcFeature == ELcShowAcceptQuery );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession* CMusEngSessionManager::CreateMusSessionL( 
-    MultimediaSharing::TMusUseCase aUseCase )
-    {
-    CMusEngMceSession* session = NULL;
-    switch ( aUseCase ) 
-        {
-        case MultimediaSharing::EMusLiveVideo:
-            {
-            session = CMusEngLiveSession::NewL();
-            break;
-            }
-        case MultimediaSharing::EMusClipVideo:
-            {
-            session = CMusEngClipSession::NewL();
-            break;
-            }            
-        case MultimediaSharing::EMusReceive:
-            {
-            session = CMusEngReceiveSession::NewL();
-            break;
-            }
-        case MultimediaSharing::EMusTwoWayVideo:    
-            {
-            session = CMusEngTwoWaySession::NewL();
-            break;
-            }
-        case MultimediaSharing::EMusReceiveTwoWayVideo:    
-            {
-            session = CMusEngTwoWayRecvSession::NewL();
-            break;
-            }
-        default:
-            User::Leave( KErrNotSupported );
-            break;
-        }
-    iCurrentUseCase = aUseCase;
-    return session;
-    }
-
-// End of File
--- a/mmsharing/mmshengine/src/musengtelephoneutils.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musengtelephoneutils.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -19,74 +19,31 @@
 // USER
 #include "musengtelephoneutils.h"
 #include "musengaudioroutingobserver.h"
+#include "musengmcesession.h"
+#include "musengvolumechangeobserver.h"
 #include "muslogger.h"
 
 // SYSTEM
 #include <centralrepository.h>
-#include <telincallvolcntrlcrkeys.h>
+#include <telephonydomaincrkeys.h>
 #include <e32property.h>
 #include <telephonydomainpskeys.h>
 #include <CPhCltCommandHandler.h> // for CPhCltCommandHandler
 
-// Constants
-const TInt KMusEngMaxVolume = 10;
-const TInt KMusEngMinVolume = 0;
-
-
-
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngTelephoneUtils* CMusEngTelephoneUtils::NewL( 
-    MMusEngAudioRoutingObserver& aAudioRoutingObserver )
+CMusEngTelephoneUtils* CMusEngTelephoneUtils::NewL()
     {
-    CMusEngTelephoneUtils* self = 
-        new( ELeave )CMusEngTelephoneUtils( aAudioRoutingObserver );
+    CMusEngTelephoneUtils* self = new( ELeave ) CMusEngTelephoneUtils();
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
     return self;
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTelephoneUtils::CMusEngTelephoneUtils( 
-    MMusEngAudioRoutingObserver& aAudioRoutingObserver ) 
-    : CActive( CActive::EPriorityStandard ),
-      iAudioRoutingObserver( aAudioRoutingObserver )
-    {
-    iAudioOutputAtStartup = CTelephonyAudioRouting::ENotActive;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTelephoneUtils::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::ConstructL()" )
-
-    // Volume control
-    iRepository = CRepository::NewL( KCRUidInCallVolume );
-
-    // Audio routing control
-    iTelephonyAudioRouting = CTelephonyAudioRouting::NewL( *this );
-
-    iAudioOutputAtStartup = iTelephonyAudioRouting->Output();
-    
-    // Phone
-    MUS_LOG( "mus: [ENGINE]     Use static DLL" )
-    iPhoneCommandHandler = CPhCltCommandHandler::NewL();
-        
-    CActiveScheduler::Add( this );
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::ConstructL()" )
-    }
 
 // -----------------------------------------------------------------------------
 //
@@ -104,34 +61,43 @@
         {
         CTelephonyAudioRouting::TAudioOutput currentMode =
                                             iTelephonyAudioRouting->Output();
-        if( currentMode != iAudioOutputAtStartup )
+        MUS_LOG1( "mus: [ENGINE] iAudioOutputAtStartup: %d", iAudioOutputAtStartup );
+        MUS_LOG1( "mus: [ENGINE] currentMode: %d", currentMode );
+        // When active call is dropped, audio output is set to ENotActive,
+        // but in some cases Mush engine get deleted before OutputChanged()
+        // notification comes. In that case we shouldn't touch output. 
+        if( currentMode != iAudioOutputAtStartup && 
+            currentMode != CTelephonyAudioRouting::ENotActive )
             {
             // As going down, let audiorouting api to show notification
             iTelephonyAudioRouting->SetShowNote( ETrue );
-            TRAPD( err, 
-                iTelephonyAudioRouting->SetOutputL( iAudioOutputAtStartup ) )
+            TRAPD( err, DoSetOutputL( iAudioOutputAtStartup ) );
             MUS_LOG1( "mus: [ENGINE]    final route change completed: %d", err )
             err++;
-        	}
+            }
         }
 
+    if ( iNotifier )
+        {
+        iNotifier->StopListening();
+        delete iNotifier;
+        }    
+
     delete iRepository;
     delete iTelephonyAudioRouting;
     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::~CMusEngTelephoneUtils()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-TBool CMusEngTelephoneUtils::AudioRoutingCanBeChanged()
+TBool CMusEngTelephoneUtils::AudioRoutingCanBeChanged() const
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::AudioRoutingCanBeChanged" )
     
-    TBool retValue = ( iTelephonyAudioRouting->Output() !=
-                       CTelephonyAudioRouting::EWiredAudioAccessory &&
-                       iTelephonyAudioRouting->Output() !=
-                       CTelephonyAudioRouting::EBTAudioAccessory &&
+    TBool retValue = ( 
                        iTelephonyAudioRouting->Output() !=
                        CTelephonyAudioRouting::ETTY );
     
@@ -141,46 +107,107 @@
     return retValue;
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusEngTelephoneUtils::IsAudioRoutingHeadset() const
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::IsAudioRoutingHeadset" )
+	    
+    TBool retValue = ( iTelephonyAudioRouting->Output() ==
+                       CTelephonyAudioRouting::EBTAudioAccessory ||
+                       iTelephonyAudioRouting->Output() ==
+                       CTelephonyAudioRouting::EWiredAudioAccessory );
+	    
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngTelephoneUtils::IsAudioRoutingHeadset: %d",
+               retValue )
+	              
+    return retValue;
+    }
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngTelephoneUtils::LoudspeakerL( TBool aEnable )
+TBool CMusEngTelephoneUtils::IsAudioRoutingLoudSpeaker() const
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::IsAudioRoutingLoudSpeaker" )
+    TBool retValue = EFalse;
+    
+    CTelephonyAudioRouting::TAudioOutput currentMode =
+                                            iTelephonyAudioRouting->Output();
+    MUS_LOG1( "mus: [ENGINE] iAudioOutputAtStartup: %d", iAudioOutputAtStartup );
+    MUS_LOG1( "mus: [ENGINE] currentMode: %d", currentMode );
+    
+    if( currentMode != iAudioOutputAtStartup && 
+        currentMode == CTelephonyAudioRouting::ELoudspeaker )
+    	{
+    
+         retValue = ETrue;
+    
+    	}
+    	
+    MUS_LOG1( "mus: [ENGINE]  <- CMusEngTelephoneUtils::IsAudioRoutingLoudSpeaker: %d",
+               retValue )
+	              
+    return retValue;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngTelephoneUtils::LoudspeakerL( TBool aEnable, TBool aShowDialog )
     {
     MUS_LOG1( "mus: [ENGINE]  -> CMusEngTelephoneUtils::LoudspeakerL(%d)",
               aEnable )
     
-    // Disable note shown by audiorouting api as it causes
-    // application going to background for a while. Instead, display
-    // note by ourselves once setting output completes. This mechanism
-    // is needed only for loudspeaker enabling as going to background
-    // causes problems only at beginning of sharing session.
-    iTelephonyAudioRouting->SetShowNote( EFalse );              
     if ( aEnable )
         {
         if ( iTelephonyAudioRouting->Output() == 
-             CTelephonyAudioRouting::EHandset )
+             CTelephonyAudioRouting::EHandset || 
+             iTelephonyAudioRouting->Output() == 
+             CTelephonyAudioRouting::EBTAudioAccessory|| 
+             iTelephonyAudioRouting->Output() == 
+             CTelephonyAudioRouting::EWiredAudioAccessory )  
             {
-            iTelephonyAudioRouting->SetOutputL( 
-                CTelephonyAudioRouting::ELoudspeaker );
+            // Disable note shown by audiorouting api as it causes
+            // application going to background for a while. Instead, display
+            // note by ourselves once setting output completes. This mechanism
+            // is needed only for loudspeaker enabling as going to background
+            // causes problems only at beginning of sharing session.
+            if ( aShowDialog )
+                {   
+                iTelephonyAudioRouting->SetShowNote( EFalse );
+                
+                iShowDialog = aShowDialog;
+                }
+    
+            DoSetOutputL( CTelephonyAudioRouting::ELoudspeaker );
             }
         }
     else
-        {        
+        {
+        iTelephonyAudioRouting->SetShowNote( aShowDialog );
+        
         if ( iAudioOutputAtStartup == CTelephonyAudioRouting::ELoudspeaker )
             {
-            iTelephonyAudioRouting->SetOutputL( 
-                CTelephonyAudioRouting::EHandset );
+            DoSetOutputL( CTelephonyAudioRouting::EHandset );
             }
         else
             {
-            iTelephonyAudioRouting->SetOutputL( iAudioOutputAtStartup );
+            DoSetOutputL( iAudioOutputAtStartup );
             }
         }
+
+    
                                 
     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::LoudspeakerL(...)" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -192,7 +219,16 @@
     }
 
 // -----------------------------------------------------------------------------
-// Gets the CS call volume level.
+// Returns locally cached the CS call volume level.
+// -----------------------------------------------------------------------------
+//
+TInt CMusEngTelephoneUtils::GetVolume() const
+    {
+    return iCurrentVolume;
+    }
+        
+// -----------------------------------------------------------------------------
+// Gets the CS call volume level from central repository.
 // Leaves if error occurs when accessing central repository.
 // -----------------------------------------------------------------------------
 //
@@ -209,9 +245,11 @@
         User::LeaveIfError( iRepository->Get( KTelIncallEarVolume,
                                               currentVolume ) );
         }
+
     return ValidateVolume( currentVolume );
     }
 
+
 // -----------------------------------------------------------------------------
 // Sets the CS call volume level.
 // Leaves if error occurs when accessing central repository.
@@ -220,8 +258,8 @@
 void CMusEngTelephoneUtils::SetVolumeL( TInt aVolume )
     {
     TInt newVolume = ValidateVolume( aVolume );
-
-    if ( GetVolumeL() != newVolume )
+    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTelephoneUtils::SetVolumeL(), %d", newVolume )
+    if ( iCurrentVolume != newVolume )
         {
         if ( IsLoudSpeakerEnabled() )
             {
@@ -233,9 +271,11 @@
             User::LeaveIfError( iRepository->Set( KTelIncallEarVolume, 
                                                   newVolume ) );
             }
+        iCurrentVolume = newVolume;
         }
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -256,6 +296,7 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::MuteMicL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -275,6 +316,27 @@
     return ( psVal == EPSTelMicMuteOn );
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngTelephoneUtils::SetAudioRoutingObserver( 
+                                    MMusEngAudioRoutingObserver* aObserver )
+    {
+    iAudioRoutingObserver = aObserver;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngTelephoneUtils::SetVolumeChangeObserver( 
+                                    MMusEngVolumeChangeObserver* aObserver )
+    {
+    iVolumeObserver = aObserver;
+    }
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -290,6 +352,23 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::RunL()" )
     }
 
+// -------------------------------------------------------------------------
+//  If RunL() leaves,It should be handled here.
+// -------------------------------------------------------------------------
+//
+TInt CMusEngTelephoneUtils::RunError( TInt aError )
+    {
+    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTelephoneUtils::\
+              RunError() return #%d", aError )
+    
+    // Nothing can be done here.
+    aError = KErrNone;
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::RunError()" )
+    return aError;
+    }
+
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -304,24 +383,26 @@
         }
         
     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::DoCancel()" )
-    } 
+    }
+    
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMusEngTelephoneUtils::AvailableOutputsChanged( 
-    CTelephonyAudioRouting& /*aTelephonyAudioRouting*/ )
+                        CTelephonyAudioRouting& /*aTelephonyAudioRouting*/ )
     {
     // NOP
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMusEngTelephoneUtils::OutputChanged( 
-    CTelephonyAudioRouting& aTelephonyAudioRouting )
+                CTelephonyAudioRouting& aTelephonyAudioRouting )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::OutputChanged()" )
 
@@ -332,8 +413,13 @@
     
     MUS_LOG1( "mus: [ENGINE]     New audio routing is %d", iAudioOutputAtStartup )
     
-    iAudioRoutingObserver.AudioRoutingChanged();
-        
+    if ( iAudioRoutingObserver )
+        {
+        iAudioRoutingObserver->AudioRoutingChanged( EFalse );
+        }
+    
+    UpdateCurrentVolume(ETrue);
+    
     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::OutputChanged()" )
     }
     
@@ -343,18 +429,97 @@
 // -----------------------------------------------------------------------------
 //
 void CMusEngTelephoneUtils::SetOutputComplete( 
-    CTelephonyAudioRouting& /*aTelephonyAudioRouting*/,
-    TInt aError )
+                    CTelephonyAudioRouting& /*aTelephonyAudioRouting*/,
+                    TInt aError )
     {
     MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::SetOutputComplete()" )
 
     if ( aError == KErrNone )
         {
-        iAudioRoutingObserver.AudioRoutingChanged();
+        if ( iAudioRoutingObserver )
+            {
+            // If audio routing api didn't shown note and show dialog mode is on,
+            // we know that this completion is for such setoutput call for which
+            // we need to show the note. Show note mode is turned off only in that
+            // case.
+            TBool dialogShownByUs( EFalse );
+            TBool dialogShownByAudioRouting( EFalse );     
+            aError = iTelephonyAudioRouting->GetShowNote( dialogShownByAudioRouting );
+            if ( aError == KErrNone && !dialogShownByAudioRouting && iShowDialog )
+                {
+                dialogShownByUs = iShowDialog;
+                iShowDialog = EFalse;
+                }
+        
+            iAudioRoutingObserver->AudioRoutingChanged( dialogShownByUs );
+            }
+
+        UpdateCurrentVolume(ETrue);
         }
     
     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::SetOutputComplete()" )
     }
+                            
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngTelephoneUtils::UpdateCurrentVolume( TBool aAudioRouteChanged )
+    {
+    TInt volume(0);
+    TRAPD(error, volume = GetVolumeL() );
+    if( (KErrNone == error) && (iCurrentVolume != volume) )
+         {
+         iCurrentVolume = volume;
+         if ( iVolumeObserver )
+             {
+             iVolumeObserver->VolumeChanged( volume, aAudioRouteChanged );
+             }
+         }
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngTelephoneUtils::CMusEngTelephoneUtils() 
+	: CActive( CActive::EPriorityStandard )
+    {
+    iAudioOutputAtStartup = CTelephonyAudioRouting::ENotActive;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngTelephoneUtils::ConstructL()
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::ConstructL()" )
+
+    // Volume control
+    iRepository = CRepository::NewL( KCRUidInCallVolume );
+    
+    iNotifier = CCenRepNotifyHandler::NewL( *this, *iRepository );
+    iNotifier->StartListeningL();
+    
+    // Audio routing control
+    iTelephonyAudioRouting = CTelephonyAudioRouting::NewL( *this );
+
+    iAudioOutputAtStartup = iTelephonyAudioRouting->Output();
+    MUS_LOG1( "mus: [ENGINE] iAudioOutputAtStartup: %d", iAudioOutputAtStartup );
+    // Phone
+    MUS_LOG( "mus: [ENGINE]     Use static DLL" )
+    iPhoneCommandHandler = CPhCltCommandHandler::NewL();
+     
+    iCurrentVolume = GetVolumeL();
+    
+    CActiveScheduler::Add( this );
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::ConstructL()" )
+    }
+
 
 // -----------------------------------------------------------------------------
 // Validates that requested volume level is valid (between 1-10) and if it is
@@ -378,3 +543,61 @@
         
     return aVolume;
     }
+
+
+// -----------------------------------------------------------------------------
+// Set output if setting is currently allowed.
+// -----------------------------------------------------------------------------
+//
+void CMusEngTelephoneUtils::DoSetOutputL( 
+    CTelephonyAudioRouting::TAudioOutput aAudioOutput )
+    {
+    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::DoSetOutputL()" )
+    if ( iAudioRoutingObserver && !iAudioRoutingObserver->AudioRouteChangeAllowed() )
+        {
+        MUS_LOG( "mus: [ENGINE]     change not allowed!" )
+        User::Leave( KErrAccessDenied );
+        }
+    iTelephonyAudioRouting->SetOutputL( aAudioOutput );
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::DoSetOutputL()" )
+    }
+
+
+// ---------------------------------------------------------------------------
+// CMusEngTelephoneUtils::HandleNotifyGeneric
+// ---------------------------------------------------------------------------
+//
+void CMusEngTelephoneUtils::HandleNotifyGeneric( TUint32 aId )
+    {
+    MUS_LOG( "mus: [ENGINE] -> CMusEngTelephoneUtils::HandleNotifyGeneric()" )
+    TInt error = KErrArgument;
+    TInt volume = 0;
+    if ( KTelIncallEarVolume == aId )
+        {
+        error = iRepository->Get( KTelIncallEarVolume, volume );        
+        MUS_LOG1( "mus: [ENGINE] EAR volume: %d", volume );
+        }
+    else if ( KTelIncallLoudspeakerVolume == aId )
+        {
+        error = iRepository->Get( KTelIncallLoudspeakerVolume, volume );        
+        MUS_LOG1( "mus: [ENGINE] Loudspeakers volume: %d", volume );
+        }
+    
+    volume = ValidateVolume(volume);
+    if ( (KErrNone == error) && (iCurrentVolume != volume) )
+        {
+        MUS_LOG1( "mus: [ENGINE] volume changed: %d!, notifying UI...", volume )
+        iCurrentVolume = volume;
+        if( iVolumeObserver  )
+            {
+            iVolumeObserver->VolumeChanged( volume, EFalse );
+            }
+        }
+    else
+        {
+        MUS_LOG( "mus: [ENGINE] volume hasn't changed!, do nothing..." )    
+        }
+        
+    MUS_LOG1( "mus: [ENGINE] <- CMusEngTelephoneUtils::HandleNotifyGeneric(), error:%d",
+            error );
+    }
--- a/mmsharing/mmshengine/src/musengtwowayrecvsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,544 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengtwowayrecvsession.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "mussipprofilehandler.h"
-#include "musenglivevideoplayer.h"
-#include "musengremotevideoplayer.h"
-
-// SYSTEM
-#include <lcsessionobserver.h>
-#include <mcemanager.h>
-#include <mcecamerasource.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcesession.h>
-#include <mcertpsource.h>
-#include <mcestreambundle.h>
-#include <musmanager.h>
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds
-// 6 seconds keepalive timer, needs to be more than receiving timeout
-const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6; 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession* CMusEngTwoWayRecvSession::NewL()
-    {
-    CMusEngTwoWayRecvSession* self = new( ELeave )CMusEngTwoWayRecvSession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()" )
-    
-    delete iLiveVideoPlayer;  
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWayRecvSession::EnableDisplayL() %d", 
-              aEnable )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-    MusEngMceUtils::DoEnableDisplayL( *display, aEnable );
-                
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-    if ( vfDisplay )
-        {
-        MusEngMceUtils::DoEnableDisplayL( *vfDisplay, aEnable );  
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngTwoWayRecvSession::IsDisplayEnabled()
-    {
-    TBool enabled( EFalse );
-    if ( iSession )
-        {
-        CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iSession );
-        if ( display )
-           {
-           enabled = display->IsEnabled();
-           }
-        }
-    return enabled;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::TDisplayOrientation CMusEngTwoWayRecvSession::OrientationL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::RotationL()" )
-    
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-    
-    TDisplayOrientation displayOrientation;
-    CMceDisplaySink::TRotation rotation( display->RotationL() );
-    
-    MUS_LOG1( "mus: [ENGINE]     MCE rotation is %d", rotation )
-    
-    if ( rotation == CMceDisplaySink::ENone )
-        {
-        displayOrientation = CMusEngMceSession::EPortrait;
-        }
-    else
-        {
-        displayOrientation = CMusEngMceSession::ELandscape;
-        }
-    
-    MUS_LOG1( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::RotationL() %d", 
-              displayOrientation )
-    
-    return displayOrientation;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngTwoWayRecvSession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetOrientationL() %d", 
-              aOrientation )
-              
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-            
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-
-    CMceDisplaySink::TRotation rotation = ( aOrientation == EPortrait ) ? 
-        CMceDisplaySink::ENone : CMceDisplaySink::EClockwise90Degree;
-    
-    display->SetRotationL( rotation );
-    if ( vfDisplay )
-        {
-        vfDisplay->SetRotationL( rotation );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetOrientationL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetRectsL()" )  
-     
-    iLocalRect = aLocalRect;
-    iRect = aRemoteRect;
-    RectChangedL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetRectsL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetSecondaryRectL()" )
-    
-    iLocalRect = aSecondaryRect;
-    RectChangedL();
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetSecondaryRectL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngTwoWayRecvSession::SecondaryRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SecondaryRect()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SecondaryRect()" )
-    return iLocalRect;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TMusEngCameraHandler& CMusEngTwoWayRecvSession::Camera()
-    {
-    return iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngTwoWayRecvSession::LocalVideoPlayer()
-    {
-    return iLiveVideoPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void CMusEngTwoWayRecvSession::RectChangedL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::RectChangedL()" )
-
-
-    // If session is not yet created, do nothing
-    if ( iSession && iSession->State() != CMceSession::ETerminated )
-        {
-        TRect remoteRect( Rect() );
-        MUS_LOG2( "mus: [ENGINE]  remote tl.ix=%d tl.iy=%d", 
-                  remoteRect.iTl.iX, remoteRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  remote brc%d br.iy=%d", 
-                  remoteRect.iBr.iX, remoteRect.iBr.iY )    
-        MUS_LOG2( "mus: [ENGINE]  local tl.ix=%d tl.iy=%d", 
-                  iLocalRect.iTl.iX, iLocalRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  local br.ix=%d br.iy=%d", 
-                  iLocalRect.iBr.iX, iLocalRect.iBr.iY )
-        
-        if ( remoteRect != iSetRemoteRect )
-            {
-            CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-            display->SetDisplayRectL( remoteRect );
-            iSetRemoteRect = remoteRect;
-            }
-        
-        if ( iLocalRect != iSetLocalRect )
-            {
-            CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-            if ( vfDisplay )
-                {
-                vfDisplay->SetDisplayRectL( iLocalRect );
-                }
-            iSetLocalRect = iLocalRect;
-            }
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::RectChangedL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    iCameraHandler.SetSession( iSession );
-    
-    // Force bandwidth line usage in sdp as it is mandatory
-    // at MT side based on GSMA VS specification IR.74. Bandwidth is set to
-    // session or to media level based on sender's way of usage. If other end
-    // is not using bandwidth attribute at all, media level is preferred.
-    SetSessionSdpLinesL( *iSession, ETrue );
-
-    CMceStreamBundle* localBundle =
-                              CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
-
-    const RPointerArray<CMceMediaStream>& streams = iSession->Streams();
-    
-    CMceMediaStream* videoInStream = NULL;
-    CMceMediaStream* videoOutStream = NULL;
-    
-    // Search interesting video streams, sendrecv is preferred
-    TBool sendRecvVideoFound( EFalse );
-    for( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoInStream( *streams[i] ) &&
-             !sendRecvVideoFound )
-            {
-            videoInStream = streams[i];
-            
-            if ( streams[i]->BoundStream() )
-                {
-                videoOutStream = &streams[i]->BoundStreamL();
-                }
-            }
-        else if ( streams[i]->BoundStream() &&
-                  MusEngMceUtils::IsVideoInStream( streams[i]->BoundStreamL() ) &&
-                  !sendRecvVideoFound )
-            {
-            videoInStream = &streams[i]->BoundStreamL();
-                
-            videoOutStream = streams[i];
-            }
-        else
-            {
-            // NOP
-            }
-        
-        sendRecvVideoFound = ( videoInStream && videoOutStream );
-        }
-    
-    CompleteSessionStructureAudioPartL( streams, *localBundle, videoInStream, videoOutStream );
-    
-    if ( videoInStream )
-        {
-        CompleteSessionStructureInStreamL( *videoInStream, *localBundle );
-        }
-    else
-        {
-        // At least receiving video stream is required
-        User::Leave( KErrCorrupt );
-        }
-    
-    if ( videoOutStream )
-        {
-        CompleteSessionStructureOutStreamL( *videoOutStream );
-        }
-    
-    // Destroy bundle if it is not needed or transfer ownership
-    if ( localBundle->Streams().Count() > 1 )
-        {
-        iSession->AddBundleL( localBundle );
-        CleanupStack::Pop( localBundle );
-        }
-    else
-        {
-        CleanupStack::PopAndDestroy( localBundle );
-        }
-    
-    AdjustStreamsAndCodecsL();
-    
-    iSession->UpdateL();
-    
-    // Now session state is right to adjust volume
-    SetSpeakerVolumeL( LcVolumeL() );
-    
-    iSipProfileHandler->CreateProfileL( iSession->Profile() );
-    
-    iRemoteVideoPlayer->SetMceSession( iSession );
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession::CMusEngTwoWayRecvSession() 
-    : CMusEngReceiveSession()
-    {
-    iMceManagerUid.iUid = CMusManager::ESipInviteDesired2WayVideo;
-    
-    iSetRemoteRect = TRect( 
-        KMusEngRectNotInit, KMusEngRectNotInit, KMusEngRectNotInit, KMusEngRectNotInit );
-    iSetLocalRect = TRect(
-        KMusEngRectNotInit, KMusEngRectNotInit, KMusEngRectNotInit, KMusEngRectNotInit );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::ConstructL()" )
-    
-    iCameraHandler.ReadCameraUsageKeyL();
-    CMusEngReceiveSession::ConstructL();
-    
-    iLiveVideoPlayer = 
-        CMusEngLiveVideoPlayer::NewL( *this, iCameraHandler, *this );
-    
-    // Override receiving timeout and keepalive values of
-    // normal one-way receiving session
-    //
-    iReceivingInactivityTimeout = KMusEngTwoWayReceivingActivityTimeout; 
-    iKeepaliveTimer = KMusEngTwoWayRtpKeepAliveTimer;
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// When checking audio streams also not interesting streams are removed from
-// session. Stream if removed if one of following apply:
-// 1. Is not and does not contain incoming video or audio
-// 2. We already have one incoming video stream
-// 3. Stream is audio and we run operator variant where audio is 
-//    not allowed.
-// 4. Two-way video exists and this one is audio
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL( 
-    const RPointerArray<CMceMediaStream>& aStreams, 
-    CMceStreamBundle& aLocalBundle, 
-    CMceMediaStream* aVideoInStream,
-    CMceMediaStream* aVideoOutStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL()" )
-    
-    // Audio streams not allowed in two-way session or in operator variant
-    TBool audioAllowed(  !( aVideoInStream && aVideoOutStream ) && !iOperatorVariant );
-    
-    for( TInt i = 0; i < aStreams.Count(); ++i )
-        {
-        // Audio supported currently only in recvonly case
-        if ( audioAllowed &&
-             MusEngMceUtils::IsAudioInStream( *aStreams[i] ) )
-            {
-            MusEngMceUtils::AddSpeakerL( *aStreams[i] );
-            
-            aLocalBundle.AddStreamL( *aStreams[i] );
-            
-            // Disable possible opposite stream to indicate that sendrecv audio is
-            // not allowed.
-            if ( aStreams[i]->BoundStream() )
-                {
-                MusEngMceUtils::DisableStreamL( aStreams[i]->BoundStreamL() );
-                }
-            }
-        else if ( audioAllowed &&
-                  aStreams[i]->BoundStream() &&
-                  MusEngMceUtils::IsAudioInStream( aStreams[i]->BoundStreamL() ) )
-            {
-            MusEngMceUtils::AddSpeakerL( aStreams[i]->BoundStreamL() );
-    
-            aLocalBundle.AddStreamL( aStreams[i]->BoundStreamL() );
-            
-            // Disable opposite stream to indicate that sendrecv audio is not allowed.
-            MusEngMceUtils::DisableStreamL( *aStreams[i] );
-            }
-        else if ( aStreams[ i ] != aVideoInStream && aStreams[ i ] != aVideoOutStream )
-            {
-           iSession->RemoveStreamL( *aStreams[i] );
-        
-            // Since succesfull removal of a stream has decreased the amount
-            // of streams in array by one, we have to modify the index
-            --i;
-            }
-        else
-            {
-            // NOP
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL( 
-    CMceMediaStream& aVideoInStream, CMceStreamBundle& aLocalBundle )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL()" )
-    
-    SetMediaSdpLinesL( aVideoInStream, ETrue );
-
-    MusEngMceUtils::AddDisplayL( aVideoInStream, *iManager, Rect() );
-    
-    static_cast<CMceRtpSource*>(aVideoInStream.Source())->UpdateL( 
-                                           KMusEngJitterBufferLength,
-                                           KMusEngJitterBufferTreshold,
-                                           KMusEngTwoWayReceivingActivityTimeout );
-                                            
-    aLocalBundle.AddStreamL( aVideoInStream );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL( 
-    CMceMediaStream& aVideoOutStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL()" )
-    
-    SetMediaSdpLinesL( aVideoOutStream, ETrue );
-        
-    CMceCameraSource* camera = NULL;
-    TRAP_IGNORE( camera = MusEngMceUtils::GetCameraL( *iSession ) )
-    if ( !camera )
-        {
-        camera = CMceCameraSource::NewLC( *iManager );
-        aVideoOutStream.SetSourceL( camera );
-        CleanupStack::Pop( camera );
-        }
-       
-    camera->DisableL(); // Start session in pause mode.
-    
-    iCameraHandler.InitializeL( *camera );
-    
-    CMceVideoStream* vfStream = CMceVideoStream::NewLC();
-
-    vfStream->SetSourceL( aVideoOutStream.Source() );
-	
-    // Complete stream, vf display is disabled at creation phase if doing bg startup
-    MusEngMceUtils::AddDisplayL( *vfStream, *iManager, SecondaryRect(), IsBackgroundStartup() );
-    
-    iSession->AddStreamL( vfStream );
-    CleanupStack::Pop( vfStream );
-    
-    iLiveVideoPlayer->SetMceSession( iSession );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL()" )
-    }
-
-
-// End of file
--- a/mmsharing/mmshengine/src/musengtwowaysession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,530 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengtwowaysession.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "musengremotevideoplayer.h"
-#include "musenglivevideoplayer.h"
-
-// SYSTEM
-#include <lcsessionobserver.h>
-#include <mcemanager.h>
-#include <mcecamerasource.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcesession.h>
-#include <mcertpsource.h>
-#include <mcevideocodec.h>
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds
-// 6 seconds keepalive timer, needs to be more than receiving timeout
-const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6; 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession* CMusEngTwoWaySession::NewL()
-    {
-    CMusEngTwoWaySession* self = new( ELeave )CMusEngTwoWaySession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession::~CMusEngTwoWaySession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
-    
-    delete iRemoteVideoPlayer; 
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWaySession::EnableDisplayL() %d", 
-              aEnable )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iSession );
-    if ( display )
-        {
-        MusEngMceUtils::DoEnableDisplayL( *display, aEnable );
-        }     
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetDisplayL( *iSession, ETrue );
-    MusEngMceUtils::DoEnableDisplayL( *vfDisplay, aEnable );     
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngTwoWaySession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetOrientationL() %d", 
-              aOrientation )
-              
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iSession );            
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetDisplayL( *iSession, ETrue );
-
-    CMceDisplaySink::TRotation rotation = ( aOrientation == EPortrait ) ? 
-         CMceDisplaySink::ENone : CMceDisplaySink::EClockwise90Degree;
-     
-    vfDisplay->SetRotationL( rotation );
-    if ( display )
-        {
-        display->SetRotationL( rotation );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetOrientationL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::EnableLcFileL( TBool /*aEnable*/ )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::EnableLcFileL" )
-
-    User::Leave( KErrNotSupported );
-
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::EnableLcFileL" ) 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetRectsL()" )  
-     
-    iLocalRect = aLocalRect;
-    iRect = aRemoteRect;
-    RectChangedL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetRectsL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetSecondaryRectL()" )
-    
-    iLocalRect = aSecondaryRect;
-    RectChangedL();
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetSecondaryRectL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngTwoWaySession::SecondaryRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SecondaryRect()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SecondaryRect()" )
-    return iLocalRect;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngTwoWaySession::IsDisplayEnabled()
-    {
-    TBool enabled( EFalse );
-    if ( iSession )
-        {
-        CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iSession );
-        if ( !display )
-            {
-            display = MusEngMceUtils::GetVfDisplay( *iSession );
-            }
-        if ( display )
-           {
-           enabled = display->IsEnabled();
-           }
-        }
-    return enabled;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngTwoWaySession::IsDisplayActive()
-    {
-    return ( IsDisplayEnabled() && iReceiving );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngTwoWaySession::RemoteVideoPlayer()
-    {
-    return iRemoteVideoPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::RectChangedL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::RectChangedL()" )
-
-    // If session is not yet created, do nothing
-    if ( iSession && iSession->State() != CMceSession::ETerminated )
-        {
-        TRect remoteRect( Rect() );
-        MUS_LOG2( "mus: [ENGINE]  remote tl.ix=%d tl.iy=%d", 
-                  remoteRect.iTl.iX, remoteRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  remote br.ix=%d br.iy=%d", 
-                  remoteRect.iBr.iX, remoteRect.iBr.iY )    
-        MUS_LOG2( "mus: [ENGINE]  local tl.ix=%d tl.iy=%d", 
-                  iLocalRect.iTl.iX, iLocalRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  local br.ix=%d br.iy=%d", 
-                  iLocalRect.iBr.iX, iLocalRect.iBr.iY )           
-
-        if ( remoteRect != iSetRemoteRect )
-            {
-            CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iSession );
-            if ( display )
-                {
-                MUS_LOG( "mus: [ENGINE]  set remote rect" )
-                display->SetDisplayRectL( remoteRect );
-                iSetRemoteRect = remoteRect;
-                }
-            }
-
-        if ( iLocalRect != iSetLocalRect )
-            {
-            MUS_LOG( "mus: [ENGINE]  set local rect" )
-            CMceDisplaySink* vfDisplay = MusEngMceUtils::GetDisplayL( *iSession, ETrue );
-            vfDisplay->SetDisplayRectL( iLocalRect );
-            iSetLocalRect = iLocalRect;
-            }
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::RectChangedL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::CompleteSessionStructureL( 
-                                            CMceStreamBundle& /*aLocalBundle*/ )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::CompleteSessionStructureL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    iCameraHandler.SetSession( iSession );
-    
-    // Create outgoing video stream
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    
-    CMceRtpSink* rtpsink = CMceRtpSink::NewLC();
-    videoStream->AddSinkL( rtpsink );
-    CleanupStack::Pop( rtpsink );
-
-    CMceCameraSource* camera = CMceCameraSource::NewLC( *iManager );
-    camera->DisableL(); // Start session in pause mode.
-    
-    iCameraHandler.InitializeL( *camera );
-
-    videoStream->SetSourceL( camera );
-    CleanupStack::Pop( camera );
-    
-    // Create incoming video stream
-    CMceVideoStream* videoInStream = CMceVideoStream::NewL();
-    CleanupStack::PushL( videoInStream );
-       
-    MusEngMceUtils::AddDisplayL( *videoInStream, *iManager, Rect() );
-
-    CMceRtpSource* rtpSource = CMceRtpSource::NewLC( KMusEngJitterBufferLength,
-                                                     KMusEngJitterBufferTreshold,
-                                                     KMusEngTwoWayReceivingActivityTimeout );
-    videoInStream->SetSourceL( rtpSource );
-    CleanupStack::Pop( rtpSource ); 
-
-    videoStream->BindL( videoInStream ); 
-    CleanupStack::Pop( videoInStream );
-
-    iSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );    
-
-    iLiveVideoPlayer->SetMceSession( iSession );
-    iRemoteVideoPlayer->SetMceSession( iSession );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::CompleteSessionStructureL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::CreateMceSessionStructureL( 
-    TBool /*aForceSdpBandwidth*/ ) 
-    {
-    //Force SDP bandwidth attributes to be included in the INVITE
-    CMusEngMceOutSession::CreateMceSessionStructureL( ETrue );
-    }
-
-// -----------------------------------------------------------------------------
-// Sets video codec attributes
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
-                                              TMceSourceType aSourceType )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWaySession::AdjustVideoCodecL()" )
-    
-    CMusEngLiveSession::AdjustVideoCodecL( aVideoCodec, aSourceType );
-    
-    aVideoCodec.SetKeepAliveTimerL( KMusEngTwoWayRtpKeepAliveTimer );
-    if ( aVideoCodec.SdpName() == KMceSDPNameH263() ||
-         aVideoCodec.SdpName() == KMceSDPNameH2632000() )
-        {
-        aVideoCodec.SetKeepAlivePayloadTypeL( KMusEngKeepAlivePayloadTypeVideoH263 );   
-        }
-    else if ( aVideoCodec.SdpName() == KMceSDPNameH264() )
-        {
-        aVideoCodec.SetKeepAlivePayloadTypeL( KMusEngKeepAlivePayloadTypeVideoAvc );                          
-        }
-    else
-        {
-        // NOP
-        }
-    
-    aVideoCodec.SetKeepAliveDataL( KNullDesC8() );
-    
-    MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::AdjustVideoCodecL()" )
-    }
-	
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::AddDisplayL( CMceMediaStream& aStream )
-    {
-    // Vf display is disabled at creation phase if doing bg startup
-    MusEngMceUtils::AddDisplayL( aStream, 
-                                 *iManager,
-                                 iLocalRect,
-                                 IsBackgroundStartup() );
-    }
- 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::StreamStateChanged( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWaySession::StreamStateChanged()" )
-    if ( !iSession )
-        {
-        return;
-        }
-    
-    if ( aStream.Type() == KMceVideo &&
-         aStream.Source() &&
-         aStream.Source()->Type() == KMceRTPSource )
-        {
-        if ( aStream.State() == CMceMediaStream::EStreaming )
-            {
-            ReceivingStarted();
-            }
-        else if ( aStream.State() == CMceMediaStream::EBuffering )
-            {
-            MUS_LOG( "mus: [ENGINE] CMusEngTwoWaySession buffered" )
-            
-            iBuffered = ETrue;
-            }
-        else
-            {
-            // NOP
-            }
-        }
-    
-    CMusEngMceSession::StreamStateChanged( aStream );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::StreamStateChanged()" )
-    }
-
-// -----------------------------------------------------------------------------
-// Once inactivity timeout occurs, state change is notified and receiving
-// and buffering statuses are cleared. That is safe to do as once receiving
-// again continues for real, buffering and streaming events will occur always 
-// sequentially. If buffering status would not be cleared, some unwanted
-// sreaming events would be passed towards client when it disables/enables
-// display sink of remote stream while inactivity timer has expired.
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::InactivityTimeout( CMceMediaStream& aStream,
-                                              CMceRtpSource& /*aSource*/ )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::InactivityTimeout()" )
-    
-    if ( aStream.Type() == KMceVideo && iReceiving )
-        {
-        iReceiving = EFalse;
-        iBuffered = EFalse;
-        if ( iRemoteVideoPlayer )
-            {
-            InformObserverAboutPlayerStateChange( iRemoteVideoPlayer );
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::InactivityTimeout()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::HandleSessionStateChanged( 
-    CMceSession& aSession,
-    TInt aStatusCode,
-    const TDesC8& aReasonPhrase )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::HandleSessionStateChanged" )
-    
-    MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )
-    
-    TBool consumed( EFalse );
-    if ( iSession && 
-         iSession == &aSession && 
-         aSession.State() == CMceSession::EEstablished )
-        {   
-        CMceVideoStream* stream = NULL;
-        CMceVideoStream* streamout = NULL;
-        TRAPD( err, stream = MusEngMceUtils::GetVideoInStreamL( *iSession ) )
-        if ( err == KErrNone && stream && stream->IsEnabled() )
-            {
-            TRAP( err, streamout = MusEngMceUtils::GetVideoOutStreamL( *iSession ) )
-            if ( err != KErrNone || !streamout || !streamout->IsEnabled() )
-                {
-                MUS_LOG( "mus: [ENGINE] sendrecv downgraded to recvonly, terminate!" )
-                consumed = ETrue;
-                InformObserverAboutSessionFailure( err );
-                }
-            }
-        }
-    
-    if ( !consumed )
-        {
-        CMusEngLiveSession::HandleSessionStateChanged( aSession,
-                                                       aStatusCode, 
-                                                       aReasonPhrase );
-        }
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::HandleSessionStateChanged" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession::CMusEngTwoWaySession() 
-    : CMusEngLiveSession()
-    {
-    iSetRemoteRect = TRect( 
-        KMusEngRectNotInit, KMusEngRectNotInit, KMusEngRectNotInit, KMusEngRectNotInit );
-    iSetLocalRect = TRect(
-        KMusEngRectNotInit, KMusEngRectNotInit, KMusEngRectNotInit, KMusEngRectNotInit );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::ConstructL()" )
-    
-    CMusEngLiveSession::ConstructL();
-    
-    iRemoteVideoPlayer = CMusEngRemoteVideoPlayer::NewL( *this, *this ); 
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::ReceivingStarted()
-    {
-    if ( iSession && iBuffered )
-        {
-        MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::ReceivingStarted()" )
-        
-        TInt err = MusEngMceUtils::EnableInactivityTimer( 
-            *iSession, KMusEngTwoWayReceivingActivityTimeout );
-        
-        if ( err != KErrNone )
-            {
-            MUS_LOG1("mus: [ENGINE] ReceivingStarted failed %d", err)
-            InformObserverAboutSessionFailure( err );   
-            }
-        else
-            {
-            iReceiving = ETrue;
-            InformObserverAboutPlayerStateChange( iRemoteVideoPlayer );
-            InformUiProviderAboutReceivingStart();
-            }
-        
-        MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::ReceivingStarted()" )
-        }
-    }
-
-// End of file
--- a/mmsharing/mmshengine/src/musenguriparser.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/musenguriparser.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -22,6 +22,7 @@
 
 #include <uri8.h>
 #include <charconv.h>
+//#include <f32file.h>
 #include <utf.h>
 #include <collate.h>
 
@@ -33,7 +34,7 @@
 // UTF7 is not working, since it converts + as +-
 // -----------------------------------------------------------------------------
 //
-TMusEngUriParser::TMusEngUriParser( const TDesC16& aUri )
+EXPORT_C TMusEngUriParser::TMusEngUriParser( const TDesC16& aUri )
     :iUriType( ENotParsed )
     {
     TBuf8<KMaxUriLength> buf;
@@ -48,20 +49,22 @@
         }
     }
 
-// ----------------------------------------------------------------------------- 
-//
-// -----------------------------------------------------------------------------
-//
-TMusEngUriParser::TMusEngUriType TMusEngUriParser::UriType()
-    {
-    return iUriType;
-    }
 
 // ----------------------------------------------------------------------------- 
 //
 // -----------------------------------------------------------------------------
 //
-HBufC8* TMusEngUriParser::GetUri8L()
+EXPORT_C TMusEngUriParser::TMusEngUriType TMusEngUriParser::UriType()
+    {
+    return iUriType;
+    }
+    
+
+// ----------------------------------------------------------------------------- 
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* TMusEngUriParser::GetUri8L()
     {
     MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::GetUri8L()" )
     
@@ -73,13 +76,15 @@
     MUS_LOG( "mus: [ENGINE]  <- TMusEngUriParser::GetUri8L()" )
 
     return uri8;
+
     }
 
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
 //
-HBufC16* TMusEngUriParser::GetUri16L( TBool aPrefix )
+EXPORT_C HBufC16* TMusEngUriParser::GetUri16L( TBool aPrefix )
     {
     MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::GetUri16L()" )
     
@@ -101,13 +106,16 @@
     MUS_LOG( "mus: [ENGINE]  <- TMusEngUriParser::GetUri16L()" )
     
     return uri16;
+   
     }
 
-// ----------------------------------------------------------------------------- 
+
+// -----------------------------------------------------------------------------
+// 
 //
 // -----------------------------------------------------------------------------
 //
-void TMusEngUriParser::ParseUriL()
+EXPORT_C void TMusEngUriParser::ParseUriL()
     {
     MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::ParseUriL()" )
     
@@ -127,7 +135,7 @@
             {// basic behaviour
             MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::ParseUriL() \
                     normal behaviour" )
-            User::Leave( KErrArgument );        
+            User::Leave( KErrCorrupt );
             }
         else
             { // variant behaviour(local tel uri)
@@ -136,7 +144,9 @@
         }
     }
 
+
 // -----------------------------------------------------------------------------
+// 
 //
 // -----------------------------------------------------------------------------
 //
@@ -179,13 +189,18 @@
     
     iUriType = TMusEngUriParser::ESip;
     }
+    
    
-// ----------------------------------------------------------------------------- 
+   
+   
+// -----------------------------------------------------------------------------
+// 
 //
 // -----------------------------------------------------------------------------
 //
 void TMusEngUriParser::HandleTelUriL()
     {
+    // Remove leading and trailing whitespaces
     iUri.TrimAll();
     if ( iUri.FindF( KMusEngTelPrefix() ) != 0 )
         {
@@ -208,6 +223,8 @@
 
     TInt index = KMusEngTelPrefix().Length() + KMusEngPlusSign().Length();
 
+    // Remove whitespaces and extra chracters like parentheses. Check that the
+    // rest characters are digits
     while ( index < iUri.Length() )
         {
         TChar character = iUri[ index ];
@@ -228,7 +245,9 @@
     iUriType = TMusEngUriParser::ETel;
     }
     
+    
 // -----------------------------------------------------------------------------
+// 
 //
 // -----------------------------------------------------------------------------
 //
@@ -239,7 +258,8 @@
     if ( iUri.FindF( KMusEngTelPrefix() ) != 0 )
         {
         // local tel uri without prefix
-        if ( iUri.Length() + KMusEngTelPrefix().Length() <= KMaxUriLength )
+        if ( iUri.Length() + KMusEngTelPrefix().Length() <=
+             KMaxUriLength )
             {
             iUri.Insert( 0, KMusEngTelPrefix() );
             }
@@ -251,7 +271,10 @@
     else
         {
         //Tel uri with prefix
-        iUri.Replace( 0, KMusEngTelPrefix().Length(), KMusEngTelPrefix() );
+        iUri.Replace(
+                0,
+                KMusEngTelPrefix().Length(),
+                KMusEngTelPrefix() );
         }
 
     TInt index = KMusEngTelPrefix().Length();
@@ -269,5 +292,6 @@
         
     iUriType = TMusEngUriParser::ETel;
     }
-
+    
+    
 // End of file
--- a/mmsharing/mmshengine/src/musengvideoplayerbase.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-// USER
-#include "musenglocalvideoplayer.h"
-#include "musengcamerahandler.h"
-#include "musengmceutils.h"
-#include "musengdisplayhandler.h"
-
-// SYSTEM
-#include <mcesession.h>
-#include <mcevideostream.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngVideoPlayerBase::CMusEngVideoPlayerBase( 
-    MMusEngDisplayHandler& aDisplayHandler,
-    MLcAudioControl& aLcAudioControl ) :
-    iDisplayHandler( aDisplayHandler ),
-    iLcAudioControl( aLcAudioControl )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngVideoPlayerBase::~CMusEngVideoPlayerBase()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::SetMceSession( CMceSession* aMceSession )
-    {
-    iMceSession = aMceSession;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::LcPlayL( TLcVideoPlayerSource /*aSource*/ )
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::LcPauseL()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcWindow* CMusEngVideoPlayerBase::LcWindow()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngVideoPlayerBase::LcCameraControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcSourceFileControl* CMusEngVideoPlayerBase::LcSourceFileControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcDestinationFileControl* CMusEngVideoPlayerBase::LcDestinationFileControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcAudioControl* CMusEngVideoPlayerBase::LcAudioControl()
-    {
-    return &iLcAudioControl;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngVideoPlayerBase::LcZoomControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngVideoPlayerBase::LcBrightnessControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::EnableLcWindowL( TBool aEnable )
-    {
-    iDisplayHandler.EnableDisplayL( aEnable );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngVideoPlayerBase::IsLcWindowEnabled()
-    {
-    return iDisplayHandler.IsDisplayEnabled();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::SetLcWindowRectL( TRect aRect )
-    {
-    iDisplayHandler.SetRectL( aRect );
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngVideoPlayerBase::LcWindowRect()
-    {
-    return iDisplayHandler.Rect();
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngVideoPlayerBase::SetLcWindowOrientationL( 
-    TLcWindowOrientation aOrientation )
-    {
-    if ( aOrientation == MLcWindow::ELandscape )
-        {
-        iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::ELandscape );
-        }
-    else 
-        {
-        iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::EPortrait );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-MLcWindow::TLcWindowOrientation CMusEngVideoPlayerBase::LcWindowOrientationL()
-    {
-    MLcWindow::TLcWindowOrientation orientation;
-    if ( iDisplayHandler.OrientationL() == MMusEngDisplayHandler::ELandscape )
-        {
-        orientation = MLcWindow::ELandscape;
-        }
-    else
-        {
-        orientation = MLcWindow::EPortrait;
-        }
-    return orientation;
-    }
--- a/mmsharing/mmshengine/src/mussipprofilehandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/src/mussipprofilehandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -12,9 +12,6 @@
 * Contributors:
 *
 * Description:  Utilities to get and set profile used with SWIS.
-*  Part of     : Mus For S60 v3.2
-*  Description : Utilities to get and set profile used with SWIS.
-*  Version     : %version: 11.1.5 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -34,6 +31,8 @@
 #include <sipprofilealrcontroller.h>
 #include <uri8.h>
 
+
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -48,6 +47,7 @@
     return self;
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -75,6 +75,7 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusSipProfileHandler::ConstructL()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -88,6 +89,7 @@
     MUS_LOG( "mus: [ENGINE]     CMusSipProfileHandler::~CMusSipProfileHandler()" )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -103,11 +105,16 @@
         {
         profile = iProfileRegistry->DefaultProfileL();
         }
-       
+    CleanupStack::PushL( profile );
+    TBool profileRegistered = EFalse;   
+    User::LeaveIfError( profile->GetParameter( KSIPProfileRegistered,
+                                                   profileRegistered  ) );
+    CleanupStack::Pop( profile );   
     delete iSipProfile;
     iSipProfile = profile;
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -117,6 +124,76 @@
     return iSipProfile;
     }
 
+#if 0 //TODO: should this be removed?
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CSIPProfile& CMusSipProfileHandler::SipProfileL( TInt aSipProfileId )
+    {
+    MUS_LOG1( "mus: [ENGINE]     -> CMusSipProfileHandler::SipProfileL(),\
+              od #%d", aSipProfileId )
+
+    if ( !iSipProfile )
+        {        
+        if ( aSipProfileId != 0 )
+            {
+            iSipProfile = iProfileRegistry->ProfileL( aSipProfileId );
+            }
+        else
+            {
+            iSipProfile = iProfileRegistry->DefaultProfileL();
+            }
+        }
+
+    // The parameter val indicates if the profile can be immediately
+    // used for creating a session, or if the client must wait for
+    // the profile to be registered.
+    TBool profileRegistered = EFalse;
+    
+    User::LeaveIfError( iSipProfile->GetParameter( KSIPProfileRegistered,
+                                                   profileRegistered  ) );
+                                                       
+    if ( !profileRegistered )
+        {
+
+        #if (defined (__WINS__) || defined(__WINSCW__))
+        
+        iProfileRegistry->EnableL( *iSipProfile, *this );            
+
+        User::LeaveIfError( iSipProfile->GetParameter( KSIPProfileRegistered,
+                                                       profileRegistered  ) );
+                                               
+        if( !profileRegistered )
+            {
+            CActiveScheduler::Start();
+
+            User::LeaveIfError( iSipProfile->GetParameter( 
+                                                    KSIPProfileRegistered,
+                                                    profileRegistered  ) );
+            
+            if ( !profileRegistered )
+                {
+                User::Leave( KErrNotReady );
+                }
+            }
+
+        #else
+
+        User::Leave( KErrNotReady );
+
+        #endif
+
+        }
+    
+        
+    MUS_LOG( "mus: [ENGINE]  <- CMusSipProfileHandler::SipProfileL()" )
+    
+    return *iSipProfile;
+    }
+#endif
+
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -129,9 +206,10 @@
 
     const MDesC8Array* aors = NULL;
     User::LeaveIfError( iSipProfile->GetParameter( KSIPRegisteredAors, aors ) );
-    __ASSERT_ALWAYS( aors && aors->MdcaCount() > 0, 
-                     User::Leave( KErrArgument ) );
-    
+    if( !aors || aors->MdcaCount() <= 0 ) 
+        {    
+        User::Leave( KErrArgument );            
+        }
     TUriParser8 parser;
     User::LeaveIfError( parser.Parse( aors->MdcaPoint( 0 ) ) );
     MUS_LOG( "mus: [ENGINE]  <- CMusSipProfileHandler::UserFromProfileLC()" )
@@ -151,50 +229,13 @@
 
 
 // -----------------------------------------------------------------------------
-// This function should never be called before creating a profile, but such
-// a situation will be considered as pending registration.
-// -----------------------------------------------------------------------------
-//
-TBool CMusSipProfileHandler::IsRegistered()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusSipProfileHandler::IsRegistered()" )
-    
-    TBool profileRegistered = EFalse;   
-    if ( iSipProfile ) 
-        {
-        iSipProfile->GetParameter( KSIPProfileRegistered, profileRegistered  );  
-        }
-    
-    MUS_LOG1( "mus: [ENGINE]  <- CMusSipProfileHandler::IsRegistered( %d )",
-              profileRegistered )
-    
-    return profileRegistered;
-    }
-
-
-// -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMusSipProfileHandler::ProfileRegistryEventOccurred(
-    TUint32 aProfileId,
-    MSIPProfileRegistryObserver::TEvent aEvent )
+    TUint32 /*aProfileId*/,
+    MSIPProfileRegistryObserver::TEvent /*aEvent*/ )
     {
-    if ( iSipProfile && aProfileId == ProfileId() )
-        {
-        switch ( aEvent )
-            {
-            case MSIPProfileRegistryObserver::EProfileRegistered:
-                {
-                iUser.ProfileRegistered();
-                break;
-                }
-            default:
-                {
-                break;
-                }
-            }
-        }
     }
 
 
@@ -208,7 +249,6 @@
     {
     }
 
-
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -256,6 +296,7 @@
     delete aTransaction; 
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -265,6 +306,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -275,6 +317,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -287,6 +330,7 @@
     delete aDialogAssoc;     
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -296,6 +340,7 @@
     CSIPRegistrationBinding& /*aRegistration*/ )
     {
     }
+    
 
 // -----------------------------------------------------------------------------
 //
@@ -307,6 +352,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -318,6 +364,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -329,6 +376,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -339,6 +387,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -349,6 +398,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -359,6 +409,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -368,15 +419,18 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMusSipProfileHandler::InviteCanceled( 
-    CSIPServerTransaction& /*aTransaction*/ )
+                                    CSIPServerTransaction& /*aTransaction*/ )
     {
+    MUS_LOG( "mus: [ENGINE]      CMusSipProfileHandler::CSIPServerTransaction")
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -386,6 +440,7 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 // CMusSipProfileHandler::AlrEvent
 // From MSipProfileAlrObserver
--- a/mmsharing/mmshengine/tsrc/ut_engine/BWINS/ut_musengineU.DEF	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/BWINS/ut_musengineU.DEF	Wed Sep 01 12:31:01 2010 +0100
@@ -1,3 +1,162 @@
 EXPORTS
 	?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * CreateTestSuiteL(void)
+	??1CRepository@@UAE@XZ @ 2 NONAME ; CRepository::~CRepository(void)
+	?StartTransaction@CRepository@@QAEHW4TTransactionMode@1@@Z @ 3 NONAME ; int CRepository::StartTransaction(enum CRepository::TTransactionMode)
+	?SetAudioRoutingObserver@CMusEngSession@@QAEXPAVMMusEngAudioRoutingObserver@@@Z @ 4 NONAME ; void CMusEngSession::SetAudioRoutingObserver(class MMusEngAudioRoutingObserver *)
+	?DigitalZoomFactorL@CMceCameraSource@@QAEHXZ @ 5 NONAME ; int CMceCameraSource::DigitalZoomFactorL(void)
+	?NewL@CCenRepNotifyHandler@@SAPAV1@AAVMCenRepNotifyHandlerCallback@@AAVCRepository@@@Z @ 6 NONAME ; class CCenRepNotifyHandler * CCenRepNotifyHandler::NewL(class MCenRepNotifyHandlerCallback &, class CRepository &)
+	?SetClipL@CMusEngClipSession@@QAEXABVTDesC16@@@Z @ 7 NONAME ; void CMusEngClipSession::SetClipL(class TDesC16 const &)
+	?GetCameraInfo@CMceCameraSource@@QBEXAAVTCameraInfo@@@Z @ 8 NONAME ; void CMceCameraSource::GetCameraInfo(class TCameraInfo &) const
+	?NewLC@CRepository@@SAPAV1@VTUid@@@Z @ 9 NONAME ; class CRepository * CRepository::NewLC(class TUid)
+	?IsMicMutedL@CMusEngSession@@QAEHXZ @ 10 NONAME ; int CMusEngSession::IsMicMutedL(void)
+	?FastRewindL@CMusEngClipSession@@QAEXH@Z @ 11 NONAME ; void CMusEngClipSession::FastRewindL(int)
+	?Create@CRepository@@QAEHKH@Z @ 12 NONAME ; int CRepository::Create(unsigned long, int)
+	?UriType@TMusEngUriParser@@QAE?AW4TMusEngUriType@1@XZ @ 13 NONAME ; enum TMusEngUriParser::TMusEngUriType TMusEngUriParser::UriType(void)
+	?ProfilesL@CSIPProfileRegistryBase@@QAEXABVTSIPProfileTypeInfo@@AAV?$RPointerArray@VCSIPProfile@@@@@Z @ 14 NONAME ; void CSIPProfileRegistryBase::ProfilesL(class TSIPProfileTypeInfo const &, class RPointerArray<class CSIPProfile> &)
+	?Type@CSIPProfile@@QBEABVTSIPProfileTypeInfo@@XZ @ 15 NONAME ; class TSIPProfileTypeInfo const & CSIPProfile::Type(void) const
+	?DurationL@CMusEngClipSession@@QAE?AVTTimeIntervalSeconds@@XZ @ 16 NONAME ; class TTimeIntervalSeconds CMusEngClipSession::DurationL(void)
+	?Type@CMceMediaSource@@QBEIXZ @ 17 NONAME ; unsigned int CMceMediaSource::Type(void) const
+	??0TMusEngUriParser@@QAE@ABVTDesC16@@@Z @ 18 NONAME ; TMusEngUriParser::TMusEngUriParser(class TDesC16 const &)
+	?BrightnessL@CMceCameraSource@@QAEHXZ @ 19 NONAME ; int CMceCameraSource::BrightnessL(void)
+	?Get@CRepository@@QAEHKAAVTDes16@@@Z @ 20 NONAME ; int CRepository::Get(unsigned long, class TDes16 &)
+	?GetUri8L@TMusEngUriParser@@QAEPAVHBufC8@@XZ @ 21 NONAME ; class HBufC8 * TMusEngUriParser::GetUri8L(void)
+	?NewLC@CSIPProfileRegistry@@SAPAV1@AAVCSIP@@AAVMSIPProfileRegistryObserver@@@Z @ 22 NONAME ; class CSIPProfileRegistry * CSIPProfileRegistry::NewLC(class CSIP &, class MSIPProfileRegistryObserver &)
+	?MaxBrightnessL@CMusEngLiveSession@@QBEHXZ @ 23 NONAME ; int CMusEngLiveSession::MaxBrightnessL(void) const
+	?OrientationL@CMusEngMceSession@@QAE?AW4TDisplayOrientation@1@XZ @ 24 NONAME ; enum CMusEngMceSession::TDisplayOrientation CMusEngMceSession::OrientationL(void)
+	?EnableL@CSIPProfileRegistry@@QAEXAAVCSIPProfile@@AAVMSIPConnectionObserver@@@Z @ 25 NONAME ; void CSIPProfileRegistry::EnableL(class CSIPProfile &, class MSIPConnectionObserver &)
+	?SetSupportedVideoCodecListL@CMusEngMceOutSession@@QAEXABVTDesC16@@@Z @ 26 NONAME ; void CMusEngMceOutSession::SetSupportedVideoCodecListL(class TDesC16 const &)
+	?CamerasAvailable@CMceCameraSource@@QBEHXZ @ 27 NONAME ; int CMceCameraSource::CamerasAvailable(void) const
+	?IsRecording@CMusEngLiveSession@@QAEHXZ @ 28 NONAME ; int CMusEngLiveSession::IsRecording(void)
+	?IsEnabled@CSIPProfileRegistry@@QBEHABVCSIPProfile@@@Z @ 29 NONAME ; int CSIPProfileRegistry::IsEnabled(class CSIPProfile const &) const
+	?NewL@DRMCommon@@SAPAV1@XZ @ 30 NONAME ; class DRMCommon * DRMCommon::NewL(void)
+	?DisableL@CMceCameraSource@@UAEXXZ @ 31 NONAME ; void CMceCameraSource::DisableL(void)
+	?IsProtectedFile@DRMCommon@@QAEHABVTDesC16@@AAH@Z @ 32 NONAME ; int DRMCommon::IsProtectedFile(class TDesC16 const &, int &)
+	?CancelTranscodeL@CMusEngClipSession@@QAEXXZ @ 33 NONAME ; void CMusEngClipSession::CancelTranscodeL(void)
+	?IsAudioRoutingHeadset@CMusEngSession@@QBEHXZ @ 34 NONAME ; int CMusEngSession::IsAudioRoutingHeadset(void) const
+	?Disable@CSIPProfileRegistry@@QAEHAAVCSIPProfile@@@Z @ 35 NONAME ; int CSIPProfileRegistry::Disable(class CSIPProfile &)
+	?BrightnessDefaultL@CMusEngLiveSession@@QAEXXZ @ 36 NONAME ; void CMusEngLiveSession::BrightnessDefaultL(void)
+	?Delete@CRepository@@QAEHKKAAK@Z @ 37 NONAME ; int CRepository::Delete(unsigned long, unsigned long, unsigned long &)
+	?CommitTransaction@CRepository@@QAEHAAK@Z @ 38 NONAME ; int CRepository::CommitTransaction(unsigned long &)
+	?SetExposureL@CMceCameraSource@@QAEXW4TExposure@CCamera@@@Z @ 39 NONAME ; void CMceCameraSource::SetExposureL(enum CCamera::TExposure)
+	?FastForwardL@CMusEngClipSession@@QAEXH@Z @ 40 NONAME ; void CMusEngClipSession::FastForwardL(int)
+	?SetZoomL@CMusEngLiveSession@@QAEXH@Z @ 41 NONAME ; void CMusEngLiveSession::SetZoomL(int)
+	?Set@CRepository@@QAEHKABVTDesC8@@@Z @ 42 NONAME ; int CRepository::Set(unsigned long, class TDesC8 const &)
+	?NewL@CMusEngClipSession@@SAPAV1@ABVTRect@@AAVMMusEngSessionObserver@@AAVMMusEngOutSessionObserver@@AAVMMusEngClipSessionObserver@@I@Z @ 43 NONAME ; class CMusEngClipSession * CMusEngClipSession::NewL(class TRect const &, class MMusEngSessionObserver &, class MMusEngOutSessionObserver &, class MMusEngClipSessionObserver &, unsigned int)
+	?InviteL@CMusEngMceOutSession@@QAEXABVTDesC16@@@Z @ 44 NONAME ; void CMusEngMceOutSession::InviteL(class TDesC16 const &)
+	?GetParameter@CSIPProfile@@QBEHKAAPBVTDesC8@@@Z @ 45 NONAME ; int CSIPProfile::GetParameter(unsigned long, class TDesC8 const * &) const
+	?IsLoudSpeakerEnabled@CMusEngSession@@QBEHXZ @ 46 NONAME ; int CMusEngSession::IsLoudSpeakerEnabled(void) const
+	?StartListeningL@CCenRepNotifyHandler@@QAEXXZ @ 47 NONAME ; void CCenRepNotifyHandler::StartListeningL(void)
+	?NewL@CSIPProfileRegistry@@SAPAV1@AAVCSIP@@AAVMSIPProfileRegistryObserver@@@Z @ 48 NONAME ; class CSIPProfileRegistry * CSIPProfileRegistry::NewL(class CSIP &, class MSIPProfileRegistryObserver &)
+	?NewL@CMusEngReceiveSession@@SAPAV1@ABVTRect@@AAVMMusEngSessionObserver@@AAVMMusEngReceiveSessionObserver@@@Z @ 49 NONAME ; class CMusEngReceiveSession * CMusEngReceiveSession::NewL(class TRect const &, class MMusEngSessionObserver &, class MMusEngReceiveSessionObserver &)
+	?ContainsAudioL@CMusEngMceSession@@QAEHXZ @ 50 NONAME ; int CMusEngMceSession::ContainsAudioL(void)
+	?VolumeUpL@CMusEngMceSession@@UAEXXZ @ 51 NONAME ; void CMusEngMceSession::VolumeUpL(void)
+	?IsPlayingL@CMusEngClipSession@@UAEHXZ @ 52 NONAME ; int CMusEngClipSession::IsPlayingL(void)
+	?Get@CRepository@@QAEHKAAH@Z @ 53 NONAME ; int CRepository::Get(unsigned long, int &)
+	?SupportedSecurityMechanismsL@CSIP@@QBEPAVCDesC8Array@@XZ @ 54 NONAME ; class CDesC8Array * CSIP::SupportedSecurityMechanismsL(void) const
+	?PlayL@CMusEngClipSession@@UAEXXZ @ 55 NONAME ; void CMusEngClipSession::PlayL(void)
+	?PauseL@CMusEngLiveSession@@UAEXXZ @ 56 NONAME ; void CMusEngLiveSession::PauseL(void)
+	?GetSessionTime@CMusEngMceSession@@QBE?AVTTimeIntervalSeconds@@XZ @ 57 NONAME ; class TTimeIntervalSeconds CMusEngMceSession::GetSessionTime(void) const
+	?Rect@CMusEngSession@@QBE?AVTRect@@XZ @ 58 NONAME ; class TRect CMusEngSession::Rect(void) const
+	?Disconnect@DRMCommon@@QAEHXZ @ 59 NONAME ; int DRMCommon::Disconnect(void)
+	?FindL@CRepository@@QAEHKKAAV?$RArray@K@@@Z @ 60 NONAME ; int CRepository::FindL(unsigned long, unsigned long, class RArray<unsigned long> &)
+	?SetBrightnessL@CMusEngLiveSession@@QBEXH@Z @ 61 NONAME ; void CMusEngLiveSession::SetBrightnessL(int) const
+	?IsAudioRoutingLoudSpeaker@CMusEngSession@@QBEHXZ @ 62 NONAME ; int CMusEngSession::IsAudioRoutingLoudSpeaker(void) const
+	?NewLC@CMceCameraSource@@SAPAV1@AAVCMceManager@@@Z @ 63 NONAME ; class CMceCameraSource * CMceCameraSource::NewLC(class CMceManager &)
+	?ProfilesL@CSIPProfileRegistryBase@@QAEXAAV?$RPointerArray@VCSIPProfile@@@@@Z @ 64 NONAME ; void CSIPProfileRegistryBase::ProfilesL(class RPointerArray<class CSIPProfile> &)
+	?ZoomOutL@CMusEngLiveSession@@QAEXXZ @ 65 NONAME ; void CMusEngLiveSession::ZoomOutL(void)
+	?ConnectionActive@CMusEngMceSession@@QBEHXZ @ 66 NONAME ; int CMusEngMceSession::ConnectionActive(void) const
+	?AudioRoutingCanBeChanged@CMusEngSession@@QBEHXZ @ 67 NONAME ; int CMusEngSession::AudioRoutingCanBeChanged(void) const
+	?GetParameter@CSIPProfile@@QBEHKAAH@Z @ 68 NONAME ; int CSIPProfile::GetParameter(unsigned long, int &) const
+	?SetWhiteBalanceL@CMceCameraSource@@QAEXW4TWhiteBalance@CCamera@@@Z @ 69 NONAME ; void CMceCameraSource::SetWhiteBalanceL(enum CCamera::TWhiteBalance)
+	?RecordL@CMusEngLiveSession@@QAEXH@Z @ 70 NONAME ; void CMusEngLiveSession::RecordL(int)
+	??1CCenRepNotifyHandler@@UAE@XZ @ 71 NONAME ; CCenRepNotifyHandler::~CCenRepNotifyHandler(void)
+	?FindEqL@CRepository@@QAEHKKABVTDesC8@@AAV?$RArray@K@@@Z @ 72 NONAME ; int CRepository::FindEqL(unsigned long, unsigned long, class TDesC8 const &, class RArray<unsigned long> &)
+	?ZoomFactorL@CMceCameraSource@@QAEHXZ @ 73 NONAME ; int CMceCameraSource::ZoomFactorL(void)
+	?TerminateL@CMusEngMceSession@@QAEXXZ @ 74 NONAME ; void CMusEngMceSession::TerminateL(void)
+	?SetZoomFactorL@CMceCameraSource@@QAEXH@Z @ 75 NONAME ; void CMceCameraSource::SetZoomFactorL(int)
+	?SIP@CSIPProfileRegistry@@QBEAAVCSIP@@XZ @ 76 NONAME ; class CSIP & CSIPProfileRegistry::SIP(void) const
+	??1CMceMediaSource@@UAE@XZ @ 77 NONAME ; CMceMediaSource::~CMceMediaSource(void)
+	?ParseUriL@TMusEngUriParser@@QAEXXZ @ 78 NONAME ; void TMusEngUriParser::ParseUriL(void)
+	?ProfileL@CSIPProfileRegistryBase@@QAEPAVCSIPProfile@@K@Z @ 79 NONAME ; class CSIPProfile * CSIPProfileRegistryBase::ProfileL(unsigned long)
+	?EnableLoudspeakerL@CMusEngSession@@QAEXHH@Z @ 80 NONAME ; void CMusEngSession::EnableLoudspeakerL(int, int)
+	?CancelInviteL@CMusEngMceOutSession@@QAEXXZ @ 81 NONAME ; void CMusEngMceOutSession::CancelInviteL(void)
+	?VolumeL@CMusEngSession@@QBEHXZ @ 82 NONAME ; int CMusEngSession::VolumeL(void) const
+	?StopListening@CCenRepNotifyHandler@@QAEXXZ @ 83 NONAME ; void CCenRepNotifyHandler::StopListening(void)
+	??1CSIPProfileRegistryBase@@UAE@XZ @ 84 NONAME ; CSIPProfileRegistryBase::~CSIPProfileRegistryBase(void)
+	?ZoomDefaultL@CMusEngLiveSession@@QAEXXZ @ 85 NONAME ; void CMusEngLiveSession::ZoomDefaultL(void)
+	?GetUri16L@TMusEngUriParser@@QAEPAVHBufC16@@H@Z @ 86 NONAME ; class HBufC16 * TMusEngUriParser::GetUri16L(int)
+	?NewL@CSIP@@SAPAV1@ABVTUid@@AAVMSIPObserver@@@Z @ 87 NONAME ; class CSIP * CSIP::NewL(class TUid const &, class MSIPObserver &)
+	??1CMceCameraSource@@UAE@XZ @ 88 NONAME ; CMceCameraSource::~CMceCameraSource(void)
+	?EnableL@CMceCameraSource@@UAEXXZ @ 89 NONAME ; void CMceCameraSource::EnableL(void)
+	?VolumeUpL@CMusEngSession@@UAEXXZ @ 90 NONAME ; void CMusEngSession::VolumeUpL(void)
+	?GetParameter@CSIPProfile@@QBEHKAAPBVMDesC8Array@@@Z @ 91 NONAME ; int CSIPProfile::GetParameter(unsigned long, class MDesC8Array const * &) const
+	?NewL@CRepository@@SAPAV1@VTUid@@@Z @ 92 NONAME ; class CRepository * CRepository::NewL(class TUid)
+	?SetVolumeChangeObserver@CMusEngSession@@QAEXPAVMMusEngVolumeChangeObserver@@@Z @ 93 NONAME ; void CMusEngSession::SetVolumeChangeObserver(class MMusEngVolumeChangeObserver *)
+	?GetParameter@CSIPProfile@@QBEHKAAK@Z @ 94 NONAME ; int CSIPProfile::GetParameter(unsigned long, unsigned long &) const
+	?IsMutedL@CMusEngMceSession@@QAEHXZ @ 95 NONAME ; int CMusEngMceSession::IsMutedL(void)
+	??1CSIP@@UAE@XZ @ 96 NONAME ; CSIP::~CSIP(void)
+	?Set@CRepository@@QAEHKH@Z @ 97 NONAME ; int CRepository::Set(unsigned long, int)
+	?AcceptInvitationL@CMusEngReceiveSession@@QAEXABH@Z @ 98 NONAME ; void CMusEngReceiveSession::AcceptInvitationL(int const &)
+	?CurrentZoomL@CMusEngLiveSession@@QBEHXZ @ 99 NONAME ; int CMusEngLiveSession::CurrentZoomL(void) const
+	?DisallowMigrationL@CSipProfileAlrController@@QAEXKK@Z @ 100 NONAME ; void CSipProfileAlrController::DisallowMigrationL(unsigned long, unsigned long)
+	?MinBrightnessL@CMusEngLiveSession@@QBEHXZ @ 101 NONAME ; int CMusEngLiveSession::MinBrightnessL(void) const
+	??1CSIPProfile@@UAE@XZ @ 102 NONAME ; CSIPProfile::~CSIPProfile(void)
+	?NewL@CMusEngLiveSession@@SAPAV1@ABVTRect@@AAVMMusEngSessionObserver@@AAVMMusEngOutSessionObserver@@AAVMMusEngLiveSessionObserver@@I@Z @ 103 NONAME ; class CMusEngLiveSession * CMusEngLiveSession::NewL(class TRect const &, class MMusEngSessionObserver &, class MMusEngOutSessionObserver &, class MMusEngLiveSessionObserver &, unsigned int)
+	?UnmuteL@CMusEngMceSession@@UAEXXZ @ 104 NONAME ; void CMusEngMceSession::UnmuteL(void)
+	?Connect@DRMCommon@@QAEHXZ @ 105 NONAME ; int DRMCommon::Connect(void)
+	?NewL@CMceCameraSource@@SAPAV1@AAVCMceManager@@@Z @ 106 NONAME ; class CMceCameraSource * CMceCameraSource::NewL(class CMceManager &)
+	?MinZoomL@CMusEngLiveSession@@QBEHXZ @ 107 NONAME ; int CMusEngLiveSession::MinZoomL(void) const
+	?Set@CRepository@@QAEHKABVTDesC16@@@Z @ 108 NONAME ; int CRepository::Set(unsigned long, class TDesC16 const &)
+	?VolumeDownL@CMusEngSession@@UAEXXZ @ 109 NONAME ; void CMusEngSession::VolumeDownL(void)
+	?ExposureL@CMceCameraSource@@QAE?AW4TExposure@CCamera@@XZ @ 110 NONAME ; enum CCamera::TExposure CMceCameraSource::ExposureL(void)
+	?MuteL@CMusEngMceSession@@UAEXXZ @ 111 NONAME ; void CMusEngMceSession::MuteL(void)
+	?NewLC@CCenRepNotifyHandler@@SAPAV1@AAVMCenRepNotifyHandlerCallback@@AAVCRepository@@@Z @ 112 NONAME ; class CCenRepNotifyHandler * CCenRepNotifyHandler::NewLC(class MCenRepNotifyHandlerCallback &, class CRepository &)
+	?SetVolumeL@CMusEngSession@@UAEXH@Z @ 113 NONAME ; void CMusEngSession::SetVolumeL(int)
+	?DecreaseBrightnessL@CMusEngLiveSession@@QAEXXZ @ 114 NONAME ; void CMusEngLiveSession::DecreaseBrightnessL(void)
+	?LastRegistrationError@CSIPProfileRegistryBase@@QBEHABVCSIPProfile@@@Z @ 115 NONAME ; int CSIPProfileRegistryBase::LastRegistrationError(class CSIPProfile const &) const
+	?SetCameraIndexL@CMceCameraSource@@QAEXH@Z @ 116 NONAME ; void CMceCameraSource::SetCameraIndexL(int)
+	?PauseL@CMusEngClipSession@@UAEXXZ @ 117 NONAME ; void CMusEngClipSession::PauseL(void)
+	?Connection@CSIP@@QBEPAVCSIPConnection@@K@Z @ 118 NONAME ; class CSIPConnection * CSIP::Connection(unsigned long) const
+	?SetRectL@CMusEngSession@@QAEXABVTRect@@@Z @ 119 NONAME ; void CMusEngSession::SetRectL(class TRect const &)
+	?Create@CRepository@@QAEHKABVTDesC8@@@Z @ 120 NONAME ; int CRepository::Create(unsigned long, class TDesC8 const &)
+	?RefreshIapAvailabilityL@CSipProfileAlrController@@QAEXK@Z @ 121 NONAME ; void CSipProfileAlrController::RefreshIapAvailabilityL(unsigned long)
+	?DefaultProfileL@CSIPProfileRegistryBase@@QAEPAVCSIPProfile@@XZ @ 122 NONAME ; class CSIPProfile * CSIPProfileRegistryBase::DefaultProfileL(void)
+	?BrightnessAutoL@CMusEngLiveSession@@QAEXXZ @ 123 NONAME ; void CMusEngLiveSession::BrightnessAutoL(void)
+	?IncreaseBrightnessL@CMusEngLiveSession@@QAEXXZ @ 124 NONAME ; void CMusEngLiveSession::IncreaseBrightnessL(void)
+	?ProfilesL@CSIPProfileRegistryBase@@QAEXABVTDesC8@@AAV?$RPointerArray@VCSIPProfile@@@@@Z @ 125 NONAME ; void CSIPProfileRegistryBase::ProfilesL(class TDesC8 const &, class RPointerArray<class CSIPProfile> &)
+	??1CSIPProfileRegistry@@UAE@XZ @ 126 NONAME ; CSIPProfileRegistry::~CSIPProfileRegistry(void)
+	?SetOrientationL@CMusEngMceSession@@QAEXW4TDisplayOrientation@1@@Z @ 127 NONAME ; void CMusEngMceSession::SetOrientationL(enum CMusEngMceSession::TDisplayOrientation)
+	?Get@CRepository@@QAEHKAAVTDes8@@@Z @ 128 NONAME ; int CRepository::Get(unsigned long, class TDes8 &)
+	?ConstructL@DRMCommon@@IAEXXZ @ 129 NONAME ; void DRMCommon::ConstructL(void)
+	?ContrastL@CMceCameraSource@@QAEHXZ @ 130 NONAME ; int CMceCameraSource::ContrastL(void)
+	?NegotiatedSecurityMechanismL@CSIP@@QAEPAVHBufC8@@ABVTDesC8@@@Z @ 131 NONAME ; class HBufC8 * CSIP::NegotiatedSecurityMechanismL(class TDesC8 const &)
+	?ZoomInL@CMusEngLiveSession@@QAEXXZ @ 132 NONAME ; void CMusEngLiveSession::ZoomInL(void)
+	?NewL@CSipProfileAlrController@@SAPAV1@AAVCSIPProfileRegistryBase@@AAVMSipProfileAlrObserver@@@Z @ 133 NONAME ; class CSipProfileAlrController * CSipProfileAlrController::NewL(class CSIPProfileRegistryBase &, class MSipProfileAlrObserver &)
+	?SetVolumeL@CMusEngMceSession@@UAEXH@Z @ 134 NONAME ; void CMusEngMceSession::SetVolumeL(int)
+	?Stop@CActiveScheduler@@SAXXZ @ 135 NONAME ; void CActiveScheduler::Stop(void)
+	?IsDisplayEnabledL@CMusEngMceSession@@QAEHXZ @ 136 NONAME ; int CMusEngMceSession::IsDisplayEnabledL(void)
+	?TranscodeL@CMusEngClipSession@@QAEXABV?$TBuf@$0BAA@@@@Z @ 137 NONAME ; void CMusEngClipSession::TranscodeL(class TBuf<256> const &)
+	?MaxZoomL@CMusEngLiveSession@@QBEHXZ @ 138 NONAME ; int CMusEngLiveSession::MaxZoomL(void) const
+	?IsSigCompSupportedL@CSIP@@QBEHXZ @ 139 NONAME ; int CSIP::IsSigCompSupportedL(void) const
+	?NewLC@CSIP@@SAPAV1@ABVTUid@@AAVMSIPObserver@@@Z @ 140 NONAME ; class CSIP * CSIP::NewLC(class TUid const &, class MSIPObserver &)
+	?VolumeDownL@CMusEngMceSession@@UAEXXZ @ 141 NONAME ; void CMusEngMceSession::VolumeDownL(void)
+	?AllowMigrationL@CSipProfileAlrController@@QAEXKK@Z @ 142 NONAME ; void CSipProfileAlrController::AllowMigrationL(unsigned long, unsigned long)
+	?PositionL@CMusEngClipSession@@QAE?AVTTimeIntervalSeconds@@XZ @ 143 NONAME ; class TTimeIntervalSeconds CMusEngClipSession::PositionL(void)
+	?SetContrastL@CMceCameraSource@@QAEXH@Z @ 144 NONAME ; void CMceCameraSource::SetContrastL(int)
+	?WhiteBalanceL@CMceCameraSource@@QAE?AW4TWhiteBalance@CCamera@@XZ @ 145 NONAME ; enum CCamera::TWhiteBalance CMceCameraSource::WhiteBalanceL(void)
+	??1DRMCommon@@UAE@XZ @ 146 NONAME ; DRMCommon::~DRMCommon(void)
+	?MuteMicL@CMusEngSession@@QAEXH@Z @ 147 NONAME ; void CMusEngSession::MuteMicL(int)
+	?NewL@CMusEngLiveSession@@SAPAV1@ABVTDesC16@@ABVTRect@@AAVMMusEngSessionObserver@@AAVMMusEngOutSessionObserver@@AAVMMusEngLiveSessionObserver@@I@Z @ 148 NONAME ; class CMusEngLiveSession * CMusEngLiveSession::NewL(class TDesC16 const &, class TRect const &, class MMusEngSessionObserver &, class MMusEngOutSessionObserver &, class MMusEngLiveSessionObserver &, unsigned int)
+	?HandleNotifyGeneric@MCenRepNotifyHandlerCallback@@UAEXK@Z @ 149 NONAME ; void MCenRepNotifyHandlerCallback::HandleNotifyGeneric(unsigned long)
+	?EnableDisplayL@CMusEngMceSession@@UAEXH@Z @ 150 NONAME ; void CMusEngMceSession::EnableDisplayL(int)
+	??0DRMCommon@@IAE@XZ @ 151 NONAME ; DRMCommon::DRMCommon(void)
+	?CurrentBrightnessL@CMusEngLiveSession@@QBEHXZ @ 152 NONAME ; int CMusEngLiveSession::CurrentBrightnessL(void) const
+	?SupportedProfileTypesL@CSIPProfileRegistryBase@@QAEXAAV?$RArray@VTSIPProfileTypeInfo@@@@@Z @ 153 NONAME ; void CSIPProfileRegistryBase::SupportedProfileTypesL(class RArray<class TSIPProfileTypeInfo> &)
+	?Start@CActiveScheduler@@SAXXZ @ 154 NONAME ; void CActiveScheduler::Start(void)
+	?SetBrightnessL@CMceCameraSource@@QAEXH@Z @ 155 NONAME ; void CMceCameraSource::SetBrightnessL(int)
+	?SetDigitalZoomFactorL@CMceCameraSource@@QAEXH@Z @ 156 NONAME ; void CMceCameraSource::SetDigitalZoomFactorL(int)
+	?IsPlayingL@CMusEngLiveSession@@UAEHXZ @ 157 NONAME ; int CMusEngLiveSession::IsPlayingL(void)
+	?IsEnabled@CMceMediaSource@@QBEHXZ @ 158 NONAME ; int CMceMediaSource::IsEnabled(void) const
+	?PlayL@CMusEngLiveSession@@UAEXXZ @ 159 NONAME ; void CMusEngLiveSession::PlayL(void)
+	?SetPositionL@CMusEngClipSession@@QAEXABVTTimeIntervalSeconds@@@Z @ 160 NONAME ; void CMusEngClipSession::SetPositionL(class TTimeIntervalSeconds const &)
 
--- a/mmsharing/mmshengine/tsrc/ut_engine/eabi/ut_musengineu.def	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/eabi/ut_musengineu.def	Wed Sep 01 12:31:01 2010 +0100
@@ -1,2 +1,224 @@
 EXPORTS
 	_Z16CreateTestSuiteLv @ 1 NONAME
+	_ZN11CRepository16StartTransactionENS_16TTransactionModeE @ 2 NONAME
+	_ZN11CRepository17CommitTransactionERm @ 3 NONAME
+	_ZN11CRepository3GetEmR5TDes8 @ 4 NONAME
+	_ZN11CRepository3GetEmR6TDes16 @ 5 NONAME
+	_ZN11CRepository3GetEmRi @ 6 NONAME
+	_ZN11CRepository3SetEmRK6TDesC8 @ 7 NONAME
+	_ZN11CRepository3SetEmRK7TDesC16 @ 8 NONAME
+	_ZN11CRepository3SetEmi @ 9 NONAME
+	_ZN11CRepository4NewLE4TUid @ 10 NONAME
+	_ZN11CRepository5FindLEmmR6RArrayImE @ 11 NONAME
+	_ZN11CRepository5NewLCE4TUid @ 12 NONAME
+	_ZN11CRepository6CreateEmRK6TDesC8 @ 13 NONAME
+	_ZN11CRepository6CreateEmi @ 14 NONAME
+	_ZN11CRepository6DeleteEmmRm @ 15 NONAME
+	_ZN11CRepository7FindEqLEmmRK6TDesC8R6RArrayImE @ 16 NONAME
+	_ZN11CRepositoryD0Ev @ 17 NONAME
+	_ZN11CRepositoryD1Ev @ 18 NONAME
+	_ZN11CRepositoryD2Ev @ 19 NONAME
+	_ZN11CSIPProfileD0Ev @ 20 NONAME
+	_ZN11CSIPProfileD1Ev @ 21 NONAME
+	_ZN11CSIPProfileD2Ev @ 22 NONAME
+	_ZN14CMusEngSession10SetVolumeLEi @ 23 NONAME
+	_ZN14CMusEngSession11IsMicMutedLEv @ 24 NONAME
+	_ZN14CMusEngSession11VolumeDownLEv @ 25 NONAME
+	_ZN14CMusEngSession18EnableLoudspeakerLEii @ 26 NONAME
+	_ZN14CMusEngSession23SetAudioRoutingObserverEP27MMusEngAudioRoutingObserver @ 27 NONAME
+	_ZN14CMusEngSession23SetVolumeChangeObserverEP27MMusEngVolumeChangeObserver @ 28 NONAME
+	_ZN14CMusEngSession8MuteMicLEi @ 29 NONAME
+	_ZN14CMusEngSession8SetRectLERK5TRect @ 30 NONAME
+	_ZN14CMusEngSession9VolumeUpLEv @ 31 NONAME
+	_ZN15CMceMediaSourceD0Ev @ 32 NONAME
+	_ZN15CMceMediaSourceD1Ev @ 33 NONAME
+	_ZN15CMceMediaSourceD2Ev @ 34 NONAME
+	_ZN16CMceCameraSource11BrightnessLEv @ 35 NONAME
+	_ZN16CMceCameraSource11ZoomFactorLEv @ 36 NONAME
+	_ZN16CMceCameraSource12SetContrastLEi @ 37 NONAME
+	_ZN16CMceCameraSource12SetExposureLEN7CCamera9TExposureE @ 38 NONAME
+	_ZN16CMceCameraSource13WhiteBalanceLEv @ 39 NONAME
+	_ZN16CMceCameraSource14SetBrightnessLEi @ 40 NONAME
+	_ZN16CMceCameraSource14SetZoomFactorLEi @ 41 NONAME
+	_ZN16CMceCameraSource15SetCameraIndexLEi @ 42 NONAME
+	_ZN16CMceCameraSource16SetWhiteBalanceLEN7CCamera13TWhiteBalanceE @ 43 NONAME
+	_ZN16CMceCameraSource18DigitalZoomFactorLEv @ 44 NONAME
+	_ZN16CMceCameraSource21SetDigitalZoomFactorLEi @ 45 NONAME
+	_ZN16CMceCameraSource4NewLER11CMceManager @ 46 NONAME
+	_ZN16CMceCameraSource5NewLCER11CMceManager @ 47 NONAME
+	_ZN16CMceCameraSource7EnableLEv @ 48 NONAME
+	_ZN16CMceCameraSource8DisableLEv @ 49 NONAME
+	_ZN16CMceCameraSource9ContrastLEv @ 50 NONAME
+	_ZN16CMceCameraSource9ExposureLEv @ 51 NONAME
+	_ZN16CMceCameraSourceD0Ev @ 52 NONAME
+	_ZN16CMceCameraSourceD1Ev @ 53 NONAME
+	_ZN16CMceCameraSourceD2Ev @ 54 NONAME
+	_ZN16TMusEngUriParser7UriTypeEv @ 55 NONAME
+	_ZN16TMusEngUriParser8GetUri8LEv @ 56 NONAME
+	_ZN16TMusEngUriParser9GetUri16LEi @ 57 NONAME
+	_ZN16TMusEngUriParser9ParseUriLEv @ 58 NONAME
+	_ZN16TMusEngUriParserC1ERK7TDesC16 @ 59 NONAME
+	_ZN16TMusEngUriParserC2ERK7TDesC16 @ 60 NONAME
+	_ZN17CMusEngMceSession10SetVolumeLEi @ 61 NONAME
+	_ZN17CMusEngMceSession10TerminateLEv @ 62 NONAME
+	_ZN17CMusEngMceSession11VolumeDownLEv @ 63 NONAME
+	_ZN17CMusEngMceSession12OrientationLEv @ 64 NONAME
+	_ZN17CMusEngMceSession14ContainsAudioLEv @ 65 NONAME
+	_ZN17CMusEngMceSession14EnableDisplayLEi @ 66 NONAME
+	_ZN17CMusEngMceSession15SetOrientationLENS_19TDisplayOrientationE @ 67 NONAME
+	_ZN17CMusEngMceSession17IsDisplayEnabledLEv @ 68 NONAME
+	_ZN17CMusEngMceSession5MuteLEv @ 69 NONAME
+	_ZN17CMusEngMceSession7UnmuteLEv @ 70 NONAME
+	_ZN17CMusEngMceSession8IsMutedLEv @ 71 NONAME
+	_ZN17CMusEngMceSession9VolumeUpLEv @ 72 NONAME
+	_ZN18CMusEngClipSession10IsPlayingLEv @ 73 NONAME
+	_ZN18CMusEngClipSession10TranscodeLERK4TBufILi256EE @ 74 NONAME
+	_ZN18CMusEngClipSession11FastRewindLEi @ 75 NONAME
+	_ZN18CMusEngClipSession12FastForwardLEi @ 76 NONAME
+	_ZN18CMusEngClipSession12SetPositionLERK20TTimeIntervalSeconds @ 77 NONAME
+	_ZN18CMusEngClipSession16CancelTranscodeLEv @ 78 NONAME
+	_ZN18CMusEngClipSession4NewLERK5TRectR22MMusEngSessionObserverR25MMusEngOutSessionObserverR26MMusEngClipSessionObserverj @ 79 NONAME
+	_ZN18CMusEngClipSession5PlayLEv @ 80 NONAME
+	_ZN18CMusEngClipSession6PauseLEv @ 81 NONAME
+	_ZN18CMusEngClipSession8SetClipLERK7TDesC16 @ 82 NONAME
+	_ZN18CMusEngClipSession9DurationLEv @ 83 NONAME
+	_ZN18CMusEngClipSession9PositionLEv @ 84 NONAME
+	_ZN18CMusEngLiveSession10IsPlayingLEv @ 85 NONAME
+	_ZN18CMusEngLiveSession11IsRecordingEv @ 86 NONAME
+	_ZN18CMusEngLiveSession12ZoomDefaultLEv @ 87 NONAME
+	_ZN18CMusEngLiveSession15BrightnessAutoLEv @ 88 NONAME
+	_ZN18CMusEngLiveSession18BrightnessDefaultLEv @ 89 NONAME
+	_ZN18CMusEngLiveSession19DecreaseBrightnessLEv @ 90 NONAME
+	_ZN18CMusEngLiveSession19IncreaseBrightnessLEv @ 91 NONAME
+	_ZN18CMusEngLiveSession4NewLERK5TRectR22MMusEngSessionObserverR25MMusEngOutSessionObserverR26MMusEngLiveSessionObserverj @ 92 NONAME
+	_ZN18CMusEngLiveSession4NewLERK7TDesC16RK5TRectR22MMusEngSessionObserverR25MMusEngOutSessionObserverR26MMusEngLiveSessionObserverj @ 93 NONAME
+	_ZN18CMusEngLiveSession5PlayLEv @ 94 NONAME
+	_ZN18CMusEngLiveSession6PauseLEv @ 95 NONAME
+	_ZN18CMusEngLiveSession7RecordLEi @ 96 NONAME
+	_ZN18CMusEngLiveSession7ZoomInLEv @ 97 NONAME
+	_ZN18CMusEngLiveSession8SetZoomLEi @ 98 NONAME
+	_ZN18CMusEngLiveSession8ZoomOutLEv @ 99 NONAME
+	_ZN19CSIPProfileRegistry4NewLER4CSIPR27MSIPProfileRegistryObserver @ 100 NONAME
+	_ZN19CSIPProfileRegistry5NewLCER4CSIPR27MSIPProfileRegistryObserver @ 101 NONAME
+	_ZN19CSIPProfileRegistry7DisableER11CSIPProfile @ 102 NONAME
+	_ZN19CSIPProfileRegistry7EnableLER11CSIPProfileR22MSIPConnectionObserver @ 103 NONAME
+	_ZN19CSIPProfileRegistryD0Ev @ 104 NONAME
+	_ZN19CSIPProfileRegistryD1Ev @ 105 NONAME
+	_ZN19CSIPProfileRegistryD2Ev @ 106 NONAME
+	_ZN20CCenRepNotifyHandler13StopListeningEv @ 107 NONAME
+	_ZN20CCenRepNotifyHandler15StartListeningLEv @ 108 NONAME
+	_ZN20CCenRepNotifyHandler4NewLER28MCenRepNotifyHandlerCallbackR11CRepository @ 109 NONAME
+	_ZN20CCenRepNotifyHandler5NewLCER28MCenRepNotifyHandlerCallbackR11CRepository @ 110 NONAME
+	_ZN20CCenRepNotifyHandlerD0Ev @ 111 NONAME
+	_ZN20CCenRepNotifyHandlerD1Ev @ 112 NONAME
+	_ZN20CCenRepNotifyHandlerD2Ev @ 113 NONAME
+	_ZN20CMusEngMceOutSession13CancelInviteLEv @ 114 NONAME
+	_ZN20CMusEngMceOutSession27SetSupportedVideoCodecListLERK7TDesC16 @ 115 NONAME
+	_ZN20CMusEngMceOutSession7InviteLERK7TDesC16 @ 116 NONAME
+	_ZN21CMusEngReceiveSession17AcceptInvitationLERKi @ 117 NONAME
+	_ZN21CMusEngReceiveSession4NewLERK5TRectR22MMusEngSessionObserverR29MMusEngReceiveSessionObserver @ 118 NONAME
+	_ZN23CSIPProfileRegistryBase15DefaultProfileLEv @ 119 NONAME
+	_ZN23CSIPProfileRegistryBase22SupportedProfileTypesLER6RArrayI19TSIPProfileTypeInfoE @ 120 NONAME
+	_ZN23CSIPProfileRegistryBase8ProfileLEm @ 121 NONAME
+	_ZN23CSIPProfileRegistryBase9ProfilesLER13RPointerArrayI11CSIPProfileE @ 122 NONAME
+	_ZN23CSIPProfileRegistryBase9ProfilesLERK19TSIPProfileTypeInfoR13RPointerArrayI11CSIPProfileE @ 123 NONAME
+	_ZN23CSIPProfileRegistryBase9ProfilesLERK6TDesC8R13RPointerArrayI11CSIPProfileE @ 124 NONAME
+	_ZN23CSIPProfileRegistryBaseD0Ev @ 125 NONAME
+	_ZN23CSIPProfileRegistryBaseD1Ev @ 126 NONAME
+	_ZN23CSIPProfileRegistryBaseD2Ev @ 127 NONAME
+	_ZN28MCenRepNotifyHandlerCallback19HandleNotifyGenericEm @ 128 NONAME
+	_ZN4CSIP28NegotiatedSecurityMechanismLERK6TDesC8 @ 129 NONAME
+	_ZN4CSIP4NewLERK4TUidR12MSIPObserver @ 130 NONAME
+	_ZN4CSIP5NewLCERK4TUidR12MSIPObserver @ 131 NONAME
+	_ZN4CSIPD0Ev @ 132 NONAME
+	_ZN4CSIPD1Ev @ 133 NONAME
+	_ZN4CSIPD2Ev @ 134 NONAME
+	_ZN9DRMCommon10ConstructLEv @ 135 NONAME
+	_ZN9DRMCommon10DisconnectEv @ 136 NONAME
+	_ZN9DRMCommon15IsProtectedFileERK7TDesC16Ri @ 137 NONAME
+	_ZN9DRMCommon4NewLEv @ 138 NONAME
+	_ZN9DRMCommon7ConnectEv @ 139 NONAME
+	_ZN9DRMCommonC1Ev @ 140 NONAME
+	_ZN9DRMCommonC2Ev @ 141 NONAME
+	_ZN9DRMCommonD0Ev @ 142 NONAME
+	_ZN9DRMCommonD1Ev @ 143 NONAME
+	_ZN9DRMCommonD2Ev @ 144 NONAME
+	_ZNK11CSIPProfile12GetParameterEmRPK11MDesC8Array @ 145 NONAME
+	_ZNK11CSIPProfile12GetParameterEmRPK6TDesC8 @ 146 NONAME
+	_ZNK11CSIPProfile12GetParameterEmRi @ 147 NONAME
+	_ZNK11CSIPProfile12GetParameterEmRm @ 148 NONAME
+	_ZNK11CSIPProfile4TypeEv @ 149 NONAME
+	_ZNK14CMusEngSession20IsLoudSpeakerEnabledEv @ 150 NONAME
+	_ZNK14CMusEngSession21IsAudioRoutingHeadsetEv @ 151 NONAME
+	_ZNK14CMusEngSession24AudioRoutingCanBeChangedEv @ 152 NONAME
+	_ZNK14CMusEngSession25IsAudioRoutingLoudSpeakerEv @ 153 NONAME
+	_ZNK14CMusEngSession4RectEv @ 154 NONAME
+	_ZNK14CMusEngSession7VolumeLEv @ 155 NONAME
+	_ZNK15CMceMediaSource4TypeEv @ 156 NONAME
+	_ZNK15CMceMediaSource9IsEnabledEv @ 157 NONAME
+	_ZNK16CMceCameraSource13GetCameraInfoER11TCameraInfo @ 158 NONAME
+	_ZNK16CMceCameraSource16CamerasAvailableEv @ 159 NONAME
+	_ZNK17CMusEngMceSession14GetSessionTimeEv @ 160 NONAME
+	_ZNK17CMusEngMceSession16ConnectionActiveEv @ 161 NONAME
+	_ZNK18CMusEngLiveSession12CurrentZoomLEv @ 162 NONAME
+	_ZNK18CMusEngLiveSession14MaxBrightnessLEv @ 163 NONAME
+	_ZNK18CMusEngLiveSession14MinBrightnessLEv @ 164 NONAME
+	_ZNK18CMusEngLiveSession14SetBrightnessLEi @ 165 NONAME
+	_ZNK18CMusEngLiveSession18CurrentBrightnessLEv @ 166 NONAME
+	_ZNK18CMusEngLiveSession8MaxZoomLEv @ 167 NONAME
+	_ZNK18CMusEngLiveSession8MinZoomLEv @ 168 NONAME
+	_ZNK19CSIPProfileRegistry3SIPEv @ 169 NONAME
+	_ZNK19CSIPProfileRegistry9IsEnabledERK11CSIPProfile @ 170 NONAME
+	_ZNK23CSIPProfileRegistryBase21LastRegistrationErrorERK11CSIPProfile @ 171 NONAME
+	_ZNK4CSIP10ConnectionEm @ 172 NONAME
+	_ZNK4CSIP19IsSigCompSupportedLEv @ 173 NONAME
+	_ZNK4CSIP28SupportedSecurityMechanismsLEv @ 174 NONAME
+	_ZTI11CRepository @ 175 NONAME
+	_ZTI11CSIPProfile @ 176 NONAME
+	_ZTI14CMusEngSession @ 177 NONAME
+	_ZTI15CMceMediaSource @ 178 NONAME
+	_ZTI16CMceCameraSource @ 179 NONAME
+	_ZTI17CMusEngMceSession @ 180 NONAME
+	_ZTI18CMusEngClipSession @ 181 NONAME
+	_ZTI18CMusEngLiveSession @ 182 NONAME
+	_ZTI19CMusEngObserverStub @ 183 NONAME
+	_ZTI19CSIPProfileRegistry @ 184 NONAME
+	_ZTI20CCenRepNotifyHandler @ 185 NONAME
+	_ZTI20CMusEngMceOutSession @ 186 NONAME
+	_ZTI21CMusEngReceiveSession @ 187 NONAME
+	_ZTI21CMusEngTelephoneUtils @ 188 NONAME
+	_ZTI21CMusSipProfileHandler @ 189 NONAME
+	_ZTI22CSIPProfileBehaviorTls @ 190 NONAME
+	_ZTI22CTelephonyAudioRouting @ 191 NONAME
+	_ZTI23CSIPProfileRegistryBase @ 192 NONAME
+	_ZTI24CSipProfileAlrController @ 193 NONAME
+	_ZTI27CMusEngSessionDurationTimer @ 194 NONAME
+	_ZTI28MCenRepNotifyHandlerCallback @ 195 NONAME
+	_ZTI4CSIP @ 196 NONAME
+	_ZTI9DRMCommon @ 197 NONAME
+	_ZTV11CRepository @ 198 NONAME
+	_ZTV11CSIPProfile @ 199 NONAME
+	_ZTV14CMusEngSession @ 200 NONAME
+	_ZTV15CMceMediaSource @ 201 NONAME
+	_ZTV16CMceCameraSource @ 202 NONAME
+	_ZTV17CMusEngMceSession @ 203 NONAME
+	_ZTV18CMusEngClipSession @ 204 NONAME
+	_ZTV18CMusEngLiveSession @ 205 NONAME
+	_ZTV19CMusEngObserverStub @ 206 NONAME
+	_ZTV19CSIPProfileRegistry @ 207 NONAME
+	_ZTV20CCenRepNotifyHandler @ 208 NONAME
+	_ZTV20CMusEngMceOutSession @ 209 NONAME
+	_ZTV21CMusEngReceiveSession @ 210 NONAME
+	_ZTV21CMusEngTelephoneUtils @ 211 NONAME
+	_ZTV21CMusSipProfileHandler @ 212 NONAME
+	_ZTV22CSIPProfileBehaviorTls @ 213 NONAME
+	_ZTV22CTelephonyAudioRouting @ 214 NONAME
+	_ZTV23CSIPProfileRegistryBase @ 215 NONAME
+	_ZTV24CSipProfileAlrController @ 216 NONAME
+	_ZTV27CMusEngSessionDurationTimer @ 217 NONAME
+	_ZTV28MCenRepNotifyHandlerCallback @ 218 NONAME
+	_ZTV4CSIP @ 219 NONAME
+	_ZTV9DRMCommon @ 220 NONAME
+	_ZThn4_N11CSIPProfileD0Ev @ 221 NONAME
+	_ZThn4_N11CSIPProfileD1Ev @ 222 NONAME
+
--- a/mmsharing/mmshengine/tsrc/ut_engine/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -15,6 +15,7 @@
 *
 */
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
+
 ../../../../../tsrc/mceclientstub/group/mceclientstub.mmp
 ut_musengine.mmp
--- a/mmsharing/mmshengine/tsrc/ut_engine/group/ut_musengine.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/group/ut_musengine.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -27,7 +27,6 @@
 CAPABILITY              EUNIT_CAPS
 VENDORID                VID_DEFAULT
 
-
 MACRO                   UNIT_TESTING
 EPOCSTACKSIZE		0x14000
 EPOCHEAPSIZE		0x020000 0x800000
@@ -51,6 +50,7 @@
 
 SOURCEPATH              ../../../../../tsrc/centralrepositorystub/src
 SOURCE                  centralrepositorystub.cpp
+SOURCE                  cenrepnotifyhandlerstub.cpp
 
 SOURCEPATH              ../../../../../tsrc/drmstub/src
 SOURCE                  drmcommonstub.cpp
@@ -59,57 +59,37 @@
 SOURCE                  mcecamerasource.cpp
 SOURCE                  mcemediasource.cpp
 
-SOURCEPATH              ../../../../../tsrc/propertystub/src
-SOURCE		            e32property.cpp
 
-SOURCEPATH              ../../../../../tsrc/contactenginestub/src
-SOURCE		            contactenginestub.cpp
 
 // Test classes
 SOURCEPATH              ../src
-SOURCE                  ut_musengsessionmanager.cpp
+SOURCE                  ut_musengsession.cpp
 SOURCE                  ut_musengmcesession.cpp
 SOURCE                  ut_musengoutsession.cpp
 SOURCE                  ut_musenglivesession.cpp
 SOURCE                  ut_musengclipsession.cpp
 SOURCE                  ut_musengreceivesession.cpp
-SOURCE                  ut_musengtwowaysession.cpp
-SOURCE                  ut_musengtwowayrecvsession.cpp
-SOURCE                  ut_musengcamerahandler.cpp
 SOURCE                  ut_musengsipprofilehandler.cpp
 SOURCE                  ut_musengmceutils.cpp
 SOURCE                  ut_musengtelephoneutils.cpp
 SOURCE                  ut_musengsessiondurationtimer.cpp
 SOURCE                  ut_musenguriparser.cpp
-SOURCE                  ut_musenglivevideoplayer.cpp
-SOURCE                  ut_musengremotevideoplayer.cpp
-SOURCE                  ut_musengclipvideoplayer.cpp
-SOURCE                  ut_muspropertywatch.cpp
+SOURCE                  ut_musengorientationhandler.cpp
 
 // Tested classes
 SOURCEPATH              ../../../src
-SOURCE                  musengsessionmanager.cpp
+SOURCE                  musengsession.cpp
 SOURCE                  musengmcesession.cpp
 SOURCE                  musengmceoutsession.cpp
 SOURCE                  musenglivesession.cpp
 SOURCE                  musengclipsession.cpp
 SOURCE                  musengreceivesession.cpp
-SOURCE                  musengtwowaysession.cpp
-SOURCE                  musengtwowayrecvsession.cpp
 SOURCE                  mussipprofilehandler.cpp
 SOURCE                  musengtelephoneutils.cpp
 SOURCE                  musengsessiondurationtimer.cpp
 SOURCE                  musengmceutils.cpp
 SOURCE                  musenguriparser.cpp
-SOURCE                  musengcamerahandler.cpp
-SOURCE                  musengvideoplayerbase.cpp
-SOURCE                  musenglocalvideoplayer.cpp
-SOURCE                  musenglivevideoplayer.cpp
-SOURCE                  musengremotevideoplayer.cpp
-SOURCE                  musengclipvideoplayer.cpp
-
-SOURCEPATH              ../../../../mmshshared/src
-SOURCE                  muspropertywatch.cpp
+SOURCE                  musengorientationhandler.cpp
 
 // Includes
 
@@ -118,13 +98,13 @@
 USERINCLUDE             ../../../../mmshshared/inc
 USERINCLUDE             ../../../../inc
 USERINCLUDE             ../../../../../inc
-USERINCLUDE           	../../../../../tsrc/sipprofilestub/inc  
+USERINCLUDE             ../../../../../tsrc/sipprofilestub/inc
 USERINCLUDE             ../../../../../tsrc/centralrepositorystub/inc
-USERINCLUDE             ../../../../../tsrc/propertystub/inc
 USERINCLUDE             ../../../../../tsrc/telephonyaudioroutingstub/inc
 
 // to replace SIP profiles with a stub
 SYSTEMINCLUDE           ../inc
+// to replace profile with a stub
 SYSTEMINCLUDE           ../../../../../tsrc/sipprofilestub/inc 
 // to replace cenrep with a stub
 SYSTEMINCLUDE           ../../../../../tsrc/centralrepositorystub/inc 
@@ -134,15 +114,12 @@
 SYSTEMINCLUDE           ../../../../../tsrc/telephonyaudioroutingstub/inc 
 // to replace DRMCommon with a stub
 SYSTEMINCLUDE           ../../../../../tsrc/drmstub/inc
-// to replace RProperty with a stub
-SYSTEMINCLUDE           ../../../../../tsrc/propertystub/inc
-// to replace certain parts of contact engine with a stub
-SYSTEMINCLUDE			../../../../../tsrc/contactenginestub/inc
 
+#if defined ( APP_LAYER_SYSTEMINCLUDE )
 APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE           /epoc32/include/ecom
-SYSTEMINCLUDE           /epoc32/include/platform/digia/EUnit
-
+#else
+SYSTEMINCLUDE     /epoc32/include
+#endif
 
 LIBRARY     euser.lib
 LIBRARY     bafl.lib
@@ -151,12 +128,9 @@
 LIBRARY     charconv.lib
 LIBRARY     inetprotutil.lib
 LIBRARY     sipcodec.lib
-
+LIBRARY     efsrv.lib
 LIBRARY 	mceclientstub.lib  
 
-LIBRARY     cntmodel.lib
-LIBRARY		estor.lib
-
 DEBUGLIBRARY		flogger.lib
 
 //EXPORTUNFROZEN
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/tsrc/ut_engine/group/ut_musengine.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,34 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHEng"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_musengine.dll"-"c:\sys\bin\ut_musengine.dll"
+"\epoc32\release\armv5\urel\mceclientstub.dll"-"c:\sys\bin\mceclientstub.dll"
+
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/musengstubs.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/musengstubs.h	Wed Sep 01 12:31:01 2010 +0100
@@ -20,18 +20,17 @@
 #ifndef UT_MUSSTUBS_H
 #define UT_MUSSTUBS_H
 
+
+#include "musengsessionobserver.h"
+#include "musengoutsessionobserver.h"
+#include "musenglivesessionobserver.h"
+#include "musengclipsessionobserver.h"
+#include "musengreceivesessionobserver.h"
 #include "musengsessiondurationtimerobserver.h"
 #include "musengaudioroutingobserver.h"
-#include "musengdisplayhandler.h"
-#include "mussipprofileuser.h"
-#include "muspropertyobserver.h"
+#include "musengvolumechangeobserver.h"
 
-#include <lcsessionobserver.h>
-#include <lcuiprovider.h>
-#include <lcwindow.h>
-#include <lcaudiocontrol.h>
 #include <e32base.h>
-#include <ecom.h>
 
 // DUMMY CLASSES
 
@@ -68,26 +67,91 @@
 */        
 class CMusEngObserverStub : public CBase, 
                             public MMusEngSessionDurationTimerObserver,
+                            public MMusEngSessionObserver,
+                            public MMusEngOutSessionObserver,
+                            public MMusEngLiveSessionObserver,
+                            public MMusEngClipSessionObserver,
+                            public MMusEngReceiveSessionObserver,
                             public MMusEngAudioRoutingObserver,
-                            public MMusSipProfileUser
+                            public MMusEngVolumeChangeObserver
     {
-    public: // Constructors and destructor
+    
+    public:
 
         CMusEngObserverStub();
+            
         ~CMusEngObserverStub();
+        
+        // From MMusEngSessionDurationTimerObserver
+        
+        void UpdateTimerEvent();
+        
+        // From MMusEngSessionObserver
+        
+        void SessionEstablished();
+        void SessionTerminated(); 
+        void SessionConnectionLost();
+        void SessionFailed();
+        void StreamIdle();
+        void StreamStreaming();
+        void SessionTimeChanged( const TTimeIntervalSeconds& aSeconds );
+        void InactivityTimeout();
 
-    public: // From MMusEngSessionDurationTimerObserver
-    
-        void UpdateTimerEvent();        
+
+        // From MMusEngOutSessionObserver
+
+        void SessionRejected();
+    	void SessionBadRequest(); // 400 
+    	void SessionUnauthorized(); // 401 
+    	void SessionPaymentRequired(); // 402
+    	void SessionRecipientNotFound(); // 404 
+    	void SessionProxyAuthenticationRequired(); // 407
+    	void SessionRequestTimeOut(); // 408
+    	void SessionUnsupportedMediaType(); // 415
+    	void SessionBusyHere(); // 486
+    	void SessionRequestCancelled(); // 487 
+    	void SessionTemporarilyNotAvailable(); // 480
+
+        // From MMusEngLiveSessionObserver
         
-    public: // From MMusEngAudioRoutingObserver
+        void DiskFull();
+        void OrientationRefreshEnded();
+        
+        // From MMusEngClipSessionObserver    
+        
+        void EndOfClip(); 
         
-        void AudioRoutingChanged();
+        void TranscodingNeeded(TBool aDueUnknowCapas);
+        
+        void TranscodingProgressed( TInt aPercentage );     
+
+        void TranscodingCompletedInit();
+
+        void TranscodingCompletedFinalize();
+
+        void TranscodingFailed();
         
-    public: // From MMusSipProfileUser    
-            
-        TBool IsRoamingBetweenAPsAllowed();
-        void ProfileRegistered();
+        void RewindFromEndL();
+
+
+        // From MMusEngReceiveSessionObserver    
+        
+        void IncomingSessionPreNotification();
+
+        void IncomingSession( const TDesC& aOriginator, 
+                              const TDesC& aOriginatorIdentity );
+        
+        void StreamBuffering();
+    
+    
+        // From MMusEngAudioRoutingObserver
+        
+        void AudioRoutingChanged( TBool aShowNote );
+        
+        TBool AudioRouteChangeAllowed() const;
+        
+        // From MMusEngVolumeChangeObserver
+        void VolumeChanged( TInt aVolume, TBool aAudioRouteChanged );
         
     public: // Helper
     
@@ -106,238 +170,50 @@
     public: // Data  
         
         TBool iUpdateTimerEventCalled;
-        TBool iAudioRoutingChangedCalled;       
-        TBool iRoamingBetweenAPsAllowed;
-        TBool iProfileRegisteredCalled;
-    };
-
-class TMusEngDisplayHandlerStub : public MMusEngDisplayHandler
-    {
-public:
-    
-    TMusEngDisplayHandlerStub();
-    
-    void Reset();
-    
-public: // From MMusEngDisplayHandler
-    
-    TRect Rect() const;
-
-    void SetRectL( const TRect& aRect );
-            
-    void SetSecondaryRectL( const TRect& aSecondaryRect );
-            
-    TRect SecondaryRect() const;
-            
-    void EnableDisplayL( TBool aEnable );
-            
-    TBool IsDisplayEnabled();
-            
-    TDisplayOrientation OrientationL();
-            
-    void SetOrientationL( TDisplayOrientation aOrientation );
-            
-    TBool IsDisplayActive();
-
-public:
-    
-    TRect iRect;
-    TRect iSecondaryRect;
-    TBool iIsEnabled;
-    TDisplayOrientation iOrientation;
-    TBool iIsActive;
-    };
-
-class CLcSessionObserverStub : public CBase, public MLcSessionObserver
-    {
-    public: // Constructors and destructor
-
-        CLcSessionObserverStub();
-        ~CLcSessionObserverStub();
         
-    public: // From MLcSessionObserver
-        
-        void StateChanged( MLcSession& aSession );
-    
-        void StateChanged( MLcVideoPlayer& aPlayer );
-    
-        void Updated( MLcSession& aSession );
-
-        void Updated( MLcVideoPlayer& aPlayer );
-    
-        void Failed( 
-            MLcSession& aSession,
-            TInt aError );
-    
-        void Failed( 
-            MLcVideoPlayer& aPlayer, 
-            TInt aError );
-    
-        void SessionTimeChanged( 
-            MLcSession& aSession,
-            const TTimeIntervalSeconds& aSeconds );
-
-    public: // New functions
-        
-        void Reset();    
-        TBool IsReseted();
-        
-    public: // Data
-        
-        enum TCalledFunction
-            {
-            EUnknown,
-            ESessionStateChanged,
-            EPlayerStateChanged,
-            ESessionUpdated,
-            EPlayerUpdated,
-            ESessionFailed,
-            EPlayerFailed,
-            ESessionTimeChanged
-            };  
-        
-        TInt iCalledFunction;
-        MLcSession* iCurrentSession;
-        MLcVideoPlayer* iCurrentPlayer;
-        TInt iSessionTime;
-        TInt iError;
-    }; 
-
-
-class CLcUiProviderStub : public CBase, public MLcUiProvider
-    {
-    public: // Constructors and destructor
-
-        CLcUiProviderStub();
-        ~CLcUiProviderStub();
-        
-    public: // From MLcUiProvider
-        
-        TBool SelectRecipient( 
-            MDesCArray& aRecipientAddresses, 
-            TDes& aSelectedRecipientAddress );        
-        
-        TBool InputRecipient( TDes& aRecipientAddress );
-        
-        void HandleForegroundStatus( TBool aForeground );
+        TBool iSessionEstablishedCalled;
+        TBool iSessionTerminatedCalled;
+        TBool iSessionConnectionLostCalled;
+        TBool iSessionFailedCalled;
+        TBool iStreamIdleCalled;
+        TBool iStreamStreamingCalled;
+        TBool iSessionTimeChangedCalled;
+        TBool iInactivityTimeoutCalled;
         
-        void BlockUi( TBool aBlocked );
-        
-    public: // New functions
-        
-        void Reset();
-        
-    public: // Data
-        
-        enum TCalledFunction
-            {
-            EUnknown,
-            ESelectRecipient,
-            EInputRecipient,
-            EHandleForegroundStatus
-            };  
-        
-        TInt iForeground;
-        TInt iCalledFunction;
-        TPtrC iRecipient;
-        TBool iSimulatedReturnValue;     
-    };
-
-
-class TLcWindowStub : public MLcWindow
-    {
-    public: // Constructor     
-        TLcWindowStub();
-    
-    public: // From MLcWindow      
-        void EnableLcWindowL( TBool aEnable );
-        TBool IsLcWindowEnabled();    
-        void SetLcWindowRectL( TRect aRect );
-        TRect LcWindowRect();
-        void SetLcWindowOrientationL( TLcWindowOrientation aOrientation );
-        TLcWindowOrientation LcWindowOrientationL();
-        
-    public: // New functions
-        
-        void Reset();
+        TBool iSessionRejectedCalled;
+    	TBool iSessionBadRequestCalled;
+    	TBool iSessionUnauthorizedCalled;
+    	TBool iSessionPaymentRequiredCalled;
+    	TBool iSessionRecipientNotFoundCalled;
+    	TBool iSessionProxyAuthenticationRequiredCalled;
+    	TBool iSessionRequestTimeOutCalled;
+    	TBool iSessionUnsupportedMediaTypeCalled;
+    	TBool iSessionBusyHereCalled;
+    	TBool iSessionRequestCancelledCalled;
+    	TBool iDiskFullCalled;
+    	
+    	TBool iEndOfClipCalled;
+    	TBool iRewindFromEnd;
+    	TBool iTranscodingNeededCalled;
+    	TBool iTranscodingCompletedInitCalled;
+    	TBool iTranscodingCompletedFinalizeCalled;
+    	TBool iTranscodingFailedCalled;
+    	
+    	TBool iIncomingSessionPreNotificationCalled;
+        TBool iIncomingSessionCalled;
+        TBool iStreamBufferingCalled;
         
-    private: // Data
-        TBool iEnabled;
-        TRect iRect;
-        TLcWindowOrientation iOrientation;
-    };
-
-
-class TLcAudioControlStub : public MLcAudioControl
-    {
-    public: // Constructor
-        TLcAudioControlStub();    
-    
-    public:
-        TBool IsLcAudioMutedL();
-        void MuteLcAudioL( TBool aMute );       
-        TBool IsLcMicMutedL();    
-        void MuteLcMicL( TBool aMute );
-        TBool IsEnablingLcLoudspeakerAllowed();   
-        void EnableLcLoudspeakerL( TBool aEnabled );
-        TBool IsLcLoudspeakerEnabled();
-        TInt LcVolumeL();
-        void SetLcVolumeL( TInt aValue );    
-        void IncreaseLcVolumeL();
-        void DecreaseLcVolumeL();
- 
-    public: // New functions
+        TBool iAudioRoutingChangedCalled;
+        TBool iShowNote;
+        TBool iAudioRouteChangeAllowed;
         
-        void Reset();        
+        TInt iTranscodingProgressedPercentage;
+        TBool iSessionTemporarilyNotAvailable;
+        HBufC* iIncomingSessionOriginator;
         
-    private: // Data      
-        TBool iAudioMuted;
-        TBool iMicMuted;
-        TBool iEnablingLoudspeakerAllowed;
-        TBool iLoudspeakerEnabled;
         TInt iVolume;
-    };
-
-class TMusPropertyObserverStub : public MMusPropertyObserver
-    {
-    public:
-    
-        enum TMusPropertyObserverFunction
-            {
-            ENone, // default value
-            EPropertyChanged,
-            EHandlePropertyError
-            };
-
-    
-        TMusPropertyObserverStub()
-            {
-            iCalledFunction = ENone;
-            iKey = 0;
-            iValue = 0;
-            iReason = 0;
-            }
-    
-        void PropertyChanged( const TUint aKey, const TInt aValue )
-            {
-            iCalledFunction = EPropertyChanged;
-            iKey = aKey;
-            iValue = aValue;
-            }
-
-
-        void HandlePropertyError( const TInt aReason )
-            {
-            iCalledFunction = EHandlePropertyError;
-            iReason = aReason;
-            }
-
-    public: // data
-
-        TMusPropertyObserverFunction iCalledFunction;
-        TInt iKey;
-        TInt iValue;
-        TInt iReason;
+        TBool iDueUnknowCapas;
+        TBool iOrientationRefreshEndedCalled;
     };
 
 
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/musengtestdefs.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/musengtestdefs.h	Wed Sep 01 12:31:01 2010 +0100
@@ -23,7 +23,6 @@
 #include <mcesession.h>
 #include <mcemanager.h>
 
-#include <digia/eunit/eunitmacros.h>
 // Next row is to disable warning emerging from EUnit code.
 // Placement is due to a fact that most test case files
 // include this file. Directive can be removed when 
@@ -33,14 +32,12 @@
 // Test values
 
 _LIT( KTestRecipientSipUri, "sip:TestRecipient@host.domain" );
-_LIT( KTestRecipient2SipUri, "sip:TestRecipient2@host.domain" );
 _LIT( KTestRecipientSipUriPrefixUpperCase, "SIP:TestRecipient@host.domain" );
 _LIT( KTestRecipientSipUriNoSipPrefix, "TestRecipient@host.domain" );
 _LIT( KTestRecipientTelUri, "tel:+3581111111");
 _LIT( KTestRecipientTelUriNoTelPrefix, "+3581111111" );
 
 _LIT8( KTestRecipientSipUri8, "sip:TestRecipient@host.domain" );
-_LIT8( KTestRecipient2SipUri8, "sip:TestRecipient2@host.domain" );
 _LIT8( KTestRecipientSipUriPrefixUpperCase8, "SIP:TestRecipient@host.domain" );
 _LIT8( KTestRecipientSipUriNoSipPrefix8, "TestRecipient@host.domain" );
 _LIT8( KTestRecipientTelUri8, "tel:+3581111111");
@@ -120,11 +117,8 @@
         User::Leave( error );\
         }
 
-// NOTE! NMusSessionApi::KCategoryUid, NMusSessionApi::KRemoteSipAddress p&s property
-// should contain recipient address to be used for invitation.
-//
 #define ESTABLISH_OUT_SESSION( outSession )\
-    outSession->EstablishLcSessionL();\
+    outSession->InviteL( KTestRecipientSipUri );\
     outSession->iSession->iState = CMceSession::EEstablished;\
     for ( TInt i = 0; i < outSession->iSession->Streams().Count(); ++i )\
             {\
@@ -142,31 +136,9 @@
 #define ESTABLISH_OUT_SESSION_AND_START_STREAMING( outSession )\
     ESTABLISH_OUT_SESSION( outSession );\
     outSession->EnableDisplayL( ETrue );\
-    outSession->LocalVideoPlayer()->LcPlayL();
-
-
-#define MUSENG_EUNIT_ASSERT_EQUALS( func, val ) \
-{\
-TInt musUnitTestRetVal = func;\
-if ( musUnitTestRetVal != KErrNoMemory ){\
-    EUNIT_ASSERT_EQUALS( musUnitTestRetVal, val );\
-    }\
-else{\
-    User::Leave( KErrNoMemory );\
-    }\
-}
-
-#define MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( func, val ) \
-{\
-TRAPD( musUnitTestRetVal, func );\
-if ( val != KErrNoMemory && musUnitTestRetVal == KErrNoMemory ){\
-    User::Leave( KErrNoMemory );\
-    }\
-else{\
-    EUNIT_ASSERT_EQUALS( musUnitTestRetVal, val );\
-    }\
-}
+    outSession->PlayL();
+    
     
 #endif // MUSENGTESTDEFS_H
 
- 
+ 
\ No newline at end of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/sipprofilealrcontroller.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/sipprofilealrcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,11 +11,10 @@
 *
 * Contributors:
 *
-* Description:  
+* Description:
 *
 */
 
-
 #ifndef CSIPPROFILEALRCONTROLLER_H
 #define CSIPPROFILEALRCONTROLLER_H
 
@@ -46,7 +45,7 @@
     {
     public: // Data only in MuS Engine's unit testing stub
     
-        TBool iAllowMigrationCalled;
+		TBool iAllowMigrationCalled;
         TBool iDisallowMigrationCalled;
         TUint32 iLastUsedIap;
         
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengcamerahandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef __UT_MUSENGCAMERAHANDLER_H__
-#define __UT_MUSENGCAMERAHANDLER_H__
-
-
-//  EXTERNAL INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-
-#include "musengcamerahandler.h"
-
-//  FORWARD DECLARATIONS
-class CMceManager;
-class CMusSipProfileHandler;
-class CMceSession;
-class CMusEngObserverStub;
-class CMceDisplaySink;
-
-
-//  CLASS DEFINITION
-/**
- * Tester class for CMusEngLiveSession. 
- * Tests only implementations that are not tested in ancestor classes.
- * 
- */
-NONSHARABLE_CLASS( UT_TMusEngCameraHandler ): public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_TMusEngCameraHandler* NewL();
-        static UT_TMusEngCameraHandler* NewLC();
-        
-        /**
-         * Destructor
-         */
-        ~UT_TMusEngCameraHandler();
-
-    private: // Constructors and destructors
-
-        UT_TMusEngCameraHandler();
-        void ConstructL();
-        
-    private: // Test case setup and teardown
-
-        void SetupL();
-        void Teardown();
-
-    private: // Test methdods
-    
-        void UT_LcCameraCountL();
-        void UT_ToggleLcCameraL();
-        void UT_SetLcBrightnessL();
-        void UT_LcBrightnessL();
-        void UT_MaxLcBrightnessL();
-        void UT_MinLcBrightnessL();
-        void UT_IncreaseLcBrightnessL();
-        void UT_DecreaseLcBrightnessL();        
-        void UT_MinLcZoomL();
-        void UT_MaxLcZoomL();
-        void UT_LcZoomValueL();
-        void UT_SetLcZoomValueL();
-        void UT_LcZoomInL();
-        void UT_LcZoomOutL();
-        void UT_PlayL();
-        void UT_PauseL();
-        void UT_IsPlayingL();
-        void UT_InitializeZoomStepSizeL();
-        void UT_ChangeCameraL();
-        void UT_ChangeActiveCameraL();
-        
-    private:    // Data
-
-        TMusEngCameraHandler iCameraHandler;
-        CMceManager* iManager;
-        CMusSipProfileHandler* iProfileHandler;
-        CMusEngObserverStub* iObserver;
-        CMceSession* iSession;
-
-        EUNIT_DECLARE_TEST_TABLE;
-    };
-
-#endif      //  __UT_MUSENGLIVESESSION_H__
-
-// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengclipsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengclipsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,8 +26,6 @@
 
 //  FORWARD DECLARATIONS
 class CMusEngClipSession;
-class CLcSessionObserverStub;
-class CLcUiProviderStub;
 class CMusEngObserverStub;
 
 // CONSTANTS
@@ -62,29 +60,44 @@
     private: // Test case setup and teardown
 
         void SetupL();
+        void Setup2L();
+
         void Teardown();
 
     private: // Test methdods
     
         void UT_NewLL();
+        void UT_SetClipLL();
+        void UT_FastForwardLL();
+        void UT_FastRewindLL();
+        void UT_PositionLL();
+        void UT_DurationLL();
+        void UT_SetPositionLL();
+        void UT_TranscodeLToAvcL();
+        void UT_TranscodeLToH263L();
+        void UT_CancelTranscodeLL();
+        void UT_PlayLL();
+        void UT_PauseLL();
+        void UT_IsPlayingLL();
         void UT_CompleteSessionStructureLL();
         void UT_StreamStateChangedL();
         void UT_StreamStateChangedWithSourceL();
         void UT_StreamStateChangedWithSinkL();
         void UT_AddAmrCodecLL();
         void UT_AddVideoCodecLL();
+        void UT_HasClipEndedL();
         void UT_ConstructAudioStructureLL();
         void UT_ConstructAudioStructureL_OperatorVariantL();
         void UT_EstablishSessionLL();
+        void UT_IsRewindFromEndL();
         
     private:    // Data
 
         CMusEngClipSession* iClipSession;
-        CLcSessionObserverStub* iLcSessionObserver;
-        CLcUiProviderStub* iLcUiProvider;
-        CMusEngObserverStub* iAudioRoutingObserver;
+        CMusEngObserverStub* iObserver;
 
         EUNIT_DECLARE_TEST_TABLE;
+
     };
 
 #endif      //  __UT_MUSENGCLIPSESSION_H__
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengclipvideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef UT_MUSENGCLIPVIDEOPLAYER_H
-#define UT_MUSENGCLIPVIDEOPLAYER_H
-
-
-// INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-#include "musengstubs.h"
-
-//  FORWARD DECLARATIONS
-class CMceSession;
-class CMusEngClipVideoPlayer;
-
-
-//  CLASS DEFINITION
-/**
- *
- */
-NONSHARABLE_CLASS( UT_CMusEngClipVideoPlayer ): public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_CMusEngClipVideoPlayer* NewL();
-        static UT_CMusEngClipVideoPlayer* NewLC();
-        
-        /**
-         * Destructor
-         */
-        ~UT_CMusEngClipVideoPlayer();
-
-    private: // Constructors and destructors
-
-        UT_CMusEngClipVideoPlayer();
-        void ConstructL();
-        
-    private: // Test case setup and teardown
-
-        void SetupL();
-        void Teardown();
-
-    private: // Test methdods
-    
-        void UT_HasClipEndedL();
-        void UT_LcVideoPlayerStateL();
-        void UT_LcPlayL(); 
-        void UT_LcPauseL(); 
-        void UT_LcIsPlayingL();
-        void UT_SetLcFileNameL();
-        void UT_LcFastForwardL();
-        void UT_LcFastRewindL();
-        void UT_LcFilePositionL();
-        void UT_LcFileDurationL();
-        void UT_SetLcFilePositionL();     
-        void UT_LcWindowL();
-        void UT_LcCameraControlL();
-        void UT_LcSourceFileControlL();
-        void UT_LcDestinationFileControlL();
-        void UT_LcAudioControlL();
-        void UT_LcZoomControlL();
-        void UT_LcBrightnessControlL();
-        
-    private:    // Data
-
-        TLcAudioControlStub       iLcAudioControlStub;
-        CMceSession*              iMceSession;
-        CMusEngClipVideoPlayer*   iClipVideoPlayer;
-        TMusEngDisplayHandlerStub iDisplayHandlerStub;
-        EUNIT_DECLARE_TEST_TABLE;
-    };
-
-#endif // UT_MUSENGCLIPVIDEOPLAYER_H
-
-// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musenglivesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musenglivesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,8 +26,6 @@
 
 //  FORWARD DECLARATIONS
 class CMusEngLiveSession;
-class CLcSessionObserverStub;
-class CLcUiProviderStub;
 class CMusEngObserverStub;
 
 
@@ -66,6 +64,16 @@
     private: // Test methdods
     
         void UT_NewLL();
+        void UT_CurrentZoomLL();
+        void UT_CMusEngLiveSession_SetZoomLL();
+        void UT_MaxZoomLL();
+        void UT_ZoomInLL();
+        void UT_ZoomOutLL();
+        void UT_ZoomDefaultLL();
+        void UT_RecordL_and_IsRecordingLL();
+        void UT_PlayLL();
+        void UT_PauseLL();
+        void UT_IsPlayingLL();
         void UT_CompleteSessionStructureLL();
         void UT_HandleSessionStateChangedL();
         void UT_AdjustVideoCodecLL();
@@ -74,18 +82,28 @@
         void UT_StreamStateChangedL();
         void UT_StreamStateChangedWithSourceL();
         void UT_StreamStateChangedWithSinkL();
-        void UT_EstablishLcSessionL();
-        void UT_LocalVideoPlayerL();  
-                
+        void UT_SetBrightnessLL();
+        void UT_CurrentBrightnessLL();
+        void UT_MaxBrightnessLL();
+        void UT_MinBrightnessLL();
+        void UT_IncreaseBrightnessLL();
+        void UT_DecreaseBrightnessLL();
+        void UT_BrightnessDefaultLL();
+        void UT_BrightnessAutoLL();
+        void UT_SetEncodingDeviceLL();
+        void UT_SetCodecConfigKeyLL();
+        void UT_ReadCodecConfigKeyLL();
+        void UT_StoreEncoderConfigInfoLL();
+        void UT_InitializeZoomStepSizeL();
+        
     private:    // Data
 
         CMusEngLiveSession* iLiveSession;
         CMusEngLiveSession* iRecordedLiveSession;
-        CLcSessionObserverStub* iLcSessionObserver;
-        CLcUiProviderStub* iLcUiProvider;
-        CMusEngObserverStub* iAudioRoutingObserver;
+        CMusEngObserverStub* iObserver;
 
         EUNIT_DECLARE_TEST_TABLE;
+
     };
 
 #endif      //  __UT_MUSENGLIVESESSION_H__
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musenglivevideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef UT_MUSENGLIVEVIDEOPLAYER_H
-#define UT_MUSENGLIVEVIDEOPLAYER_H
-
-
-// INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-#include "musengcamerahandler.h"
-#include "musengstubs.h"
-
-//  FORWARD DECLARATIONS
-class CMceSession;
-class CMusEngLiveVideoPlayer;
-
-
-//  CLASS DEFINITION
-/**
- *
- */
-NONSHARABLE_CLASS( UT_CMusEngLiveVideoPlayer ): public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_CMusEngLiveVideoPlayer* NewL();
-        static UT_CMusEngLiveVideoPlayer* NewLC();
-        
-        /**
-         * Destructor
-         */
-        ~UT_CMusEngLiveVideoPlayer();
-
-    private: // Constructors and destructors
-
-        UT_CMusEngLiveVideoPlayer();
-        void ConstructL();
-        
-    private: // Test case setup and teardown
-
-        void SetupL();
-        void Teardown();
-
-    private: // Test methdods
-    
-        void UT_NewLL();       
-        void UT_LcVideoPlayerStateL();
-        void UT_LcPlayL(); 
-        void UT_LcWindowL();
-        void UT_LcCameraControlL();
-        void UT_LcSourceFileControlL();
-        void UT_LcDestinationFileControlL();
-        void UT_LcAudioControlL();
-        void UT_LcZoomControlL();
-        void UT_LcBrightnessControlL();
-        void UT_EnableLcWindowL();
-        void UT_LcWindowRectL();
-        void UT_LcWindowOrientationL();
-        void UT_SetLcFileNameL();
-        void UT_LcRecordL();
-        
-    private:    // Data
-
-        TLcAudioControlStub iLcAudioControlStub;
-        CMceSession* iMceSession;
-        TMusEngCameraHandler iCameraHandler;
-        CMusEngLiveVideoPlayer* iLiveVideoPlayer;
-        TMusEngDisplayHandlerStub iDisplayHandlerStub;
-        EUNIT_DECLARE_TEST_TABLE;
-    };
-
-#endif // UT_MUSENGLIVEVIDEOPLAYER_H
-
-// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengmcesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengmcesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -29,8 +29,9 @@
 class CMusEngLiveSession;
 class CMusEngReceiveSession;
 class CMusEngClipSession;
-class CLcSessionObserverStub;
-class CLcUiProviderStub;
+class CMusEngObserverStub;
+class CMceSession;
+class CMusEngMceSession;
 
 //  CLASS DEFINITION
 /**
@@ -66,69 +67,52 @@
         void Teardown();
 
     private: // Test methdods
+    
+        void UT_CMusEngMceSession_TerminateLL();
+        void UT_CMusEngMceSession_GetSessionTimeL();
+        void UT_CMusEngMceSession_ConnectionActiveL();
+        void UT_CMusEngMceSession_ContainsAudioLL();
+        void UT_CMusEngMceSession_IsMutedLL();
+        void UT_CMusEngMceSession_OrientationLL();
+        void UT_CMusEngMceSession_SetOrientationLL();
+        void UT_CMusEngMceSession_VolumeUpLL();
+        void UT_CMusEngMceSession_VolumeDownLL();
+        void UT_CMusEngMceSession_SetVolumeLL();
+        void UT_CMusEngMceSession_EnableDisplayL();
+        void UT_CMusEngMceSession_MuteLL();
+        void UT_CMusEngMceSession_UnmuteLL();
+        void UT_CMusEngMceSession_HandleTerminationL();
 
-        void UT_LcSessionStateL();
-        void UT_RemoteVideoPlayerL();
-        void UT_LocalVideoPlayerL();          
-        void UT_LocalDisplayNameL();
-        void UT_RemoteDisplayNameL();
-        void UT_RemoteDetailsL();
-        void UT_SetParameterL();
-        void UT_ParameterValueL();
-        void UT_IsLcAudioMutedL();
-        void UT_MuteLcAudioL();
-        void UT_MuteLcMicL();
-        void UT_EnableLcLoudspeakerL();
-        void UT_SetLcVolumeL();        
-        void UT_GetSessionTimeL();
-        void UT_HandleTerminationL();
-        void UT_AdjustVideoCodecL();
-        void UT_AdjustAudioCodecL();
-        void UT_RectChangedL();
-        void UT_SetSessionSdpLinesL();
-        void UT_SetSessionSdpLines_OperatorL();
-        void UT_SetMediaSdpLinesL();
-        void UT_SetMediaSdpLines_OperatorL();
-        void UT_AdjustStreamsAndCodecsL();
-        void UT_IncomingSessionL();
-        void UT_IncomingUpdateL();
-        void UT_StreamStateChangedL();
-        void UT_StreamStateChangedWithSourceL();
-        void UT_StreamStateChangedWithSinkL();
-        void UT_SessionStateChangedL();
-        void UT_HandleSessionStateChanged_EncoderKeyStoringL();
-        void UT_SessionConnectionStateChangedL();
-        void UT_FailedL();
-        void UT_UpdateFailedL();
-        void UT_SRReceivedL();
-        void UT_RRReceivedL();        
-        void UT_SsrcAddedL();
-        void UT_SsrcRemovedL();
-        void UT_UpdateTimerEventL();
-        void UT_IsRoamingBetweenAPsAllowedL();
-        void UT_SaveContactL();
-        void UT_RectL();
-        void UT_SetRectLL();
-        void UT_SecondaryRectL();
-        void UT_SetSecondaryRectLL();
-        void UT_EnableDisplayLL();
-        void UT_CMusEngMceSession_SetOrientationLL();
-        void UT_SetEncodingDeviceLL();
-        void UT_SetCodecConfigKeyLL();
-        void UT_ReadCodecConfigKeyLL();
-        void UT_StoreEncoderConfigInfoLL();
-        void UT_StreamStreamingL();
-        void UT_InformObserverAboutSessionStateChangeL();
-        void UT_InformObserverAboutSessionUpdateL();
-        void UT_InformObserverAboutSessionFailureL();
-        void UT_InformObserverAboutPlayerStateChangeL();
-        void UT_InformObserverAboutPlayerUpdateL();
-        void UT_InformObserverAboutPlayerFailureL();      
-        void UT_LcUiProviderL(); 
-        void UI_IsBackgroundStartupL();
-        void UT_InformUiProviderAboutReceivingStartL();
-        void UT_SetForegroundStatusL();
-        void UT_UpdateLcSessionLL();
+        void UT_CMusEngMceSession_AdjustVideoCodecLL();
+        void UT_CMusEngMceSession_AdjustAudioCodecLL();
+        void UT_CMusEngMceSession_RectChangedLL();
+        void UT_CMusEngMceSession_SetSessionSdpLinesLL();
+        void UT_CMusEngMceSession_AdjustStreamsAndCodecsLL();
+        void UT_CMusEngMceSession_IncomingSessionL();
+        void UT_CMusEngMceSession_IncomingUpdateL();
+        void UT_CMusEngMceSession_StreamStateChangedL();
+        void UT_CMusEngMceSession_StreamStateChangedWithSourceL();
+        void UT_CMusEngMceSession_StreamStateChangedWithSinkL();
+        void UT_CMusEngMceSession_SessionStateChangedL();
+        void UT_CMusEngMceSession_SessionConnectionStateChangedL();
+        void UT_CMusEngMceSession_FailedL();
+        void UT_CMusEngMceSession_UpdateFailedL();
+        
+        void UT_CMusEngMceSession_SRReceivedL();
+        void UT_CMusEngMceSession_RRReceivedL();
+        void UT_CMusEngMceSession_InactivityTimeoutL();
+        void UT_CMusEngMceSession_SsrcAddedL();
+        void UT_CMusEngMceSession_SsrcRemovedL();
+        void UT_CMusEngMceSession_UpdateTimerEventL();
+        void UT_CMusEngMceSession_IsRoamingBetweenAPsAllowedL(); 
+        void UT_CMusEngMceSession_IsDisplayEnabledLL();
+        
+        void UT_CMusEngMceSession_VolumeChangedL();
+    
+    private:
+        
+        void SetMaxVolForSpeakersL(CMceSession& aSession, TInt aMaxVol);
+        TBool VerifySpeakersVolume(CMusEngMceSession& aSession, TInt aVolume);
         
     private:    // Data
 
@@ -136,8 +120,8 @@
         CMusEngReceiveSession* iReceiveSession;
         CMusEngClipSession* iClipSession;
         CMusEngLiveSession* iSomeOtherSession;
-        CLcSessionObserverStub* iLcSessionObserver;
-        CLcUiProviderStub* iLcUiProvider;
+        CMusEngObserverStub* iObserver;
+
         TMceTransactionDataContainer iContainer;
         EUNIT_DECLARE_TEST_TABLE;
     };
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengmceutils.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengmceutils.h	Wed Sep 01 12:31:01 2010 +0100
@@ -21,16 +21,14 @@
 
 
 //  EXTERNAL INCLUDES
+#include "mussipprofileuser.h"
 #include <digia/eunit/ceunittestsuiteclass.h>
 #include <digia/eunit/eunitmacros.h>
 
-
 //  FORWARD DECLARATIONS
 class CMceManager;
 class CMusSipProfileHandler;
 class CMceSession;
-class CMusEngObserverStub;
-class CMceDisplaySink;
 
 #ifndef NONSHARABLE_CLASS
     #define NONSHARABLE_CLASS(x) class x
@@ -41,8 +39,9 @@
  * Tester class for MusEngMceUtils. 
  * 
  */
-NONSHARABLE_CLASS( UT_MusEngMceUtils ): 
-    public CEUnitTestSuiteClass
+NONSHARABLE_CLASS( UT_MusEngMceUtils ):
+	public CEUnitTestSuiteClass,
+    public MMusSipProfileUser
     {
     public:     // Constructors and destructors
 
@@ -56,8 +55,11 @@
          * Destructor
          */
         ~UT_MusEngMceUtils();
+
+	public: // From MMusSipProfileUser    
         
-        
+        TBool IsRoamingBetweenAPsAllowed();
+
     private: // Constructors and destructors
 
         UT_MusEngMceUtils();
@@ -66,44 +68,35 @@
     private: // Test case setup and teardown
 
         void SetupL();
-        void Setup2L();
 
         void Teardown();
 
     private: // Test methdods
     
-        void UT_IsVideoInStreamL();
-        void UT_IsVideoOutStreamL();
-        void UT_IsAudioInStreamL();
-        void UT_GetVideoOutStreamLL();
-        void UT_GetVideoInStreamLL();
-        void UT_GetRecordingStreamL();
-        void UT_GetMediaSinkFromStreamL();
-        void UT_GetMediaSinkLFromStreamL();
-        void UT_GetMediaSinkFromSessionL();
-        void UT_GetMediaSinkLFromSessionL();
-        void UT_GetCameraLL();
-        void UT_GetFileSourceLL();
-        void UT_GetDisplayL();
-        void UT_GetDisplayLL();
-        void UT_AddDisplayLL();
-        void UT_AddSpeakerLL();
-        void UT_DisableStreamLL();
-        void UT_GetReceivingDisplayL();
-        void UT_GetReceivingDisplayLL();
-        void UT_GetVfDisplayL();
-        void UT_EnableInactivityTimerL();
+        void UT_MusEngMceUtils_IsVideoInStreamL();
+        void UT_MusEngMceUtils_IsAudioInStreamL();
+        void UT_MusEngMceUtils_GetVideoOutStreamLL();
+        void UT_MusEngMceUtils_GetVideoInStreamLL();
+        void UT_MusEngMceUtils_GetRecordingStreamL();
+        void UT_MusEngMceUtils_GetMediaSinkL();  // From stream
+        void UT_MusEngMceUtils_GetMediaSinkLL(); // From stream
+        void UT_MusEngMceUtils_GetMediaSink2L(); // From session
+        void UT_MusEngMceUtils_GetMediaSinkL2L(); // From session
+        void UT_MusEngMceUtils_GetCameraLL();
+        void UT_MusEngMceUtils_GetFileSourceLL();
+        void UT_MusEngMceUtils_GetDisplayL();
+        void UT_MusEngMceUtils_GetDisplayLL();
+        void UT_MusEngMceUtils_AddDisplayLL();
+        void UT_MusEngMceUtils_AddSpeakerLL();
+        void UT_MusEngMceUtils_DisableStreamLL();
         
     private:    // Data
 
         CMceManager* iManager;
         CMusSipProfileHandler* iProfileHandler;
-        CMusEngObserverStub* iObserver;
         CMceSession* iEmptySession;
         CMceSession* iVideoOutSession;
         CMceSession* iVideoInSession;
-        
-        CMceDisplaySink* iReceivingDisplay; // Not owned
 
         EUNIT_DECLARE_TEST_TABLE;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengorientationhandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __UT_MUSENGORIENTATIONHANDLER_H__
+#define __UT_MUSENGORIENTATIONHANDLER_H__
+
+
+//  EXTERNAL INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitmacros.h>
+
+//  FORWARD DECLARATIONS
+class CMusEngLiveSession;
+class CMusEngObserverStub;
+class CMusEngOrientationHandler;
+
+
+//  CLASS DEFINITION
+/**
+ * Tester class for CMusEngLiveSession. 
+ * Tests only implementations that are not tested in ancestor classes.
+ * 
+ */
+NONSHARABLE_CLASS( UT_CMusEngOrientationHandler ): public CEUnitTestSuiteClass
+    {
+    public:     // Constructors and destructors
+
+        /**
+         * Two phase construction
+         */
+        static UT_CMusEngOrientationHandler* NewL();
+        static UT_CMusEngOrientationHandler* NewLC();
+        
+        /**
+         * Destructor
+         */
+        ~UT_CMusEngOrientationHandler();
+
+    private: // Constructors and destructors
+
+        UT_CMusEngOrientationHandler();
+        void ConstructL();
+        
+    private: // Test case setup and teardown
+
+        void SetupL();
+
+        void Teardown();
+
+    private: // Test methdods
+    
+        void UT_NewLL();
+        void UT_RefreshOrientationL();
+
+    private:    // Data
+
+        CMusEngLiveSession* iLiveSession;
+        CMusEngObserverStub* iObserver;
+        CMusEngOrientationHandler* iHandler;
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_MUSENGORIENTATIONHANDLER_H__
+
+// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengoutsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengoutsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,8 +26,6 @@
 
 //  FORWARD DECLARATIONS
 class CMusEngLiveSession;
-class CLcSessionObserverStub;
-class CLcUiProviderStub;
 class CMusEngObserverStub;
 
 // CONSTANTS
@@ -71,29 +69,21 @@
 
     private: // Test methdods
     
-        void UT_EstablishLcSessionL();
-        void UT_EstablishLcSession_RecipientResolvingL();
-        void UT_EstablishLcSession_RegistrationPendingL();
-        void UT_TerminateLcSessionL();
-        void UT_EstablishSessionLL();
-        void UT_HandleTerminationL();
-        void UT_HandleRecipientNotFoundTerminationL();
-        void UT_AdjustVideoCodecLL();
-        void UT_AdjustAudioCodecLL();
-        void UT_CreateMceSessionStructureLL();
-        void UT_ConstructLL();
-        void UT_ContactSavingLL();
-        void UT_RemoteAddressLL();
-        void UT_RemoteDisplayNameL();
+        void UT_CMusEngOutSession_InviteLL();
+        void UT_CMusEngOutSession_CancelInviteLL();
+        void UT_CMusEngOutSession_EstablishSessionLL();
+        void UT_CMusEngOutSession_HandleTerminationL();
+        void UT_CMusEngOutSession_AdjustVideoCodecLL();
+        void UT_CMusEngOutSession_AdjustAudioCodecLL();
+        void UT_CMusEngOutSession_CreateMceSessionStructureLL();
 
     private:    // Data
 
         CMusEngLiveSession* iLiveSession;
-        CLcSessionObserverStub* iLcSessionObserver;
-        CLcUiProviderStub* iLcUiProvider;
-        CMusEngObserverStub* iAudioRoutingObserver;
+        CMusEngObserverStub* iObserver;
 
         EUNIT_DECLARE_TEST_TABLE;
+
     };
 
 #endif      //  __UT_MUSENGOUTSESSION_H__
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengreceivesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengreceivesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -27,10 +27,9 @@
 //  FORWARD DECLARATIONS
 class CMceInSession;
 class CMusEngReceiveSession;
-class CLcSessionObserverStub;
+class CMusEngObserverStub;
 class CMceVideoStream;
 class CMceAudioStream;
-class CLcUiProviderStub;
 
 #include <e32def.h>
 #ifndef NONSHARABLE_CLASS
@@ -80,11 +79,7 @@
     private: // Test methdods
     
         void UT_NewLL();
-        void UT_LcSessionStateL();
-        void UT_EstablishLcSessionL();
-        void UT_TerminateLcSessionL();
-        void UT_RemoteVideoPlayerL();        
-        void UT_RemoteDisplayName();        
+        void UT_AcceptInvitationLL();
         void UT_HandleSessionStateChangedL();
         void UT_AdjustVideoCodecLL();
         void UT_AdjustAudioCodecLL();
@@ -92,6 +87,9 @@
         void UT_IncomingSessionL();
         void UT_IncomingUpdateL();
         void UT_StreamStateChangedL();
+        
+        // All the following functions test
+        // CMusEngReceiveSession::CompleteSessionStructureL
         void UT_CompleteSessionStructureL_WithoutSessionL();
         void UT_CompleteSessionStructureL_WithoutStreamsL();
         void UT_CompleteSessionStructureL_WithOutgoingStreamL();
@@ -100,18 +98,14 @@
         void UT_CompleteSessionStructureL_WithVideoInBoundToVideoOutL();
         void UT_CompleteSessionStructureL_WithMultipleVideoInsL();
         void UT_CompleteSessionStructureL_WithVideoAndMultipleAudioInsL();
-        void UT_CompleteSessionStructureL_OperatorVariant();   
-        void UT_CompleteSessionStructureL_SdpBandwidthAttributesL();   
+        void UT_CompleteSessionStructureL_OperatorVariant();
+        
         void UT_ParseAssertedIdentityL();
-        void UT_ContactSavingLL();
-        void UT_IsDisplayActive();
-        void UT_InactivityTimeoutL();
         
     private:    // Data
 
         CMusEngReceiveSession* iReceiveSession;
-        CLcSessionObserverStub* iLcSessionObserver;
-        CLcUiProviderStub* iLcUiProvider;
+        CMusEngObserverStub* iObserver;
 
         EUNIT_DECLARE_TEST_TABLE;
 
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengremotevideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef UT_MUSENGREMOTEVIDEOPLAYER_H
-#define UT_MUSENGREMOTEVIDEOPLAYER_H
-
-
-// INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-#include "musengstubs.h"
-
-// FORWARD DECLARATIONS
-class CMceSession;
-class CMusEngRemoteVideoPlayer;
-
-
-//  CLASS DEFINITION
-/**
- *
- */
-NONSHARABLE_CLASS( UT_CMusEngRemoteVideoPlayer ): public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_CMusEngRemoteVideoPlayer* NewL();
-        static UT_CMusEngRemoteVideoPlayer* NewLC();
-        
-        /**
-         * Destructor
-         */
-        ~UT_CMusEngRemoteVideoPlayer();
-
-    private: // Constructors and destructors
-
-        UT_CMusEngRemoteVideoPlayer();
-        void ConstructL();
-        
-    private: // Test case setup and teardown
-
-        void SetupL();
-        void Teardown();
-
-    private: // Test methdods
-    
-        void UT_NewLL();       
-        void UT_LcVideoPlayerStateL();
-        void UT_LcPlayL(); 
-        void UT_LcWindowL();
-        void UT_LcCameraControlL();
-        void UT_LcSourceFileControlL();
-        void UT_LcDestinationFileControlL();
-        void UT_LcAudioControlL();
-        void UT_LcZoomControlL();
-        void UT_LcBrightnessControlL();
-        void UT_EnableLcWindowL();
-        void UT_LcWindowRectL();
-        void UT_LcWindowOrientationL();
-        
-    private:    // Data
-
-        TLcAudioControlStub iLcAudioControlStub;
-        CMceSession* iMceSession;        
-        CMusEngRemoteVideoPlayer* iRemoteVideoPlayer;   
-        TMusEngDisplayHandlerStub iDisplayHandlerStub;
-        EUNIT_DECLARE_TEST_TABLE;
-    };
-
-#endif // UT_MUSENGREMOTEVIDEOPLAYER_H
-
-// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __UT_MUSENGSESSION_H__
+#define __UT_MUSENGSESSION_H__
+
+
+//  EXTERNAL INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitmacros.h>
+
+//  FORWARD DECLARATIONS
+class CMusEngLiveSession;
+class CMusEngObserverStub;
+
+
+//  CLASS DEFINITION
+/**
+ * Tester class for CMusEngSession. 
+ * Since CMusEngSession is abstract, it is tested via object of its'
+ * concrete descendant class CMusEngLiveSession. Only concrete 
+ * implementations are tested in this tester class. 
+ * 
+ */
+NONSHARABLE_CLASS( UT_CMusEngSession ): public CEUnitTestSuiteClass
+    {
+    public:     // Constructors and destructors
+
+        /**
+         * Two phase construction
+         */
+        static UT_CMusEngSession* NewL();
+        static UT_CMusEngSession* NewLC();
+        
+        /**
+         * Destructor
+         */
+        ~UT_CMusEngSession();
+
+    private: // Constructors and destructors
+
+        UT_CMusEngSession();
+        void ConstructL();
+        
+    private: // Test case setup and teardown
+
+        void SetupL();
+
+        void Teardown();
+
+    private: // Test methods
+        
+        void UT_RectL();
+        void UT_SetRectLL();
+        void UT_AudioRoutingCanBeChangedL();
+		void UT_IsAudioRoutingHeadsetL();
+        void UT_IsAudioRoutingLoudSpeakerL();
+        void UT_EnableLoudspeakerLL();
+        void UT_IsLoudSpeakerEnabledL();
+        void UT_VolumeLL();
+        void UT_MuteMicLL();
+        void UT_IsMicMutedLL();
+        void UT_SetAudioRoutingObserverL();
+        void UT_VolumeUpLL();
+        void UT_VolumeDownLL();
+        void UT_SetVolumeLL();
+        void UT_SetVolumeChangeObserverL();
+
+    private:    // Data
+
+        CMusEngLiveSession* iLiveSession;
+        CMusEngObserverStub* iObserver;
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_MUSENGSESSION_H__
+
+// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengsessionmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef UT_MUSENGSESSIONMANAGER_H
-#define UT_MUSENGSESSIONMANAGER_H
-
-//  EXTERNAL INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-
-//  FORWARD DECLARATIONS
-class CMusEngSessionManager;
-class CLcUiProviderStub;
-
-
-//  CLASS DEFINITION
-/**
- * Tester class for CMusEngSessionManager.
- * 
- */
-NONSHARABLE_CLASS( UT_CMusEngSessionManager ): public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_CMusEngSessionManager* NewL();
-        static UT_CMusEngSessionManager* NewLC();
-        
-        /**
-         * Destructor
-         */
-        ~UT_CMusEngSessionManager();
-
-    private: // Constructors and destructors
-
-        UT_CMusEngSessionManager();
-        void ConstructL();
-        
-    private: // Test case setup and teardown
-
-        void SetupL();
-
-        void Teardown();
-
-    private: // Test methdods
-    
-        void UT_NewL();
-        void UT_SessionL();
-        void UT_IsFeatureSupportedL();
-        void UT_CreateMusSessionL();
-        void UT_PropertyChangedL();
-        
-    private:    // Data
-
-        CMusEngSessionManager* iSessionManager;
-        CLcUiProviderStub* iLcUiProvider;
-
-        EUNIT_DECLARE_TEST_TABLE;
-    };
-
-#endif // UT_MUSENGSESSIONMANAGER_H
-
-// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengsipprofilehandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengsipprofilehandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -20,13 +20,13 @@
 #define __UT_MUSENGSIPPROFILEHANDLER_H__
 
 
-// INCLUDES
+//  INCLUDES
+#include "mussipprofileuser.h"
 #include <digia/eunit/ceunittestsuiteclass.h>
 #include <digia/eunit/eunitmacros.h>
 
 //  FORWARD DECLARATIONS
 class CMusSipProfileHandler;
-class CMusEngObserverStub;
 
 
 //  CLASS DEFINITION
@@ -34,8 +34,9 @@
  * Tester class for CMusSipProfileHandler. 
  * 
  */
-NONSHARABLE_CLASS( UT_CMusEngSipProfileHandler ): 
-    public CEUnitTestSuiteClass
+NONSHARABLE_CLASS( UT_CMusEngSipProfileHandler ):
+	public CEUnitTestSuiteClass,
+    public MMusSipProfileUser
     {
     public:     // Constructors and destructors
 
@@ -49,7 +50,11 @@
          * Destructor
          */
         ~UT_CMusEngSipProfileHandler();
+
+	public: // From MMusSipProfileUser    
         
+        TBool IsRoamingBetweenAPsAllowed();
+
     private: // Constructors and destructors
 
         UT_CMusEngSipProfileHandler();
@@ -61,20 +66,18 @@
 
         void Teardown();
 
-    private: // Test methdods
+    private: // Test methods
     
-        void UT_CreateSipProfileLL();
-        void UT_ProfileIdL();
-        void UT_AlrEventL();
-        void UT_NullTestsL();
-        void UT_UserFromProfileLCL();
-        void UT_IsRegisteredL();
-        void UT_ProfileRegistryEventOccurredL();
+        void UT_CMusEngSipProfileHandler_CreateSipProfileLL();
+        void UT_CMusEngSipProfileHandler_ProfileIdL();
+        void UT_CMusEngSipProfileHandler_AlrEventL();
+        void UT_CMusEngSipProfileHandler_NullTestsL();
+        void UT_CMusEngSipProfileHandler_UserFromProfileLCL();
         
     private:    // Data
 
         CMusSipProfileHandler* iProfileHandler;
-        CMusEngObserverStub* iObserver;
+        TBool iRoamingBetweenAPsAllowed;
         
         EUNIT_DECLARE_TEST_TABLE;
     };
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengtelephoneutils.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengtelephoneutils.h	Wed Sep 01 12:31:01 2010 +0100
@@ -63,6 +63,8 @@
         
         void UT_NewLL();
         void UT_AudioRoutingCanBeChangedL();
+        void UT_IsAudioRoutingHeadsetL();
+        void UT_IsAudioRoutingLoudSpeakerL();
         void UT_LoudspeakerLL();
         void UT_IsLoudSpeakerEnabledL();
         void UT_GetVolumeLL();
@@ -72,6 +74,8 @@
         void UT_SetOutputCompleteL();
         void UT_ValidateVolumeL();
         void UT_DestructorL();
+        void UT_UpdateCurrentVolumeL();
+        void UT_HandleNotifyGenericL();
 
     private:    // Data
 
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengtwowayrecvsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef __UT_MUSENGTWOWAYRECVSESSION_H__
-#define __UT_MUSENGTWOWAYRECVSESSION_H__
-
-
-//  EXTERNAL INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-
-//  FORWARD DECLARATIONS
-class CMceInSession;
-class CMusEngTwoWayRecvSession;
-class CMusEngReceiveSession;
-class CMceVideoStream;
-class CMceAudioStream;
-class CLcSessionObserverStub;
-
-#include <e32def.h>
-#ifndef NONSHARABLE_CLASS
-    #define NONSHARABLE_CLASS(x) class x
-#endif
-
-//  CLASS DEFINITION
-/**
- *
- */
-NONSHARABLE_CLASS( UT_CMusEngTwoWayRecvSession ): public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_CMusEngTwoWayRecvSession* NewL();
-        static UT_CMusEngTwoWayRecvSession* NewLC();
-        
-        /**
-         * Destructor
-         */
-        ~UT_CMusEngTwoWayRecvSession();
-
-    private: // Constructors and destructors
-
-        UT_CMusEngTwoWayRecvSession();
-        void ConstructL();
-        
-    private: // Test case setup and teardown
-
-        void SetupL();
-
-        void Teardown();
-
-    private: // Test helpers
-    
-        CMceVideoStream* ConstructVideoInStreamLC();
-        CMceVideoStream* ConstructVideoOutStreamLC();
-        CMceAudioStream* ConstructAudioInStreamLC();
-        CMceAudioStream* ConstructAudioOutStreamLC();
-        CMceInSession* ConstructInSessionLC( TInt aVideoStreamCount,
-                                             TInt aAudioStreamCount,
-                                             TBool aConstructSinks = ETrue );
-
-        CMceInSession* ConstructTwoWayInSessionLC( TBool aConstructSinks = ETrue );
-    
-    private: // Test methdods
-    
-        void UT_NewLL();
-        void UT_EnableDisplayLL();
-        void UT_SetOrientationLL();
-        void UT_OrientationLL();
-        void UT_SetLocalRectLL();
-        void UT_SetRectsLL();
-        void UT_CameraL();
-        void UT_LocalVideoPlayerL();
-        void UT_HandleSessionStateChangedL();
-        void UT_AdjustVideoCodecLL();
-        void UT_AdjustAudioCodecLL();
-        void UT_DoCodecSelectionLL();
-        void UT_IncomingSessionL();        
-        void UT_CompleteSessionStructureL_WithoutSessionL();
-        void UT_CompleteSessionStructureL_WithoutStreamsL();
-        void UT_CompleteSessionStructureL_WithOutgoingStreamL();
-        void UT_CompleteSessionStructureL_WithVideoInL();
-        void UT_CompleteSessionStructureL_WithVideoOutBoundToVideoInL();
-        void UT_CompleteSessionStructureL_WithVideoInBoundToVideoOutL();
-        void UT_CompleteSessionStructureL_WithMultipleVideoInsL();
-        void UT_CompleteSessionStructureL_WithVideoAndMultipleAudioInsL();
-        void UT_CompleteSessionStructureL_OperatorVariant();
-                
-    private:    // Data
-
-        CMusEngTwoWayRecvSession* iReceiveSession;
-        CLcSessionObserverStub* iLcSessionObserver;
-
-        EUNIT_DECLARE_TEST_TABLE;
-    };
-
-#endif      //  __UT_MUSENGRECEIVESESSION_H__
-
-// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_musengtwowaysession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef __UT_MUSENGTWOWAYSESSION_H__
-#define __UT_MUSENGTWOWAYSESSION_H__
-
-
-//  EXTERNAL INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-
-//  FORWARD DECLARATIONS
-class CMusEngTwoWaySession;
-class CLcSessionObserverStub;
-class CLcUiProviderStub;
-
-
-//  CLASS DEFINITION
-/**
- * Tester class for CMusEngLiveSession. 
- * Tests only implementations that are not tested in ancestor classes.
- * 
- */
-NONSHARABLE_CLASS( UT_CMusEngTwoWaySession ): public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_CMusEngTwoWaySession* NewL();
-        static UT_CMusEngTwoWaySession* NewLC();
-        
-        /**
-         * Destructor
-         */
-        ~UT_CMusEngTwoWaySession();
-
-    private: // Constructors and destructors
-
-        UT_CMusEngTwoWaySession();
-        void ConstructL();
-        
-    private: // Test case setup and teardown
-
-        void SetupL();
-
-        void Teardown();
-
-    private: // Test methdods
-    
-        void UT_NewLL();
-        void UT_EstablishLcSessionLL();
-        void UT_EnableDisplayLL();
-        void UT_SetOrientationLL();
-        void UT_SetLocalRectLL();
-        void UT_SetRectsLL();
-        void UT_CompleteSessionStructureLL();
-        void UT_HandleSessionStateChangedL();
-        void UT_AdjustVideoCodecLL();
-        void UT_AdjustAudioCodecLL();
-        void UT_DoCodecSelectionLL();
-        void UT_StreamStateChangedL();
-        void UT_StreamStateChangedWithSourceL();
-        void UT_SetEncodingDeviceLL();
-        void UT_SetCodecConfigKeyLL();
-        void UT_ReadCodecConfigKeyLL();
-        void UT_StoreEncoderConfigInfoLL();
-        void UT_RemoteVideoPlayerL();
-        void UT_EnableLcFileL();
-        void UT_InactivityTimeoutL();
-        
-    private:    // Data
-
-        CMusEngTwoWaySession* iLiveSession;
-        CLcSessionObserverStub* iLcSessionObserver;
-        CLcUiProviderStub* iLcUiProvider;
-
-        EUNIT_DECLARE_TEST_TABLE;
-    };
-
-#endif      //  __UT_MUSENGTWOWAYSESSION_H__
-
-// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/ut_muspropertywatch.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef __UT_MUSPROPERYWATCH_H__
-#define __UT_MUSPROPERYWATCH_H__
-
-
-//  EXTERNAL INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-
-#include "musengstubs.h"
-
-//  FORWARD DECLARATIONS
-class CMusPropertyWatch;
-class TMusUiPropertyObserverStub;
-
-//  CLASS DEFINITION
-/**
- * Tester class for CMusEngSession.
- * Since CMusEngSession is abstract, it is tested via object of its'
- * concrete descendant class CMusEngLiveSession. Only concrete
- * implementations are tested in this tester class.
- *
- */
-NONSHARABLE_CLASS( UT_CMusPropertyWatch ): public CEUnitTestSuiteClass
-    {
-    public:     // Constructors and destructors
-
-        /**
-         * Two phase construction
-         */
-        static UT_CMusPropertyWatch* NewL();
-        static UT_CMusPropertyWatch* NewLC();
-
-        /**
-         * Destructor
-         */
-        ~UT_CMusPropertyWatch();
-
-    private: // Constructors and destructors
-
-        UT_CMusPropertyWatch();
-        void ConstructL();
-
-    private: // Test case setup and teardown
-
-        void SetupL();
-
-        void Teardown();
-
-    private: // Test methods
-
-	    void UT_CMusPropertyWatch_ReadIntPropertyLL();
-	    void UT_CMusPropertyWatch_ReadDescPropertyLL();
-	    void UT_CMusPropertyWatch_DoCancelL();
-	    void UT_CMusPropertyWatch_RunLL();
-	    void UT_CMusPropertyWatch_RunErrorL();
-
-
-    private:    // Data
-
-
-	    TMusPropertyObserverStub iPropertyObserver;
-        CMusPropertyWatch* iPropertyWatch;
-
-        EUNIT_DECLARE_TEST_TABLE;
-
-    };
-
-#endif      //  __UT_MUSPROPERYWATCH_H__
-
-// End of file
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/musengstubs.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/musengstubs.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,7 +18,6 @@
 
 
 #include "musengstubs.h"
-#include "musengtestdefs.h"
 #include <sipprofilealrcontroller.h>
 
 
@@ -34,16 +33,22 @@
     Reset();
     }
         
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
 //
 CMusEngObserverStub::~CMusEngObserverStub()
     {
+    delete iIncomingSessionOriginator;
     }
 
+
+// -------- Functions from MMusEngSessionDurationTimerObserver -----------------
+
+
 // -----------------------------------------------------------------------------
-// From MMusEngSessionDurationTimerObserver
+// 
 // -----------------------------------------------------------------------------
 //
 void CMusEngObserverStub::UpdateTimerEvent()
@@ -51,31 +56,368 @@
     iUpdateTimerEventCalled = ETrue;
     }
 
+
+// ----------- Functions from MusEngSessionObserver ----------------------------
+
+
+
+
 // -----------------------------------------------------------------------------
-// From MMusEngAudioRoutingObserver
+// 
 // -----------------------------------------------------------------------------
 //	
-void CMusEngObserverStub::AudioRoutingChanged()
+void CMusEngObserverStub::SessionEstablished()
+    {
+    iSessionEstablishedCalled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionTerminated()
+    {
+    iSessionTerminatedCalled = ETrue;
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionConnectionLost()
+    {
+    iSessionConnectionLostCalled = ETrue;
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionFailed()
+    {
+    iSessionFailedCalled = ETrue;
+    }
+    
+            
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::StreamIdle()
+    {
+    iStreamIdleCalled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::StreamStreaming()
+    {
+    iStreamStreamingCalled = ETrue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionTimeChanged( 
+                        const TTimeIntervalSeconds& /*aSeconds*/ )
+    {
+    iSessionTimeChangedCalled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::InactivityTimeout()
+    {
+    iInactivityTimeoutCalled = ETrue;
+    }
+
+
+
+
+
+
+// ---- FUNCTIONS OF MMusEngOutSessionObserver --------------------------------
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionRejected()
+    {
+    iSessionRejectedCalled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//  
+void CMusEngObserverStub::SessionBadRequest()
     {
-    iAudioRoutingChangedCalled = ETrue;
+    iSessionBadRequestCalled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionUnauthorized()
+    {
+    iSessionUnauthorizedCalled = ETrue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionPaymentRequired()
+    {
+    iSessionPaymentRequiredCalled = ETrue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionRecipientNotFound()
+    {
+    iSessionRecipientNotFoundCalled = ETrue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionProxyAuthenticationRequired()
+    {
+    iSessionProxyAuthenticationRequiredCalled = ETrue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionRequestTimeOut()
+    {
+    iSessionRequestTimeOutCalled = ETrue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionUnsupportedMediaType()
+    {
+    iSessionUnsupportedMediaTypeCalled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//    
+void CMusEngObserverStub::SessionBusyHere()
+    {
+    iSessionBusyHereCalled = ETrue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::SessionRequestCancelled()
+    {
+    iSessionRequestCancelledCalled = ETrue;
+    }
+
+
+void CMusEngObserverStub::SessionTemporarilyNotAvailable()
+    {
+    iSessionTemporarilyNotAvailable = ETrue;
+    }
+
+
+
+// ---- FUNCTIONS OF MMusEngLiveSessionObserver ----------------------------------
+
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::DiskFull()
+    {
+    iDiskFullCalled = ETrue;
     }
 
 // -----------------------------------------------------------------------------
-// From MMusSipProfileUser
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::OrientationRefreshEnded()
+    {
+    iOrientationRefreshEndedCalled = ETrue;    
+    }
+
+
+// ---- FUNCTIONS OF MMusEngClipSessionObserver ----------------------------------
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::EndOfClip()
+    {
+    iEndOfClipCalled = ETrue;
+    }
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+
+void CMusEngObserverStub::RewindFromEndL()
+	{
+	iRewindFromEnd= ETrue;
+	}
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngObserverStub::TranscodingNeeded(TBool aDueUnknowCapas)
+    {
+    iTranscodingNeededCalled = ETrue;
+    iDueUnknowCapas = aDueUnknowCapas;
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//        
+void CMusEngObserverStub::TranscodingProgressed( TInt aPercentage )
+    {
+    iTranscodingProgressedPercentage = aPercentage;
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//  
+void CMusEngObserverStub::TranscodingCompletedInit()
+    {
+    iTranscodingCompletedInitCalled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
 // -----------------------------------------------------------------------------
-//   
-TBool CMusEngObserverStub::IsRoamingBetweenAPsAllowed()
+//  
+void CMusEngObserverStub::TranscodingCompletedFinalize()
+    {
+    iTranscodingCompletedFinalizeCalled = ETrue;
+    }    
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//  
+void CMusEngObserverStub::TranscodingFailed()
+    {
+    iTranscodingFailedCalled = ETrue;
+    }
+ 
+
+// ---- FUNCTIONS OF MMusEngInSessionObserver ----------------------------------
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//	
+void CMusEngObserverStub::IncomingSessionPreNotification()
+    {
+    iIncomingSessionPreNotificationCalled = ETrue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//	
+void CMusEngObserverStub::IncomingSession( const TDesC& aOriginator,
+                                           const TDesC& /*aOriginatorIdentity*/ )
     {
-    return iRoamingBetweenAPsAllowed;
+    iIncomingSessionCalled = ETrue;
+    iIncomingSessionOriginator = aOriginator.Alloc();
+    
+    if ( !iIncomingSessionOriginator )
+        {
+        // TODO: Handle out of memory.
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//	
+void CMusEngObserverStub::StreamBuffering()
+    {
+    iStreamBufferingCalled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//	
+void CMusEngObserverStub::AudioRoutingChanged( TBool aShowNote )
+    {
+    iAudioRoutingChangedCalled = ETrue;
+    iShowNote = aShowNote;
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//    
+TBool CMusEngObserverStub::AudioRouteChangeAllowed() const
+    {
+    return iAudioRouteChangeAllowed;
     }
     
 // -----------------------------------------------------------------------------
-// From MMusSipProfileUser
+// 
 // -----------------------------------------------------------------------------
-//   
-void CMusEngObserverStub::ProfileRegistered()
+//    
+void CMusEngObserverStub::VolumeChanged( TInt aVolume, TBool /*aAudioRouteChanged*/ )
     {
-    iProfileRegisteredCalled = ETrue;
+    iVolume = aVolume;
     }
 
 // ----- HELPERS ---------------------------------------------------------------
@@ -87,10 +429,42 @@
 //	
 TBool CMusEngObserverStub::IsReseted()
     {
-    return ( iUpdateTimerEventCalled == EFalse &&
-             iAudioRoutingChangedCalled == EFalse &&
-             iRoamingBetweenAPsAllowed == EFalse &&
-             iProfileRegisteredCalled == EFalse );
+    return ( !iUpdateTimerEventCalled &&
+             !iSessionEstablishedCalled &&
+             !iSessionTerminatedCalled &&
+             !iSessionConnectionLostCalled &&
+             !iSessionFailedCalled &&
+             !iStreamIdleCalled &&
+             !iStreamStreamingCalled &&
+             !iSessionTimeChangedCalled &&
+             !iInactivityTimeoutCalled &&
+             !iSessionRejectedCalled &&
+             !iSessionBadRequestCalled &&
+        	 !iSessionUnauthorizedCalled &&
+        	 !iSessionPaymentRequiredCalled &&
+        	 !iSessionRecipientNotFoundCalled &&
+        	 !iSessionProxyAuthenticationRequiredCalled &&
+        	 !iSessionRequestTimeOutCalled &&
+        	 !iSessionUnsupportedMediaTypeCalled &&
+        	 !iSessionBusyHereCalled  &&
+        	 !iSessionRequestCancelledCalled &&
+        	 !iDiskFullCalled &&
+        	 !iEndOfClipCalled &&
+        	 !iRewindFromEnd &&
+        	 !iTranscodingNeededCalled &&
+        	 !iTranscodingCompletedInitCalled &&
+        	 !iTranscodingCompletedFinalizeCalled &&
+        	 !iTranscodingFailedCalled &&
+        	 !iIncomingSessionPreNotificationCalled &&
+             !iIncomingSessionCalled &&
+             !iStreamBufferingCalled &&
+             !iAudioRoutingChangedCalled &&
+             iTranscodingProgressedPercentage == 0 &&
+             !iSessionTemporarilyNotAvailable &&
+             !iIncomingSessionOriginator &&
+             !iShowNote &&
+             iAudioRouteChangeAllowed &&
+             !iVolume );
     }
 
 // -----------------------------------------------------------------------------
@@ -100,472 +474,44 @@
 void CMusEngObserverStub::Reset()
     {
     iUpdateTimerEventCalled = EFalse;
+    iSessionEstablishedCalled = EFalse;
+    iSessionTerminatedCalled = EFalse;
+    iSessionConnectionLostCalled = EFalse;
+    iSessionFailedCalled = EFalse;
+    iStreamIdleCalled = EFalse;
+    iStreamStreamingCalled = EFalse;
+    iSessionTimeChangedCalled = EFalse;
+    iInactivityTimeoutCalled = EFalse;
+    iSessionRejectedCalled = EFalse;
+	iSessionBadRequestCalled = EFalse;
+	iSessionUnauthorizedCalled = EFalse;
+	iSessionPaymentRequiredCalled = EFalse;
+	iSessionRecipientNotFoundCalled = EFalse;
+	iSessionProxyAuthenticationRequiredCalled = EFalse;
+	iSessionRequestTimeOutCalled = EFalse;
+	iSessionUnsupportedMediaTypeCalled = EFalse;
+	iSessionBusyHereCalled = EFalse;
+	iSessionRequestCancelledCalled = EFalse;
+	iDiskFullCalled = EFalse;
+	iEndOfClipCalled = EFalse;
+	iRewindFromEnd = EFalse;
+	iTranscodingNeededCalled = EFalse;
+    iTranscodingCompletedInitCalled = EFalse;
+    iTranscodingCompletedFinalizeCalled = EFalse;
+	iTranscodingFailedCalled = EFalse;
+	iIncomingSessionPreNotificationCalled = EFalse;
+    iIncomingSessionCalled = EFalse;
+    iStreamBufferingCalled = EFalse;
     iAudioRoutingChangedCalled = EFalse;
-    iRoamingBetweenAPsAllowed = EFalse;
-    iProfileRegisteredCalled = EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//  
-TMusEngDisplayHandlerStub::TMusEngDisplayHandlerStub()
-    {
-    Reset();
-    }
-
-void TMusEngDisplayHandlerStub::Reset()
-    {
-    iRect = TRect( 0, 0, 0, 0 );
-    iSecondaryRect = TRect( 0, 0, 0, 0 );
-    iIsEnabled = EFalse;
-    iOrientation = EPortrait;
-    iIsActive = ETrue;
-    }
-
-TRect TMusEngDisplayHandlerStub::Rect() const
-    {
-    return iRect;
-    }
-
-void TMusEngDisplayHandlerStub::SetRectL( const TRect& aRect )
-    {
-    iRect = aRect;
-    }
-            
-void TMusEngDisplayHandlerStub::SetSecondaryRectL( const TRect& aSecondaryRect )
-    {
-    iSecondaryRect = aSecondaryRect;
-    }
-            
-TRect TMusEngDisplayHandlerStub::SecondaryRect() const
-    {
-    return iSecondaryRect;
-    }
-            
-void TMusEngDisplayHandlerStub::EnableDisplayL( TBool aEnable )
-    {
-    iIsEnabled = aEnable;
-    }
-            
-TBool TMusEngDisplayHandlerStub::IsDisplayEnabled()
-    {
-    return iIsEnabled;
-    }
-            
-MMusEngDisplayHandler::TDisplayOrientation TMusEngDisplayHandlerStub::OrientationL()
-    {
-    return iOrientation;
-    }
-            
-void TMusEngDisplayHandlerStub::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    iOrientation = aOrientation;
-    }
-            
-TBool TMusEngDisplayHandlerStub::IsDisplayActive()
-    {
-    return iIsActive;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//        
-CLcSessionObserverStub::CLcSessionObserverStub()
-    {
-    } 
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CLcSessionObserverStub::~CLcSessionObserverStub()
-    {
-    }
-        
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//     
-void CLcSessionObserverStub::StateChanged( MLcSession& aSession )
-    {
-    iCalledFunction = ESessionStateChanged;
-    iCurrentSession = &aSession;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcSessionObserverStub::StateChanged( MLcVideoPlayer& aPlayer )
-    {
-    iCalledFunction = EPlayerStateChanged;
-    iCurrentPlayer = &aPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcSessionObserverStub::Updated( MLcSession& aSession )
-    {
-    iCalledFunction = ESessionUpdated;
-    iCurrentSession = &aSession;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcSessionObserverStub::Updated( MLcVideoPlayer& aPlayer )
-    {
-    iCalledFunction = EPlayerUpdated;
-    iCurrentPlayer = &aPlayer;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcSessionObserverStub::Failed( MLcSession& aSession, TInt aError )
-    {
-    iCalledFunction = ESessionFailed;
-    iCurrentSession = &aSession;
-    iError = aError;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcSessionObserverStub::Failed( MLcVideoPlayer& aPlayer, TInt aError )
-    {
-    iCalledFunction = EPlayerFailed;
-    iCurrentPlayer = &aPlayer;
-    iError = aError;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcSessionObserverStub::SessionTimeChanged(
-    MLcSession& aSession,
-    const TTimeIntervalSeconds& aSeconds )
-    {
-    iCalledFunction = ESessionTimeChanged;
-    iCurrentSession = &aSession;
-    iSessionTime = aSeconds.Int();
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcSessionObserverStub::Reset()
-    {
-    iCalledFunction = EUnknown;
-    iCurrentSession = NULL;
-    iCurrentPlayer = NULL;
-    iSessionTime = 0;
-    iError = KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CLcSessionObserverStub::IsReseted()
-    {
-    return ( iCalledFunction == EUnknown && 
-             iCurrentSession == NULL &&
-             iCurrentPlayer == NULL &&
-             iSessionTime == 0 &&
-             iError == KErrNone );
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CLcUiProviderStub::CLcUiProviderStub()
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CLcUiProviderStub::~CLcUiProviderStub()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CLcUiProviderStub::SelectRecipient( 
-    MDesCArray& aRecipientAddresses, 
-    TDes& aSelectedRecipientAddress )
-    {
-    iCalledFunction = ESelectRecipient;
-    if ( aRecipientAddresses.MdcaCount() > 0 )
-        {
-        aSelectedRecipientAddress = aRecipientAddresses.MdcaPoint( 0 );
-        }
-    return iSimulatedReturnValue;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CLcUiProviderStub::InputRecipient( TDes& aRecipientAddress )
-    {
-    iCalledFunction = EInputRecipient;
-    aRecipientAddress = iRecipient;
-    return iSimulatedReturnValue;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcUiProviderStub::HandleForegroundStatus( TBool aForeground )
-    {
-    iCalledFunction = EHandleForegroundStatus;
-    iForeground = aForeground;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcUiProviderStub::BlockUi( TBool /*aBlocked*/ )
-    {
-    }
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CLcUiProviderStub::Reset()
-    {
-    iCalledFunction = EUnknown;
-    iRecipient.Set( KNullDesC );
-    iSimulatedReturnValue = EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TLcWindowStub::TLcWindowStub() :
-    iEnabled( EFalse ),
-    iRect(),
-    iOrientation( MLcWindow::EPortrait )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcWindowStub::EnableLcWindowL( TBool aEnable )
-    {
-    iEnabled = aEnable;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool TLcWindowStub::IsLcWindowEnabled()
-    {
-    return iEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcWindowStub::SetLcWindowRectL( TRect aRect )
-    {
-    iRect = aRect;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TRect TLcWindowStub::LcWindowRect()
-    {
-    delete HBufC::NewL( 1 );
-    return iRect;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcWindowStub::SetLcWindowOrientationL( TLcWindowOrientation aOrientation )
-    {
-    delete HBufC::NewL( 1 );
-    iOrientation = aOrientation;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcWindowStub::Reset()
-    {
-    iEnabled = EFalse;
-    iOrientation = MLcWindow::EPortrait;
-    iRect.SetSize( TSize() );
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-MLcWindow::TLcWindowOrientation TLcWindowStub::LcWindowOrientationL()
-    {
-    delete HBufC::NewL( 1 );
-    return iOrientation;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TLcAudioControlStub::TLcAudioControlStub()
-    {
-    Reset();
-    }
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool TLcAudioControlStub::IsLcAudioMutedL()
-    {
-    delete HBufC::NewL( 1 );
-    return iAudioMuted;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcAudioControlStub::MuteLcAudioL( TBool aMute )
-    {
-    delete HBufC::NewL( 1 );
-    iAudioMuted = aMute;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool TLcAudioControlStub::IsLcMicMutedL()
-    {
-    delete HBufC::NewL( 1 );
-    return iMicMuted;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcAudioControlStub::MuteLcMicL( TBool aMute )
-    {
-    delete HBufC::NewL( 1 );
-    iMicMuted = aMute;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool TLcAudioControlStub::IsEnablingLcLoudspeakerAllowed()
-    {
-    return iEnablingLoudspeakerAllowed;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcAudioControlStub::EnableLcLoudspeakerL( TBool aEnabled )
-    {
-    delete HBufC::NewL( 1 );
-    iLoudspeakerEnabled = aEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool TLcAudioControlStub::IsLcLoudspeakerEnabled()
-    {
-    return iLoudspeakerEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TInt TLcAudioControlStub::LcVolumeL()
-    {
-    delete HBufC::NewL( 1 );
-    return iVolume;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcAudioControlStub::SetLcVolumeL( TInt aValue )
-    {
-    delete HBufC::NewL( 1 );
-    iVolume = aValue;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcAudioControlStub::IncreaseLcVolumeL()
-    {
-    delete HBufC::NewL( 1 );
-    iVolume++;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcAudioControlStub::DecreaseLcVolumeL()
-    {
-    delete HBufC::NewL( 1 );
-    iVolume--;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void TLcAudioControlStub::Reset()
-    {
-    iAudioMuted = EFalse;
-    iMicMuted = EFalse;
-    iEnablingLoudspeakerAllowed = EFalse;
-    iLoudspeakerEnabled = ETrue;
+    iTranscodingProgressedPercentage = 0;
+    delete iIncomingSessionOriginator;
+    iSessionTemporarilyNotAvailable = EFalse;   
+    iIncomingSessionOriginator = NULL;
+    iShowNote = EFalse;
+    iAudioRouteChangeAllowed = ETrue;
     iVolume = 0;
+    iDueUnknowCapas = EFalse;
+    iOrientationRefreshEndedCalled = EFalse;
     }
 
 
@@ -610,8 +556,3 @@
     : iRegistry( aRegistry )
     {
     }
-
-void REComSession::DestroyedImplementation(TUid /*aDtorIDKey*/)
-    {
-    }
-
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengcamerahandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,956 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include "ut_musengcamerahandler.h"
-#include "musengstubs.h"
-#include "musengtestdefs.h"
-#include "musenglivesession.h"
-#include "mussipprofilehandler.h"
-#include "musengmceutils.h"
-#include "mussettings.h"
-#include "mussessionproperties.h"
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-#include <mceoutsession.h>
-#include <mcestreambundle.h>
-#include <mcevideostream.h>
-#include <mcecamerasource.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcertpsource.h>
-
-const TUint KSipProfileId( 1 );
-
-//use step in different time period
-const TInt KZoomBigStepCount = 15;
-const TInt KZoomSmallStepCount = KZoomBigStepCount*2;
-const TInt KZoomStepMinSize = 1;
-
-// 0.4 second
-const TInt64 KZoomFasterTime = 400000;//must bigger than 1/3 second
-
-//insure that step is 1
-#define USER_SLEEP  User::After(KZoomFasterTime)
-
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_TMusEngCameraHandler* UT_TMusEngCameraHandler::NewL()
-    {
-    UT_TMusEngCameraHandler* self = UT_TMusEngCameraHandler::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_TMusEngCameraHandler* UT_TMusEngCameraHandler::NewLC()
-    {
-    UT_TMusEngCameraHandler* self = new( ELeave ) UT_TMusEngCameraHandler();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_TMusEngCameraHandler::~UT_TMusEngCameraHandler()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_TMusEngCameraHandler::UT_TMusEngCameraHandler()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::SetupL()
-    {
-    iManager = CMceManager::NewL( TUid::Null(), NULL );
-    iObserver = new( ELeave ) CMusEngObserverStub;
-    iObserver->iRoamingBetweenAPsAllowed = ETrue;
-    iProfileHandler = CMusSipProfileHandler::NewL( *iObserver );
-     
-    iProfileHandler->CreateProfileL( KSipProfileId );
-     
-    iSession = CMceOutSession::NewL( *iManager,
-                                     *iProfileHandler->Profile(),
-                                      KTestRecipientSipUri8() );
-       
-       
-    CMceVideoStream* videoOut = CMceVideoStream::NewLC();
-    
-    videoOut->AddSinkL( CMceRtpSink::NewLC() );
-    CleanupStack::Pop();
-    
-    videoOut->AddSinkL( CMceDisplaySink::NewLC( *iManager ) );
-    CleanupStack::Pop();
-    
-    videoOut->SetSourceL( CMceCameraSource::NewLC( *iManager ) );
-    CleanupStack::Pop();
-    
-    CMceVideoStream* videoIn  = CMceVideoStream::NewLC();
-    
-    CMceDisplaySink* receivingDisplay = CMceDisplaySink::NewLC( *iManager );
-    videoIn->AddSinkL( receivingDisplay );
-    CleanupStack::Pop();
-    
-    videoIn->SetSourceL( CMceRtpSource::NewLC() );
-    CleanupStack::Pop();
-    
-    videoOut->BindL( videoIn );
-    CleanupStack::Pop( videoIn );
-    
-    iSession->AddStreamL( videoOut );
-    CleanupStack::Pop( videoOut ); 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::Teardown()
-    {
-    delete iSession;
-    iSession = NULL;
-    iCameraHandler.SetSession( NULL );
-    delete iProfileHandler;
-    delete iObserver;
-    delete iManager;
-    }
-
-
-
-// TEST CASES
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_LcCameraCountL()
-    {
-    // Call without setting the MCE session
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.LcCameraCountL(), KErrNotReady )
-    
-    iCameraHandler.SetSession( iSession );
-    CMceCameraSource* camera = 
-        MusEngMceUtils::GetCameraL( *( iSession ) );
-    iCameraHandler.iCameraUsage = MusSettingsKeys::EUseCameraSwapping;
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = TMusEngCameraHandler::EBackCamera;
-   
-    // Two cameras
-    EUNIT_ASSERT_EQUALS( 2, iCameraHandler.LcCameraCountL() )
-
-    // Two cameras, swapping cameras not allowed, use only main camera
-    iCameraHandler.iCameraUsage = MusSettingsKeys::EUseOnlyMainCamera;
-    camera->iCameraCount = 2;
-    EUNIT_ASSERT_EQUALS( 1, iCameraHandler.LcCameraCountL() )
-
-    // Two cameras, swapping cameras not allowed, use only main camera
-    iCameraHandler.iCameraUsage = MusSettingsKeys::EUseOnlySecondaryCamera;
-    camera->iCameraCount = 2;
-    EUNIT_ASSERT_EQUALS( 1, iCameraHandler.LcCameraCountL() )
-
-    // Only one camera available
-    iCameraHandler.iCameraUsage = MusSettingsKeys::EUseCameraSwapping;
-    camera->iCameraCount = 1;
-    EUNIT_ASSERT_EQUALS( 1, iCameraHandler.LcCameraCountL() ) 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_ToggleLcCameraL()
-    {
-    EUNIT_ASSERT_EQUALS( TInt( TMusEngCameraHandler::ECameraNotAvailable ), 
-                         iCameraHandler.CurrentLcCameraIndex() )     
-    
-    iCameraHandler.SetSession( iSession );
-    iCameraHandler.iCameraUsage = MusSettingsKeys::EUseCameraSwapping;
-    iCameraHandler.iCurrentCamera = TMusEngCameraHandler::EBackCamera;
-    
-    // Switch from back to front
-    iCameraHandler.ToggleLcCameraL();
-    EUNIT_ASSERT_EQUALS( TInt( TMusEngCameraHandler::EFrontCamera ), 
-                         iCameraHandler.CurrentLcCameraIndex() )
-    
-    // Switch from front to back
-    iCameraHandler.ToggleLcCameraL();
-    EUNIT_ASSERT_EQUALS( TInt( TMusEngCameraHandler::EBackCamera ), 
-                         iCameraHandler.CurrentLcCameraIndex() )    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_MinLcZoomL()
-    {
-    // MCE Session has not been set
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.MinLcZoomL(), KErrNotReady )
-
-    // MCE Session has been set
-    iCameraHandler.SetSession( iSession );
-    EUNIT_ASSERT_EQUALS( 
-        iCameraHandler.iCameraInfo.iMinZoom,
-        iCameraHandler.MinLcZoomL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_MaxLcZoomL()
-    {
-    // MCE Session has not been set
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.MaxLcZoomL(), KErrNotReady )
-
-    // MCE Session has been set
-    iCameraHandler.SetSession( iSession );
-    EUNIT_ASSERT_EQUALS( 
-        iCameraHandler.iCameraInfo.iMaxZoom + 
-        iCameraHandler.iCameraInfo.iMaxDigitalZoom,
-        iCameraHandler.MaxLcZoomL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_LcZoomValueL()
-    {  
-    // MCE Session has not been set
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.LcZoomValueL(), KErrNotReady )
-    
-    // Check that originally current and default zoom are the same
-    iCameraHandler.SetSession( iSession );
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *( iSession ) );    
-    
-    // Zoom to maximum optical value
-    while ( camera->iZoomFactor < iCameraHandler.iCameraInfo.iMaxZoom )
-        {
-        iCameraHandler.LcZoomInL();
-        }   
-    EUNIT_ASSERT_EQUALS( 
-        iCameraHandler.iCameraInfo.iMaxZoom,
-        iCameraHandler.LcZoomValueL() )   
-
-    // Zoom using digital zoom
-    iCameraHandler.LcZoomInL();
-    EUNIT_ASSERT_EQUALS(
-        iCameraHandler.iCameraInfo.iMaxZoom + camera->iDigitalZoomFactor,
-        iCameraHandler.LcZoomValueL() )              
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_SetLcZoomValueL()
-    {
-    // MCE Session has not been set
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iCameraHandler.SetLcZoomValueL( 1 ), 
-        KErrNotReady )
-    
-    // Value above the maximum zoom
-    iCameraHandler.SetSession( iSession );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iCameraHandler.SetLcZoomValueL( iCameraHandler.MaxLcZoomL() + 1 ), 
-        KErrArgument )   
-    
-    // Value below the minimum zoom
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iCameraHandler.SetLcZoomValueL( iCameraHandler.MinLcZoomL() - 1 ), 
-        KErrArgument )     
-    
-    // OK: set zoom factor
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    TInt zoomValue = iCameraHandler.iCameraInfo.iMaxZoom - 1;  
-    iCameraHandler.SetLcZoomValueL( zoomValue );
-    EUNIT_ASSERT_EQUALS( zoomValue, camera->ZoomFactorL() )     
-    
-    // OK: set digital zoom factor
-    zoomValue = iCameraHandler.iCameraInfo.iMaxZoom + 1;
-    iCameraHandler.SetLcZoomValueL( zoomValue );
-    EUNIT_ASSERT_EQUALS( 1, camera->DigitalZoomFactorL() )  
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_LcZoomInL()
-    {    
-    // Check that zooming is not possible before invite
-    TRAPD( error, iCameraHandler.LcZoomInL() );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrNotReady );
-    
-    iCameraHandler.SetSession( iSession );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *( iSession ) );
-    
-    TInt oldZoomFactor = camera->iZoomFactor;
-    
-    // Check that zoom factor can be increased
-    USER_SLEEP;  //insure that small step is used
-    iCameraHandler.LcZoomInL();
-    EUNIT_ASSERT( camera->iZoomFactor == oldZoomFactor +
-            iCameraHandler.iSmallZoomStep );
-    
-   //Check the "burst" mode (immediate second ZoomIn), big step should be used
-    TInt nZoom = camera->iZoomFactor + camera->iDigitalZoomFactor;
-    iCameraHandler.LcZoomInL();
-    TInt nStep = camera->iZoomFactor + camera->iDigitalZoomFactor - nZoom;
-    EUNIT_ASSERT( nStep == iCameraHandler.iBigZoomStep );
-
-    // Zoom to maximum optical value
-    while ( camera->iZoomFactor < iCameraHandler.iCameraInfo.iMaxZoom )
-        {
-        iCameraHandler.LcZoomInL();
-        }
-        
-    TInt maxOpticalZoomFactor = camera->ZoomFactorL();
-    
-    // Check that digital zoom is used instead of optical
-    iCameraHandler.LcZoomInL();
-    EUNIT_ASSERT( camera->iZoomFactor == maxOpticalZoomFactor );
-    EUNIT_ASSERT( camera->iDigitalZoomFactor > 0 );
-    
-    // Zoom to maximum digital value
-    while ( camera->iDigitalZoomFactor < 
-            iCameraHandler.iCameraInfo.iMaxDigitalZoom )
-        {
-        iCameraHandler.LcZoomInL();
-        }
-    
-    TInt maxDigitalZoomFactor = camera->DigitalZoomFactorL();
-    
-    // Check that further zooming is impossible
-    iCameraHandler.LcZoomInL();
-    EUNIT_ASSERT( camera->iZoomFactor == maxOpticalZoomFactor );
-    EUNIT_ASSERT( camera->iDigitalZoomFactor == maxDigitalZoomFactor );   
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_LcZoomOutL()
-    {
-    // Check that zooming is not possible before invite
-    TRAPD( error, iCameraHandler.LcZoomOutL() );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrNotReady );
-    
-    iCameraHandler.SetSession( iSession );
-    
-    CMceCameraSource* camera = 
-                        MusEngMceUtils::GetCameraL( *(iSession) );
-    
-    // Simulate maximum zoom 
-    camera->iZoomFactor = iCameraHandler.iCameraInfo.iMaxZoom;
-    camera->iDigitalZoomFactor = iCameraHandler.iCameraInfo.iMaxDigitalZoom;
-    
-    // Check that digital zoom factor can be decreased
-    USER_SLEEP;  //insure that small step is used
-    iCameraHandler.LcZoomOutL();
-    EUNIT_ASSERT( camera->iZoomFactor == iCameraHandler.iCameraInfo.iMaxZoom );
-    EUNIT_ASSERT( camera->iDigitalZoomFactor == 
-                    iCameraHandler.iCameraInfo.iMaxDigitalZoom - 
-                    iCameraHandler.iSmallZoomStep );
-    
-    //Check the "burst" mode (immediate second ZoomOut), big step should be used
-    TInt nZoom = camera->iZoomFactor + camera->iDigitalZoomFactor;
-    iCameraHandler.LcZoomOutL();
-    TInt nStep;
-    nStep = nZoom - (camera->iZoomFactor + camera->iDigitalZoomFactor );
-    EUNIT_ASSERT( nStep == iCameraHandler.iBigZoomStep );
- 
-    // Simulate maximum zoom again
-    camera->iZoomFactor = iCameraHandler.iCameraInfo.iMaxZoom;
-    camera->iDigitalZoomFactor = iCameraHandler.iCameraInfo.iMaxDigitalZoom;
-    
-    // Zoom to minimum digital zoom
-    while ( camera->iDigitalZoomFactor > 0 )
-        {
-        iCameraHandler.LcZoomOutL();
-        }
-    
-    EUNIT_ASSERT( camera->iZoomFactor == iCameraHandler.iCameraInfo.iMaxZoom );
-    EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 );
-    
-    // Check that optical zoom is decreased instead of digital
-    USER_SLEEP;  //insure that step is the small one
-    iCameraHandler.LcZoomOutL();
-    EUNIT_ASSERT( camera->iZoomFactor == 
-                    iCameraHandler.iCameraInfo.iMaxZoom -
-                    iCameraHandler.iSmallZoomStep );
-    EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 );
-    
-    // Zoom to minimum optical zoom
-    while ( camera->iZoomFactor > iCameraHandler.iCameraInfo.iMinZoom )
-        {
-        iCameraHandler.LcZoomOutL();
-        }
-    
-    // Check that further zooming is impossible
-    iCameraHandler.LcZoomOutL();
-    EUNIT_ASSERT( camera->iZoomFactor == iCameraHandler.iCameraInfo.iMinZoom );
-    EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_SetLcBrightnessL()
-    {
-    // Check that setting brightness is not possible before invite
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iCameraHandler.SetLcBrightnessL( KTestSomeBrightness ),
-        KErrNotReady )
-    
-    iCameraHandler.SetSession( iSession );
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *( iSession ) );
-   
-    camera->iCameraInfo.iOptionsSupported =
-        camera->iCameraInfo.iOptionsSupported|TCameraInfo::EBrightnessSupported;
-
-    // Check that originally current and default brightness are the same
-    EUNIT_ASSERT_EQUALS( iCameraHandler.iDefaultBrightness,
-                         iCameraHandler.LcBrightnessL() )
-
-    // Test setting brightness
-    iCameraHandler.SetLcBrightnessL( KTestSomeBrightness );
-    EUNIT_ASSERT_EQUALS( KTestSomeBrightness, iCameraHandler.LcBrightnessL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_LcBrightnessL()
-    {
-    // Check that checking current brightness is not possible before invite
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.LcBrightnessL(),
-                                 KErrNotReady )
-    
-    // All the other stuff checked in tests of SetBrightnessL
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_MaxLcBrightnessL()
-    {
-    // MaxBrightness should return a constant
-    EUNIT_ASSERT_EQUALS( KTestMaxBrightness, iCameraHandler.MaxLcBrightnessL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_MinLcBrightnessL()
-    {
-    // MinBrightness should return a constant
-
-    EUNIT_ASSERT_EQUALS( KTestMinBrightness, iCameraHandler.MinLcBrightnessL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_IncreaseLcBrightnessL()
-    {
-    // Check that increasing brightness is not possible before invite
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.IncreaseLcBrightnessL(),
-                                 KErrNotReady )
-
-    iCameraHandler.SetSession( iSession );
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *(iSession) );
-
-    camera->iCameraInfo.iOptionsSupported =
-        camera->iCameraInfo.iOptionsSupported|TCameraInfo::EBrightnessSupported;
-    
-    // Check that originally current and default brightness are the same
-    EUNIT_ASSERT_EQUALS( iCameraHandler.iDefaultBrightness,
-                         iCameraHandler.LcBrightnessL() )
-
-    // Check that brightness can be increased...
-    iCameraHandler.IncreaseLcBrightnessL();
-    EUNIT_ASSERT_EQUALS( iCameraHandler.iDefaultBrightness + KTestBrightnessStepSize,
-                         iCameraHandler.LcBrightnessL() )
-                         
-    // ... but only to maximum
-    iCameraHandler.SetLcBrightnessL( KTestMaxBrightness );
-    iCameraHandler.IncreaseLcBrightnessL();
-    
-    EUNIT_ASSERT_EQUALS( KTestMaxBrightness,
-                         iCameraHandler.LcBrightnessL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_DecreaseLcBrightnessL()
-    {
-    // Check that decreasing brightness is not possible before invite
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.DecreaseLcBrightnessL(),
-                                 KErrNotReady )
-
-    iCameraHandler.SetSession( iSession );
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *(iSession) );
-
-    camera->iCameraInfo.iOptionsSupported =
-        camera->iCameraInfo.iOptionsSupported|TCameraInfo::EBrightnessSupported;
-    
-    // Check that originally current and default brightness are the same
-    EUNIT_ASSERT_EQUALS( iCameraHandler.iDefaultBrightness,
-                         iCameraHandler.LcBrightnessL() )
-
-    // Check that brightness can be decreased...
-    iCameraHandler.DecreaseLcBrightnessL();
-
-    EUNIT_ASSERT_EQUALS( 
-        iCameraHandler.iDefaultBrightness - KTestBrightnessStepSize,
-        iCameraHandler.LcBrightnessL() )
-    
-    // ... but only to minimum
-    iCameraHandler.SetLcBrightnessL( KTestMinBrightness );
-    iCameraHandler.DecreaseLcBrightnessL();
-    EUNIT_ASSERT_EQUALS( KTestMinBrightness,
-                         iCameraHandler.LcBrightnessL() )
-	}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//    
-void UT_TMusEngCameraHandler::UT_PlayL()
-    {
-    // Check that resuming is not possible before invite
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.PlayL(), KErrNotReady )
-   
-    iCameraHandler.SetSession( iSession );
-
-    iCameraHandler.PauseL();
- 
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *(iSession) );    
-    iCameraHandler.PlayL();
-    EUNIT_ASSERT( camera->IsEnabled() )
- 
-    // Try to enable camera again, request should be ignored
-    iCameraHandler.PlayL();
-    EUNIT_ASSERT( camera->IsEnabled() )
-    }  
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//    
-void UT_TMusEngCameraHandler::UT_PauseL()
-    {
-    // Check that pausing is not possible before invite
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.PauseL(), KErrNotReady )
-    
-    iCameraHandler.SetSession( iSession );
-    
-    iCameraHandler.PlayL();
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *(iSession) );
-                    
-    iCameraHandler.PauseL();
-
-    EUNIT_ASSERT( !camera->IsEnabled() )
-    
-    // Try to disable camera again, request should be ignored
-    iCameraHandler.PauseL();
-    EUNIT_ASSERT( !camera->IsEnabled() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//    
-void UT_TMusEngCameraHandler::UT_IsPlayingL()
-    {
-    // Try without a session 
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iCameraHandler.IsPlayingL(), KErrNotReady )
-    
-    // Normal cases
-    iCameraHandler.SetSession( iSession );
-    
-    iCameraHandler.PlayL();
-    EUNIT_ASSERT( iCameraHandler.IsPlayingL() )
-    
-    iCameraHandler.PauseL();
-    EUNIT_ASSERT( !iCameraHandler.IsPlayingL() )
-    }
-    
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_InitializeZoomStepSizeL()
-    {
-    //Check that zooming steps have defualt values before session establishment
-    iCameraHandler.InitializeZoomStepSize();
-    EUNIT_ASSERT( iCameraHandler.iSmallZoomStep == KZoomStepMinSize );
-    EUNIT_ASSERT( iCameraHandler.iBigZoomStep == KZoomStepMinSize );
-    
-    iCameraHandler.SetSession( iSession );   
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *(iSession) );
-    
-    //Check that zooming step sizes have default value KZoomStepMinSize 
-    //in case of zooming values range is smaller than KZoomBigStepCount
-    iCameraHandler.iCameraInfo.iMinZoom = 0;
-    iCameraHandler.iCameraInfo.iMaxZoom = 0;
-    iCameraHandler.iCameraInfo.iMaxDigitalZoom = KZoomBigStepCount / 2;    
-    iCameraHandler.InitializeZoomStepSize();
-    EUNIT_ASSERT( iCameraHandler.iSmallZoomStep == KZoomStepMinSize );
-    EUNIT_ASSERT( iCameraHandler.iBigZoomStep == KZoomStepMinSize );
-    
-    //Check that zooming step sizes have default value KZoomStepMinSize 
-    //in case of zooming values range is bigger than KZoomBigStepCount,
-    //but smaller than 2*KZoomBigStepCount (KZoomSmallStepCount)
-    iCameraHandler.iCameraInfo.iMaxDigitalZoom = 2*KZoomBigStepCount - 1;
-    iCameraHandler.InitializeZoomStepSize();
-    EUNIT_ASSERT( iCameraHandler.iSmallZoomStep == KZoomStepMinSize );
-    EUNIT_ASSERT( iCameraHandler.iBigZoomStep == KZoomStepMinSize );
- 
-    //Check zooming steps sizes in case of zooming values range is
-    //bigger than 2*KZoomBigStepCount and smaller than 2*KZoomSmallStepCount
-    iCameraHandler.iCameraInfo.iMinZoom = - KZoomBigStepCount;
-    iCameraHandler.iCameraInfo.iMaxZoom = KZoomBigStepCount;
-    iCameraHandler.iCameraInfo.iMaxDigitalZoom = KZoomBigStepCount;
-    //zooming range is (-KZoomBigStepCount, 2*KZoomBigStepCount)
-    iCameraHandler.InitializeZoomStepSize();
-    EUNIT_ASSERT( iCameraHandler.iSmallZoomStep == KZoomStepMinSize );
-    EUNIT_ASSERT( iCameraHandler.iBigZoomStep == 3 );
-
-    //Check zooming steps sizes in case of zooming values range is
-    //bigger than 2*KZoomSmallStepCount
-    iCameraHandler.iCameraInfo.iMaxZoom = KZoomSmallStepCount;
-    iCameraHandler.iCameraInfo.iMaxDigitalZoom = KZoomSmallStepCount;
-    iCameraHandler.iCameraInfo.iMinZoom = - KZoomSmallStepCount;
-    //zooming range is (-KZoomSmallStepCount, 2*KZoomSmallStepCount)
-    iCameraHandler.InitializeZoomStepSize();
-    EUNIT_ASSERT( iCameraHandler.iSmallZoomStep == 3 );
-    EUNIT_ASSERT( iCameraHandler.iBigZoomStep == 6 );    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_ChangeActiveCameraL()
-    {
-    iCameraHandler.SetSession( iSession );
-    
-    CMceCameraSource* camera = 
-        MusEngMceUtils::GetCameraL( *(iSession) );
-    
-    //Camera is not enabled
-    camera->iIsEnabled = ETrue;
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 1;
-    iCameraHandler.ChangeActiveCameraL( TMusEngCameraHandler::EFrontCamera );
-    EUNIT_ASSERT(  camera->iCameraIndex == 1 );
-    EUNIT_ASSERT(  camera->iIsEnabled == ETrue );
-    
-    //Camera is not enabled
-    camera->iIsEnabled = EFalse;
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 1;
-    iCameraHandler.ChangeActiveCameraL( TMusEngCameraHandler::EFrontCamera );
-    EUNIT_ASSERT(  camera->iCameraIndex == 1 );
-    EUNIT_ASSERT(  camera->iIsEnabled == EFalse );    
-
-    //Check that iCameraInfo get updated after camera change
-    EUNIT_PRINT(_L("Check that iCameraInfo get updated after camera change"));
-    
-    //Check that iCameraInfo get updated after camera change
-    EUNIT_PRINT(_L("Check that iCameraInfo get updated after camera change"));
-    camera->iIsEnabled = ETrue;
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 0;
-    iCameraHandler.ChangeActiveCameraL( TMusEngCameraHandler::EBackCamera );
-    EUNIT_ASSERT(  camera->iCameraIndex == 0 );
-    TCameraInfo infoBack = iCameraHandler.iCameraInfo;
-    iCameraHandler.ChangeActiveCameraL( TMusEngCameraHandler::EFrontCamera );
-    EUNIT_ASSERT(  camera->iCameraIndex == 1 );
-    TCameraInfo infoFront = iCameraHandler.iCameraInfo;
-    
-    EUNIT_ASSERT(  infoBack.iMaxZoom != infoFront.iMaxZoom );
-    EUNIT_ASSERT(  infoBack.iMaxDigitalZoom != infoFront.iMaxDigitalZoom );
-    camera->iIsEnabled = ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_TMusEngCameraHandler::UT_ChangeCameraL()
-    { 
-    TRAPD( error, iCameraHandler.ChangeCameraL( TMusEngCameraHandler::EFrontCamera ) );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrNotReady );
-    
-    iCameraHandler.SetSession( iSession );
-    
-    CMceCameraSource* camera = 
-                            MusEngMceUtils::GetCameraL( *(iSession) );
-    //Only one camera is supported 
-    camera->iCameraCount = 0;
-    camera->iCameraIndex = 0;
-    
-    iCameraHandler.ChangeCameraL( TMusEngCameraHandler::EFrontCamera );
-    //EUNIT_ASSERT(  camera->iCameraIndex == 0 );
-    
-    // Front camera is supported.
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 1;
-    iCameraHandler.ChangeCameraL( TMusEngCameraHandler::EFrontCamera );
-    EUNIT_ASSERT(  camera->iCameraIndex == 1 );
-    
-    //No change
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 0;
-    camera->iIsEnabled = EFalse;
-    iCameraHandler.ChangeCameraL( TMusEngCameraHandler::EFrontCamera );
-    EUNIT_ASSERT(  camera->iIsEnabled == EFalse );
-    
-    // Back camera is supported.
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 1;
-    iCameraHandler.ChangeCameraL( TMusEngCameraHandler::EBackCamera );
-    EUNIT_ASSERT(  camera->iCameraIndex == 0 );
-        
-    //No change
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 0;
-    camera->iIsEnabled = EFalse;
-    iCameraHandler.ChangeCameraL( TMusEngCameraHandler::EBackCamera );
-    EUNIT_ASSERT(  camera->iIsEnabled == EFalse );
-    
-    // Next camera.
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 0;
-    iCameraHandler.ChangeCameraL( TMusEngCameraHandler::ECameraNotAvailable );
-    EUNIT_ASSERT(  camera->iCameraIndex == 1 );
-    
-    camera->iCameraCount = 2;
-    camera->iCameraIndex = 1;
-    iCameraHandler.ChangeCameraL( TMusEngCameraHandler::ECameraNotAvailable );
-    EUNIT_ASSERT(  camera->iCameraIndex == 0 );    
-    }
-
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_TMusEngCameraHandler,
-    "UT_TMusEngCameraHandler",
-    "UNIT" )
-
-EUNIT_TEST(
-    "LcCameraCountL - test ",
-    "TMusEngCameraHandler",
-    "LcCameraCountL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcCameraCountL, Teardown)
-
-EUNIT_TEST(
-    "ToggleLcCameraL - test ",
-    "TMusEngCameraHandler",
-    "ToggleLcCameraL",
-    "FUNCTIONALITY",
-    SetupL, UT_ToggleLcCameraL, Teardown)
-
-EUNIT_TEST(
-    "MinLcZoomL - test ",
-    "TMusEngCameraHandler",
-    "MinLcZoomL",
-    "FUNCTIONALITY",
-    SetupL, UT_MinLcZoomL, Teardown)
-    
-EUNIT_TEST(
-    "MaxLcZoomL - test ",
-    "TMusEngCameraHandler",
-    "MaxLcZoomL",
-    "FUNCTIONALITY",
-    SetupL, UT_MaxLcZoomL, Teardown)
-
-EUNIT_TEST(
-    "LcZoomValueL - test ",
-    "TMusEngCameraHandler",
-    "LcZoomValueL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcZoomValueL, Teardown)
-    
-EUNIT_TEST(
-    "SetLcZoomValueL - test ",
-    "TMusEngCameraHandler",
-    "SetLcZoomValueL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetLcZoomValueL, Teardown)     
-    
-EUNIT_TEST(
-    "LcZoomInL - test ",
-    "TMusEngCameraHandler",
-    "LcZoomInL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcZoomInL, Teardown)
-
-EUNIT_TEST(
-    "LcZoomOutL - test ",
-    "TMusEngCameraHandler",
-    "LcZoomOutL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcZoomOutL, Teardown)
-
-EUNIT_TEST(
-    "SetLcBrightnessL - test ",
-    "TMusEngCameraHandler",
-    "SetLcBrightnessL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetLcBrightnessL, Teardown)
-
-EUNIT_TEST(
-    "LcBrightnessL - test ",
-    "TMusEngCameraHandler",
-    "LcBrightnessL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcBrightnessL, Teardown)
-
-EUNIT_TEST(
-    "MaxLcBrightnessL - test ",
-    "TMusEngCameraHandler",
-    "MaxLcBrightnessL",
-    "FUNCTIONALITY",
-    SetupL, UT_MaxLcBrightnessL, Teardown)
-
-EUNIT_TEST(
-    "MinLcBrightnessL - test ",
-    "TMusEngCameraHandler",
-    "MinLcBrightnessL",
-    "FUNCTIONALITY",
-    SetupL, UT_MinLcBrightnessL, Teardown)
-
-EUNIT_TEST(
-    "IncreaseLcBrightnessL - test ",
-    "TMusEngCameraHandler",
-    "IncreaseLcBrightnessL",
-    "FUNCTIONALITY",
-    SetupL, UT_IncreaseLcBrightnessL, Teardown)
-
-EUNIT_TEST(
-    "DecreaseLcBrightnessL - test ",
-    "TMusEngCameraHandler",
-    "DecreaseLcBrightnessL",
-    "FUNCTIONALITY",
-    SetupL, UT_DecreaseLcBrightnessL, Teardown)
-
-EUNIT_TEST(
-    "PlayL - test ",
-    "TMusEngCameraHandler",
-    "PlayL",
-    "FUNCTIONALITY",
-    SetupL, UT_PlayL, Teardown)
-
-EUNIT_TEST(
-    "PauseL - test ",
-    "TMusEngCameraHandler",
-    "PauseL",
-    "FUNCTIONALITY",
-    SetupL, UT_PauseL, Teardown)
-
-EUNIT_TEST(
-    "IsPlayingL - test ",
-    "TMusEngCameraHandler",
-    "IsPlayingL",
-    "FUNCTIONALITY",
-    SetupL, UT_IsPlayingL, Teardown)
-
-EUNIT_TEST(
-    "InitializeZoomStepSize - test ",
-    "TMusEngCameraHandler",
-    "InitializeZoomStepSize",
-    "FUNCTIONALITY",
-    SetupL, UT_InitializeZoomStepSizeL, Teardown)      
-
-EUNIT_TEST(
-    "ChangeCameraL - test ",
-    "TMusEngCameraHandler",
-    "ChangeCameraL",
-    "FUNCTIONALITY",
-    SetupL, UT_ChangeCameraL, Teardown)    
-    
-EUNIT_TEST(
-    "UT_ChangeActiveCameraL - test ",
-    "TMusEngCameraHandler",
-    "DisableAndEnableBeforeChangingCamera",
-    "FUNCTIONALITY",
-    SetupL, UT_ChangeActiveCameraL, Teardown)
-    
-EUNIT_END_TEST_TABLE
-
-//  END OF FILE
-
-
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengclipsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengclipsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -23,12 +23,10 @@
 #include "musengclipsession.h"
 #include "mussipprofilehandler.h"
 #include "musengmceutils.h"
-#include "mussessionproperties.h"
+
 
 //  SYSTEM INCLUDES
-#include <lcvideoplayer.h>
-#include <lcsourcefilecontrol.h>
-#include <eunitmacros.h>
+#include <digia/eunit/eunitmacros.h>
 #include <mceoutsession.h>
 #include <mcestreambundle.h>
 #include <mcevideostream.h>
@@ -43,7 +41,6 @@
 #include <drmcommon.h>
 #include <sipprofile.h>
 #include <sipstrings.h>
-#include <e32property.h>
 
 
 // -----------------------------------------------------------------------------
@@ -109,26 +106,33 @@
 //
 void UT_CMusEngClipSession::SetupL()
     {
-    iLcSessionObserver = new( ELeave )CLcSessionObserverStub;
-    iLcUiProvider = new( ELeave )CLcUiProviderStub;
-    iAudioRoutingObserver = new( ELeave )CMusEngObserverStub; 
-    
-    iClipSession = CMusEngClipSession::NewL();
-    iClipSession->SetLcSessionObserver( iLcSessionObserver );
-    iClipSession->SetLcUiProvider( iLcUiProvider );    
-    iClipSession->LocalVideoPlayer()->LcSourceFileControl()->SetLcFileNameL(
-        KTestVideoFileName() );
-    delete iClipSession->iVideoCodecList;
-    iClipSession->iVideoCodecList = NULL;
+    iObserver = new( ELeave ) CMusEngObserverStub;
+    iClipSession = CMusEngClipSession::NewL( TRect(0,0, 100,100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );
+    iClipSession->SetClipL( KTestVideoFileName );
     iClipSession->iVideoCodecList = KMceSDPNameH264().AllocL();
 
     SIPStrings::OpenL();
-    
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        KTestRecipientSipUri ) );
     }
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::Setup2L()
+    {
+    iObserver = new( ELeave ) CMusEngObserverStub;
+    iClipSession = CMusEngClipSession::NewL( TRect(0,0, 100,100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );
+    iClipSession->SetClipL( KTestVideoFileName );
+    iClipSession->iVideoCodecList = KMceSDPNameH263().AllocL();
+
+    SIPStrings::OpenL();
+    }
     
 // -----------------------------------------------------------------------------
 //
@@ -138,16 +142,14 @@
     {
     SIPStrings::Close();
     delete iClipSession;
-    delete iLcSessionObserver;
-    delete iLcUiProvider;
-    delete iAudioRoutingObserver;
-    PropertyHelper::Close();
+    delete iObserver;
     }
 
 
 
 // TEST CASES
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -155,8 +157,662 @@
 void UT_CMusEngClipSession::UT_NewLL()
     {
     EUNIT_ASSERT( iClipSession )
+    EUNIT_ASSERT( iClipSession->iFileName != KNullDesC() )
     EUNIT_ASSERT( !iClipSession->iSession )
-    EUNIT_ASSERT( iClipSession->iMceManagerUid == TUid::Uid( KMusUiUid ) );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_SetClipLL()
+    {
+    // Try with protected file, cannot use EUNIT_ASSERT_SPECIFIC_LEAVE
+    TRAPD( error, iClipSession->SetClipL( KMusDrmProtectedFileName() ) )
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrPermissionDenied )
+    EUNIT_ASSERT_EQUALS( iClipSession->iFileName, KTestVideoFileName() )
+
+    // Change the file before session is established
+    iClipSession->SetClipL( KTestAvcVideoFileName() );
+    EUNIT_ASSERT_EQUALS( iClipSession->iFileName, KTestAvcVideoFileName() )
+    EUNIT_ASSERT( !iClipSession->iSession )
+    
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iClipSession );
+    
+    // Now test with established session
+    iClipSession->SetClipL( KTestVideoFileName() );
+    
+    CMceFileSource* file = 
+                    MusEngMceUtils::GetFileSourceL( *iClipSession->iSession );
+    
+    EUNIT_ASSERT_EQUALS( iClipSession->iFileName, KTestVideoFileName() )
+    EUNIT_ASSERT_EQUALS( file->iFileName, KTestVideoFileName() )
+    
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_FastForwardLL()
+    {
+    // Try before establishment
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->FastForwardL( ETrue ),
+                                 KErrNotReady )
+    
+    // Establish session, simulate position and duration and try again   
+    ESTABLISH_OUT_SESSION( iClipSession );
+    
+    CMceFileSource* file = 
+                    MusEngMceUtils::GetFileSourceL( *iClipSession->iSession );
+                    
+    file->iDuration = KMusEngTestFileDuration;
+    file->iPosition = KMusEngTestFilePosition; 
+    
+    iClipSession->FastForwardL( ETrue );
+
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() > 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 )
+    
+    // Simulate fastforwarding for a while
+    User::After( 1000 );
+
+    // Try to fastforward when already fastforwarding, will be ignored
+    iClipSession->FastForwardL( ETrue );
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() > 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 )
+    
+    // Stop fastforwarding
+    iClipSession->FastForwardL( EFalse );
+    EUNIT_ASSERT( file->iPosition > KMusEngTestFilePosition )
+    EUNIT_ASSERT( file->iPosition != file->iDuration )
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 )
+    
+    // Try to stop fastforwarding again, leaves 
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->FastForwardL( EFalse ),
+                                 KErrAlreadyExists )
+    
+    // Start fastrewinding
+    iClipSession->FastRewindL( ETrue );
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() > 0 )
+    
+    // Start fastforwarding, rewinding should be stopped and FFWD started
+    iClipSession->FastForwardL( ETrue );
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() > 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 )
+    
+    // Simulate fastforwarding for a while
+    User::After( 1000 );
+    
+    // Simulate that clip is almost in end and fastforwarding would have 
+    // continued over end, position should be set to duration.
+    
+    file->iPosition = TTimeIntervalMicroSeconds( file->iDuration.Int64() - 1 );
+    
+    iClipSession->FastForwardL( EFalse );
+    EUNIT_ASSERT( file->iPosition == file->iDuration )
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 )
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_FastRewindLL()
+    {
+    // Try before establishment
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->FastRewindL( ETrue ),
+                                 KErrNotReady )
+    
+    // Establish session, simulate position and duration and try again   
+    ESTABLISH_OUT_SESSION( iClipSession );
+    
+    CMceFileSource* file = 
+                    MusEngMceUtils::GetFileSourceL( *iClipSession->iSession );
+                    
+    file->iDuration = KMusEngTestFileDuration;
+    file->iPosition = KMusEngTestFilePosition; 
+    
+    iClipSession->FastRewindL( ETrue );
+
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() > 0 )
+    
+    // Simulate fastrewinding for a while
+    User::After( 1000 );
+    
+    // Try to fastrewind when already fastrewinding, will be ignored
+    iClipSession->FastRewindL( ETrue );
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() > 0 )
+    
+    // Stop fastrewinding
+    iClipSession->FastRewindL( EFalse );
+    EUNIT_ASSERT( file->iPosition < KMusEngTestFilePosition )
+    EUNIT_ASSERT( file->iPosition != TTimeIntervalMicroSeconds( 0 ) )
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 )
+    
+    // Try to stop fastrewinding again, leaves 
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->FastRewindL( EFalse ),
+                                 KErrAlreadyExists )
+    
+    // Start fastforwarding
+    iClipSession->FastForwardL( ETrue );
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() >= 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 )
+    
+    // Start fastrewinding, forwarding should be stopped and FFWD started
+    iClipSession->FastRewindL( ETrue );
+    EUNIT_ASSERT( !file->iIsEnabled );
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() >= 0 )
+    
+    // Simulate that clip has just begun and fastrewinding would have 
+    // continued over beginning, position should be set to zero.
+    
+    file->iPosition = TTimeIntervalMicroSeconds( 1 );
+    
+    // Simulate fastrewinding for a while
+    User::After( 1000 );
+    
+    iClipSession->FastRewindL( EFalse );
+    EUNIT_ASSERT( file->iPosition == TTimeIntervalMicroSeconds( 0 ) )
+    EUNIT_ASSERT( !file->iIsEnabled )
+    EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 )
+    EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) 
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_PositionLL()
+    {
+    // Try before establishment
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PositionL(), KErrNotReady )
+    
+    // Establish session and try again
+    ESTABLISH_OUT_SESSION( iClipSession );
+    
+    CMceFileSource* file = 
+                    MusEngMceUtils::GetFileSourceL( *iClipSession->iSession );
+    file->iPosition = 2000000;
+    
+    EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 
+                  file->iPosition.Int64() )
+    
+    // Ask position while fastforwarding, it should be bigger than real position
+    iClipSession->FastForwardL( ETrue );
+    
+    User::After( 1000000 ); // We have to wait since dividing in PositionL and 
+                            // multiplying before comparison loses difference 
+    
+    EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 >
+                  file->iPosition.Int64() )
+    
+    // Ask position while fastforwarding beyond end of clip, clip duration is
+    // returned
+    file->iPosition = file->iDuration;
+    
+    EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 ==
+                  file->iDuration.Int64() )
+    
+    // Stop fastforwarding, start fastrewinding, position is set to the end clip
+    iClipSession->FastForwardL( EFalse );
+    iClipSession->FastRewindL( ETrue );
+    
+    User::After( 1000000 ); // We have to wait since dividing in PositionL and 
+                            // multiplying before comparison loses difference 
+    
+    // Ask position while fastrewinding, it should be smaller than real 
+    // position
+    EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 <
+                  file->iPosition.Int64() )
+    
+    // Ask position while fastrewinding beyond the beginning of clip, zero 
+    // returned
+    file->iPosition = 0;
+    
+    EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 0 )
+    
+    // Asking position when rewinded to beginning but rewinding has ended 
+    // and clip has not ended (position should not be altered in that case)
+    iClipSession->iRewindedToBeginning = ETrue;
+    file->iPosition = 0;
+    iClipSession->iFRWDStartTime = TTime( 0 );
+    
+    EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 0 )
+    
+    // Position has proceeded from beginning, rewinding to beginning info
+    // is cleared.
+    file->iPosition = 10000000;
+    iClipSession->iFRWDStartTime = TTime( 0 );
+    iClipSession->iRewindedToBeginning = EFalse;
+    EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 10000000 )
+    EUNIT_ASSERT( iClipSession->iRewindedToBeginning == EFalse )
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_DurationLL()
+    {
+    // Try before establishment
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->DurationL(), KErrNotReady )
+    
+    // Establish session and try again
+    ESTABLISH_OUT_SESSION( iClipSession );
+    
+    CMceFileSource* file = 
+                    MusEngMceUtils::GetFileSourceL( *iClipSession->iSession );
+    file->iDuration = 2000000;
+    
+    EUNIT_ASSERT( iClipSession->DurationL().Int() * 1000000 == 
+                  file->iDuration.Int64() )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_SetPositionLL()
+    {
+    TTimeIntervalSeconds time( 20 );
+    
+    // Try before establishment
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->SetPositionL( time ),
+                                 KErrNotReady )
+    
+    // Normal case with already disabled file source
+    ESTABLISH_OUT_SESSION( iClipSession );
+    
+    CMceFileSource* file = 
+                MusEngMceUtils::GetFileSourceL( *iClipSession->iSession ); 
+    file->iIsEnabled = EFalse;
+    
+    iClipSession->SetPositionL( time );
+    
+    EUNIT_ASSERT( file->iPosition.Int64() == 
+                  static_cast<TInt64>(time.Int()) * 1000000 )
+    EUNIT_ASSERT( !file->iIsEnabled )
+    
+    // Normal case with enabled file source
+    TTimeIntervalSeconds anotherTime( 30 );
+
+    file->iIsEnabled = ETrue;
+    iClipSession->SetPositionL( anotherTime );
+    
+    EUNIT_ASSERT( file->iPosition.Int64() == 
+                  static_cast<TInt64>(anotherTime.Int()) * 1000000 )
+    EUNIT_ASSERT( file->iIsEnabled )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_TranscodeLToAvcL()
+    {
+    // Check that transcoding is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( 
+                    iClipSession->TranscodeL( KTestVideoFileName() ),
+                    KErrNotReady )
+    
+    // Construct session with video and audio streams that must transcoded 
+    
+    CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile();
+  
+    iClipSession->iSession = CMceOutSession::NewL( 
+                                    *(iClipSession->iManager),
+                                    *profile,
+                                    KTestRecipientSipUri8() );
+                             
+    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
+
+    CMceRtpSink* rtpsink = CMceRtpSink::NewLC();
+    videoStream->AddSinkL( rtpsink );
+    CleanupStack::Pop( rtpsink );
+
+    CMceFileSource* fileSource = 
+        CMceFileSource::NewLC( *iClipSession->iManager, KTestAvcVideoFileName() );
+    videoStream->SetSourceL( fileSource );                            
+    CleanupStack::Pop( fileSource );
+
+    iClipSession->iSession->AddStreamL( videoStream );
+    CleanupStack::Pop( videoStream );
+    
+    CMceAudioStream* audioStream = CMceAudioStream::NewLC();
+        
+    audioStream->AddSinkL( CMceRtpSink::NewLC() );
+    CleanupStack::Pop();
+    
+    audioStream->SetSourceL( fileSource );
+    
+    iClipSession->iSession->AddStreamL( audioStream );
+    CleanupStack::Pop( audioStream );
+    
+    videoStream->iState = CMceMediaStream::ETranscodingRequired;
+    audioStream->iState = CMceMediaStream::ETranscodingRequired; 
+    
+    // Remove all codecs (file has some unknown codec type)
+    RPointerArray<CMceVideoCodec> videoCodecs = videoStream->Codecs();
+    for ( TInt i = 0; i < videoCodecs.Count(); i++ )
+        {
+        videoStream->RemoveCodecL( *videoCodecs[ i ] );
+        }
+    RPointerArray<CMceVideoCodec> videoCodecs2 = videoStream->Codecs();
+    EUNIT_ASSERT_EQUALS( videoCodecs2.Count(), 0 )
+    EUNIT_ASSERT( audioStream->Codecs().Count() > 1 )  
+    
+    // Add some stream which must not be transcoded
+    
+    CMceAudioStream* inStream = CMceAudioStream::NewLC();
+        
+    inStream->AddSinkL( CMceSpeakerSink::NewLC() );
+    CleanupStack::Pop();
+    
+    inStream->SetSourceL( CMceRtpSource::NewLC() );
+    CleanupStack::Pop();
+    
+    iClipSession->iSession->AddStreamL( inStream );
+    CleanupStack::Pop( inStream );
+
+    // Transcode
+    iClipSession->TranscodeL( KTestAvcVideoFileName() );
+    
+    // Check that transcoding has begun (transcoding to AVC as we know
+    // that other end supports it
+    EUNIT_ASSERT( iClipSession->iTranscodingOngoing )
+    EUNIT_ASSERT( videoStream->State() == CMceMediaStream::ETranscoding )
+    EUNIT_ASSERT( audioStream->State() == CMceMediaStream::ETranscoding )
+    EUNIT_ASSERT( inStream->State() != CMceMediaStream::ETranscoding )
+    
+    // Check that codecs have been replaced
+    const RPointerArray<CMceVideoCodec> videoCodecs3 = videoStream->Codecs();
+    EUNIT_ASSERT_EQUALS( videoCodecs3.Count(), 1 )
+    EUNIT_ASSERT( videoCodecs3[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 )
+    EUNIT_ASSERT( audioStream->Codecs().Count() == 1 )  
+    EUNIT_ASSERT( audioStream->Codecs()[0]->AllowedBitrates() == 
+                  KMceAllowedAmrNbBitrate475 )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_TranscodeLToH263L()
+    {
+    // Check that transcoding is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( 
+                    iClipSession->TranscodeL( KTestVideoFileName() ),
+                    KErrNotReady )
+    
+    // Construct session with video and audio streams that must transcoded 
+    
+    CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile();
+  
+    iClipSession->iSession = CMceOutSession::NewL( 
+                                    *(iClipSession->iManager),
+                                    *profile,
+                                    KTestRecipientSipUri8() );
+                             
+    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
+
+    CMceRtpSink* rtpsink = CMceRtpSink::NewLC();
+    videoStream->AddSinkL( rtpsink );
+    CleanupStack::Pop( rtpsink );
+
+    CMceFileSource* fileSource = 
+        CMceFileSource::NewLC( *iClipSession->iManager, KTestAvcVideoFileName() );
+    videoStream->SetSourceL( fileSource );                            
+    CleanupStack::Pop( fileSource );
+
+    iClipSession->iSession->AddStreamL( videoStream );
+    CleanupStack::Pop( videoStream );
+    
+    CMceAudioStream* audioStream = CMceAudioStream::NewLC();
+        
+    audioStream->AddSinkL( CMceRtpSink::NewLC() );
+    CleanupStack::Pop();
+    
+    audioStream->SetSourceL( fileSource );
+    
+    iClipSession->iSession->AddStreamL( audioStream );
+    CleanupStack::Pop( audioStream );
+    
+    videoStream->iState = CMceMediaStream::ETranscodingRequired;
+    audioStream->iState = CMceMediaStream::ETranscodingRequired; 
+    
+    const RPointerArray<CMceVideoCodec> videoCodecs = videoStream->Codecs();
+    EUNIT_ASSERT_EQUALS( videoCodecs.Count(), 1 )
+    EUNIT_ASSERT( videoCodecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 )
+    EUNIT_ASSERT( audioStream->Codecs().Count() > 1 )  
+    
+    TSize resolution(200,200); // Some value
+    videoStream->Codecs()[0]->SetResolutionL( resolution );
+    audioStream->Codecs()[0]->SetBitrate( KMceAllowedAmrNbBitrateAll );
+    
+    // Add some stream which must not be transcoded
+    
+    CMceAudioStream* inStream = CMceAudioStream::NewLC();
+        
+    inStream->AddSinkL( CMceSpeakerSink::NewLC() );
+    CleanupStack::Pop();
+    
+    inStream->SetSourceL( CMceRtpSource::NewLC() );
+    CleanupStack::Pop();
+    
+    iClipSession->iSession->AddStreamL( inStream );
+    CleanupStack::Pop( inStream );
+
+    // Transcode
+    iClipSession->TranscodeL( KTestAvcVideoFileName() );
+    
+    // Check that transcoding has begun (transcoding to H263 as we don't
+    // know whether other end supports H264)    EUNIT_ASSERT( iClipSession->iTranscodingOngoing )
+    EUNIT_ASSERT( videoStream->State() == CMceMediaStream::ETranscoding )
+    EUNIT_ASSERT( audioStream->State() == CMceMediaStream::ETranscoding )
+    EUNIT_ASSERT( inStream->State() != CMceMediaStream::ETranscoding )
+    
+    // Check that codecs have been replaced
+    const RPointerArray<CMceVideoCodec> videoCodecs2 = videoStream->Codecs();
+    EUNIT_ASSERT_EQUALS( videoCodecs2.Count(), 1 )
+    EUNIT_ASSERT( videoCodecs2[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 )
+    EUNIT_ASSERT( audioStream->Codecs().Count() == 1 )  
+    
+    EUNIT_ASSERT( videoStream->Codecs()[0]->Resolution() != resolution )
+    EUNIT_ASSERT( audioStream->Codecs()[0]->AllowedBitrates() == 
+                  KMceAllowedAmrNbBitrate475 )
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngClipSession::UT_CancelTranscodeLL()
+    {
+    // Check that canceling transcoding is not possible before actual
+    // transcoding
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->CancelTranscodeL(),
+                                 KErrNotReady )
+    
+    // Construct session structure
+    
+    CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile();
+  
+    iClipSession->iSession = CMceOutSession::NewL( 
+                                    *(iClipSession->iManager),
+                                    *profile,
+                                    KTestRecipientSipUri8() );
+                             
+    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
+
+    CMceRtpSink* rtpsink = CMceRtpSink::NewLC();
+    videoStream->AddSinkL( rtpsink );
+    CleanupStack::Pop( rtpsink );
+
+    CMceFileSource* fileSource = 
+        CMceFileSource::NewLC( *iClipSession->iManager, KTestVideoFileName() );
+    videoStream->SetSourceL( fileSource );                            
+    CleanupStack::Pop( fileSource );
+
+    iClipSession->iSession->AddStreamL( videoStream );
+    CleanupStack::Pop( videoStream );
+    
+    CMceAudioStream* audioStream = CMceAudioStream::NewLC();
+        
+    audioStream->AddSinkL( CMceRtpSink::NewLC() );
+    CleanupStack::Pop();
+    
+    audioStream->SetSourceL( fileSource );
+    
+    iClipSession->iSession->AddStreamL( audioStream );
+    CleanupStack::Pop( audioStream );
+    
+    // Set need for transcoding
+    videoStream->iState = CMceMediaStream::ETranscodingRequired;
+    audioStream->iState = CMceMediaStream::ETranscodingRequired; 
+
+    // Transcode
+    iClipSession->TranscodeL( KTestAvcVideoFileName() );
+
+    EUNIT_ASSERT( videoStream->State() == CMceMediaStream::ETranscoding )
+    EUNIT_ASSERT( audioStream->State() == CMceMediaStream::ETranscoding )
+        
+    // Cancel
+    iClipSession->CancelTranscodeL();
+    
+    EUNIT_ASSERT( videoStream->State() == 
+                  CMceMediaStream::ETranscodingRequired )
+    EUNIT_ASSERT( audioStream->State() == 
+                  CMceMediaStream::ETranscodingRequired )
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//    
+void UT_CMusEngClipSession::UT_PlayLL()
+    {
+    // Check that resuming is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PlayL(), KErrNotReady )
+    
+    ESTABLISH_OUT_SESSION( iClipSession );
+
+    // Check that playing is not possible during FFWD
+    iClipSession->iFFWDStartTime = TTime( 10 );
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PlayL(), KErrNotReady )
+    iClipSession->iFFWDStartTime = TTime( 0 );
+ 
+    // Check that playing is not possible during FRWD
+    iClipSession->iFRWDStartTime = TTime( 10 );
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PlayL(), KErrNotReady )
+    iClipSession->iFRWDStartTime = TTime( 0 );
+
+    // Successful case
+    CMceFileSource* file = 
+            MusEngMceUtils::GetFileSourceL( *(iClipSession->iSession) );
+
+    file->iIsEnabled = EFalse;
+
+    iClipSession->PlayL();
+
+    EUNIT_ASSERT( file->IsEnabled() )
+    
+    // Try to play again, request should be ignored
+    
+    iClipSession->PlayL();
+
+    EUNIT_ASSERT( file->IsEnabled() )
+
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//    
+void UT_CMusEngClipSession::UT_PauseLL()
+    {
+    // Check that pausing is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PauseL(), KErrNotReady )
+    
+    ESTABLISH_OUT_SESSION( iClipSession );
+
+    // Check that pausing is not possible during FFWD
+    iClipSession->iFFWDStartTime = TTime( 10 );
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PauseL(), KErrNotReady )
+    iClipSession->iFFWDStartTime = TTime( 0 );
+ 
+    // Check that pausing is not possible during FRWD
+    iClipSession->iFRWDStartTime = TTime( 10 );
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PauseL(), KErrNotReady )
+    iClipSession->iFRWDStartTime = TTime( 0 );
+
+    // Successful case
+    
+    CMceFileSource* file = 
+            MusEngMceUtils::GetFileSourceL( *(iClipSession->iSession) );
+
+    file->iIsEnabled = ETrue;
+    
+    iClipSession->PauseL();
+
+    EUNIT_ASSERT( !file->IsEnabled() )
+    
+    // Try to pause again, request should be ignored
+    
+    iClipSession->PauseL();
+
+    EUNIT_ASSERT( !file->IsEnabled() )
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//    
+void UT_CMusEngClipSession::UT_IsPlayingLL()
+    {
+    // Try without a session 
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->IsPlayingL(), KErrNotReady );
+    
+    // Normal cases
+    ESTABLISH_OUT_SESSION( iClipSession );
+    
+    iClipSession->PlayL();
+    EUNIT_ASSERT( iClipSession->IsPlayingL() )
+    
+    iClipSession->PauseL();
+    EUNIT_ASSERT( !iClipSession->IsPlayingL() )
     }
         
 
@@ -165,26 +821,39 @@
 // -----------------------------------------------------------------------------
 //
 void UT_CMusEngClipSession::UT_CompleteSessionStructureLL()
-    {   
+    {
+    
     CMceStreamBundle* localBundle = 
-        CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
+                            CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
     
     // Check that structure cannot be completed before creating the session
     EUNIT_ASSERT_SPECIFIC_LEAVE( 
                 iClipSession->CompleteSessionStructureL( *localBundle ),
                 KErrNotReady )
     
-    // Normal case
-    CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile();          
+    // Check that structure cannot be completed before setting the file name
+    iClipSession->iFileName = KNullDesC();          
+    CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile();
+  
     iClipSession->iSession = CMceOutSession::NewL( 
-        *iClipSession->iManager, *profile, KTestRecipientSipUri8() );
+                                    *(iClipSession->iManager),
+                                    *profile,
+                                    KTestRecipientSipUri8() );
+
+    EUNIT_ASSERT_SPECIFIC_LEAVE( 
+                iClipSession->CompleteSessionStructureL( *localBundle ),
+                KErrNotReady )
     
+    // Normal case
+    iClipSession->iFileName = KTestVideoFileName();                     
     iClipSession->CompleteSessionStructureL( *localBundle );
+    
     EUNIT_ASSERT( iClipSession->iSession->Streams().Count() == 3 )
     EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Type() == KMceVideo )
     EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Source() )
     EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Source()->Type() ==
-                  KMceFileSource )             
+                  KMceFileSource )
+    EUNIT_ASSERT( !iClipSession->IsPlayingL() )              
     EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Sinks().Count() == 1 )
     EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Sinks()[0]->Type() ==
                   KMceRTPSink )
@@ -214,7 +883,7 @@
     CleanupStack::PopAndDestroy( videoStream );
     
     // Simulate sending invite
-    iClipSession->EstablishLcSessionL();
+    iClipSession->InviteL( KTestRecipientSipUri() );
    
     // Try all the stream states
     CMceMediaStream* changedStream = iClipSession->iSession->Streams()[0];
@@ -223,57 +892,56 @@
     changedStream->iState = CMceMediaStream::EUninitialized;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // EBuffering, stream is buffering
     changedStream->iState = CMceMediaStream::EBuffering;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled )
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled )
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     changedStream->iState = CMceMediaStream::EDisabled;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // ENoResources, stream has no needed resources to stream
     changedStream->iState = CMceMediaStream::ENoResources;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // ETranscodingRequired, stream requires non-realtime transcoding
     changedStream->iState = CMceMediaStream::ETranscodingRequired;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // ETranscoding, stream is transcoding in non-realtime
     changedStream->iState = CMceMediaStream::ETranscoding;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     }
     
 
@@ -294,7 +962,7 @@
     CleanupStack::PopAndDestroy( videoStream );
     
     // Simulate sending invite
-    iClipSession->EstablishLcSessionL();
+    iClipSession->InviteL( KTestRecipientSipUri() );
     
     // Try all the non-default stream states
     CMceMediaStream* changedStream = iClipSession->iSession->Streams()[0];
@@ -305,9 +973,68 @@
     changedSource->iIsEnabled = EFalse;
     iClipSession->StreamStateChanged( *changedStream, *changedSource );
     
-    // TODO: EUNIT_ASSERT( iLcSessionObserver->iEndOfClipCalled )
+    EUNIT_ASSERT( iObserver->iEndOfClipCalled == ETrue )
     changedSource->iIsEnabled = ETrue;
-    iLcSessionObserver->Reset();
+    iObserver->Reset();
+    
+    // ETranscodingRequired, transcoding has failed
+    iClipSession->iSession->iState = CMceSession::EIdle;
+    iClipSession->iTranscodingOngoing = ETrue;
+    changedStream->iState = CMceMediaStream::ETranscodingRequired;
+    static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
+                            *changedStream, *changedSource );
+    EUNIT_ASSERT( iObserver->iTranscodingFailedCalled )
+    EUNIT_ASSERT( !iClipSession->iTranscodingOngoing )
+    iObserver->Reset();
+    
+    // ETranscoding, transcoding has progresssed
+    iClipSession->iSession->iState = CMceSession::EIdle;
+    changedStream->iState = CMceMediaStream::ETranscoding;
+    static_cast<CMceFileSource*>(changedSource)->iTranscodingPercentage = 20;
+    static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
+                            *changedStream, *changedSource );
+    EUNIT_ASSERT( iObserver->iTranscodingProgressedPercentage == 20 )
+    iObserver->Reset();
+    
+    // ETranscoding, transcoding has progresssed, querying percentage fails
+    iClipSession->iSession->iState = CMceSession::EIdle;
+    changedStream->iState = CMceMediaStream::ETranscoding;
+    iObserver->iTranscodingProgressedPercentage = -1; // make assertion possible
+    static_cast<CMceFileSource*>(changedSource)->iFailWithCode = KErrNotReady;
+    static_cast<CMceFileSource*>(changedSource)->iTranscodingPercentage = 30;
+    static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
+                            *changedStream, *changedSource );
+    EUNIT_ASSERT( iObserver->iTranscodingProgressedPercentage == 0 )
+    iObserver->Reset();
+
+    // EInitialized, transcoding has completed, establishment fails
+    iClipSession->iSession->iState = CMceSession::EIdle;
+    iClipSession->iSession->iFailWithCode = KErrCorrupt; // != KErrNone
+    iClipSession->iTranscodingOngoing = ETrue;
+    changedStream->iState = CMceMediaStream::EInitialized;
+    static_cast<CMceFileSource*>(changedSource)->iTranscodingPercentage = 100;
+    static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
+                            *changedStream, *changedSource );
+    EUNIT_ASSERT( iObserver->iTranscodingCompletedInitCalled )
+    EUNIT_ASSERT( iObserver->iTranscodingCompletedFinalizeCalled )
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled )
+    EUNIT_ASSERT( !iClipSession->iTranscodingOngoing )
+    iObserver->Reset();
+    
+    // EInitialized, transcoding has completed, establishment succeeds
+    iClipSession->iSession->iState = CMceSession::EIdle;
+    iClipSession->iTranscodingOngoing = ETrue;
+    changedStream->iState = CMceMediaStream::EInitialized;
+    static_cast<CMceFileSource*>(changedSource)->iTranscodingPercentage = 100;
+    static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
+                            *changedStream, *changedSource );
+    EUNIT_ASSERT( iObserver->iTranscodingCompletedInitCalled )
+    EUNIT_ASSERT( iObserver->iTranscodingCompletedFinalizeCalled )    
+    // Next cannot be asserted since it is not true with alloc decoration
+    // EUNIT_ASSERT( !iObserver->iSessionFailedCalled )  
+    EUNIT_ASSERT( !iClipSession->iTranscodingOngoing )
+    iObserver->Reset();
+    
     
     // Test default stream state change behavior, remove or change when
     // behavior changes
@@ -317,13 +1044,13 @@
     changedStream->iState = CMceMediaStream::EUninitialized;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
 
     // Special meaning (Transcoding ready), tested separately
     
@@ -331,21 +1058,20 @@
     changedStream->iState = CMceMediaStream::EBuffering;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled )
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled )
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     // This state has non-default meaning, tested before defaults
@@ -354,7 +1080,9 @@
     changedStream->iState = CMceMediaStream::ENoResources;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
+
+    
     }
 
 
@@ -374,7 +1102,7 @@
     CleanupStack::PopAndDestroy( videoStream );
     
     // Simulate sending invite
-    iClipSession->EstablishLcSessionL();
+    iClipSession->InviteL( KTestRecipientSipUri() );
                                      
     // Test default stream state change behavior
     CMceMediaStream* changedStream = iClipSession->iSession->Streams()[0];
@@ -385,65 +1113,65 @@
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // EBuffering, stream is buffering
     changedStream->iState = CMceMediaStream::EBuffering;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled );
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled )
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     changedStream->iState = CMceMediaStream::EDisabled;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // ENoResources, stream has no needed resources to stream
     changedStream->iState = CMceMediaStream::ENoResources;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
                                                             
     // ETranscodingRequired, stream requires non-realtime transcoding
     changedStream->iState = CMceMediaStream::ETranscodingRequired;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // ETranscoding, stream is transcoding in non-realtime
     changedStream->iState = CMceMediaStream::ETranscoding;
     static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( 
                                                             *changedStream,
                                                             *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
+    
     }
 
 
@@ -537,6 +1265,65 @@
 //
 // -----------------------------------------------------------------------------
 //
+void UT_CMusEngClipSession::UT_HasClipEndedL()
+    {
+    // Try before establishing the session
+    EUNIT_ASSERT( !iClipSession->HasClipEnded() )
+    
+    // Try with session, but without video out stream 
+    
+    CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile();
+  
+    iClipSession->iSession = CMceOutSession::NewL( 
+                                    *(iClipSession->iManager),
+                                    *profile,
+                                    KTestRecipientSipUri8() ); 
+    
+    EUNIT_ASSERT( !iClipSession->HasClipEnded() )
+    
+    // Try with video out stream without source...
+    CMceVideoStream* videoOut = CMceVideoStream::NewLC();
+    
+    videoOut->AddSinkL( CMceRtpSink::NewLC() );
+    CleanupStack::Pop();
+     
+    iClipSession->iSession->AddStreamL( videoOut );
+    CleanupStack::Pop( videoOut );
+    
+    EUNIT_ASSERT( !iClipSession->HasClipEnded() )
+    
+    // And with enabled source and stream     
+    videoOut->SetSourceL( CMceFileSource::NewLC( *iClipSession->iManager,
+                                                 iClipSession->iFileName ) );
+    CleanupStack::Pop();
+    
+    EUNIT_ASSERT( !iClipSession->HasClipEnded() )
+    
+    // try with different position and duration
+    (static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 90;
+    (static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111;
+    EUNIT_ASSERT( !iClipSession->HasClipEnded() )
+    
+    // Disapling source
+    (static_cast<CMceFileSource*> (videoOut->Source()))->DisableL();
+    EUNIT_ASSERT( !iClipSession->HasClipEnded() )
+
+    // Disapling stream
+    videoOut->iState = CMceMediaStream::EDisabled;
+    EUNIT_ASSERT( !iClipSession->HasClipEnded() )
+       
+    // and finaly try with "real" end of clip 
+    (static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 0;
+    (static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111;
+    
+    EUNIT_ASSERT( iClipSession->HasClipEnded() )
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 void UT_CMusEngClipSession::UT_ConstructAudioStructureLL()
     {
     
@@ -569,9 +1356,8 @@
     videoOut->AddSinkL( CMceRtpSink::NewLC() );
     CleanupStack::Pop();
     
-    videoOut->SetSourceL( CMceFileSource::NewLC( 
-        *iClipSession->iManager,
-        iClipSession->LocalVideoPlayer()->LcSourceFileControl()->LcFileName() ) );
+    videoOut->SetSourceL( CMceFileSource::NewLC( *iClipSession->iManager,
+                                                 iClipSession->iFileName ) );
     CleanupStack::Pop();                                             
      
     iClipSession->iSession->AddStreamL( videoOut );
@@ -638,8 +1424,7 @@
 //
 void UT_CMusEngClipSession::UT_EstablishSessionLL()
     {
-    iClipSession->LocalVideoPlayer()->LcSourceFileControl()->SetLcFileNameL(
-         KTestAvcVideoFileName() );
+    iClipSession->SetClipL( KTestAvcVideoFileName() );
 
     // Try to establish, must fail, because of missing session
     TRAPD( error, iClipSession->EstablishSessionL() );
@@ -652,7 +1437,7 @@
     // 1.Test that in case the peer party supports H264, no transcoding is needed
     
     // Call to CMusEngOutMceSession::InviteL leads to call to EstablishL
-    iClipSession->EstablishLcSessionL();
+    iClipSession->InviteL( KTestRecipientSipUri );
     
     const RPointerArray<CMceMediaStream>& streams = iClipSession->iSession->Streams();
 
@@ -668,10 +1453,13 @@
              
              }
          }
+
+    EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled )    
+    EUNIT_ASSERT( !iClipSession->iTranscodingRequiredDueMissingOptions )
     
     ///////
     // 2.Test the case when we don't know whether peer supports H264, 
-    // transcoding is needed => function will leave with KErrNotSupported
+    // transcoding is needed, H264 codec has to be removed from the codec list
 
     delete iClipSession->iSession;
     iClipSession->iSession = NULL;
@@ -679,25 +1467,140 @@
     delete iClipSession->iVideoCodecList;
     iClipSession->iVideoCodecList = NULL;
     
-    MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( 
-                   iClipSession->EstablishLcSessionL(),
-                   KErrNotSupported )
-    
+    // Call to CMusEngOutMceSession::InviteL leads to call to EstablishL
+    iClipSession->InviteL( KTestRecipientSipUri );
+
+    const RPointerArray<CMceMediaStream>& streams2 = iClipSession->iSession->Streams();
+
+    for ( TInt i = 0; i < streams2.Count(); ++i )
+         {
+         if ( streams2[i]->Type() == KMceVideo )
+             {
+             CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( streams2[i] );
+             const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs();
+             EUNIT_ASSERT_EQUALS( codecs.Count(), 1 )
+             EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 )
+             }
+         }
+ 
+    EUNIT_ASSERT( iObserver->iTranscodingNeededCalled )
+    EUNIT_ASSERT( iObserver->iDueUnknowCapas )
+    EUNIT_ASSERT( iClipSession->iTranscodingRequiredDueMissingOptions )
     
     ///////
-    // 3.Test that if peer doesn't supports H264, transcoding is needed
-    // => function will leave with KErrNotSupported
+    // 3. Establish behaves differently at second round in case clip is AVC
+    // and because remote party's capabilities were unknown. Use-case is such
+    // that AVC is tried to be transcoded first but if it fails, invite is retried
+    // by using AVC
+    iObserver->Reset();
+    iClipSession->InviteL( KTestRecipientSipUri );
+    const RPointerArray<CMceMediaStream>& testStreams = iClipSession->iSession->Streams();
+
+    for ( TInt i = 0; i < testStreams.Count(); ++i )
+        {
+        if ( testStreams[i]->Type() == KMceVideo )
+            {
+            CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( testStreams[i] );
+            const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs();
+            EUNIT_ASSERT_EQUALS( codecs.Count(), 1 )
+            EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 )
+            }
+        }
+    
+    EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled )
+    EUNIT_ASSERT( !iObserver->iDueUnknowCapas )
+    
+    ///////
+    // 4.Test that if peer doesn't supports H264, transcoding is needed
+    // H264 codec has to be removed from the codec list
+
+    iObserver->iTranscodingNeededCalled = EFalse;
     
     delete iClipSession->iSession;
     iClipSession->iSession = NULL;
      
     iClipSession->iVideoCodecList = KMceSDPNameH263().AllocL();
     
-    MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( 
-                    iClipSession->EstablishLcSessionL(),
-                    KErrNotSupported )
+    // Call to CMusEngOutMceSession::InviteL leads to call to EstablishL
+    iClipSession->InviteL( KTestRecipientSipUri );
+
+    const RPointerArray<CMceMediaStream>& streams3 = iClipSession->iSession->Streams();
+
+    for ( TInt i = 0; i < streams3.Count(); ++i )
+         {
+         if ( streams3[i]->Type() == KMceVideo )
+             {
+             CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( streams3[i] );
+             const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs();
+             EUNIT_ASSERT_EQUALS( codecs.Count(), 1 )
+             EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 )
+             }
+         }
+  
+    EUNIT_ASSERT( iObserver->iTranscodingNeededCalled )
+    EUNIT_ASSERT( !iObserver->iDueUnknowCapas )
+          
     }
 
+void UT_CMusEngClipSession::UT_IsRewindFromEndL()
+    {
+    // Try before establishing the session
+    EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() )
+    
+    // Try with session, but without video out stream 
+    
+    CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile();
+  
+    iClipSession->iSession = CMceOutSession::NewL( 
+                                    *(iClipSession->iManager),
+                                    *profile,
+                                    KTestRecipientSipUri8() ); 
+    
+    EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() )
+    
+    // Try with video out stream without source...
+    CMceVideoStream* videoOut = CMceVideoStream::NewLC();
+    
+    videoOut->AddSinkL( CMceRtpSink::NewLC() );
+    CleanupStack::Pop();
+     
+    iClipSession->iSession->AddStreamL( videoOut );
+    CleanupStack::Pop( videoOut );
+    
+    EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() )
+    
+    // And with enabled source and stream     
+    videoOut->SetSourceL( CMceFileSource::NewLC( *iClipSession->iManager,
+                                                 iClipSession->iFileName ) );
+    CleanupStack::Pop();
+    
+    EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() )
+    
+    // try with different position and duration
+    (static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 90;
+    (static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111;
+    EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() )
+    
+    // Disapling source
+    (static_cast<CMceFileSource*> (videoOut->Source()))->DisableL();
+    EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() )
+
+    // Disapling stream
+    videoOut->iState = CMceMediaStream::EDisabled;
+    EUNIT_ASSERT( iClipSession->IsRewindFromEnd() )
+    
+    iClipSession->iPause = ETrue;
+    EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() )
+    
+    iClipSession->iPause = EFalse;
+    EUNIT_ASSERT( iClipSession->IsRewindFromEnd() )
+       
+    // and finaly try with "real" end of clip 
+    (static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 0;
+    (static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111;
+    
+    EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() )
+    }
 
 //  TEST TABLE
 
@@ -714,6 +1617,90 @@
     SetupL, UT_NewLL, Teardown)
 
 EUNIT_TEST(
+    "SetClipL - test ",
+    "CMusEngClipSession",
+    "AetClipL",
+    "FUNCTIONALITY",
+    SetupL, UT_SetClipLL, Teardown)
+
+EUNIT_TEST(
+    "FastForwardL - test ",
+    "CMusEngClipSession",
+    "FastForwardL",
+    "FUNCTIONALITY",
+    SetupL, UT_FastForwardLL, Teardown)
+
+EUNIT_TEST(
+    "FastRewindL - test ",
+    "CMusEngClipSession",
+    "FastRewindL",
+    "FUNCTIONALITY",
+    SetupL, UT_FastRewindLL, Teardown)
+
+EUNIT_TEST(
+    "PositionL - test ",
+    "CMusEngClipSession",
+    "PositionL",
+    "FUNCTIONALITY",
+    SetupL, UT_PositionLL, Teardown)
+
+EUNIT_TEST(
+    "DurationL - test ",
+    "CMusEngClipSession",
+    "DurationL",
+    "FUNCTIONALITY",
+    SetupL, UT_DurationLL, Teardown)
+
+EUNIT_TEST(
+    "SetPositionL - test ",
+    "CMusEngClipSession",
+    "SetPositionL",
+    "FUNCTIONALITY",
+    SetupL, UT_SetPositionLL, Teardown)
+    
+EUNIT_TEST(
+    "TranscodeL - To AVC test ",
+    "CMusEngClipSession",
+    "TranscodeL",
+    "FUNCTIONALITY",
+    SetupL, UT_TranscodeLToAvcL, Teardown)
+
+EUNIT_TEST(
+    "TranscodeL - To H263 test ",
+    "CMusEngClipSession",
+    "TranscodeL",
+    "FUNCTIONALITY",
+    Setup2L, UT_TranscodeLToH263L, Teardown)
+    
+EUNIT_TEST(
+    "CancelTranscodeL - test ",
+    "CMusEngClipSession",
+    "CancelTranscodeL",
+    "FUNCTIONALITY",
+    SetupL, UT_CancelTranscodeLL, Teardown)
+    
+EUNIT_TEST(
+    "PlayL - test ",
+    "CMusEngClipSession",
+    "PlayL",
+    "FUNCTIONALITY",
+    SetupL, UT_PlayLL, Teardown)
+
+EUNIT_TEST(
+    "PauseL - test ",
+    "CMusEngClipSession",
+    "PauseL",
+    "FUNCTIONALITY",
+    SetupL, UT_PauseLL, Teardown)
+
+EUNIT_TEST(
+    "IsPlayingL - test ",
+    "CMusEngClipSession",
+    "IsPlayingL",
+    "FUNCTIONALITY",
+    SetupL, UT_IsPlayingLL, Teardown)
+
+EUNIT_TEST(
     "CompleteSessionStructureL - test ",
     "CMusEngClipSession",
     "CompleteSessionStructureL",
@@ -754,6 +1741,13 @@
     "AddVideoCodecL",
     "FUNCTIONALITY",
     SetupL, UT_AddVideoCodecLL, Teardown)
+    
+EUNIT_TEST(
+    "HasClipEnded - test ",
+    "CMusEngClipSession",
+    "HasClipEnded",
+    "FUNCTIONALITY",
+    SetupL, UT_HasClipEndedL, Teardown)
 
 EUNIT_TEST(
     "ConstructAudioStructureL - test ",
@@ -776,7 +1770,13 @@
     "FUNCTIONALITY",
     SetupL, UT_EstablishSessionLL, Teardown)    
 
-        
+EUNIT_TEST(
+    "IsRewindFromEnd - test ",
+    "CMusEngClipSession",
+    "IsRewindFromEnd",
+    "FUNCTIONALITY",
+    SetupL, UT_IsRewindFromEndL, Teardown)
+    
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengclipvideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,805 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include "ut_musengclipvideoplayer.h"
-#include "musengtestdefs.h"
-#include "musengmceutils.h"
-#include "musengclipvideoplayer.h"
-#include "mceoutsession.h"
-#include "mcevideostream.h"
-#include "mcertpsink.h"
-#include "mcefilesource.h"
-#include "drmcommon.h"
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngClipVideoPlayer* UT_CMusEngClipVideoPlayer::NewL()
-    {
-    UT_CMusEngClipVideoPlayer* self = UT_CMusEngClipVideoPlayer::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngClipVideoPlayer* UT_CMusEngClipVideoPlayer::NewLC()
-    {
-    UT_CMusEngClipVideoPlayer* self = new( ELeave ) UT_CMusEngClipVideoPlayer();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngClipVideoPlayer::~UT_CMusEngClipVideoPlayer()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngClipVideoPlayer::UT_CMusEngClipVideoPlayer()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }   
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::SetupL()
-    {
-    iMceSession = CMceOutSession::NewL();
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC(); 
-    CMceRtpSink* rtpsink = CMceRtpSink::NewLC();
-    videoStream->AddSinkL( rtpsink );
-    CleanupStack::Pop( rtpsink );
-    CMceFileSource* fileSource = 
-        CMceFileSource::NewLC( *iMceSession->iManager, KTestVideoFileName() );
-    fileSource->DisableL();
-    videoStream->SetSourceL( fileSource );
-    CleanupStack::Pop( fileSource );
-    iMceSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );    
-    iClipVideoPlayer = 
-        CMusEngClipVideoPlayer::NewL(  
-            iDisplayHandlerStub,
-            iLcAudioControlStub );
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::Teardown()
-    {
-    delete iClipVideoPlayer;
-    delete iMceSession;
-    iLcAudioControlStub.Reset();
-    }
-
-
-// TEST CASES
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_HasClipEndedL()
-    {
-    CMceSession* invalidMceSession = CMceOutSession::NewL();
-    CleanupStack::PushL( invalidMceSession );    
-    
-    // Try before establishing the session
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT( !iClipVideoPlayer->HasClipEnded() )
-    
-    // Try with session, but without video out stream
-    iClipVideoPlayer->SetMceSession( invalidMceSession );
-    EUNIT_ASSERT( !iClipVideoPlayer->HasClipEnded() )
-    
-    // Try with video out stream without source...
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    videoStream->AddSinkL( CMceRtpSink::NewLC() );
-    CleanupStack::Pop();
-    invalidMceSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );
-    EUNIT_ASSERT( !iClipVideoPlayer->HasClipEnded() )
-    
-    // And with enabled source and stream 
-    CMceFileSource* fileSource = 
-        CMceFileSource::NewLC( 
-            *invalidMceSession->iManager, KTestVideoFileName() );
-    videoStream->SetSourceL( fileSource );
-    CleanupStack::Pop( fileSource );   
-    EUNIT_ASSERT( !iClipVideoPlayer->HasClipEnded() )
-    
-    // try with different position and duration
-    fileSource->iPosition = 90;
-    fileSource->iDuration = 111;
-    EUNIT_ASSERT( !iClipVideoPlayer->HasClipEnded() )
-    
-    // Disabled source
-    fileSource->DisableL();
-    EUNIT_ASSERT( !iClipVideoPlayer->HasClipEnded() )
-
-    // Disabled stream
-    videoStream->iState = CMceMediaStream::EDisabled;
-    EUNIT_ASSERT( !iClipVideoPlayer->HasClipEnded() )
-       
-    // and finaly try with "real" end of clip 
-    fileSource->iPosition = 0;
-    fileSource->iDuration = 111;
-    
-    EUNIT_ASSERT( iClipVideoPlayer->HasClipEnded() )
-    
-    CleanupStack::PopAndDestroy( invalidMceSession );
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcVideoPlayerStateL()
-    {
-    // iMceSession not set
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )    
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    
-    // Establish Session and simulate media playing.
-    iMceSession->iState = CMceSession::EEstablished;
-    for ( TInt i = 0; i < iMceSession->Streams().Count(); i++ )
-        {
-        iMceSession->Streams()[i]->iState = CMceMediaStream::EStreaming;
-        }
-    
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPlaying ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )
-                                                
-    // Media streams unavailable
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EUninitialized;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )
-
-    // All other stream states
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EInitialized;	
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EInit ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )	
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EBuffering;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EBuffering ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )
-		
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EIdle;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPaused ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )	
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EDisabled;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPaused ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EStreaming;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPlaying ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )
-
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ENoResources;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ETranscodingRequired;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ETranscoding;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iClipVideoPlayer->LcVideoPlayerState() ) )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcPlayL()
-    {
-    // MCE session not set
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipVideoPlayer->LcPlayL(), KErrNotReady )
-
-    // File source does not exist
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    iMceSession->Streams()[ 0 ]->SetSourceL( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipVideoPlayer->LcPlayL(), KErrNotFound )
-    
-    // Play
-    CMceFileSource* fileSource = 
-        CMceFileSource::NewLC( *iMceSession->iManager, KTestVideoFileName() );
-    fileSource->DisableL();
-    iMceSession->Streams()[ 0 ]->SetSourceL( fileSource );
-    CleanupStack::Pop( fileSource );   
-    EUNIT_ASSERT( !iClipVideoPlayer->LcIsPlayingL() )
-    iClipVideoPlayer->LcPlayL();    
-    EUNIT_ASSERT( iClipVideoPlayer->LcIsPlayingL() )
-    
-    // Try to play again
-    iClipVideoPlayer->LcPlayL();
-    EUNIT_ASSERT( iClipVideoPlayer->LcIsPlayingL() )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcPauseL()
-    {
-    // MCE session not set
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipVideoPlayer->LcPauseL(), KErrNotReady )
-
-    // File source does not exist
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    iMceSession->Streams()[ 0 ]->SetSourceL( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipVideoPlayer->LcPauseL(), KErrNotFound )     
-    
-    // Pause 
-    CMceFileSource* fileSource = 
-        CMceFileSource::NewLC( *iMceSession->iManager, KTestVideoFileName() );
-    fileSource->EnableL();
-    iMceSession->Streams()[ 0 ]->SetSourceL( fileSource );
-    CleanupStack::Pop( fileSource );      
-    EUNIT_ASSERT( iClipVideoPlayer->LcIsPlayingL() )
-    iClipVideoPlayer->LcPauseL();
-    EUNIT_ASSERT( !iClipVideoPlayer->LcIsPlayingL() )
-
-    // Try to pause already paused clip
-    iClipVideoPlayer->LcPauseL();
-    EUNIT_ASSERT( !iClipVideoPlayer->LcIsPlayingL() )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcIsPlayingL()
-    {
-    // MCE session not set
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iClipVideoPlayer->LcIsPlayingL(), KErrNotReady )
-
-    // Player is not playing when file source is disabled
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );    
-    file->DisableL();
-    EUNIT_ASSERT( !iClipVideoPlayer->LcIsPlayingL() )
-
-    // Player is playing when file source is enabled
-    file->EnableL();
-    EUNIT_ASSERT( iClipVideoPlayer->LcIsPlayingL() )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_SetLcFileNameL()
-    {    
-    // Set file before iMceSession is set
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-    iClipVideoPlayer->SetMceSession( NULL );
-    iClipVideoPlayer->SetLcFileNameL( KTestAvcVideoFileName() );
-    EUNIT_ASSERT_EQUALS( iClipVideoPlayer->LcFileName(), KTestAvcVideoFileName() )
-    EUNIT_ASSERT_EQUALS( file->iFileName, KTestVideoFileName() )
-
-    // Set file after session is set
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    file->iFileName = KTestAvcVideoFileName();
-    iClipVideoPlayer->SetLcFileNameL( KTestVideoFileName() );
-    EUNIT_ASSERT_EQUALS( iClipVideoPlayer->LcFileName(), KTestVideoFileName() )
-    EUNIT_ASSERT_EQUALS( file->iFileName, KTestVideoFileName() )
-
-    // Set DRM protected file, file names not changed
-    MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE(
-        iClipVideoPlayer->SetLcFileNameL( KMusDrmProtectedFileName() ),
-        KErrPermissionDenied )
-    EUNIT_ASSERT_EQUALS( iClipVideoPlayer->LcFileName(), KTestVideoFileName() )
-    EUNIT_ASSERT_EQUALS( file->iFileName, KTestVideoFileName() )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcFastForwardL()
-    {
-    // Try before establishment
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iClipVideoPlayer->LcFastForwardL( ETrue ), KErrNotReady )
-    
-    // Establish session, simulate position and duration and try again 
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );                  
-    file->iDuration = KMusEngTestFileDuration;
-    file->iPosition = KMusEngTestFilePosition; 
-    iClipVideoPlayer->LcFastForwardL( ETrue );
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() > 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() == 0 )
-    
-    // Simulate fastforwarding for a while
-    User::After( 1000 );
-
-    // Try to fastforward when already fastforwarding, will be ignored
-    iClipVideoPlayer->LcFastForwardL( ETrue );
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() > 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() == 0 )
-    
-    // Stop fastforwarding
-    iClipVideoPlayer->LcFastForwardL( EFalse );
-    EUNIT_ASSERT( file->iPosition > KMusEngTestFilePosition )
-    EUNIT_ASSERT( file->iPosition != file->iDuration )
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() == 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() == 0 )
-    
-    // Try to stop fastforwarding again, leaves 
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iClipVideoPlayer->LcFastForwardL( EFalse ), KErrAlreadyExists )
-    
-    // Start fastrewinding
-    iClipVideoPlayer->LcFastRewindL( ETrue );
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() == 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() > 0 )
-    
-    // Start fastforwarding, rewinding should be stopped and FFWD started
-    iClipVideoPlayer->LcFastForwardL( ETrue );
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() > 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() == 0 )
-    
-    // Simulate fastforwarding for a while
-    User::After( 1000 );
-    
-    // Simulate that clip is almost in end and fastforwarding would have 
-    // continued over end, position should be set to duration.
-    file->iPosition = TTimeIntervalMicroSeconds( file->iDuration.Int64() - 1 );
-    iClipVideoPlayer->LcFastForwardL( EFalse );
-    EUNIT_ASSERT( file->iPosition == file->iDuration )
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT_EQUALS( 0, iClipVideoPlayer->iFFWDStartTime.Int64() )
-    EUNIT_ASSERT_EQUALS( 0, iClipVideoPlayer->iFRWDStartTime.Int64() )    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcFastRewindL()
-    {
-    // Try before establishment
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iClipVideoPlayer->LcFastRewindL( ETrue ), KErrNotReady )
-    
-    // Establish session, simulate position and duration and try again   
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );          
-    file->iDuration = KMusEngTestFileDuration;
-    file->iPosition = KMusEngTestFilePosition; 
-    iClipVideoPlayer->LcFastRewindL( ETrue );
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() == 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() > 0 )
-    
-    // Simulate fastrewinding for a while
-    User::After( 1000 );
-    
-    // Try to fastrewind when already fastrewinding, will be ignored
-    iClipVideoPlayer->LcFastRewindL( ETrue );
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() == 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() > 0 )
-    
-    // Stop fastrewinding
-    iClipVideoPlayer->LcFastRewindL( EFalse );
-    EUNIT_ASSERT( file->iPosition < KMusEngTestFilePosition )
-    EUNIT_ASSERT( file->iPosition != TTimeIntervalMicroSeconds( 0 ) )
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() == 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() == 0 )
-    
-    // Try to stop fastrewinding again, leaves 
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iClipVideoPlayer->LcFastRewindL( EFalse ), KErrAlreadyExists )
-    
-    // Start fastforwarding
-    iClipVideoPlayer->LcFastForwardL( ETrue );
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() >= 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() == 0 )
-    
-    // Start fastrewinding, forwarding should be stopped and FFWD started
-    iClipVideoPlayer->LcFastRewindL( ETrue );
-    EUNIT_ASSERT( !file->iIsEnabled );
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() == 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() >= 0 )
-    
-    // Simulate that clip has just begun and fastrewinding would have 
-    // continued over beginning, position should be set to zero.
-    
-    file->iPosition = TTimeIntervalMicroSeconds( 1 );
-    
-    // Simulate fastrewinding for a while
-    User::After( 1000 );
-    
-    iClipVideoPlayer->LcFastRewindL( EFalse );
-    EUNIT_ASSERT( file->iPosition == TTimeIntervalMicroSeconds( 0 ) )
-    EUNIT_ASSERT( !file->iIsEnabled )
-    EUNIT_ASSERT( iClipVideoPlayer->iFFWDStartTime.Int64() == 0 )
-    EUNIT_ASSERT( iClipVideoPlayer->iFRWDStartTime.Int64() == 0 ) 
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcFilePositionL()
-    {
-    // Try before establishment
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iClipVideoPlayer->LcFilePositionL(), KErrNotReady )
-    
-    // Establish session and try again
-    iClipVideoPlayer->SetMceSession( iMceSession );
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-    file->iPosition = 2000000;   
-    EUNIT_ASSERT( iClipVideoPlayer->LcFilePositionL().Int() * 1000000 == 
-                  file->iPosition.Int64() )
-    
-    // Ask position while fastforwarding, it should be bigger than real position
-    iClipVideoPlayer->LcFastForwardL( ETrue );
-    User::After( 1000000 ); // We have to wait since dividing in LcFilePositionL and 
-                            // multiplying before comparison loses difference  
-    EUNIT_ASSERT( iClipVideoPlayer->LcFilePositionL().Int() * 1000000 >
-                  file->iPosition.Int64() )
-    
-    // Ask position while fastforwarding beyond end of clip, clip duration is
-    // returned
-    file->iPosition = file->iDuration;
-    EUNIT_ASSERT( iClipVideoPlayer->LcFilePositionL().Int() * 1000000 ==
-                  file->iDuration.Int64() )
-    
-    // Stop fastforwarding, start fastrewinding, position is set to the end clip
-    iClipVideoPlayer->LcFastForwardL( EFalse );
-    iClipVideoPlayer->LcFastRewindL( ETrue );   
-    User::After( 1000000 ); // We have to wait since dividing in LcFilePositionL and 
-                            // multiplying before comparison loses difference 
-    
-    // Ask position while fastrewinding, it should be smaller than real 
-    // position
-    EUNIT_ASSERT( iClipVideoPlayer->LcFilePositionL().Int() * 1000000 <
-                  file->iPosition.Int64() )
-    
-    // Ask position while fastrewinding beyond the beginning of clip, zero 
-    // returned
-    file->iPosition = 0;
-    EUNIT_ASSERT( iClipVideoPlayer->LcFilePositionL().Int() * 1000000 == 0 )
-    
-    // Asking position when rewinded to beginning but rewinding has ended 
-    // and clip has not ended (position should not be altered in that case)
-    iClipVideoPlayer->iRewindedToBeginning = ETrue;
-    file->iPosition = 0;
-    iClipVideoPlayer->iFRWDStartTime = TTime( 0 );   
-    EUNIT_ASSERT( iClipVideoPlayer->LcFilePositionL().Int() * 1000000 == 0 )
-    
-    // Position has proceeded from beginning, rewinding to beginning info
-    // is cleared.
-    file->iPosition = 10000000;
-    iClipVideoPlayer->iFRWDStartTime = TTime( 0 );
-    EUNIT_ASSERT( iClipVideoPlayer->LcFilePositionL().Int() * 1000000 == 10000000 )
-    EUNIT_ASSERT( iClipVideoPlayer->iRewindedToBeginning == EFalse )
-    }
-    
-    
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcFileDurationL()
-    {
-    // Try before establishment
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iClipVideoPlayer->LcFileDurationL(), KErrNotReady )
-    
-    // Establish session and try again
-    iClipVideoPlayer->SetMceSession( iMceSession );    
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession );
-    file->iDuration = 2000000;
-    EUNIT_ASSERT( iClipVideoPlayer->LcFileDurationL().Int() * 1000000 == 
-                  file->iDuration.Int64() )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_SetLcFilePositionL()
-    {
-    TTimeIntervalSeconds time( 20 );
-    
-    // Try before establishment
-    iClipVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iClipVideoPlayer->SetLcFilePositionL( time ), KErrNotReady )
-    
-    // Normal case with already disabled file source
-    iClipVideoPlayer->SetMceSession( iMceSession );    
-    CMceFileSource* file = MusEngMceUtils::GetFileSourceL( *iMceSession ); 
-    file->iIsEnabled = EFalse;    
-    iClipVideoPlayer->SetLcFilePositionL( time );
-    EUNIT_ASSERT( file->iPosition.Int64() == 
-                  static_cast< TInt64 >( time.Int() ) * 1000000 )
-    EUNIT_ASSERT( !file->iIsEnabled )
-    
-    // Normal case with enabled file source
-    TTimeIntervalSeconds anotherTime( 30 );
-    file->iIsEnabled = ETrue;
-    iClipVideoPlayer->SetLcFilePositionL( anotherTime ); 
-    EUNIT_ASSERT( file->iPosition.Int64() ==
-                  static_cast< TInt64 >( anotherTime.Int() ) * 1000000 )
-    EUNIT_ASSERT( file->iIsEnabled )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcWindowL()
-    {
-    EUNIT_ASSERT( iClipVideoPlayer->LcWindow() == iClipVideoPlayer )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcCameraControlL()
-    {
-    EUNIT_ASSERT( iClipVideoPlayer->LcCameraControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcSourceFileControlL()
-    {
-    EUNIT_ASSERT( iClipVideoPlayer->LcSourceFileControl() == iClipVideoPlayer )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcDestinationFileControlL()
-    {
-    EUNIT_ASSERT( iClipVideoPlayer->LcDestinationFileControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcAudioControlL()
-    {
-    EUNIT_ASSERT( iClipVideoPlayer->LcAudioControl() == &iLcAudioControlStub )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcZoomControlL()
-    {
-    EUNIT_ASSERT( iClipVideoPlayer->LcZoomControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngClipVideoPlayer::UT_LcBrightnessControlL()
-    {
-    EUNIT_ASSERT( iClipVideoPlayer->LcBrightnessControl() == NULL )
-    }
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusEngClipVideoPlayer,
-    "UT_CMusEngClipVideoPlayer",
-    "UNIT" )   
-    
-EUNIT_TEST(
-    "HasClipEnded - test ",
-    "CMusEngClipVideoPlayer",
-    "HasClipEnded",
-    "FUNCTIONALITY",
-    SetupL, UT_HasClipEndedL, Teardown)
-
-EUNIT_TEST(
-    "LcVideoPlayerState - test ",
-    "CMusEngClipVideoPlayer",
-    "LcVideoPlayerState",
-    "FUNCTIONALITY",
-    SetupL, UT_LcVideoPlayerStateL, Teardown)
-
-EUNIT_TEST(
-    "LcPlayL - test ",
-    "CMusEngClipVideoPlayer",
-    "LcPlayL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcPlayL, Teardown)
-
-EUNIT_TEST(
-    "LcPauseL - test ",
-    "CMusEngClipVideoPlayer",
-    "LcPauseL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcPauseL, Teardown)
-
-EUNIT_TEST(
-    "LcIsPlayingL - test ",
-    "CMusEngClipVideoPlayer",
-    "LcIsPlayingL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcIsPlayingL, Teardown)
-    
-EUNIT_TEST(
-    "SetLcFileNameL - test ",
-    "CMusEngClipVideoPlayer",
-    "SetLcFileNameL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetLcFileNameL, Teardown)
-
-EUNIT_TEST(
-    "LcFastForwardL - test ",
-    "CMusEngClipVideoPlayer",
-    "LcFastForwardL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcFastForwardL, Teardown)
-
-EUNIT_TEST(
-    "LcFastRewindL - test ",
-    "CMusEngClipVideoPlayer",
-    "LcFastRewindL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcFastRewindL, Teardown)
-
-EUNIT_TEST(
-    "LcFilePositionL - test ",
-    "CMusEngClipVideoPlayer",
-    "LcFilePositionL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcFilePositionL, Teardown)
-
-EUNIT_TEST(
-    "LcFileDurationL - test ",
-    "CMusEngClipVideoPlayer",
-    "LcFileDurationL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcFileDurationL, Teardown)
-
-EUNIT_TEST(
-    "SetLcFilePositionL - test ",
-    "CMusEngClipVideoPlayer",
-    "SetLcFilePositionL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetLcFilePositionL, Teardown)    
-    
-EUNIT_TEST(
-    "LcWindow - test ",
-    "CMusEngClipVideoPlayer",
-    "LcWindow",
-    "FUNCTIONALITY",
-    SetupL, UT_LcWindowL, Teardown)
-
-EUNIT_TEST(
-    "LcCameraControl - test ",
-    "CMusEngClipVideoPlayer",
-    "LcCameraControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcCameraControlL, Teardown)
-
-EUNIT_TEST(
-    "LcSourceFileControl - test ",
-    "CMusEngClipVideoPlayer",
-    "LcSourceFileControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcSourceFileControlL, Teardown)
-
-EUNIT_TEST(
-    "LcDestinationFileControl - test ",
-    "CMusEngClipVideoPlayer",
-    "LcDestinationFileControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcDestinationFileControlL, Teardown)
-
-EUNIT_TEST(
-    "LcAudioControl - test ",
-    "CMusEngClipVideoPlayer",
-    "LcAudioControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcAudioControlL, Teardown)
-
-EUNIT_TEST(
-    "LcZoomControl - test ",
-    "CMusEngClipVideoPlayer",
-    "LcZoomControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcZoomControlL, Teardown)
-
-EUNIT_TEST(
-    "LcBrightnessControl - test ",
-    "CMusEngClipVideoPlayer",
-    "LcBrightnessControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcBrightnessControlL, Teardown)
-    
-EUNIT_END_TEST_TABLE
-
-//  END OF FILE
-
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenginedllmain.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenginedllmain.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -16,6 +16,7 @@
 */
 
 //  USER INCLUDES
+#include "ut_musengsession.h"
 #include "ut_musengmcesession.h"
 #include "ut_musengoutsession.h"
 #include "ut_musenglivesession.h"
@@ -26,14 +27,7 @@
 #include "ut_musengtelephoneutils.h"
 #include "ut_musenguriparser.h"
 #include "ut_musengsipprofilehandler.h"
-#include "ut_musengsessionmanager.h"
-#include "ut_musengtwowaysession.h"
-#include "ut_musengtwowayrecvsession.h"
-#include "ut_musengcamerahandler.h"
-#include "ut_musenglivevideoplayer.h"
-#include "ut_musengremotevideoplayer.h"
-#include "ut_musengclipvideoplayer.h"
-#include "ut_muspropertywatch.h"
+#include "ut_musengorientationhandler.h"
 
 
 //  SYSTEM INCLUDES
@@ -46,24 +40,19 @@
 //
 EXPORT_C MEUnitTest* CreateTestSuiteL()
     {
+    
     CEUnitTestSuite* rootSuite = CEUnitTestSuite::NewLC( _L( "Mush Engine" ) );
 
-    rootSuite->AddL( UT_CMusEngClipVideoPlayer::NewLC() );
-    CleanupStack::Pop();
-    
     rootSuite->AddL( UT_CMusEngSipProfileHandler::NewLC() );
     CleanupStack::Pop();
 
-    rootSuite->AddL( UT_CMusEngLiveVideoPlayer::NewLC() );
-    CleanupStack::Pop();  
-
-    rootSuite->AddL( UT_CMusEngRemoteVideoPlayer::NewLC() );
-    CleanupStack::Pop();    
-    
     rootSuite->AddL( UT_MusEngMceUtils::NewLC() );
     CleanupStack::Pop();
     
     rootSuite->AddL( UT_CMusEngSessionDurationTimer::NewLC() );
+    CleanupStack::Pop();
+
+    rootSuite->AddL( UT_CMusEngSession::NewLC() );
     CleanupStack::Pop();  
     
     rootSuite->AddL( UT_CMusEngMceSession::NewLC() );
@@ -81,27 +70,15 @@
     rootSuite->AddL( UT_CMusEngClipSession::NewLC() );
     CleanupStack::Pop();      
     
-    rootSuite->AddL( UT_CMusEngTwoWaySession::NewLC() );
-    CleanupStack::Pop();  
-    
-    rootSuite->AddL( UT_CMusEngTwoWayRecvSession::NewLC() );
-    CleanupStack::Pop();  
-    
-    rootSuite->AddL( UT_TMusEngCameraHandler::NewLC() );
-    CleanupStack::Pop();
-        
     rootSuite->AddL( UT_CMusEngTelephoneUtils::NewLC() );
     CleanupStack::Pop();      
- 
+    
     rootSuite->AddL( UT_TMusEngUriParser::NewLC() );
-    CleanupStack::Pop();
+    CleanupStack::Pop();     
     
-    rootSuite->AddL( UT_CMusEngSessionManager::NewLC() );
-    CleanupStack::Pop();  
-     
-    rootSuite->AddL( UT_CMusPropertyWatch::NewLC() );
-    CleanupStack::Pop();
-    
+    rootSuite->AddL( UT_CMusEngOrientationHandler::NewLC() );
+    CleanupStack::Pop();     
+
     CleanupStack::Pop( rootSuite );
 
     return rootSuite;
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenglivesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenglivesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -24,8 +24,6 @@
 #include "mussipprofilehandler.h"
 #include "musengmceutils.h"
 #include "mussettings.h"
-#include "mussessionproperties.h"
-#include "musenglivevideoplayer.h"
 
 //  SYSTEM INCLUDES
 #include <digia/eunit/eunitmacros.h>
@@ -40,6 +38,31 @@
 #include <mceaudiocodec.h>
 
 
+_LIT8( KMusAvcBitrateLevel1TestText, "TestTextForAvcBrL1Level" );
+_LIT8( KMusAvcBitrateLevel1bTestText, "TestTextForAvcBrL1bLevel" );
+_LIT8( KMusAvcBitrateLevel1_1TestText, "TestTextForAvcBrL1_1Level" );
+_LIT8( KMusAvcBitrateLevel1_2TestText, "TestTextForAvcBrL1_2Level" );
+_LIT8( KMusAvcBitrateLevel1_3TestText, "TestTextForAvcBrL1_3Level" );
+_LIT8( KMusAvcBitrateLevel2TestText, "TestTextForAvcBrL2Level" );
+
+_LIT8( KMusAvcBitrateLevel_1b_ConfigKey, "AvcBrL1b=TestTextForAvcBrL1bLevel;" );
+
+_LIT8( KMusAvcBitrateLevel_1_1_ConfigKey, 
+"AvcBrL1_1=TestTextForAvcBrL1_1Level;");
+
+_LIT8( KMusAvcBitrateLevels_1_1_And_1b_ConfigKeys, 
+"AvcBrL1_1=TestTextForAvcBrL1_1Level;\
+AvcBrL1b=TestTextForAvcBrL1bLevel;" );
+
+_LIT8( KMusAvcAllLevelsConcatenation,
+"AvcBrL1=TestTextForAvcBrL1Level;\
+AvcBrL1b=TestTextForAvcBrL1bLevel;\
+AvcBrL1_1=TestTextForAvcBrL1_1Level;\
+AvcBrL1_2=TestTextForAvcBrL1_2Level;\
+AvcBrL1_3=TestTextForAvcBrL1_3Level;\
+AvcBrL2=TestTextForAvcBrL2Level;" );
+
+
 
 //use step in different time period
 const TInt KZoomBigStepCount = 15;
@@ -116,25 +139,20 @@
 // -----------------------------------------------------------------------------
 //
 void UT_CMusEngLiveSession::SetupL()
-    {    
-    iLcSessionObserver = new( ELeave )CLcSessionObserverStub;
-    iLcUiProvider = new( ELeave )CLcUiProviderStub;
-    iAudioRoutingObserver = new( ELeave )CMusEngObserverStub;    
+    {
+    iObserver = new( ELeave ) CMusEngObserverStub;
     
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );
+    iLiveSession = CMusEngLiveSession::NewL( TRect(0, 0, 100, 100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );
                                              
-    iRecordedLiveSession = CMusEngLiveSession::NewL();
-    iRecordedLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iRecordedLiveSession->SetLcUiProvider( iLcUiProvider );
-    MLcDestinationFileControl* destinationFileControl =
-        iRecordedLiveSession->LocalVideoPlayer()->LcDestinationFileControl();
-    destinationFileControl->SetLcFileNameL( KTestVideoFileName() );
-    
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        KTestRecipientSipUri ) );
+    iRecordedLiveSession = CMusEngLiveSession::NewL( KTestVideoFileName(),
+                                                     TRect(0, 0, 100, 100),
+                                                     *iObserver,
+                                                     *iObserver,
+                                                     *iObserver );    
+
     }
 
 
@@ -146,14 +164,11 @@
     {
     delete iLiveSession;
     delete iRecordedLiveSession;
-    delete iLcSessionObserver;
-    delete iLcUiProvider;
-    delete iAudioRoutingObserver;
-    PropertyHelper::Close();
+    delete iObserver;
+    
     // Delete static data from CenRep stub
     CRepository::iStaticWriteAvcKeysToStaticData = EFalse;
     CRepository::DeleteStubAvcConfigKeys();
-    CRepository::ResetStubGlobal();
     CRepository::iForceFailWithCode = KErrNone;
     }
 
@@ -161,37 +176,602 @@
 
 // TEST CASES
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void UT_CMusEngLiveSession::UT_NewLL()
     {
-    EUNIT_ASSERT( iLiveSession )
-    EUNIT_ASSERT( iRecordedLiveSession )
-    EUNIT_ASSERT( iLiveSession->iCameraHandler.iCameraUsage == MusSettingsKeys::EUseCameraSwapping );     
-    EUNIT_ASSERT( iLiveSession->iMceManagerUid == TUid::Uid( KMusUiUid ) );
+    EUNIT_ASSERT( iLiveSession );
+    EUNIT_ASSERT( iLiveSession->iRecordedFile == KNullDesC() );     
+    EUNIT_ASSERT( iRecordedLiveSession ); 
+    EUNIT_ASSERT( iRecordedLiveSession->iRecordedFile == KTestVideoFileName() );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_CurrentZoomLL()
+    {
+    // Check that checking current zoom is not possible before invite
+    TRAPD( error, iLiveSession->CurrentZoomL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+    
+    // Check that originally current and default zoom are the same
+    EUNIT_ASSERT( iLiveSession->iDefaultZoomFactor == 
+                  iLiveSession->CurrentZoomL() );
+    
+    // Zoom to maximum optical value
+    while ( camera->iZoomFactor < iLiveSession->iCameraInfo.iMaxZoom )
+        {
+        iLiveSession->ZoomInL();
+        }
+    
+    EUNIT_ASSERT( iLiveSession->iCameraInfo.iMaxZoom == 
+                  iLiveSession->CurrentZoomL() );    
+
+    // Zoom using digital zoom
+    
+    iLiveSession->ZoomInL();
+    
+    EUNIT_ASSERT( iLiveSession->CurrentZoomL() == 
+                    iLiveSession->iCameraInfo.iMaxZoom + 
+                    camera->iDigitalZoomFactor )
+                  
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_CMusEngLiveSession_SetZoomLL()
+    {
+    TRAPD( error, iLiveSession->SetZoomL(2) );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+    EUNIT_ASSERT( camera->iZoomFactor == 1 );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 );
+    TRAPD( err, iLiveSession->SetZoomL(0) );
+    EUNIT_ASSERT( err == KErrArgument );
+    iLiveSession->SetZoomL(2);
+    EUNIT_ASSERT( camera->iZoomFactor == 2 );
+    TRAPD( err1, iLiveSession->SetZoomL(14) );
+    EUNIT_ASSERT( err1 == KErrArgument );
+    iLiveSession->SetZoomL( 5 );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor == 2 );
+    }
+void UT_CMusEngLiveSession::UT_MaxZoomLL()
+    {
+    // Check that checking maximum zoom is not possible before invite
+    TRAPD( error, iLiveSession->MaxZoomL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    EUNIT_ASSERT( iLiveSession->MaxZoomL() == 
+                    iLiveSession->iCameraInfo.iMaxZoom + 
+                    iLiveSession->iCameraInfo.iMaxDigitalZoom );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_ZoomInLL()
+    {    
+    // Check that zooming is not possible before invite
+    TRAPD( error, iLiveSession->ZoomInL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+    
+    // Check the default value
+    EUNIT_ASSERT( iLiveSession->iDefaultZoomFactor == camera->iZoomFactor );
+
+    // Check that zoom factor can be increased
+    USER_SLEEP;  //insure that small step is used
+    iLiveSession->ZoomInL();
+    EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iDefaultZoomFactor +
+            iLiveSession->iSmallZoomStep );
+    
+   //Check the "burst" mode (immediate second ZoomIn), big step should be used
+    TInt nZoom = camera->iZoomFactor + camera->iDigitalZoomFactor;
+    iLiveSession->ZoomInL();
+    TInt nStep = camera->iZoomFactor + camera->iDigitalZoomFactor - nZoom;
+    EUNIT_ASSERT( nStep == iLiveSession->iBigZoomStep );
 
-    delete iLiveSession;
-    iLiveSession = NULL;
-    CRepository::SetStubGlobal( MusSettingsKeys::KCameraUsage,
-                                MusSettingsKeys::EUseOnlySecondaryCamera );
+    // Zoom to maximum optical value
+    while ( camera->iZoomFactor < iLiveSession->iCameraInfo.iMaxZoom )
+        {
+        iLiveSession->ZoomInL();
+        }
+        
+    TInt maxOpticalZoomFactor = camera->ZoomFactorL();
+    
+    // Check that digital zoom is used instead of optical
+    iLiveSession->ZoomInL();
+    EUNIT_ASSERT( camera->iZoomFactor == maxOpticalZoomFactor );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor > 0 );
+    
+    // Zoom to maximum digital value
+    while ( camera->iDigitalZoomFactor < 
+            iLiveSession->iCameraInfo.iMaxDigitalZoom )
+        {
+        iLiveSession->ZoomInL();
+        }
+    
+    TInt maxDigitalZoomFactor = camera->DigitalZoomFactorL();
+    
+    // Check that further zooming is impossible
+    iLiveSession->ZoomInL();
+    EUNIT_ASSERT( camera->iZoomFactor == maxOpticalZoomFactor );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor == maxDigitalZoomFactor );
+    
+    }
+
 
-    iLiveSession = CMusEngLiveSession::NewL();
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_ZoomOutLL()
+    {
+    // Check that zooming is not possible before invite
+    TRAPD( error, iLiveSession->ZoomOutL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+    
+    // Check the default value
+    EUNIT_ASSERT( iLiveSession->iDefaultZoomFactor == camera->iZoomFactor );
+    
+    // Simulate maximum zoom 
+    camera->iZoomFactor = iLiveSession->iCameraInfo.iMaxZoom;
+    camera->iDigitalZoomFactor = iLiveSession->iCameraInfo.iMaxDigitalZoom;
+    
+    // Check that digital zoom factor can be decreased
+    USER_SLEEP;  //insure that small step is used
+    iLiveSession->ZoomOutL();
+    EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iCameraInfo.iMaxZoom );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor == 
+                    iLiveSession->iCameraInfo.iMaxDigitalZoom - 
+                    iLiveSession->iSmallZoomStep );
+    
+    //Check the "burst" mode (immediate second ZoomOut), big step should be used
+    TInt nZoom = camera->iZoomFactor + camera->iDigitalZoomFactor;
+    iLiveSession->ZoomOutL();
+    TInt nStep;
+    nStep = nZoom - (camera->iZoomFactor + camera->iDigitalZoomFactor );
+    EUNIT_ASSERT( nStep == iLiveSession->iBigZoomStep );
+ 
+    // Simulate maximum zoom again
+    camera->iZoomFactor = iLiveSession->iCameraInfo.iMaxZoom;
+    camera->iDigitalZoomFactor = iLiveSession->iCameraInfo.iMaxDigitalZoom;
+    
+    // Zoom to minimum digital zoom
+    while ( camera->iDigitalZoomFactor > 0 )
+        {
+        iLiveSession->ZoomOutL();
+        }
+    
+    EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iCameraInfo.iMaxZoom );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 );
+    
+    // Check that optical zoom is decreased instead of digital
+    USER_SLEEP;  //insure that step is the small one
+    iLiveSession->ZoomOutL();
+    EUNIT_ASSERT( camera->iZoomFactor == 
+                    iLiveSession->iCameraInfo.iMaxZoom -
+                    iLiveSession->iSmallZoomStep );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 );
+    
+    // Zoom to minimum optical zoom
+    while ( camera->iZoomFactor > iLiveSession->iCameraInfo.iMinZoom )
+        {
+        iLiveSession->ZoomOutL();
+        }
+    
+    // Check that further zooming is impossible
+    iLiveSession->ZoomOutL();
+    EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iCameraInfo.iMinZoom );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_ZoomDefaultLL()
+    {
+    // Check that zooming is not possible before invite
+    TRAPD( error, iLiveSession->ZoomDefaultL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+    
+    // Check the default value
+    EUNIT_ASSERT( iLiveSession->iDefaultZoomFactor == camera->iZoomFactor );
+    
+    // increase zoom factor so much that optical zoom is in maximum value
+    // and digital zoom is in use
+    while ( camera->iDigitalZoomFactor == 0 )
+        {
+        iLiveSession->ZoomInL();
+        }
+    EUNIT_ASSERT( camera->iZoomFactor > iLiveSession->iDefaultZoomFactor );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor > 0 );
+    
+    // back to default
+    iLiveSession->ZoomDefaultL();
+    EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iDefaultZoomFactor  );
+    EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_SetBrightnessLL()
+    {
+    // Check that setting brightness is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( 
+                        iLiveSession->SetBrightnessL( KTestSomeBrightness ),
+                        KErrNotReady )
     
-    EUNIT_ASSERT_EQUALS( TInt( iLiveSession->iCameraHandler.iCameraUsage ),
-                         TInt( MusSettingsKeys::EUseOnlySecondaryCamera ) );     
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+   
+    camera->iCameraInfo.iOptionsSupported =
+    camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported;
+
+    // Check that originally current and default brightness are the same
+    EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness,
+                         iLiveSession->CurrentBrightnessL() )
+
+    // Test setting brightness
+    iLiveSession->SetBrightnessL( KTestSomeBrightness );
+
+    EUNIT_ASSERT_EQUALS( KTestSomeBrightness,
+                         iLiveSession->CurrentBrightnessL() )
+    }
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_CurrentBrightnessLL()
+    {
+    // Check that checking current brightness is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->CurrentBrightnessL(),
+                                 KErrNotReady )
+    
+    // All the other stuff checked in tests of SetBrightnessL
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_MaxBrightnessLL()
+    {
+    // MaxBrightness should return a constant
+
+    EUNIT_ASSERT_EQUALS( KTestMaxBrightness, iLiveSession->MaxBrightnessL() )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_MinBrightnessLL()
+    {
+    // MinBrightness should return a constant
+
+    EUNIT_ASSERT_EQUALS( KTestMinBrightness, iLiveSession->MinBrightnessL() )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_IncreaseBrightnessLL()
+    {
+    // Check that increasing brightness is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->IncreaseBrightnessL(),
+                                 KErrNotReady )
+
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+
+    camera->iCameraInfo.iOptionsSupported =
+    camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported;
+    
+    // Check that originally current and default brightness are the same
+    EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness,
+                         iLiveSession->CurrentBrightnessL() )
+
+    // Check that brightness can be increased...
+    iLiveSession->IncreaseBrightnessL();
+
+    EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness + KTestBrightnessStepSize,
+                         iLiveSession->CurrentBrightnessL() )
+                         
+    // ... but only to maximum
+    
+    iLiveSession->SetBrightnessL( KTestMaxBrightness );
+    
+    iLiveSession->IncreaseBrightnessL();
+    
+    EUNIT_ASSERT_EQUALS( KTestMaxBrightness,
+                         iLiveSession->CurrentBrightnessL() )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_DecreaseBrightnessLL()
+    {
+    // Check that decreasing brightness is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->DecreaseBrightnessL(),
+                                 KErrNotReady )
+
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+
+    camera->iCameraInfo.iOptionsSupported =
+    camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported;
+    
+    // Check that originally current and default brightness are the same
+    EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness,
+                         iLiveSession->CurrentBrightnessL() )
+
+    // Check that brightness can be decreased...
+    iLiveSession->DecreaseBrightnessL();
+
+    EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness - KTestBrightnessStepSize,
+                         iLiveSession->CurrentBrightnessL() )
+    
+    // ... but only to minimum
+    
+    iLiveSession->SetBrightnessL( KTestMinBrightness );
+    
+    iLiveSession->DecreaseBrightnessL();
+    
+    EUNIT_ASSERT_EQUALS( KTestMinBrightness,
+                         iLiveSession->CurrentBrightnessL() )
+	}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_BrightnessDefaultLL()
+    {
+    // Check that setting default brightness is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->BrightnessDefaultL(),
+                                 KErrNotReady )
+
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+
+    camera->iCameraInfo.iOptionsSupported =
+    camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported;
     
-    delete iLiveSession;
-    iLiveSession = NULL;
-    CRepository::SetStubGlobal( MusSettingsKeys::KCameraUsage,
-                                MusSettingsKeys::EUseOnlyMainCamera );
+    // Check that originally current and default brightness are the same
+    EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness,
+                         iLiveSession->CurrentBrightnessL() )
+
+    // set brightness to max
+    iLiveSession->SetBrightnessL( KTestMaxBrightness );
+    EUNIT_ASSERT_NOT_EQUALS( iLiveSession->iDefaultBrightness,
+                             iLiveSession->CurrentBrightnessL() )
+    
+    // set brightness to default and check it
+    iLiveSession->BrightnessDefaultL();
+
+    EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness,
+                         iLiveSession->CurrentBrightnessL() )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_BrightnessAutoLL()
+    {
+    // Check that setting brightness to auto is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->BrightnessAutoL(),
+                                 KErrNotReady );
+
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+
+    camera->iCameraInfo.iOptionsSupported =
+    camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported;
+    
+    // Check that originally brightness is not auto
+    EUNIT_ASSERT_NOT_EQUALS( CCamera::EBrightnessAuto, 
+                             iLiveSession->CurrentBrightnessL() )
+
+    // check that brightness is set to auto
+    iLiveSession->BrightnessAutoL();
+    EUNIT_ASSERT_EQUALS( CCamera::EBrightnessAuto,
+                         iLiveSession->CurrentBrightnessL() )
+    }
+
 
-    iLiveSession = CMusEngLiveSession::NewL();   
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_RecordL_and_IsRecordingLL()
+    {
+    // Check that recording is not possible before invite
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iRecordedLiveSession->RecordL( ETrue ),
+                                 KErrNotReady )
+    
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    ESTABLISH_OUT_SESSION( iRecordedLiveSession );
+    
+    // Check that recording is off by default
+    EUNIT_ASSERT( !iRecordedLiveSession->IsRecording() );
+    
+    // Check that recording can be set on
+    iRecordedLiveSession->RecordL( ETrue );
+    EUNIT_ASSERT( iRecordedLiveSession->IsRecording() );
+    
+    // Check that recording  cannot be set on if recording stream does not exist
+     EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->RecordL( ETrue ),
+                                  KErrNotReady )
+    
+    // Check that setting on the recording twice does not harm
+    iRecordedLiveSession->RecordL( ETrue );
+    EUNIT_ASSERT( iRecordedLiveSession->IsRecording() );
+    
+    // Check that recording can be set off again
+    iRecordedLiveSession->RecordL( EFalse );
+    EUNIT_ASSERT( !iRecordedLiveSession->IsRecording() );
+    
+    // Check that setting off the recording twice does not harm
+    iRecordedLiveSession->RecordL( EFalse );
+    EUNIT_ASSERT( !iRecordedLiveSession->IsRecording() );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//    
+void UT_CMusEngLiveSession::UT_PlayLL()
+    {
+    // Check that resuming is not possible before invite
+    TRAPD( error, iLiveSession->PlayL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    ESTABLISH_OUT_SESSION( iLiveSession );
+
+    iLiveSession->PauseL();
     
-    EUNIT_ASSERT_EQUALS( TInt( iLiveSession->iCameraHandler.iCameraUsage ),
-                         TInt( MusSettingsKeys::EUseOnlyMainCamera ) );
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+     
+    iLiveSession->PlayL();
+
+    EUNIT_ASSERT( camera->IsEnabled() );
+ 
+    // Try to enable camera again, request should be ignored
+    
+    iLiveSession->PlayL();
+
+    EUNIT_ASSERT( camera->IsEnabled() );
+ 
     }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//    
+void UT_CMusEngLiveSession::UT_PauseLL()
+    {
+    // Check that pausing is not possible before invite
+    TRAPD( error, iLiveSession->PauseL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    iLiveSession->PlayL();
+    
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+                    
+    iLiveSession->PauseL();
+
+    EUNIT_ASSERT( !camera->IsEnabled() );
+    
+    // Try to disable camera again, request should be ignored
+    
+    iLiveSession->PauseL();
+
+    EUNIT_ASSERT( !camera->IsEnabled() );
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//    
+void UT_CMusEngLiveSession::UT_IsPlayingLL()
+    {
+    // Try without a session 
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->IsPlayingL(), KErrNotReady );
+    
+    // Normal cases
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    iLiveSession->PlayL();
+    EUNIT_ASSERT( iLiveSession->IsPlayingL() )
+    
+    iLiveSession->PauseL();
+    EUNIT_ASSERT( !iLiveSession->IsPlayingL() )
+    }
+
 
 // -----------------------------------------------------------------------------
 //
@@ -199,8 +779,9 @@
 //
 void UT_CMusEngLiveSession::UT_CompleteSessionStructureLL()
     {
+    
     CMceStreamBundle* localBundle = 
-        CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
+                            CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
     
     // Check that structure cannot be completed before creating the session
     TRAPD( error, iLiveSession->CompleteSessionStructureL( *localBundle ) );
@@ -225,6 +806,7 @@
     EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Source() );
     EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Source()->Type() ==
                   KMceCameraSource );
+    EUNIT_ASSERT( !iLiveSession->IsPlayingL() )
     EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Sinks().Count() == 1 );
     EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Sinks()[0]->Type() ==
                   KMceRTPSink );
@@ -262,28 +844,46 @@
         
     EUNIT_ASSERT( file )
     
-  
+    CleanupStack::PopAndDestroy( localBundle );
+                                   
+    }
+
 
-    EUNIT_ASSERT( iLiveSession->iCameraHandler.iCurrentCamera ==
-                        TMusEngCameraHandler::EBackCamera );
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_HandleSessionStateChangedL()
+    {
+    // Make Repository empty, config keys must be written
+    CRepository::SetStubAvcConfigKeysL( KNullDesC8() );
     
-    delete iLiveSession->iSession; 
-    iLiveSession->iSession = NULL; 
+    // Invite    
+    iLiveSession->InviteL( KTestRecipientSipUri );
+    iLiveSession->iSession->iState = CMceSession::EEstablished;
     
-    iLiveSession->iSession = CMceOutSession::NewL( 
-                                    *(iLiveSession->iManager),
-                                    *profile,
-                                    KTestRecipientSipUri8() );
+    // Force failure on CenRep
+    CRepository::iForceFailWithCode = KErrNoMemory;
+    
+    // Simulate session state transition notification
+    iLiveSession->HandleSessionStateChanged( 
+                        *iLiveSession->iSession,
+                        200, KNullDesC8() );
+
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled );
     
-    iLiveSession->iCameraHandler.iCameraUsage = MusSettingsKeys::EUseOnlySecondaryCamera;     
-    iLiveSession->CompleteSessionStructureL( *localBundle );
+    // Normal case, something will be written to CenRep
+    iRecordedLiveSession->InviteL( KTestRecipientSipUri );
+    iRecordedLiveSession->iSession->iState = CMceSession::EEstablished;
+    iRecordedLiveSession->HandleSessionStateChanged( 
+                        *iRecordedLiveSession->iSession,
+                        200, KNullDesC8() );
     
-    EUNIT_ASSERT( iLiveSession->iCameraHandler.iCurrentCamera ==
-                        TMusEngCameraHandler::EFrontCamera );
+    HBufC8* info = MultimediaSharingSettings::EncoderConfigInfoLC();
+    EUNIT_ASSERT_NOT_EQUALS( *info, KMusAvcBitrateLevel_1b_ConfigKey() )
+    CleanupStack::PopAndDestroy( info );
+    }
     
-    
-    CleanupStack::PopAndDestroy( localBundle );                                 
-    }
 
 // -----------------------------------------------------------------------------
 //
@@ -298,10 +898,10 @@
     CMceVideoCodec* codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );
     CMceVideoCodec* codecUnknown = CMceH263Codec::NewLC( KNullDesC8() );
         
-    iLiveSession->AdjustVideoCodecL( *codecH263, KMceCameraSource );
-    iLiveSession->AdjustVideoCodecL( *codecH2632000, KMceCameraSource );    
-    iLiveSession->AdjustVideoCodecL( *codecAvc, KMceCameraSource );  
-    iLiveSession->AdjustVideoCodecL( *codecUnknown, KMceCameraSource );
+    iLiveSession->AdjustVideoCodecL( *codecH263 );
+    iLiveSession->AdjustVideoCodecL( *codecH2632000 );    
+    iLiveSession->AdjustVideoCodecL( *codecAvc );  
+    iLiveSession->AdjustVideoCodecL( *codecUnknown );
 
     // Test that bit rates has been set to H263 & AVC codecs
     EUNIT_ASSERT( codecH263->iAllowedBitrates == KMceAllowedH263BitrateAll )
@@ -336,8 +936,10 @@
     CleanupStack::PopAndDestroy( codecAvc );
     CleanupStack::PopAndDestroy( codecH2632000 );
     CleanupStack::PopAndDestroy( codecH263 );
+    
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -356,6 +958,7 @@
     CleanupStack::PopAndDestroy( codec );
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -381,16 +984,16 @@
     EUNIT_ASSERT_EQUALS( stream->Codecs().Count(), 3 )
     
     // Check that AVC codecs are removed if they are known to be not supported
-    delete iLiveSession->iVideoCodecList;
-    iLiveSession->iVideoCodecList = NULL;
-    iLiveSession->iVideoCodecList = _L8("SomethingThatIsNotAVC").AllocL();
+    iLiveSession->SetSupportedVideoCodecListL( _L( "SomethingThatIsNotAVC" ) );
     iLiveSession->DoCodecSelectionL( *stream );
     EUNIT_ASSERT_EQUALS( stream->Codecs().Count(), 2 )
     EUNIT_ASSERT( stream->Codecs()[0]->SdpName() != KMceSDPNameH264() )
     EUNIT_ASSERT( stream->Codecs()[1]->SdpName() != KMceSDPNameH264() )
     
     CleanupStack::PopAndDestroy( stream );
+    
     }
+    
 
 // -----------------------------------------------------------------------------
 // Although all states are not meaningfull for LiveSession, all states are
@@ -406,7 +1009,7 @@
     CleanupStack::PopAndDestroy( videoStream );
     
     // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri() );
     
     // Try all the stream states
     CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0];
@@ -415,58 +1018,59 @@
     changedStream->iState = CMceMediaStream::EUninitialized;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EBuffering, stream is buffering
     changedStream->iState = CMceMediaStream::EBuffering;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled );
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( *changedStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
+                                                            *changedStream );
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled );
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     changedStream->iState = CMceMediaStream::EDisabled;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ENoResources, stream has no needed resources to stream
     changedStream->iState = CMceMediaStream::ENoResources;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscodingRequired, stream requires non-realtime transcoding
     changedStream->iState = CMceMediaStream::ETranscodingRequired;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscoding, stream is transcoding in non-realtime
     changedStream->iState = CMceMediaStream::ETranscoding;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                                                             *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     }
 
+
 // -----------------------------------------------------------------------------
 // Although all states are not meaningfull for LiveSession, all states are
 // tested in order to force the updating of unit tests when behavior is changed 
@@ -483,7 +1087,7 @@
     CleanupStack::PopAndDestroy( videoStream );
     
     // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri() );
     
     // Try all the stream states
     CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0];
@@ -493,59 +1097,59 @@
     changedStream->iState = CMceMediaStream::EUninitialized;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );;
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EBuffering, stream is buffering
     changedStream->iState = CMceMediaStream::EBuffering;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled );
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) ) 
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled );
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     changedStream->iState = CMceMediaStream::EDisabled;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ENoResources, stream has no needed resources to stream
     changedStream->iState = CMceMediaStream::ENoResources;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscodingRequired, stream requires non-realtime transcoding
     changedStream->iState = CMceMediaStream::ETranscodingRequired;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscoding, stream is transcoding in non-realtime
     changedStream->iState = CMceMediaStream::ETranscoding;
     static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
                             *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     }
     
+
 // -----------------------------------------------------------------------------
 // Although all states are not meaningfull for LiveSession, all states are
 // tested in order to force the updating of unit tests when behavior is changed 
@@ -563,9 +1167,7 @@
     // Try with session
     
     ESTABLISH_OUT_SESSION( iRecordedLiveSession )
-    MLcDestinationFileControl* destinationFileControl =
-        iRecordedLiveSession->LocalVideoPlayer()->LcDestinationFileControl();
-    destinationFileControl->LcRecordL( ETrue );
+    iRecordedLiveSession->RecordL( ETrue );
     
     // Test state CMceMediaStream::ENoResources
                     
@@ -574,9 +1176,8 @@
     iLiveSession->StreamStateChanged(
                 *iLiveSession->iSession->Streams()[0],
                 *iLiveSession->iSession->Streams()[0]->Sinks()[0] );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled )
+    iObserver->Reset();
 
     // Try again with recording stream, but indicate change in another stream,
     // nothing happens    
@@ -611,11 +1212,8 @@
     iRecordedLiveSession->StreamStateChanged( *recordingStream,
                                               *recordingStream->Sinks()[0] );
     
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::EDiskFull ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iDiskFullCalled )
+    iObserver->Reset();
     
     
     // Test default stream state change behavior
@@ -626,34 +1224,33 @@
     // EUninitialized, stream is created, unexpected change, nothing happens
     changedStream->iState = CMceMediaStream::EUninitialized;
     iLiveSession->StreamStateChanged( *changedStream, *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     iLiveSession->StreamStateChanged( *changedStream, *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EBuffering, stream is buffering
     changedStream->iState = CMceMediaStream::EBuffering;
     iLiveSession->StreamStateChanged( *changedStream, *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     iLiveSession->StreamStateChanged( *changedStream, *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled );
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
     iLiveSession->StreamStateChanged( *changedStream, *changedSink );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled );
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     changedStream->iState = CMceMediaStream::EDisabled;
     iLiveSession->StreamStateChanged( *changedStream, *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ENoResources, stream has no needed resources to stream
     // This state has non-default meaning, tested before defaults
@@ -661,12 +1258,12 @@
     // ETranscodingRequired, stream requires non-realtime transcoding
     changedStream->iState = CMceMediaStream::ETranscodingRequired;
     iLiveSession->StreamStateChanged( *changedStream, *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscoding, stream is transcoding in non-realtime
     changedStream->iState = CMceMediaStream::ETranscoding;
     iLiveSession->StreamStateChanged( *changedStream, *changedSink );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     }
 
@@ -675,24 +1272,252 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngLiveSession::UT_EstablishLcSessionL()
+void UT_CMusEngLiveSession::UT_SetEncodingDeviceLL()
+    {
+    CMceAvcCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
+    
+    // Generic error in CenRep, leave expected
+    CRepository::iForceFailWithCode = KErrNotReady;
+    EUNIT_ASSERT_LEAVE( iLiveSession->SetEncodingDeviceL( *codec ) )
+    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, TUid::Uid( 0 ) )
+    
+    // No entry in CenRep, default value expected
+    CRepository::iForceFailWithCode = KErrNotFound;
+    const TUid KDefaultEncodingDevice( TUid::Uid( 0x20001C13 ) );
+    iLiveSession->SetEncodingDeviceL( *codec );
+    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, 
+                         KDefaultEncodingDevice )
+    
+    // Entry in CenRep
+    const TInt KSomeEncodingDevice( 0x20001C15 );
+    CRepository::iStaticEncoderUid = KSomeEncodingDevice;
+    iLiveSession->SetEncodingDeviceL( *codec );
+    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, 
+                         TUid::Uid( KSomeEncodingDevice ) )
+                                             
+    CleanupStack::PopAndDestroy( codec );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_SetCodecConfigKeyLL()
     {
-    iLiveSession->EstablishLcSessionL();
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::EOffering ),
-                         TInt( iLiveSession->iSession->iState ) )
+    CMceAvcCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
+    codec->SetAllowedBitrates( KMceAvcBitrateLevel1b );
+
+    // Generic error in CenRep, leave expected
+    CRepository::iForceFailWithCode = KErrNotReady;
+    EUNIT_ASSERT_LEAVE( iLiveSession->SetCodecConfigKeyL( *codec ) );
+    EUNIT_ASSERT( !codec->iConfigKey )
+    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
+    CRepository::iForceFailWithCode = KErrNone;
+    
+    // No entry in CenRep, nothing happens
+    iLiveSession->SetCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( !codec->iConfigKey )
+    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
+    
+    // Empty entry in CenRep
+    CRepository::SetStubAvcConfigKeysL( KNullDesC8() );
+    iLiveSession->SetCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( !codec->iConfigKey )
+    EUNIT_ASSERT( iLiveSession->iStoreEncoderConfigInfo )
+    iLiveSession->iStoreEncoderConfigInfo = EFalse; // emulate original situation
+    
+    // Entry in CenRep
+    CRepository::SetStubAvcConfigKeysL( KMusAvcBitrateLevel_1b_ConfigKey );
+    iLiveSession->SetCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( codec->iConfigKey )
+    HBufC8* key = codec->ConfigKeyL();
+    CleanupStack::PushL( key );
+    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1bTestText() )
+    CleanupStack::PopAndDestroy( key );
+    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
+    
+    CleanupStack::PopAndDestroy( codec );
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngLiveSession::UT_LocalVideoPlayerL()
+void UT_CMusEngLiveSession::UT_ReadCodecConfigKeyLL()
     {
-    EUNIT_ASSERT( iLiveSession->LocalVideoPlayer() == 
-                  iLiveSession->iLiveVideoPlayer )
+    HBufC8* key( NULL );
+    
+    // Try with H263, leave expected
+    CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() );  
+    EUNIT_ASSERT_LEAVE( key = iLiveSession->ReadCodecConfigKeyL( *codecH263 ) )
+    CleanupStack::PopAndDestroy( codecH263 );
+    
+    // Try without an entry in CenRep, leave expected
+    CMceVideoCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
+    codec->SetAllowedBitrates( 0 | KMceAvcBitrateLevel1 );
+    EUNIT_ASSERT_LEAVE( key = iLiveSession->ReadCodecConfigKeyL( *codec ) )
+
+    // Create CenRep entry which does not include wanted bitrate, NULL value
+    // expected
+    CRepository::SetStubAvcConfigKeysL( KMusAvcBitrateLevel1bTestText() );
+    key = iLiveSession->ReadCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( !key )
+    
+    // Create entry with all AVC keys and try with all the values
+    CRepository::SetStubAvcConfigKeysL( KMusAvcAllLevelsConcatenation() );                           
+    
+    // KMceAvcBitrateLevel1
+    key = iLiveSession->ReadCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( key );
+    CleanupStack::PushL( key );
+    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1TestText );
+    CleanupStack::PopAndDestroy( key );
+    
+    // KMceAvcBitrateLevel1b
+    codec->SetAllowedBitrates( KMceAvcBitrateLevel1b );
+    key = iLiveSession->ReadCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( key );
+    CleanupStack::PushL( key );
+    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1bTestText );
+    CleanupStack::PopAndDestroy( key );
+    
+    // KMceAvcBitrateLevel1_1
+    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_1 );
+    key = iLiveSession->ReadCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( key );
+    CleanupStack::PushL( key );
+    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_1TestText );
+    CleanupStack::PopAndDestroy( key );
+    
+    // KMceAvcBitrateLevel1_2
+    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_2 );
+    key = iLiveSession->ReadCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( key );
+    CleanupStack::PushL( key );
+    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_2TestText );
+    CleanupStack::PopAndDestroy( key );
+    
+    // KMceAvcBitrateLevel1_3
+    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_3 );
+    key = iLiveSession->ReadCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( key );
+    CleanupStack::PushL( key );
+    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_3TestText );
+    CleanupStack::PopAndDestroy( key );
+    
+    // KMceAvcBitrateLevel2
+    codec->SetAllowedBitrates( KMceAvcBitrateLevel2 );
+    key = iLiveSession->ReadCodecConfigKeyL( *codec );
+    EUNIT_ASSERT( key );
+    CleanupStack::PushL( key );
+    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel2TestText );
+    CleanupStack::PopAndDestroy( key );
+   
+    CleanupStack::PopAndDestroy( codec );
+
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_StoreEncoderConfigInfoLL()
+    {
+    CRepository::iStaticWriteAvcKeysToStaticData = ETrue;
+    
+    // Try with clean CenRep
+    MultimediaSharingSettings::SetEncoderConfigInfoL( KNullDesC8() );   
+    
+    ESTABLISH_OUT_SESSION( iLiveSession ) // calls StoreEncoderConfigInfoL
+    // If StoreEncoderConfigInfoL leaves with KErrNoMemory,
+    // MMusEngSessionObserver::SessionFailed will be called.
+    __ASSERT_ALWAYS( !iObserver->iSessionFailedCalled, 
+                     User::Leave( KErrNoMemory ) );
+                     
+    HBufC8* keys = MultimediaSharingSettings::EncoderConfigInfoLC();    
+    EUNIT_ASSERT_EQUALS( *keys, KMusAvcBitrateLevel_1b_ConfigKey() )
+    CleanupStack::PopAndDestroy( keys );
+    
+    // Try without a clean CenRep 
+    MultimediaSharingSettings::SetEncoderConfigInfoL(
+                                        KMusAvcBitrateLevel_1_1_ConfigKey() );   
+    
+    ESTABLISH_OUT_SESSION( iRecordedLiveSession )
+    // If StoreEncoderConfigInfoL leaves with KErrNoMemory,
+    // MMusEngSessionObserver::SessionFailed will be called.
+    __ASSERT_ALWAYS( !iObserver->iSessionFailedCalled, 
+                     User::Leave( KErrNoMemory ) );
+                     
+    keys = MultimediaSharingSettings::EncoderConfigInfoLC();
+    EUNIT_ASSERT_EQUALS( *keys, 
+                         KMusAvcBitrateLevels_1_1_And_1b_ConfigKeys() )
+    CleanupStack::PopAndDestroy( keys );
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngLiveSession::UT_InitializeZoomStepSizeL()
+    {
+    //Check that zooming steps have defualt values before session establishment
+    iLiveSession->InitializeZoomStepSize();
+    EUNIT_ASSERT( iLiveSession->iSmallZoomStep == KZoomStepMinSize );
+    EUNIT_ASSERT( iLiveSession->iBigZoomStep == KZoomStepMinSize );
+    
+    // simulate session establishment
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    CMceCameraSource* camera = 
+                        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+    
+    //Check that zooming step sizes have default value KZoomStepMinSize 
+    //in case of zooming values range is smaller than KZoomBigStepCount
+    iLiveSession->iCameraInfo.iMinZoom = 0;
+    iLiveSession->iCameraInfo.iMaxZoom = 0;
+    iLiveSession->iCameraInfo.iMaxDigitalZoom = KZoomBigStepCount / 2;    
+    iLiveSession->InitializeZoomStepSize();
+    EUNIT_ASSERT( iLiveSession->iSmallZoomStep == KZoomStepMinSize );
+    EUNIT_ASSERT( iLiveSession->iBigZoomStep == KZoomStepMinSize );
+    
+    
+    //Check that zooming step sizes have default value KZoomStepMinSize 
+    //in case of zooming values range is bigger than KZoomBigStepCount,
+    //but smaller than 2*KZoomBigStepCount (KZoomSmallStepCount)
+    iLiveSession->iCameraInfo.iMaxDigitalZoom = 2*KZoomBigStepCount - 1;
+    iLiveSession->InitializeZoomStepSize();
+    EUNIT_ASSERT( iLiveSession->iSmallZoomStep == KZoomStepMinSize );
+    EUNIT_ASSERT( iLiveSession->iBigZoomStep == KZoomStepMinSize );
+
+    
+    //Check zooming steps sizes in case of zooming values range is
+    //bigger than 2*KZoomBigStepCount and smaller than 2*KZoomSmallStepCount
+    iLiveSession->iCameraInfo.iMinZoom = - KZoomBigStepCount;
+    iLiveSession->iCameraInfo.iMaxZoom = KZoomBigStepCount;
+    iLiveSession->iCameraInfo.iMaxDigitalZoom = KZoomBigStepCount;
+    //zooming range is (-KZoomBigStepCount, 2*KZoomBigStepCount)
+    iLiveSession->InitializeZoomStepSize();
+    EUNIT_ASSERT( iLiveSession->iSmallZoomStep == KZoomStepMinSize );
+    EUNIT_ASSERT( iLiveSession->iBigZoomStep == 3 );
+
+    
+    //Check zooming steps sizes in case of zooming values range is
+    //bigger than 2*KZoomSmallStepCount
+    iLiveSession->iCameraInfo.iMaxZoom = KZoomSmallStepCount;
+    iLiveSession->iCameraInfo.iMaxDigitalZoom = KZoomSmallStepCount;
+    iLiveSession->iCameraInfo.iMinZoom = - KZoomSmallStepCount;
+    //zooming range is (-KZoomSmallStepCount, 2*KZoomSmallStepCount)
+    iLiveSession->InitializeZoomStepSize();
+    EUNIT_ASSERT( iLiveSession->iSmallZoomStep == 3 );
+    EUNIT_ASSERT( iLiveSession->iBigZoomStep == 6 );    
+    }
+    
+
 //  TEST TABLE
+
 EUNIT_BEGIN_TEST_TABLE(
     UT_CMusEngLiveSession,
     "UT_CMusEngLiveSesssion",
@@ -706,6 +1531,125 @@
     SetupL, UT_NewLL, Teardown)
 
 EUNIT_TEST(
+    "CurrentZoomL - test ",
+    "CMusEngLiveSession",
+    "CurrentZoomL",
+    "FUNCTIONALITY",
+    SetupL, UT_CurrentZoomLL, Teardown)
+
+EUNIT_TEST(
+    "MaxZoomL - test ",
+    "CMusEngLiveSession",
+    "MaxZoomL",
+    "FUNCTIONALITY",
+    SetupL, UT_MaxZoomLL, Teardown)
+    
+EUNIT_TEST(
+    "ZoomInL - test ",
+    "CMusEngLiveSession",
+    "ZoomInL",
+    "FUNCTIONALITY",
+    SetupL, UT_ZoomInLL, Teardown)
+
+EUNIT_TEST(
+    "ZoomOutL - test ",
+    "CMusEngLiveSession",
+    "ZoomOutL",
+    "FUNCTIONALITY",
+    SetupL, UT_ZoomOutLL, Teardown)
+
+EUNIT_TEST(
+    "ZoomDefaultL - test ",
+    "CMusEngLiveSession",
+    "ZoomDefaultL",
+    "FUNCTIONALITY",
+    SetupL, UT_ZoomDefaultLL, Teardown)
+
+EUNIT_TEST(
+    "SetBrightnessL - test ",
+    "CMusEngLiveSession",
+    "SetBrightnessL",
+    "FUNCTIONALITY",
+    SetupL, UT_SetBrightnessLL, Teardown)
+
+EUNIT_TEST(
+    "CurrentBrightnessL - test ",
+    "CMusEngLiveSession",
+    "CurrentBrightnessL",
+    "FUNCTIONALITY",
+    SetupL, UT_CurrentBrightnessLL, Teardown)
+
+EUNIT_TEST(
+    "MaxBrightnessL - test ",
+    "CMusEngLiveSession",
+    "MaxBrightnessL",
+    "FUNCTIONALITY",
+    SetupL, UT_MaxBrightnessLL, Teardown)
+
+EUNIT_TEST(
+    "MinBrightnessL - test ",
+    "CMusEngLiveSession",
+    "MinBrightnessL",
+    "FUNCTIONALITY",
+    SetupL, UT_MinBrightnessLL, Teardown)
+
+EUNIT_TEST(
+    "IncreaseBrightnessL - test ",
+    "CMusEngLiveSession",
+    "IncreaseBrightnessL",
+    "FUNCTIONALITY",
+    SetupL, UT_IncreaseBrightnessLL, Teardown)
+
+EUNIT_TEST(
+    "DecreaseBrightnessL - test ",
+    "CMusEngLiveSession",
+    "DecreaseBrightnessL",
+    "FUNCTIONALITY",
+    SetupL, UT_DecreaseBrightnessLL, Teardown)
+
+EUNIT_TEST(
+    "BrightnessDefaultL - test ",
+    "CMusEngLiveSession",
+    "BrightnessDefaultL",
+    "FUNCTIONALITY",
+    SetupL, UT_BrightnessDefaultLL, Teardown)
+
+EUNIT_TEST(
+    "BrightnessAutoL - test ",
+    "CMusEngLiveSession",
+    "BrightnessAutoL",
+    "FUNCTIONALITY",
+    SetupL, UT_BrightnessAutoLL, Teardown)
+
+EUNIT_TEST(
+    "RecordL_and_IsRecordingL - test ",
+    "CMusEngLiveSession",
+    "RecordL_and_IsRecordingL",
+    "FUNCTIONALITY",
+    SetupL, UT_RecordL_and_IsRecordingLL, Teardown)
+
+EUNIT_TEST(
+    "PlayL - test ",
+    "CMusEngLiveSession",
+    "PlayL",
+    "FUNCTIONALITY",
+    SetupL, UT_PlayLL, Teardown)
+
+EUNIT_TEST(
+    "PauseL - test ",
+    "CMusEngLiveSession",
+    "PauseL",
+    "FUNCTIONALITY",
+    SetupL, UT_PauseLL, Teardown)
+
+EUNIT_TEST(
+    "IsPlayingL - test ",
+    "CMusEngLiveSession",
+    "IsPlayingL",
+    "FUNCTIONALITY",
+    SetupL, UT_IsPlayingLL, Teardown)
+
+EUNIT_TEST(
     "CompleteSessionStructureL - test ",
     "CMusEngLiveSession",
     "CompleteSessionStructureL",
@@ -713,6 +1657,13 @@
     SetupL, UT_CompleteSessionStructureLL, Teardown)
 
 EUNIT_TEST(
+    "HandleSessionStateChanged - test ",
+    "CMusEngLiveSession",
+    "HandleSessionStateChanged",
+    "FUNCTIONALITY",
+    SetupL, UT_HandleSessionStateChangedL, Teardown)
+
+EUNIT_TEST(
     "AdjustVideoCodecL - test ",
     "CMusEngLiveSession",
     "AdjustVideoCodecL",
@@ -752,22 +1703,44 @@
     "CMusEngLiveSession",
     "StreamStateChangedL( sink )",
     "FUNCTIONALITY",
-    SetupL, UT_StreamStateChangedWithSinkL, Teardown) 
+    SetupL, UT_StreamStateChangedWithSinkL, Teardown)
+
+EUNIT_TEST(
+    "SetEncodingDeviceL - test ",
+    "CMusEngLiveSession",
+    "SetEncodingDeviceL",
+    "FUNCTIONALITY",
+    SetupL, UT_SetEncodingDeviceLL, Teardown)   
+
+EUNIT_TEST(
+    "SetCodecConfigKeyL - test ",
+    "CMusEngLiveSession",
+    "SetCodecConfigKeyL",
+    "FUNCTIONALITY",
+    SetupL, UT_SetCodecConfigKeyLL, Teardown)    
 
 EUNIT_TEST(
-    "EstablishLcSessionL - test ",
+    "ReadCodecConfigKeyL - test ",
     "CMusEngLiveSession",
-    "EstablishLcSessionL",
+    "ReadCodecConfigKeyL",
     "FUNCTIONALITY",
-    SetupL, UT_EstablishLcSessionL, Teardown)
+    SetupL, UT_ReadCodecConfigKeyLL, Teardown)        
+
+EUNIT_TEST(
+    "StoreEncoderConfigInfoL - test ",
+    "CMusEngLiveSession",
+    "StoreEncoderConfigInfoL",
+    "FUNCTIONALITY",
+    SetupL, UT_StoreEncoderConfigInfoLL, Teardown)      
     
 EUNIT_TEST(
-    "LocalVideoPlayer - test ",
+    "InitializeZoomStepSize - test ",
     "CMusEngLiveSession",
-    "LocalVideoPlayer",
+    "InitializeZoomStepSize",
     "FUNCTIONALITY",
-    SetupL, UT_LocalVideoPlayerL, Teardown)
-    
+    SetupL, UT_InitializeZoomStepSizeL, Teardown)      
+
+      
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenglivevideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,490 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include "ut_musenglivevideoplayer.h"
-#include "musenglivevideoplayer.h"
-#include "musengtestdefs.h"
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-#include <mceoutsession.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcecamerasource.h>
-#include <mcefilesink.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngLiveVideoPlayer* UT_CMusEngLiveVideoPlayer::NewL()
-    {
-    UT_CMusEngLiveVideoPlayer* self = UT_CMusEngLiveVideoPlayer::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngLiveVideoPlayer* UT_CMusEngLiveVideoPlayer::NewLC()
-    {
-    UT_CMusEngLiveVideoPlayer* self = new( ELeave ) UT_CMusEngLiveVideoPlayer();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngLiveVideoPlayer::~UT_CMusEngLiveVideoPlayer()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngLiveVideoPlayer::UT_CMusEngLiveVideoPlayer()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }   
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::SetupL()
-    {
-    iMceSession = CMceOutSession::NewL();
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC(); 
-    CMceRtpSink* rtpsink = CMceRtpSink::NewLC();
-    videoStream->AddSinkL( rtpsink );
-    CleanupStack::Pop( rtpsink );
-    CMceCameraSource* camera = CMceCameraSource::NewLC();
-    iCameraHandler.InitializeL( *camera );
-    videoStream->SetSourceL( camera );
-    CleanupStack::Pop( camera );
-    iMceSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );
-    
-    iCameraHandler.SetSession( iMceSession );     
-    iLiveVideoPlayer = 
-        CMusEngLiveVideoPlayer::NewL(  
-            iDisplayHandlerStub,
-            iCameraHandler, 
-            iLcAudioControlStub );
-    iLiveVideoPlayer->SetMceSession( iMceSession );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::Teardown()
-    {
-    delete iLiveVideoPlayer;
-    delete iMceSession;
-    iLcAudioControlStub.Reset();
-    }
-
-
-
-// TEST CASES
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_NewLL()
-    {    
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcVideoPlayerStateL()
-    {
-    // iMceSession not set
-    iLiveVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )    
-    iLiveVideoPlayer->SetMceSession( iMceSession );
-    
-    // Establish Session and simulate media playing.
-    iMceSession->iState = CMceSession::EEstablished;
-    for ( TInt i = 0; i < iMceSession->Streams().Count(); i++ )
-        {
-        iMceSession->Streams()[i]->iState = CMceMediaStream::EStreaming;
-        }
-    
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPlaying ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )
-                                                
-    // Media streams unavailable
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EUninitialized;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )
-
-    // All other stream states
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EInitialized;	
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EInit ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )	
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EBuffering;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EBuffering ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )
-		
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EIdle;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPaused ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )	
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EDisabled;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPaused ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EStreaming;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPlaying ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )
-
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ENoResources;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ETranscodingRequired;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )
-	
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ETranscoding;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iLiveVideoPlayer->LcVideoPlayerState() ) )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcPlayL()
-    {
-    // Play
-    iLiveVideoPlayer->LcPlayL();
-    EUNIT_ASSERT( iLiveVideoPlayer->LcIsPlayingL() );
-    
-    // Pause
-    iLiveVideoPlayer->LcPauseL();
-    EUNIT_ASSERT( !iLiveVideoPlayer->LcIsPlayingL() );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcWindowL()
-    {
-    EUNIT_ASSERT( iLiveVideoPlayer->LcWindow() == iLiveVideoPlayer )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcCameraControlL()
-    {
-    EUNIT_ASSERT( iLiveVideoPlayer->LcCameraControl() == &iCameraHandler )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcSourceFileControlL()
-    {
-    EUNIT_ASSERT( iLiveVideoPlayer->LcSourceFileControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcDestinationFileControlL()
-    {
-    EUNIT_ASSERT( 
-        iLiveVideoPlayer->LcDestinationFileControl() == iLiveVideoPlayer )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcAudioControlL()
-    {
-    EUNIT_ASSERT( iLiveVideoPlayer->LcAudioControl() == &iLcAudioControlStub )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcZoomControlL()
-    {
-    EUNIT_ASSERT( iLiveVideoPlayer->LcZoomControl() == &iCameraHandler )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcBrightnessControlL()
-    {
-    EUNIT_ASSERT( iLiveVideoPlayer->LcBrightnessControl() == &iCameraHandler )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_EnableLcWindowL()
-    {
-    EUNIT_ASSERT( !iLiveVideoPlayer->IsLcWindowEnabled() )
-    
-    // Enable
-    iLiveVideoPlayer->EnableLcWindowL( ETrue );
-    EUNIT_ASSERT( iLiveVideoPlayer->IsLcWindowEnabled() )
-    
-    // Disable
-    iLiveVideoPlayer->EnableLcWindowL( EFalse );
-    EUNIT_ASSERT( !iLiveVideoPlayer->IsLcWindowEnabled() )    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcWindowRectL()
-    {
-    TRect rect( 12, 34, 56, 78 );
-    iLiveVideoPlayer->SetLcWindowRectL( rect );
-    EUNIT_ASSERT( iLiveVideoPlayer->LcWindowRect() == rect )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcWindowOrientationL()
-    {
-    iLiveVideoPlayer->SetLcWindowOrientationL( MLcWindow::EPortrait );
-    EUNIT_ASSERT_EQUALS( TInt( MLcWindow::EPortrait ), 
-                         TInt( iLiveVideoPlayer->LcWindowOrientationL() ) )
-    
-    iLiveVideoPlayer->SetLcWindowOrientationL( MLcWindow::ELandscape );
-    EUNIT_ASSERT_EQUALS( TInt( MLcWindow::ELandscape ), 
-                         TInt( iLiveVideoPlayer->LcWindowOrientationL() ) )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_SetLcFileNameL()
-    {
-    EUNIT_ASSERT_EQUALS( KNullDesC(), iLiveVideoPlayer->LcFileName() )
-    
-    _LIT( KFileName, "my_clip.format");
-    TFileName fileName( KFileName );
-    iLiveVideoPlayer->SetLcFileNameL( fileName );
-    EUNIT_ASSERT_EQUALS( fileName, iLiveVideoPlayer->LcFileName() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngLiveVideoPlayer::UT_LcRecordL()
-    {
-    // No MCE session
-    iLiveVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iLiveVideoPlayer->LcRecordL( ETrue ), KErrNotReady )
-    
-    // No file sink in the session
-    iLiveVideoPlayer->SetMceSession( iMceSession );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iLiveVideoPlayer->LcRecordL( ETrue ), KErrNotReady )      
-    
-    // Record, not yet recording
-    EUNIT_ASSERT( !iLiveVideoPlayer->LcIsRecording() )
-    CMceVideoStream* streamForRecording = CMceVideoStream::NewLC(); 
-    CMceFileSink* fileSink = CMceFileSink::NewLC( KTestVideoFileName() );
-    fileSink->DisableL();
-    streamForRecording->AddSinkL( fileSink );
-    CleanupStack::Pop( fileSink );
-    iMceSession->AddStreamL( streamForRecording );
-    CleanupStack::Pop( streamForRecording );   
-    iLiveVideoPlayer->LcRecordL( ETrue );    
-    EUNIT_ASSERT( iLiveVideoPlayer->LcIsRecording() )
-    
-    // Record, already recording
-    iLiveVideoPlayer->LcRecordL( ETrue );    
-    EUNIT_ASSERT( iLiveVideoPlayer->LcIsRecording() ) 
-    
-    // Stop recording
-    iLiveVideoPlayer->LcRecordL( EFalse );    
-    EUNIT_ASSERT( !iLiveVideoPlayer->LcIsRecording() )         
-    
-    // Stop recording, not anymore recording
-    iLiveVideoPlayer->LcRecordL( EFalse );    
-    EUNIT_ASSERT( !iLiveVideoPlayer->LcIsRecording() )
-    }
-
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusEngLiveVideoPlayer,
-    "UT_CMusEngLiveVideoPlayer",
-    "UNIT" )
-
-EUNIT_TEST(
-    "NewL - test ",
-    "CMusEngLiveVideoPlayer",
-    "NewL",
-    "FUNCTIONALITY",
-    SetupL, UT_NewLL, Teardown)    
-    
-EUNIT_TEST(
-    "LcVideoPlayerState - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcVideoPlayerState",
-    "FUNCTIONALITY",
-    SetupL, UT_LcVideoPlayerStateL, Teardown)
-
-EUNIT_TEST(
-    "LcPlayL - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcPlayL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcPlayL, Teardown)
-
-EUNIT_TEST(
-    "LcWindow - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcWindow",
-    "FUNCTIONALITY",
-    SetupL, UT_LcWindowL, Teardown)
-
-EUNIT_TEST(
-    "LcCameraControl - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcCameraControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcCameraControlL, Teardown)
-
-EUNIT_TEST(
-    "LcSourceFileControl - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcSourceFileControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcSourceFileControlL, Teardown)
-
-EUNIT_TEST(
-    "LcDestinationFileControl - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcDestinationFileControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcDestinationFileControlL, Teardown)
-
-EUNIT_TEST(
-    "LcAudioControl - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcAudioControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcAudioControlL, Teardown)
-
-EUNIT_TEST(
-    "LcZoomControl - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcZoomControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcZoomControlL, Teardown)
-
-EUNIT_TEST(
-    "LcBrightnessControl - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcBrightnessControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcBrightnessControlL, Teardown) 
-
-EUNIT_TEST(
-    "EnableLcWindowL - test ",
-    "CMusEngLiveVideoPlayer",
-    "EnableLcWindowL",
-    "FUNCTIONALITY",
-    SetupL, UT_EnableLcWindowL, Teardown)    
-        
-EUNIT_TEST(
-    "LcWindowRect - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcWindowRect",
-    "FUNCTIONALITY",
-    SetupL, UT_LcWindowRectL, Teardown)  
-        
-EUNIT_TEST(
-    "LcWindowOrientation - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcWindowOrientation",
-    "FUNCTIONALITY",
-    SetupL, UT_LcWindowOrientationL, Teardown)
-    
-EUNIT_TEST(
-    "SetLcFileNameL - test ",
-    "CMusEngLiveVideoPlayer",
-    "SetLcFileNameL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetLcFileNameL, Teardown)    
-    
-EUNIT_TEST(
-    "LcRecordL - test ",
-    "CMusEngLiveVideoPlayer",
-    "LcRecordL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcRecordL, Teardown)    
-    
-EUNIT_END_TEST_TABLE
-
-//  END OF FILE
-
-
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengmcesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengmcesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -28,12 +28,9 @@
 #include "musengsessiondurationtimer.h"
 #include "musengtelephoneutils.h"
 #include "musengmceutils.h"
-#include "mussessionproperties.h"
-#include "contactenginestub.h"
-#include "musenglivevideoplayer.h"
 
 //  SYSTEM INCLUDES
-#include <lcsourcefilecontrol.h>
+
 #include <digia/eunit/eunitmacros.h>
 #include <mceinsession.h>
 #include <mcevideostream.h>
@@ -45,37 +42,9 @@
 #include <mcevideocodec.h>
 #include <mceaudiocodec.h>
 #include <audiopreference.h>
+#include <mceh263codec.h>
 #include <mceavccodec.h>
-#include <mceh263codec.h>
-#include <mcecamerasource.h>
-#include <mcefilesource.h>
-#include <telmicmutestatuspskeys.h>
-
-// CONSTANTS
-
-_LIT8( KMusAvcBitrateLevel1TestText, "TestTextForAvcBrL1Level" );
-_LIT8( KMusAvcBitrateLevel1bTestText, "TestTextForAvcBrL1bLevel" );
-_LIT8( KMusAvcBitrateLevel1_1TestText, "TestTextForAvcBrL1_1Level" );
-_LIT8( KMusAvcBitrateLevel1_2TestText, "TestTextForAvcBrL1_2Level" );
-_LIT8( KMusAvcBitrateLevel1_3TestText, "TestTextForAvcBrL1_3Level" );
-_LIT8( KMusAvcBitrateLevel2TestText, "TestTextForAvcBrL2Level" );
 
-_LIT8( KMusAvcBitrateLevel_1b_ConfigKey, "AvcBrL1b=TestTextForAvcBrL1bLevel;" );
-
-_LIT8( KMusAvcBitrateLevel_1_1_ConfigKey, 
-"AvcBrL1_1=TestTextForAvcBrL1_1Level;");
-
-_LIT8( KMusAvcBitrateLevels_1_1_And_1b_ConfigKeys, 
-"AvcBrL1_1=TestTextForAvcBrL1_1Level;\
-AvcBrL1b=TestTextForAvcBrL1bLevel;" );
-
-_LIT8( KMusAvcAllLevelsConcatenation,
-"AvcBrL1=TestTextForAvcBrL1Level;\
-AvcBrL1b=TestTextForAvcBrL1bLevel;\
-AvcBrL1_1=TestTextForAvcBrL1_1Level;\
-AvcBrL1_2=TestTextForAvcBrL1_2Level;\
-AvcBrL1_3=TestTextForAvcBrL1_3Level;\
-AvcBrL2=TestTextForAvcBrL2Level;" );
 
 
 // -----------------------------------------------------------------------------
@@ -141,37 +110,34 @@
 //
 void UT_CMusEngMceSession::SetupL(  )
     {
-    iLcSessionObserver = new( ELeave )CLcSessionObserverStub;
-    iLcUiProvider = new( ELeave )CLcUiProviderStub;
-
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        KTestRecipientSipUri ) );    
-    
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
+    iObserver = new( ELeave ) CMusEngObserverStub;
+    iLiveSession = CMusEngLiveSession::NewL( KNullDesC,
+                                             TRect(0,0, 100,100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );
     
-    iSomeOtherSession = CMusEngLiveSession::NewL();
-    iSomeOtherSession->SetLcSessionObserver( iLcSessionObserver );
-    iSomeOtherSession->SetLcUiProvider( iLcUiProvider );
-    
+    iSomeOtherSession = CMusEngLiveSession::NewL( KNullDesC,
+                                                  TRect(0,0, 100,100),
+                                                  *iObserver,
+                                                  *iObserver,
+                                                  *iObserver );
     ESTABLISH_OUT_SESSION( iSomeOtherSession );
-   
-    iClipSession = CMusEngClipSession::NewL();
-    iClipSession->SetLcSessionObserver( iLcSessionObserver );
-    iClipSession->SetLcUiProvider( iLcUiProvider );
-    MLcSourceFileControl* sourceFileControl =
-        iClipSession->LocalVideoPlayer()->LcSourceFileControl();
-    sourceFileControl->SetLcFileNameL( KTestAvcVideoFileName() );
+    
+    iClipSession = CMusEngClipSession::NewL( TRect(0,0, 100,100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );                                             
+    iClipSession->SetClipL( KTestVideoFileName() );
 
-    delete iClipSession->iVideoCodecList;
-    iClipSession->iVideoCodecList = NULL;
-    iClipSession->iVideoCodecList = KMceSDPNameH264().AllocL();
+    TBuf<50> videoCodec;
+    videoCodec.Copy( KMceSDPNameH264() );
+    iClipSession->SetSupportedVideoCodecListL(videoCodec);
     
     // Construct and establish an incoming session
-    iReceiveSession = CMusEngReceiveSession::NewL();
-    iReceiveSession->SetLcSessionObserver( iLcSessionObserver ); 
+    iReceiveSession = CMusEngReceiveSession::NewL( TRect(0,0, 100,100), 
+                                                   *iObserver,
+                                                   *iObserver );
     CMceInSession* inSession = CMceInSession::NewL( *iReceiveSession->iManager,
                                                     KTestOriginator() );
                                                     
@@ -187,11 +153,12 @@
                                                         inSession, 
                                                         &iContainer );
     iReceiveSession->iSession->iState = CMceSession::EProceeding;
-    iReceiveSession->EstablishLcSessionL();
-   
-    iLcSessionObserver->Reset();
+    iReceiveSession->AcceptInvitationL( ETrue );
+    
+    iObserver->Reset();
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -201,282 +168,47 @@
     delete iLiveSession;
     delete iClipSession;
     delete iReceiveSession;
-    delete iLcSessionObserver;
-    delete iLcUiProvider;
+    delete iObserver;
     delete iSomeOtherSession;
-    PropertyHelper::Close();
-    // Delete static data from CenRep stub
-    CRepository::iStaticWriteAvcKeysToStaticData = EFalse;
-    CRepository::DeleteStubAvcConfigKeys();
-    CRepository::ResetStubGlobal();
-    CRepository::iForceFailWithCode = KErrNone;
+    
     }
 
 
 
 // TEST CASES
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_LcSessionStateL()
-    {
-    // No MCE session -> MLcSession::EUninitialized
-    EUNIT_ASSERT_EQUALS( MLcSession::EUninitialized, 
-                         iLiveSession->LcSessionState() )
-                         
-    // MLcSession::EOpen
-    ESTABLISH_OUT_SESSION( iLiveSession )
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::EEstablished ),
-                         TInt( iLiveSession->iSession->iState ) )  
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EOpen ), 
-                         TInt( iLiveSession->LcSessionState() ) )
-
-    // MLcSession::EInitialized
-    iLiveSession->iSession->iState = CMceSession::EIdle;
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EInitialized ), 
-                         TInt( iLiveSession->LcSessionState() ) )
-
-    // MLcSession::EReceived
-    iLiveSession->iSession->iState = CMceSession::EIncoming;
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EReceived ),
-                         TInt( iLiveSession->LcSessionState() ) )
-
-    iLiveSession->iSession->iState = CMceSession::EProceeding; 
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EReceived ), 
-                         TInt( iLiveSession->LcSessionState() ) )
-    
-    iLiveSession->iSession->iState = CMceSession::EReserving; 
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EReceived ), 
-                         TInt( iLiveSession->LcSessionState() ) )   
-    
-    // MLcSession::EOpening
-    iLiveSession->iSession->iState = CMceSession::EOffering;
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EOpening ), 
-                         TInt( iLiveSession->LcSessionState() ) )
-    
-    iLiveSession->iSession->iState = CMceSession::EAnswering;
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EOpening ), 
-                         TInt( iLiveSession->LcSessionState() ) )
-
-    // MLcSession::EClosing
-    iLiveSession->iSession->iState = CMceSession::ECancelling; 
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EClosing ), 
-                         TInt( iLiveSession->LcSessionState() ) )
-    
-    iLiveSession->iSession->iState = CMceSession::ETerminating; 
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EClosing ), 
-                         TInt( iLiveSession->LcSessionState() ) )
-    
-    // MLcSession::EClosed
-    iLiveSession->iSession->iState = CMceSession::ETerminated;
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EClosed ), 
-                         TInt( iLiveSession->LcSessionState() ) )   
-    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_RemoteVideoPlayerL()
-    {
-    EUNIT_ASSERT( iLiveSession->CMusEngMceSession::RemoteVideoPlayer() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_LocalVideoPlayerL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_TerminateLL()
     {
-    EUNIT_ASSERT( iLiveSession->CMusEngMceSession::LocalVideoPlayer() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_LocalDisplayNameL()
-    {
-    EUNIT_ASSERT_EQUALS( KNullDesC(), iLiveSession->LocalDisplayName() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_RemoteDisplayNameL()
-    {
-    // Clear the thread common storage to ensrue its not polluted. 
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                   NMusSessionApi::KContactName,
-                                   KNullDesC) );
+    TRAPD( error, iLiveSession->TerminateL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
     
-    EUNIT_ASSERT_EQUALS( KNullDesC(), iLiveSession->RemoteDisplayName() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_RemoteDetailsL()
-    {
-    // Clear the thread common storage to ensrue its not polluted. 
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                   NMusSessionApi::KTelNumber,
-                                   KNullDesC) );
+    ESTABLISH_OUT_SESSION( iLiveSession );
     
-    EUNIT_ASSERT_EQUALS( KNullDesC(), iLiveSession->RemoteDetails() )
+    EUNIT_ASSERT( iLiveSession->iSession->iState == CMceSession::EEstablished );
     
-    _LIT( KMusTestDetails, "1222233499" );
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                   NMusSessionApi::KTelNumber,
-                                   KMusTestDetails) );
-    EUNIT_ASSERT_EQUALS( KMusTestDetails(), iLiveSession->RemoteDetails() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetParameterL()
-    {
-    const TInt dummy( 0 );
-    EUNIT_ASSERT_EQUALS( KErrNotSupported, 
-                         iLiveSession->SetParameter( dummy, dummy ) )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_ParameterValueL()
-    {
-    const TInt dummy( 0 );
-    EUNIT_ASSERT_EQUALS( KErrNotSupported, 
-                         iLiveSession->ParameterValue( dummy ) )
+    iLiveSession->TerminateL();
+    
+    EUNIT_ASSERT( iLiveSession->iSession->iState == CMceSession::ETerminating );
+    
     }
 
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_IsLcAudioMutedL()
-    {
-    // No MCE session
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->IsLcAudioMutedL(), KErrNotReady )
-    
-    ESTABLISH_OUT_SESSION( iLiveSession )
-    
-    // No audio
-    EUNIT_ASSERT( iLiveSession->IsLcAudioMutedL() )
-    
-    // Contains audio, but explicitly muted
-    CMceAudioStream* audioStream = CMceAudioStream::NewLC();
-    iLiveSession->iSession->AddStreamL( audioStream );
-    CleanupStack::Pop( audioStream );
-    iLiveSession->iExplicitlyMuted = ETrue;
-    EUNIT_ASSERT( iLiveSession->IsLcAudioMutedL() )
-    
-    // Contains audio, not muted
-    iLiveSession->iExplicitlyMuted = EFalse;
-    EUNIT_ASSERT( !iLiveSession->IsLcAudioMutedL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_MuteLcAudioL()
-    {
-    // No MCE session
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->IsLcAudioMutedL(), KErrNotReady )
-    
-    ESTABLISH_OUT_SESSION( iLiveSession )
-    
-    // Mute 
-    iLiveSession->MuteLcAudioL( ETrue );
-    EUNIT_ASSERT( iLiveSession->iExplicitlyMuted )
-    EUNIT_ASSERT( iLiveSession->IsLcAudioMutedL() )
-    
-    // Unmute
-    iLiveSession->MuteLcAudioL( EFalse );
-    EUNIT_ASSERT( !iLiveSession->iExplicitlyMuted )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_MuteLcMicL()
-    {
-    // Mute
-    iLiveSession->MuteLcMicL( ETrue );
-    User::LeaveIfError( RProperty::Set( KPSUidTelMicrophoneMuteStatus,
-                                        KTelMicrophoneMuteState,
-                                        EPSTelMicMuteOn ) );  
-    EUNIT_ASSERT( iLiveSession->IsLcMicMutedL() )
-    
-    // Unmute
-    iLiveSession->MuteLcMicL( EFalse );
-    User::LeaveIfError( RProperty::Set( KPSUidTelMicrophoneMuteStatus,
-                                        KTelMicrophoneMuteState,
-                                        EPSTelMicMuteOff ) );    
-    EUNIT_ASSERT( !iLiveSession->IsLcMicMutedL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_EnableLcLoudspeakerL()
-    {
-    // Check that enabling the loudspeaker is allowed
-    EUNIT_ASSERT( iLiveSession->IsEnablingLcLoudspeakerAllowed() )
-    
-    // Disable 
-    iLiveSession->EnableLcLoudspeakerL( EFalse );
-    EUNIT_ASSERT( !iLiveSession->IsLcLoudspeakerEnabled() )
-    
-    // Enable
-    iLiveSession->EnableLcLoudspeakerL( ETrue );
-    EUNIT_ASSERT( iLiveSession->IsLcLoudspeakerEnabled() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetLcVolumeL()
-    {
-    ESTABLISH_OUT_SESSION( iLiveSession )
-    
-    // Set volume
-    const TInt volume( 5 );
-    iLiveSession->SetLcVolumeL( volume );
-    EUNIT_ASSERT_EQUALS( volume, iLiveSession->LcVolumeL() );
-    
-    // Increase volume
-    iLiveSession->IncreaseLcVolumeL();
-    EUNIT_ASSERT_EQUALS( volume+1, iLiveSession->LcVolumeL() );
-    
-    // Decrease volume
-    iLiveSession->DecreaseLcVolumeL();
-    EUNIT_ASSERT_EQUALS( volume, iLiveSession->LcVolumeL() );    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
 //  
-void UT_CMusEngMceSession::UT_GetSessionTimeL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_GetSessionTimeL()
     {
     EUNIT_ASSERT( iLiveSession->GetSessionTime() < TTimeIntervalSeconds( 0 ) );
     
     // Invite
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri );
     
     EUNIT_ASSERT( iLiveSession->GetSessionTime() < TTimeIntervalSeconds( 0 ) );
     
@@ -487,68 +219,546 @@
     TTimeIntervalSeconds sessionTime = iLiveSession->GetSessionTime();
     EUNIT_ASSERT( sessionTime >= TTimeIntervalSeconds( 0 ) );
     }
+    
+void UT_CMusEngMceSession::UT_CMusEngMceSession_IsDisplayEnabledLL()
+    {
+    TRAPD( error, iLiveSession->IsDisplayEnabledL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+
+    ESTABLISH_OUT_SESSION( iLiveSession );
+     
+    //Enable
+    CMceDisplaySink* display = 
+                    MusEngMceUtils::GetDisplayL( *(iLiveSession->iSession) );
+    display->iIsEnabled = ETrue;
+    EUNIT_ASSERT( iLiveSession->IsDisplayEnabledL() );
+    
+    //Disable
+    display->iIsEnabled = EFalse;
+    EUNIT_ASSERT( !iLiveSession->IsDisplayEnabledL() );
+    
+    // Display is reported as disabled when session state is terminated or idle
+    iLiveSession->iSession->iState = CMceSession::ETerminated;
+    display->iIsEnabled = ETrue;
+    EUNIT_ASSERT( !iLiveSession->IsDisplayEnabledL() );
+    iLiveSession->iSession->iState = CMceSession::EIdle;
+    EUNIT_ASSERT( !iLiveSession->IsDisplayEnabledL() );
+    }
+	
+	
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_ConnectionActiveL()
+    {
+    EUNIT_ASSERT( !iLiveSession->ConnectionActive() );
+    
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    EUNIT_ASSERT( iLiveSession->ConnectionActive() );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_ContainsAudioLL()
+    {
+    // Try without session, fails
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->ContainsAudioL(), KErrNotReady )
+    
+    // Establish session without audio
+    ESTABLISH_OUT_SESSION( iLiveSession )
+    
+    EUNIT_ASSERT( !iLiveSession->ContainsAudioL() )
+    
+    // Establish session with audio
+    ESTABLISH_OUT_SESSION( iClipSession )
+    
+    EUNIT_ASSERT( iClipSession->ContainsAudioL() )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_IsMutedLL()
+    {
+    // Try without session, fails
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->IsMutedL(), KErrNotReady )
+    
+    // Establish session without audio
+    ESTABLISH_OUT_SESSION( iLiveSession )
+    
+    EUNIT_ASSERT( iLiveSession->IsMutedL() )
+    
+    // Establish session with audio
+    ESTABLISH_OUT_SESSION( iClipSession )
+    
+    EUNIT_ASSERT( !iClipSession->IsMutedL() )  // Not muted although disabled
+    
+    iClipSession->EnableDisplayL( ETrue ); // Enabled also speaker
+    
+    EUNIT_ASSERT( !iClipSession->IsMutedL() )  // Enabled and not muted
+
+    iClipSession->MuteL();
+    
+    EUNIT_ASSERT( iClipSession->IsMutedL() ) // Explicitly muted
+    
+    iClipSession->UnmuteL();
+    
+    EUNIT_ASSERT( !iClipSession->IsMutedL() ) // Explicitly unmuted
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_OrientationLL()
+    {
+    // Try without session, fails
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->OrientationL(), KErrNotReady )
+    
+    // Establish a session and try all the MCE rotation values
+    ESTABLISH_OUT_SESSION( iLiveSession )
+    
+    CMceDisplaySink* display = 
+                    MusEngMceUtils::GetDisplayL( *iLiveSession->iSession );
+
+    display->iRotation = CMceDisplaySink::ENone;
+    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
+                         CMusEngMceSession::EPortrait )
+    
+    display->iRotation = CMceDisplaySink::EClockwise90Degree;
+    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
+                         CMusEngMceSession::ELandscape )
+    
+    display->iRotation = CMceDisplaySink::EClockwise180Degree;
+    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
+                         CMusEngMceSession::ELandscape )
+    
+    display->iRotation = CMceDisplaySink::EClockwise270Degree;
+    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
+                         CMusEngMceSession::ELandscape )
+            
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_SetOrientationLL()
+    {
+    // Try without session, fails
+    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->SetOrientationL( 
+                                                CMusEngMceSession::EPortrait ), 
+                                 KErrNotReady )
+
+    // Establish a session
+    ESTABLISH_OUT_SESSION( iLiveSession )
+    
+    CMceDisplaySink* display = 
+                    MusEngMceUtils::GetDisplayL( *iLiveSession->iSession );
+    
+    // Check the initial state
+    display->iRotation = CMceDisplaySink::ENone;
+    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
+                         CMusEngMceSession::EPortrait )      
+                         
+    // Successfully change orientation
+    
+    iLiveSession->SetOrientationL( CMusEngMceSession::ELandscape );
+    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
+                         CMusEngMceSession::ELandscape )
+    
+    iLiveSession->SetOrientationL( CMusEngMceSession::EPortrait );
+    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
+                         CMusEngMceSession::EPortrait )                     
+                         
+    }
+        
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_HandleTerminationL()
-    { 
-    // Try different values
-    iLiveSession->CMusEngMceSession::HandleTermination( KSipStatusCodeNoCodeSet,
-                                                        KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionStateChanged ) )
-    iLcSessionObserver->Reset();
+void UT_CMusEngMceSession::UT_CMusEngMceSession_VolumeUpLL()
+    {    
+    // Try without session, fails
+    TRAPD( error, iLiveSession->VolumeUpL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // Test only usage of CMceSpeaker, phone part is tested in base class
+    
+    // Check that nothing crashes without any speakers    
+    iReceiveSession->VolumeUpL();
+    
+    // Establish session
+    ESTABLISH_OUT_SESSION( iClipSession )
+    
+    TInt initialVolume = iClipSession->VolumeL();
+    
+    iClipSession->VolumeUpL();
+
+    // Check that all speaker volumes are adjusted and store one speaker pointer
+    
+    CMceSpeakerSink* speaker = NULL;
+    
+    CMceSession* session = iClipSession->iSession;
+    
+    for ( TInt i = 0; i < session->Streams().Count(); ++i )
+        {
+        for ( TInt j = 0; j < session->Streams()[i]->Sinks().Count(); ++j )
+            {
+            if ( session->Streams()[i]->Sinks()[j]->Type() == KMceSpeakerSink )
+                {
+                speaker = static_cast<CMceSpeakerSink*>(
+                                            session->Streams()[i]->Sinks()[j] );
+                EUNIT_ASSERT( speaker->VolumeL() == initialVolume + 1 );
+                }
+            }
+        } 
+
+    while ( iClipSession->VolumeL() < speaker->MaxVolumeL() )
+        {
+        iClipSession->VolumeUpL();
+        }
+
+    iClipSession->VolumeUpL(); // Does not do anything to volume
+    
+    EUNIT_ASSERT( iClipSession->VolumeL() == speaker->MaxVolumeL() );
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_VolumeDownLL()
+    {
+        // Try without session, fails
+    TRAPD( error, iLiveSession->VolumeDownL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // Test only usage of CMceSpeaker, phone part is tested in base class
+    
+    // Check that nothing crashes without any speakers    
+    iReceiveSession->VolumeUpL();
+    
+    // Establish session
+    ESTABLISH_OUT_SESSION( iClipSession )
+    
+    TInt initialVolume = iClipSession->VolumeL();
+    
+    iClipSession->VolumeDownL();
+
+    // Check that all speaker volumes are adjusted and store one speaker pointer
+    
+    CMceSpeakerSink* speaker = NULL;
+    
+    CMceSession* session = iClipSession->iSession;
+    
+    for ( TInt i = 0; i < session->Streams().Count(); ++i )
+        {
+        for ( TInt j = 0; j < session->Streams()[i]->Sinks().Count(); ++j )
+            {
+            if ( session->Streams()[i]->Sinks()[j]->Type() == KMceSpeakerSink )
+                {
+                speaker = static_cast<CMceSpeakerSink*>(
+                                            session->Streams()[i]->Sinks()[j] );
+                EUNIT_ASSERT( speaker->VolumeL() == initialVolume - 1 );
+                }
+            }
+        } 
+
+    while ( iClipSession->VolumeL() > 0 )
+        {
+        iClipSession->VolumeDownL();
+        }
 
-    iLiveSession->CMusEngMceSession::HandleTermination( KSipStatusCode200OK,
-                                                        KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionStateChanged ) )
-    iLcSessionObserver->Reset();
+    iClipSession->VolumeDownL(); // Does not do anything to volume
+    
+    EUNIT_ASSERT_EQUALS( iClipSession->VolumeL(), 0 );
+        
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_SetVolumeLL()
+    {    
+    // Try without session, fails
+    TInt newVolume = KTelephonyVolumeDefaultValue + 1;
+    
+    TRAPD( error, iLiveSession->SetVolumeL( newVolume ) );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // Test only usage of CMceSpeaker, phone part is tested in base class
+    
+    // Check that nothing crashes without any speakers    
+    iReceiveSession->SetVolumeL( newVolume );
+    
+    // Establish session
+    ESTABLISH_OUT_SESSION( iClipSession )
+    
+    TInt initialVolume = iClipSession->VolumeL();
+    
+    iClipSession->SetVolumeL( newVolume );
+
+    // Check that all speaker volumes are adjusted and store one speaker pointer
+    
+    CMceSpeakerSink* speaker = NULL;
+    
+    CMceSession* session = iClipSession->iSession;
+    
+    for ( TInt i = 0; i < session->Streams().Count(); ++i )
+        {
+        for ( TInt j = 0; j < session->Streams()[i]->Sinks().Count(); ++j )
+            {
+            if ( session->Streams()[i]->Sinks()[j]->Type() == KMceSpeakerSink )
+                {
+                speaker = static_cast<CMceSpeakerSink*>(
+                                            session->Streams()[i]->Sinks()[j] );
+                EUNIT_ASSERT( speaker->VolumeL() == newVolume );
+                }
+            }
+        } 
 
-    iLiveSession->CMusEngMceSession::HandleTermination( KSipStatusCodeUnknown,
-                                                        KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, KErrGeneral )
-    iLcSessionObserver->Reset();
+    newVolume = speaker->MaxVolumeL() + 1;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == speaker->MaxVolumeL() );
+    
+    newVolume = -1;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == 0 );
+    
+    // Test situation where MCE max volume is bigger than MUS max vol
+    SetMaxVolForSpeakersL(*session, KMusEngMaxVolume * 10);
+    newVolume = 5;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == newVolume * 10 );
+    newVolume = 1;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == newVolume * 10 );
+    newVolume = KMusEngMaxVolume;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == newVolume * 10 );
+    
+    SetMaxVolForSpeakersL(*session, KMusEngMaxVolume * 1000);
+    newVolume = 7;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == newVolume * 1000 );
+    newVolume = 1;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == newVolume * 1000 );
+    newVolume = KMusEngMaxVolume;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == newVolume * 1000 );
+    
+    
+    // Test situation where MCE max volume is smaller than MUS max vol
+    SetMaxVolForSpeakersL(*session, KMusEngMaxVolume / 2);
+    newVolume = 3;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == newVolume / 2 );
+    newVolume = 1;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == 1 );
+    newVolume = KMusEngMaxVolume;
+    iClipSession->SetVolumeL( newVolume );
+    EUNIT_ASSERT( iClipSession->VolumeL() == newVolume );
+    EUNIT_ASSERT( speaker->VolumeL() == newVolume / 2 );
     }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_AdjustVideoCodecL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_EnableDisplayL()
     {
-    CRepository::SetStubAvcConfigKeysL( KNullDesC8() );
-        
-    CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() );
-    CMceVideoCodec* codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    CMceVideoCodec* codecAvcFromFile = CMceAvcCodec::NewLC( KMceSDPNameH264() );
+    TRAPD( error, iLiveSession->EnableDisplayL( ETrue ) );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    CMceDisplaySink* display = 
+                    MusEngMceUtils::GetDisplayL( *(iLiveSession->iSession) );
     
-    iLiveSession->CMusEngMceSession::AdjustVideoCodecL( *codecH263,
-                                                        KMceCameraSource );
-    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
+    // Disable
+    iLiveSession->EnableDisplayL( EFalse );
+    
+    EUNIT_ASSERT( !display->iIsEnabled );
+    
+    // Try to disable again, request should be ignored
+    
+    iLiveSession->EnableDisplayL( EFalse );
+    
+    EUNIT_ASSERT( !display->iIsEnabled );
 
-    iLiveSession->CMusEngMceSession::AdjustVideoCodecL( *codecAvcFromFile,
-                                                        KMceFileSource);  
-    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
+    // Enable
+    
+    iLiveSession->EnableDisplayL( ETrue );
+    
+    EUNIT_ASSERT( display->iIsEnabled );
     
-    iLiveSession->CMusEngMceSession::AdjustVideoCodecL( *codecAvc,
-                                                        KMceCameraSource );  
-    EUNIT_ASSERT( iLiveSession->iStoreEncoderConfigInfo )
+    // Try to enable again, request should be ignored
+    
+    iLiveSession->EnableDisplayL( ETrue );
     
-    CleanupStack::PopAndDestroy( codecAvcFromFile );
-    CleanupStack::PopAndDestroy( codecAvc );
-    CleanupStack::PopAndDestroy( codecH263 );
+    EUNIT_ASSERT( display->iIsEnabled );
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_AdjustAudioCodecL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_MuteLL()
+    {
+    TRAPD( error, iClipSession->MuteL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    ESTABLISH_OUT_SESSION_AND_START_STREAMING( iClipSession );
+    
+    const RPointerArray<CMceMediaStream> streams = 
+                                            iClipSession->iSession->Streams();
+    
+    iClipSession->MuteL();
+    
+    // Check that all audio speaker sinks are disabled and only those                                        
+    for ( TInt i = 0; i < streams.Count(); ++i )
+        {
+        for ( TInt j = 0; j < streams[i]->Sinks().Count(); ++j )
+            {
+            CMceMediaSink* sink = streams[i]->Sinks()[j];
+            if ( sink->Type() == KMceSpeakerSink  &&
+                 streams[i]->Type() == KMceAudio )
+                {
+                EUNIT_ASSERT( sink->IsEnabled() == EFalse )
+                }    
+            else
+                {
+                EUNIT_ASSERT( sink->IsEnabled() == ETrue )
+                } 
+            }        
+        }
+    
+    EUNIT_ASSERT( iClipSession->iExplicitlyMuted ) 
+    
+    // Try to mute again, request should be ignored without actions or leaving
+
+    iClipSession->MuteL();
+
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Relies on previous test
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_UnmuteLL()
+    {
+    TRAPD( error, iClipSession->UnmuteL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    ESTABLISH_OUT_SESSION( iClipSession );
+    
+    const RPointerArray<CMceMediaStream> streams = 
+                                            iClipSession->iSession->Streams();
+    
+    iClipSession->MuteL();
+    
+    iClipSession->UnmuteL();
+    
+    // Check that all audio speaker sinks are enabled
+                                            
+    for ( TInt i = 0; i < streams.Count(); ++i )
+        {
+        for ( TInt j = 0; j < streams[i]->Sinks().Count(); ++j )
+            {
+            if ( streams[i]->Sinks()[j]->Type() == KMceSpeakerSink )
+                {
+                EUNIT_ASSERT( streams[i]->Sinks()[j]->IsEnabled() == ETrue )
+                }
+            }        
+        }
+    
+    EUNIT_ASSERT( !iClipSession->iExplicitlyMuted ) 
+    
+    // Try to unmute again, request should be ignored without actions or leaving
+
+    iClipSession->UnmuteL();
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_HandleTerminationL()
+    { 
+    // Try different values
+    iLiveSession->CMusEngMceSession::HandleTermination( KSipStatusCodeNoCodeSet,
+                                                        KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionTerminatedCalled );
+    iObserver->Reset();
+
+    iLiveSession->CMusEngMceSession::HandleTermination( KSipStatusCode200OK,
+                                                        KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionTerminatedCalled );
+    iObserver->Reset();
+
+    iLiveSession->CMusEngMceSession::HandleTermination( KSipStatusCodeUnknown,
+                                                        KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled );
+    iObserver->Reset();
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_AdjustVideoCodecLL()
+    {
+    // CMusEngMceSession::AdjustVideoCodecL does nothing, so NULL test is enough
+    CMceVideoCodec* codec = 
+                iLiveSession->iManager->SupportedVideoCodecs()[0]->CloneL();
+    CleanupStack::PushL( codec );
+    iLiveSession->CMusEngMceSession::AdjustVideoCodecL( *codec );
+    CleanupStack::PopAndDestroy( codec );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_AdjustAudioCodecLL()
     {
     CMceAudioCodec* codec = 
                 iLiveSession->iManager->SupportedAudioCodecs()[0]->CloneL();
@@ -559,14 +769,16 @@
     EUNIT_ASSERT( codec->iMMFPriorityPreference == KAudioPrefSwisPlayback )
     
     CleanupStack::PopAndDestroy( codec );
-    }   
+    }
+        
         
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_RectChangedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_RectChangedLL()
     {
+    
     // Does nothing before session establishment
     
     iLiveSession->RectChangedL();
@@ -579,9 +791,9 @@
     // Display size has been updated
     
     CMceDisplaySink* display = 
-        MusEngMceUtils::GetDisplayL( *( iLiveSession->iSession ) );
+                MusEngMceUtils::GetDisplayL( *( iLiveSession->iSession ) );
     
-    EUNIT_ASSERT( display->DisplayRectL() == iLiveSession->Rect() )
+    EUNIT_ASSERT( display->DisplayRectL() == iLiveSession->Rect() );
     
     // Terminate session and try again, rect must not be changed
     
@@ -592,307 +804,8 @@
     iLiveSession->SetRectL( newRect ); 
     
     EUNIT_ASSERT( display->DisplayRectL() != newRect )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetSessionSdpLinesL()
-    {
-    // set operator variant off
-    iReceiveSession->iOperatorVariant = EFalse;
-    CRepository::SetStubGlobal( MusSettingsKeys::KVideoBandwidth,
-                                128 );
-                     
-    // 1. There is b=AS line at session level
-    // => Xapplication, b=AS and b=TIAS set to session level  
-    CMceInSession* inSession = CMceInSession::NewL( *iReceiveSession->iManager,
-                                                    KTestOriginator );
-    CleanupStack::PushL( inSession );    
-    EUNIT_ASSERT( !inSession->iSessionSDPLines );
-    inSession->iSessionSDPLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-        
-    iReceiveSession->SetSessionSdpLinesL( *inSession, ETrue );
-    
-    MDesC8Array* sdpLines = inSession->iSessionSDPLines;    
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 3 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ).Find( 
-            KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 2 ).Find( 
-            KMusEngSessionSdpLineTiasLine() ) == 0 );
     
     
-    // 2. There are b=TIAS sdp line at session  
-    // => Xapplication, b=AS and b=TIAS set to session level
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-    inSession->iSessionSDPLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineTiasLine() );
-        
-    iReceiveSession->SetSessionSdpLinesL( *inSession, ETrue );
-    
-    sdpLines = inSession->iSessionSDPLines;    
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 3 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ).Find( 
-            KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 2 ).Find( 
-            KMusEngSessionSdpLineTiasLine() ) == 0 );
-            
-    // 3. Simulating outcoming session, i.e. 2d param aForceBandwidthLine is EFalse  
-    // => only Xapplication SDP line is set
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-         
-    iReceiveSession->SetSessionSdpLinesL( *inSession, EFalse );
-     
-    sdpLines = inSession->iSessionSDPLines;    
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 1 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
-    
-    // 4. No KVideoBandwidth entry in CenRep => TIAS usage should be disabled
-    // There is AS and TIAS at session level => AS is taken at session level
-    CRepository::iForceFailWithCode = KErrNotFound;
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-    inSession->iSessionSDPLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineTiasLine() );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-        
-    iReceiveSession->SetSessionSdpLinesL( *inSession, ETrue );
-    
-    sdpLines = inSession->iSessionSDPLines;    
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ) == KMusEngSessionSdpLineBandwidthField() );
-    
-    CleanupStack::PopAndDestroy( inSession );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetSessionSdpLines_OperatorL()
-    {
-    // set operator variant
-    iReceiveSession->iOperatorVariant = ETrue;
-
-    // 1. There is b=TIAS sdp line in session => only application and  
-    // type lines are set, no bandwidth related attributes
-    CMceInSession* inSession = CMceInSession::NewL( *iReceiveSession->iManager,
-                                     KTestOriginator );
-    CleanupStack::PushL( inSession );        
-    
-    EUNIT_ASSERT( !inSession->iSessionSDPLines );
-    inSession->iSessionSDPLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineTiasLine() );
-        
-    iReceiveSession->SetSessionSdpLinesL( *inSession, ETrue );
-    
-    MDesC8Array* sdpLines = inSession->iSessionSDPLines;    
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineApplication() );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ) == KMusEngSessionSdpLineType() );    
-
-    // 2. There are b=AS and b=TIAS sdp lines in session => application and  
-    // type SDP lines as well as b=AS bandwidth attributes are set
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-    inSession->iSessionSDPLines = new ( ELeave ) CDesC8ArrayFlat( 2 );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineTiasLine() );
-        
-    iReceiveSession->SetSessionSdpLinesL( *inSession, ETrue );
-    
-    sdpLines = inSession->iSessionSDPLines;    
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 3 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineApplication() );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ) == KMusEngSessionSdpLineType() );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 2 ) == KMusEngSessionSdpLineBandwidthField() );
-        
-    
-    // 3. Simulating outcoming session, i.e. 2d param aForceBandwidthLine is EFalse  
-    // => only application and type SDP lines are set
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-        
-    iReceiveSession->SetSessionSdpLinesL( *inSession, EFalse );
-    
-    sdpLines = inSession->iSessionSDPLines;    
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineApplication() );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ) == KMusEngSessionSdpLineType() );
-        
-    CleanupStack::PopAndDestroy( inSession );   
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetMediaSdpLinesL()
-    {
-    // set operator variant off
-    iReceiveSession->iOperatorVariant = EFalse;
-    CRepository::SetStubGlobal( MusSettingsKeys::KVideoBandwidth,
-                                128 );
-
-    // 1. There is no b=AS, b=TIAS sdp lines at session level
-    // => b=AS and b=TIAS are taken at media level
-    CMceInSession* inSession = CMceInSession::NewL( *iReceiveSession->iManager,
-                                                    KTestOriginator );
-    CleanupStack::PushL( inSession );
-    
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();        
-    videoStream->SetSourceL( CMceRtpSource::NewLC() );
-    CleanupStack::Pop(); //rtpSource        
-    videoStream->AddSinkL( CMceDisplaySink::NewLC( *iReceiveSession->iManager ) );
-    CleanupStack::Pop(); //displaySink
-        
-    inSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );
-
-    iReceiveSession->SetMediaSdpLinesL( *videoStream, ETrue );
-    
-    MDesC8Array* sdpLines = inSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ).Find( 
-            KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ).Find( 
-            KMusEngSessionSdpLineTiasLine() ) == 0 );
-    
-    
-    // 2. There is b=AS sdp line at session and media level
-    // => b=AS and b=TIAS are taken at media level
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-    inSession->iSessionSDPLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    
-    iReceiveSession->SetMediaSdpLinesL( *videoStream, ETrue );
-    
-    sdpLines = inSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ).Find( 
-            KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ).Find( 
-            KMusEngSessionSdpLineTiasLine() ) == 0 );
-
-    // 3. Simulating outcoming session, i.e. 2d param aForceBandwidthLine is EFalse
-    // => no bandwidth attributes at media level
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-     
-    delete inSession->Streams()[ 0 ]->iMediaSDPLines;
-    inSession->Streams()[ 0 ]->iMediaSDPLines = NULL;
-     
-    iReceiveSession->SetMediaSdpLinesL( *videoStream, EFalse );
-     
-    sdpLines = inSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 0 );
-
-    // 4. No KVideoBandwidth entry in CenRep => TIAS usage should be disabled
-    // There is no bandwidth attributes in session => AS is taken at meida level
-    CRepository::iForceFailWithCode = KErrNotFound;
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-        
-    iReceiveSession->SetMediaSdpLinesL( *videoStream, ETrue );
-    
-    sdpLines = inSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 1 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineBandwidthField() );
-
-    CleanupStack::PopAndDestroy( inSession );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetMediaSdpLines_OperatorL()
-    {
-    // set operator variant
-    iReceiveSession->iOperatorVariant = ETrue;
-
-    // 1. There is no b=AS sdp line at session level
-    // => b=AS is taken at media level
-    CMceInSession* inSession = CMceInSession::NewL( *iReceiveSession->iManager,
-                                                    KTestOriginator );
-    CleanupStack::PushL( inSession );
-  
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();        
-    videoStream->SetSourceL( CMceRtpSource::NewLC() );
-    CleanupStack::Pop(); //rtpSource        
-    videoStream->AddSinkL( CMceDisplaySink::NewLC( *iReceiveSession->iManager ) );
-    CleanupStack::Pop(); //displaySink
-        
-    inSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );
-
-    EUNIT_ASSERT( !inSession->iSessionSDPLines );   
-    inSession->iSessionSDPLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineTiasLine() );
-        
-    iReceiveSession->SetMediaSdpLinesL( *videoStream, ETrue );
-    
-    MDesC8Array* sdpLines = inSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 1 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineBandwidthField() );
-    
-    
-    // 2. There is b=AS sdp line at session and media level
-    // => b=AS is not taken at media level
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-    inSession->iSessionSDPLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    inSession->iSessionSDPLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    
-    delete inSession->Streams()[ 0 ]->iMediaSDPLines;
-    inSession->Streams()[ 0 ]->iMediaSDPLines = NULL;
-    inSession->Streams()[ 0 ]->iMediaSDPLines =  
-                new ( ELeave ) CDesC8ArrayFlat( 1 ); 
-    inSession->Streams()[ 0 ]->iMediaSDPLines->AppendL( 
-                KMusEngSessionSdpLineBandwidthField() );
-    
-    iReceiveSession->SetMediaSdpLinesL( *videoStream, ETrue );
-    
-    EUNIT_ASSERT( inSession->Streams()[ 0 ]->iMediaSDPLines );
-    EUNIT_ASSERT( inSession->Streams()[ 0 ]->iMediaSDPLines->MdcaCount() == 0 );
-
-
-    // 3. Simulating outcoming session, i.e. 2d param aForceBandwidthLine is EFalse
-    // => b=AS is taken at media level
-    delete inSession->iSessionSDPLines;
-    inSession->iSessionSDPLines = NULL;
-     
-    delete inSession->Streams()[ 0 ]->iMediaSDPLines;
-    inSession->Streams()[ 0 ]->iMediaSDPLines = NULL;
-     
-    iReceiveSession->SetMediaSdpLinesL( *videoStream, EFalse );
-     
-    sdpLines = inSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( sdpLines );
-    EUNIT_ASSERT( sdpLines->MdcaCount() == 1 );
-    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineBandwidthField() );
-    
-    CleanupStack::PopAndDestroy( inSession );
     }
 
 
@@ -900,7 +813,120 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_AdjustStreamsAndCodecsL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_SetSessionSdpLinesLL()
+    {
+    // set operator variant off
+    MultimediaSharingSettings::SetOperatorVariantSettingL(
+                     MusSettingsKeys::EStandard );
+                     
+    // There is no sdp lines in session, right one is added
+
+    CMceInSession* inSession = CMceInSession::NewL( *iReceiveSession->iManager,
+                                                    KTestOriginator );
+    CleanupStack::PushL( inSession );
+    
+    iReceiveSession->SetSessionSdpLinesL( *inSession );
+    
+    MDesC8Array* sdpLines = inSession->SessionSDPLinesL();
+    CleanupDeletePushL( sdpLines );
+    
+    EUNIT_ASSERT( sdpLines );
+    EUNIT_ASSERT( sdpLines->MdcaCount() == 1 );
+    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
+    
+    CleanupStack::PopAndDestroy(); // sdplines
+
+    // There is one line ready, replace it with right one
+    CDesC8Array* newSdpLines = new ( ELeave ) CDesC8ArrayFlat( 3 );
+    CleanupStack::PushL( newSdpLines );
+    newSdpLines->AppendL( KTestRecipientRandomText8() );
+    inSession->SetSessionSDPLinesL( newSdpLines );
+    CleanupStack::Pop( newSdpLines );
+    
+    iReceiveSession->SetSessionSdpLinesL( *inSession );
+    
+    sdpLines = inSession->SessionSDPLinesL();
+    CleanupDeletePushL( sdpLines );
+      
+    EUNIT_ASSERT( sdpLines );
+    EUNIT_ASSERT( sdpLines->MdcaCount() == 1 );
+    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
+    
+    CleanupStack::PopAndDestroy(); // sdplines
+    
+
+    CleanupStack::PopAndDestroy( inSession );
+
+    // for operator variant testing
+    // set operator variant
+    iReceiveSession->iOperatorVariant = ETrue;
+
+    // There is no sdp lines in session, right ones are added to session and media level
+    inSession = CMceInSession::NewL( *iReceiveSession->iManager,
+                                                    KTestOriginator );
+    CleanupStack::PushL( inSession );
+    
+    iReceiveSession->SetSessionSdpLinesL( *inSession );
+    
+    sdpLines = inSession->SessionSDPLinesL();
+    CleanupDeletePushL( sdpLines );
+    
+    EUNIT_ASSERT( sdpLines );
+    EUNIT_ASSERT( sdpLines->MdcaCount() == 2 );
+    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineApplication() );
+    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ) == KMusEngSessionSdpLineType() );
+    
+    CleanupStack::PopAndDestroy(); // sdplines
+    
+    MDesC8Array* mediaSdpLines = 
+        iReceiveSession->iSession->Streams()[ 0 ]->MediaAttributeLinesL();
+    CleanupDeletePushL( mediaSdpLines );
+    TBool bandwidthFoundFromMediaLevel = EFalse;
+    for ( TInt i = 0; mediaSdpLines && i < mediaSdpLines->MdcaCount(); i++ )
+        {
+        if ( mediaSdpLines->MdcaPoint( i ).Compare( 
+                KMusEngSessionSdpLineBandwidthField() ) == 0 )
+            {
+            bandwidthFoundFromMediaLevel = ETrue;
+            }
+        }
+    EUNIT_ASSERT( bandwidthFoundFromMediaLevel );
+    CleanupStack::PopAndDestroy( mediaSdpLines );
+
+    // There is one line ready, replace it with right ones
+    newSdpLines = new ( ELeave ) CDesC8ArrayFlat( 3 );
+    CleanupStack::PushL( newSdpLines );
+    newSdpLines->AppendL( KTestRecipientRandomText8() );
+    inSession->SetSessionSDPLinesL( newSdpLines );
+    CleanupStack::Pop( newSdpLines );
+    
+    iReceiveSession->SetSessionSdpLinesL( *inSession );
+    
+    sdpLines = inSession->SessionSDPLinesL();
+    CleanupDeletePushL( sdpLines );
+      
+    EUNIT_ASSERT( sdpLines );
+    EUNIT_ASSERT( sdpLines->MdcaCount() == 2 );
+    EUNIT_ASSERT( sdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineApplication() );
+    EUNIT_ASSERT( sdpLines->MdcaPoint( 1 ) == KMusEngSessionSdpLineType() );
+    
+    CleanupStack::PopAndDestroy(); // sdplines
+    
+
+    CleanupStack::PopAndDestroy( inSession );
+
+
+    // set operator variant off
+    MultimediaSharingSettings::SetOperatorVariantSettingL(
+                     MusSettingsKeys::EStandard );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngMceSession::UT_CMusEngMceSession_AdjustStreamsAndCodecsLL()
     {
     // Check that function cannot be called before creating the session
     TRAPD( error, iClipSession->AdjustStreamsAndCodecsL() );
@@ -1005,6 +1031,46 @@
         EUNIT_ASSERT( 
             videoStream->Codecs()[ i ]->MaxBitRate() == 128000 );
         }
+    
+    // Test for Configuration based codec removal. Magic uid not set.    
+    CMceVideoCodec* codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );    
+    videoStream->AddCodecL( codecAvc );
+    CleanupStack::Pop( codecAvc );         
+    iClipSession->AdjustStreamsAndCodecsL();   
+    TBool avcCodecFound(EFalse);
+    for ( TInt i = 0; i < videoStream->Codecs().Count(); i++ )
+      {      
+      if( !videoStream->Codecs()[ i ]->SdpName().CompareF( KMceSDPNameH264 ) )
+        {
+        avcCodecFound = ETrue;
+        }      
+      }
+    // AVC should present
+    EUNIT_ASSERT(avcCodecFound);
+    
+    // Test for Configuration based codec removal. Magic uid set.
+    // Store the real value and revert back later , so that other tests will not be affected.
+    TUid uid = MultimediaSharingSettings::EncodingDeviceL();    
+    TInt32 KMusDisableAVC = 0x0fffffff;
+    MultimediaSharingSettings::SetPropertyValueL( MusSettingsKeys::KEncodingDevice,KMusDisableAVC);
+    codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );    
+    videoStream->AddCodecL( codecAvc );
+    CleanupStack::Pop( codecAvc );  
+    codecH2632000 = CMceH263Codec::NewLC( KMceSDPNameH2632000() );
+    videoStream->AddCodecL( codecH2632000 );
+    CleanupStack::Pop( codecH2632000 );
+    iClipSession->AdjustStreamsAndCodecsL();    
+    for ( TInt i = 0; i < videoStream->Codecs().Count(); i++ )
+       {
+       // H264 ( AVC ) codec should be removed
+       EUNIT_ASSERT( 
+                   videoStream->Codecs()[ i ]->SdpName().CompareF( KMceSDPNameH264 ) );
+       }
+    
+    
+    MultimediaSharingSettings::SetPropertyValueL( MusSettingsKeys::KEncodingDevice,uid.iUid);
+    
+    
     }
 
 
@@ -1012,7 +1078,7 @@
 //
 // -----------------------------------------------------------------------------
 //  
-void UT_CMusEngMceSession::UT_IncomingSessionL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_IncomingSessionL()
     {
     // New session should get rejected and deleted in any case, first failure
     CMceInSession* inSession = CMceInSession::NewL( 
@@ -1034,7 +1100,7 @@
 //
 // -----------------------------------------------------------------------------
 //  
-void UT_CMusEngMceSession::UT_IncomingUpdateL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_IncomingUpdateL()
     {
     CMceInSession* inSession = CMceInSession::NewL( 
                                       *iLiveSession->iManager, KNullDesC8 );
@@ -1072,7 +1138,7 @@
 //
 // -----------------------------------------------------------------------------
 //  
-void UT_CMusEngMceSession::UT_StreamStateChangedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_StreamStateChangedL()
     {
     // Try without a session, nothing happens
     CMceAudioStream* audioStream = CMceAudioStream::NewLC();
@@ -1080,7 +1146,7 @@
     CleanupStack::PopAndDestroy( audioStream );
     
     // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri() );
     
     // No observer set, so expect nothing to be done, cannot be asserted
     CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0];
@@ -1090,56 +1156,55 @@
     // EUninitialized, stream is created, unexpected change, nothing happens
     changedStream->iState = CMceMediaStream::EUninitialized;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EBuffering, stream is buffering
     changedStream->iState = CMceMediaStream::EBuffering;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled );
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled );
+    iObserver->Reset();
     
     // EStreaming, stream is streaming, other than video out- or instream
     changedStream->iState = CMceMediaStream::EStreaming;
     iLiveSession->CMusEngMceSession::StreamStateChanged( 
                                 *iLiveSession->iSession->Streams()[1] );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->IsReseted() );
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     changedStream->iState = CMceMediaStream::EDisabled;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ENoResources, stream has no needed resources to stream
     changedStream->iState = CMceMediaStream::ENoResources;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscodingRequired, stream requires non-realtime transcoding
     changedStream->iState = CMceMediaStream::ETranscodingRequired;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscoding, stream is transcoding in non-realtime
     changedStream->iState = CMceMediaStream::ETranscoding;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     }
     
@@ -1149,7 +1214,7 @@
 // when function is changed
 // -----------------------------------------------------------------------------
 //  
-void UT_CMusEngMceSession::UT_StreamStateChangedWithSourceL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_StreamStateChangedWithSourceL()
     {
     // Try without a session, nothing happens
     iLiveSession->CMusEngMceSession::StreamStateChanged( 
@@ -1160,7 +1225,7 @@
     CleanupStack::PopAndDestroy(); // audiostream
     
     // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri() );
     
     // Try all the stream states
     CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0];
@@ -1168,49 +1233,48 @@
     // EUninitialized, stream is created, unexpected change, nothing happens
     changedStream->iState = CMceMediaStream::EUninitialized;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EBuffering, stream is buffering
     changedStream->iState = CMceMediaStream::EBuffering;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled );
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled );
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     changedStream->iState = CMceMediaStream::EDisabled;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ENoResources, stream has no needed resources to stream
     changedStream->iState = CMceMediaStream::ENoResources;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscodingRequired, stream requires non-realtime transcoding
     changedStream->iState = CMceMediaStream::ETranscodingRequired;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscoding, stream is transcoding in non-realtime
     changedStream->iState = CMceMediaStream::ETranscoding;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     }
 
@@ -1220,7 +1284,7 @@
 // when function is changed
 // -----------------------------------------------------------------------------
 //  
-void UT_CMusEngMceSession::UT_StreamStateChangedWithSinkL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_StreamStateChangedWithSinkL()
     {
     // Try without a session, nothing happens
     CMceAudioStream* audioStream = CMceAudioStream::NewLC();
@@ -1228,7 +1292,7 @@
     CleanupStack::PopAndDestroy( audioStream );
     
     // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri() );
     
     // Try all the stream states
     CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0];
@@ -1236,49 +1300,48 @@
     // EUninitialized, stream is created, unexpected change, nothing happens
     changedStream->iState = CMceMediaStream::EUninitialized;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EInitialized, stream is initialized
     changedStream->iState = CMceMediaStream::EInitialized;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EBuffering, stream is buffering
     changedStream->iState = CMceMediaStream::EBuffering;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EIdle, stream is not receiving RTP
     changedStream->iState = CMceMediaStream::EIdle;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled );
     
     // EStreaming, stream is streaming
     changedStream->iState = CMceMediaStream::EStreaming;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled );
+    iObserver->Reset();
     
     // EDisabled, stream is explicitly disabled
     changedStream->iState = CMceMediaStream::EDisabled;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ENoResources, stream has no needed resources to stream
     changedStream->iState = CMceMediaStream::ENoResources;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscodingRequired, stream requires non-realtime transcoding
     changedStream->iState = CMceMediaStream::ETranscodingRequired;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ETranscoding, stream is transcoding in non-realtime
     changedStream->iState = CMceMediaStream::ETranscoding;
     iLiveSession->CMusEngMceSession::StreamStateChanged( *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     }        
 
@@ -1287,24 +1350,22 @@
 //
 // -----------------------------------------------------------------------------
 //    
-void UT_CMusEngMceSession::UT_SessionStateChangedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_SessionStateChangedL()
     {
     // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();   
+    iLiveSession->InviteL( KTestRecipientSipUri() );   
 
     // No container, so expect to be handled as internal error
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, NULL );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, KErrGeneral )
-    iLcSessionObserver->Reset();    
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled );
+    iObserver->Reset();    
     
     // Try to tell session about some other session's state transition
     
     TMceTransactionDataContainer container;
  
     iLiveSession->SessionStateChanged( *iSomeOtherSession->iSession, &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );    
+    EUNIT_ASSERT( iObserver->IsReseted() );    
       
     // Try all the normal cases:
     
@@ -1316,10 +1377,8 @@
     container.SetReasonPhrase( anyReasonPhrase );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, KErrGeneral )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled );
+    iObserver->Reset();
     container.Clear();
     
     // EOffering
@@ -1327,47 +1386,44 @@
     container.SetStatusCode( KSipStatusCodeNoCodeSet );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EIncoming
     iLiveSession->iSession->iState = CMceSession::EIncoming;
     container.SetStatusCode( KSipStatusCodeNoCodeSet );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, KErrGeneral )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled );
+    iObserver->Reset();
     
     // EReserving
     iLiveSession->iSession->iState = CMceSession::EReserving;
     container.SetStatusCode( KSipStatusCodeNoCodeSet );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EAnswering
     iLiveSession->iSession->iState = CMceSession::EAnswering;
     container.SetStatusCode( KSipStatusCodeNoCodeSet );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EProceeding
     iLiveSession->iSession->iState = CMceSession::EProceeding;
     container.SetStatusCode( KSipStatusCodeNoCodeSet );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // EEstablished
     iLiveSession->iSession->iState = CMceSession::EEstablished;
     container.SetStatusCode( KSipStatusCode200OK );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionEstablishedCalled );
+    iObserver->Reset();
     
     // EEstablished again (meaning expiration of session timer 
     // and refresment of session )
@@ -1375,109 +1431,74 @@
     container.SetStatusCode( KSipStatusCode200OK );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
     
     // ECancelling
     iLiveSession->iSession->iState = CMceSession::ECancelling;
     container.SetStatusCode( KSipStatusCodeNoCodeSet );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->IsReseted() );
+    iObserver->Reset();
     
     // ETerminating
     iLiveSession->iSession->iState = CMceSession::ETerminating;
     container.SetStatusCode( KSipStatusCodeNoCodeSet );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->IsReseted() );
+    iObserver->Reset();
     
     // ETerminated
     iLiveSession->iSession->iState = CMceSession::ETerminated;
     container.SetStatusCode( KSipStatusCode200OK );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, 
                                        &container );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionTerminatedCalled );
+    iObserver->Reset();
     
     // Default case
     iLiveSession->iSession->iState = static_cast<CMceSession::TState>( 10 );
     container.SetStatusCode( KSipStatusCodeNoCodeSet );
     iLiveSession->SessionStateChanged( *iLiveSession->iSession, &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
+    EUNIT_ASSERT( iObserver->IsReseted() );
 
     }
+    
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //     
-void UT_CMusEngMceSession::UT_HandleSessionStateChanged_EncoderKeyStoringL()
-    {
-    // Make repository empty, config keys must be written
-    CRepository::SetStubAvcConfigKeysL( KNullDesC8() );
-    
-    // Invite    
-    iLiveSession->EstablishLcSessionL();
-    iLiveSession->iSession->iState = CMceSession::EEstablished;
-    
-    // Force failure on CenRep
-    CRepository::iForceFailWithCode = KErrNoMemory;
-    
-    // Simulate session state transition notification
-    iLiveSession->HandleSessionStateChanged( 
-        *iLiveSession->iSession, 200, KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, KErrNoMemory )    
-    
-    // Normal case, something will be written to CenRep    
-    iClipSession->EstablishLcSessionL();
-    iClipSession->iSession->iState = CMceSession::EEstablished;
-    iClipSession->HandleSessionStateChanged( 
-                            *iClipSession->iSession, 200, KNullDesC8() );  
-    HBufC8* info = MultimediaSharingSettings::EncoderConfigInfoLC();
-    EUNIT_ASSERT_NOT_EQUALS( *info, KMusAvcBitrateLevel_1b_ConfigKey() )
-    CleanupStack::PopAndDestroy( info );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//     
-void UT_CMusEngMceSession::UT_SessionConnectionStateChangedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_SessionConnectionStateChangedL()
     {
     
     // Try to tell session about another session's connection state change
     
     iLiveSession->SessionConnectionStateChanged( *iSomeOtherSession->iSession, 
                                                  ETrue );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); // No session yet, nothing happened
+    EUNIT_ASSERT( iObserver->IsReseted() ); // No session yet, nothing happened
     
     // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri() );
     
     // Now try again to notify session about session connection state change
     // of an another session
     iLiveSession->SessionConnectionStateChanged( *iSomeOtherSession->iSession, 
                                                  ETrue );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); // Wrong session, nothing happened
+    EUNIT_ASSERT( iObserver->IsReseted() ); // Wrong session, nothing happened
     
     // Try tell session connection state is active
     iLiveSession->SessionConnectionStateChanged( *iLiveSession->iSession, 
                                                  ETrue );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); // Session active, nothing happened
+    EUNIT_ASSERT( iObserver->IsReseted() ); // Session active, nothing happened
     
     // Try tell session connection state is inactive
     iLiveSession->SessionConnectionStateChanged( *iLiveSession->iSession, 
                                                  EFalse );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::EConnectionLost ) )
-    iLcSessionObserver->Reset();  
+    EUNIT_ASSERT( iObserver->iSessionConnectionLostCalled );
+    iObserver->Reset();
+    
     }
     
 
@@ -1485,26 +1506,25 @@
 //
 // -----------------------------------------------------------------------------
 // 
-void UT_CMusEngMceSession::UT_FailedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_FailedL()
     {
     // Try to tell session about failure of another session
 
     iLiveSession->Failed( *iSomeOtherSession->iSession, 0 );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); // No session yet, nothing happened
+    EUNIT_ASSERT( iObserver->IsReseted() ); // No session yet, nothing happened
     
     // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri() );
     
     // Now try again to notify session about failure of an another session
     iLiveSession->Failed( *iSomeOtherSession->iSession, 0 );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); // Wrong session, nothing happened
+    EUNIT_ASSERT( iObserver->IsReseted() ); // Wrong session, nothing happened
     
     // Tell session that it has failed
-    iLiveSession->Failed( *iLiveSession->iSession, KErrNotFound );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, KErrNotFound )
-    iLcSessionObserver->Reset();
+    iLiveSession->Failed( *iLiveSession->iSession, 0 );
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled );
+    iObserver->Reset();
+    
     }
     
 
@@ -1512,31 +1532,27 @@
 //
 // -----------------------------------------------------------------------------
 //     
-void UT_CMusEngMceSession::UT_UpdateFailedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_UpdateFailedL()
     {
     // Try to tell session about update failure of another session
     iLiveSession->UpdateFailed( *iSomeOtherSession->iSession, NULL );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, KErrGeneral )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled ); // No container, internal error
+    iObserver->Reset();
     
     // Try again with container
     TMceTransactionDataContainer container;
     iLiveSession->UpdateFailed( *iSomeOtherSession->iSession, &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); // No session yet, nothing happened
+    EUNIT_ASSERT( iObserver->IsReseted() ); // No session yet, nothing happened
     
     // Invite and try again.
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri() );
     iLiveSession->UpdateFailed( *iSomeOtherSession->iSession, &container );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); // Wrong session, nothing happened¨
+    EUNIT_ASSERT( iObserver->IsReseted() ); // Wrong session, nothing happened¨
     
     // Try with right session
     iLiveSession->UpdateFailed( *iLiveSession->iSession, &container );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, KErrGeneral )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionFailedCalled );
+    iObserver->Reset();
     }
     
 
@@ -1544,7 +1560,7 @@
 //
 // -----------------------------------------------------------------------------
 // 
-void UT_CMusEngMceSession::UT_SRReceivedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_SRReceivedL()
     {
     EUNIT_ASSERT( iLiveSession->iSecondsFromLastRtcpReport == 0 );
     
@@ -1587,7 +1603,7 @@
 //
 // -----------------------------------------------------------------------------
 //     
-void UT_CMusEngMceSession::UT_RRReceivedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_RRReceivedL()
     {
     EUNIT_ASSERT( iLiveSession->iSecondsFromLastRtcpReport == 0 );
     
@@ -1624,12 +1640,45 @@
     EUNIT_ASSERT( iLiveSession->iSecondsFromLastRtcpReport == 0 );    
     }
     
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//      
+void UT_CMusEngMceSession::UT_CMusEngMceSession_InactivityTimeoutL()
+    {    
+    //   Construct an audio stream for this test
+    
+    CMceAudioStream* audioStream = CMceAudioStream::NewLC();
+    
+    CMceRtpSource* rtpSource = CMceRtpSource::NewLC();
+    audioStream->SetSourceL( rtpSource );
+    CleanupStack::Pop( rtpSource );
+    
+    iReceiveSession->InactivityTimeout( *audioStream, *rtpSource );
+    
+    EUNIT_ASSERT( iObserver->IsReseted() )
+    
+    CleanupStack::PopAndDestroy( audioStream );
+    
+    // And now real inactivity timeout
+    
+    iReceiveSession->InactivityTimeout( 
+                *iReceiveSession->iSession->Streams()[0],
+                *static_cast<CMceRtpSource*>
+                        (iReceiveSession->iSession->Streams()[0]->Source()) );
+    
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled )
+    
+    iObserver->Reset();
+    }
+    
     
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //       
-void UT_CMusEngMceSession::UT_SsrcAddedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_SsrcAddedL()
     {
     // As CMusEngMceSession::SsrcAdded is expected to do nothing, just call
     // it to make sure it does not weaken the test coverage
@@ -1648,7 +1697,7 @@
 //
 // -----------------------------------------------------------------------------
 //  
-void UT_CMusEngMceSession::UT_SsrcRemovedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_SsrcRemovedL()
     {
     // As CMusEngMceSession::SsrcRemoved is expected to do nothing, just call
     // it to make sure it does not weaken the test coverage
@@ -1667,25 +1716,21 @@
 //
 // -----------------------------------------------------------------------------
 //  
-void UT_CMusEngMceSession::UT_UpdateTimerEventL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_UpdateTimerEventL()
     {
-    iLcSessionObserver->Reset();
     iLiveSession->UpdateTimerEvent();
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EUnknown ) )
+    EUNIT_ASSERT( iObserver->iSessionTimeChangedCalled )
     EUNIT_ASSERT( iLiveSession->iUpdateTimer->IsActive() )
     iLiveSession->iUpdateTimer->Cancel();
-    iLcSessionObserver->Reset();
+    iObserver->Reset();
     
     iLiveSession->iSecondsFromLastRtcpReport = 25; // >KMusEngRtcpInactivityThreshold
     iLiveSession->UpdateTimerEvent();
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::EMediaInactivityTimeout ) )
+    EUNIT_ASSERT( iObserver->iSessionTimeChangedCalled )
+    EUNIT_ASSERT( iObserver->iInactivityTimeoutCalled );
     EUNIT_ASSERT( iLiveSession->iUpdateTimer->IsActive() )
     iLiveSession->iUpdateTimer->Cancel();
-    iLcSessionObserver->Reset(); 
+    iObserver->Reset();
     }   
 
 
@@ -1693,13 +1738,14 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_IsRoamingBetweenAPsAllowedL()
+void UT_CMusEngMceSession::UT_CMusEngMceSession_IsRoamingBetweenAPsAllowedL()
     {
     // No session
     EUNIT_ASSERT( iLiveSession->IsRoamingBetweenAPsAllowed() )
 
     // Session idle
-    iLiveSession->EstablishLcSessionL();
+    _LIT( KRecipientSipUri, "sip:user@some.where" );
+    iLiveSession->InviteL( KRecipientSipUri );
     iLiveSession->iSession->iState = CMceSession::EIdle;
     EUNIT_ASSERT( iLiveSession->IsRoamingBetweenAPsAllowed() )
     
@@ -1716,249 +1762,55 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_SaveContactL()
-    {     
-    _LIT8( KTestSaveContactAddr, "sip:abc@10.10.10.10");
-    
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KTelNumber,
-                                        _L("12341234") ) );
-    
-    // Operator variant
-    iLiveSession->iOperatorVariant = ETrue;
-    MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( 
-            iLiveSession->SaveContactL( KTestSaveContactAddr ), KErrNotSupported )
-    
-    // No address to save
-    iLiveSession->iOperatorVariant = EFalse;
-    MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( 
-               iLiveSession->SaveContactL( KNullDesC8 ), KErrArgument )
+void UT_CMusEngMceSession::UT_CMusEngMceSession_VolumeChangedL()
+    {
+    // Try without session, nothing happens
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
+    iLiveSession->VolumeChanged( 1, EFalse );
+    EUNIT_ASSERT( !VerifySpeakersVolume(*iLiveSession, 1) )
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
 
-    // Contact id KErrNotSupported (multiple matching contacts)
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                     NMusSessionApi::KContactId,
-                                     KErrNotSupported ) );
+    // Establish session
+    ESTABLISH_OUT_SESSION( iClipSession )
     
-    MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( 
-                iLiveSession->SaveContactL( KTestSaveContactAddr ), KErrNotFound )
+    // Try without observer
+    iClipSession->VolumeChanged( 2, EFalse );
+    EUNIT_ASSERT( VerifySpeakersVolume(*iClipSession, 2) )
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
+    
     
-    // SIP field exists already
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KContactId,
-                                        2 ) );
-
-    ContactEngineStubHelper::SetSIPFieldFound( ETrue );
-    MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( 
-                   iLiveSession->SaveContactL( KTestSaveContactAddr ), KErrAlreadyExists )
-    
-    // No correct field in fields info
-    ContactEngineStubHelper::Reset();
-    ContactEngineStubHelper::SetSIPFieldInfoFound( EFalse );
-    MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( 
-                       iLiveSession->SaveContactL( KTestSaveContactAddr ), KErrNotFound )
-    
-    // Success
-    ContactEngineStubHelper::Reset();
-    iLiveSession->SaveContactL( KTestSaveContactAddr );
-    EUNIT_ASSERT( ContactEngineStubHelper::GetCalledFunction() == EContactEngineStubSetText );
+    // Try with observer set
+    iClipSession->SetVolumeChangeObserver( iObserver );
+    iClipSession->VolumeChanged( 3, EFalse );
+    EUNIT_ASSERT( VerifySpeakersVolume(*iClipSession, 3) )
+    EUNIT_ASSERT( iObserver->iVolume == 3 );
     
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_RectL()
-    {
-    iLiveSession->SetRectL( TRect( 0, 0, 100, 100 ) );    
-    TRect rect = iLiveSession->Rect();
-    
-    // Initial values
-    EUNIT_ASSERT( rect.iTl.iX == 0 );
-    EUNIT_ASSERT( rect.iTl.iY == 0 );
-    EUNIT_ASSERT( rect.iBr.iX == 100 );
-    EUNIT_ASSERT( rect.iBr.iY == 100 );
-    
-    iLiveSession->iRect.iTl.iX = 100;
-    iLiveSession->iRect.iTl.iY = 200;
-    iLiveSession->iRect.iBr.iX = 300;
-    iLiveSession->iRect.iBr.iY = 400;
-    
-    rect = iLiveSession->Rect();
-    
-    EUNIT_ASSERT( rect.iTl.iX == 100 );
-    EUNIT_ASSERT( rect.iTl.iY == 200 );
-    EUNIT_ASSERT( rect.iBr.iX == 300 );
-    EUNIT_ASSERT( rect.iBr.iY == 400 );  
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetRectLL()
-    {
-    TRect rect;
-
-    rect.iTl.iX = 100;
-    rect.iTl.iY = 200;
-    rect.iBr.iX = 300;
-    rect.iBr.iY = 400;
-
-    iLiveSession->SetRectL( rect );
-    
-    EUNIT_ASSERT( iLiveSession->iRect.iTl.iX == 100 );
-    EUNIT_ASSERT( iLiveSession->iRect.iTl.iY == 200 );
-    EUNIT_ASSERT( iLiveSession->iRect.iBr.iX == 300 );
-    EUNIT_ASSERT( iLiveSession->iRect.iBr.iY == 400 );
-
-    ESTABLISH_OUT_SESSION( iLiveSession );
-    
-    CMceDisplaySink* display = 
-                MusEngMceUtils::GetDisplayL( *( iLiveSession->iSession ) );
-    TRect displayRect = display->DisplayRectL();
-    
-    EUNIT_ASSERT( displayRect.iTl.iX == 100 );
-    EUNIT_ASSERT( displayRect.iTl.iY == 200 );
-    EUNIT_ASSERT( displayRect.iBr.iX == 300 );
-    EUNIT_ASSERT( displayRect.iBr.iY == 400 );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SecondaryRectL()
-    {
-    iLiveSession->SetSecondaryRectL( TRect( 0, 0, 100, 100 ) );    
-    TRect rect = iLiveSession->SecondaryRect();
-    
-    // Initial values
-    EUNIT_ASSERT( rect.iTl.iX == 0 );
-    EUNIT_ASSERT( rect.iTl.iY == 0 );
-    EUNIT_ASSERT( rect.iBr.iX == 100 );
-    EUNIT_ASSERT( rect.iBr.iY == 100 );
-    
-    iLiveSession->iRect.iTl.iX = 100;
-    iLiveSession->iRect.iTl.iY = 200;
-    iLiveSession->iRect.iBr.iX = 300;
-    iLiveSession->iRect.iBr.iY = 400;
-    
-    rect = iLiveSession->SecondaryRect();
-    
-    EUNIT_ASSERT( rect.iTl.iX == 100 );
-    EUNIT_ASSERT( rect.iTl.iY == 200 );
-    EUNIT_ASSERT( rect.iBr.iX == 300 );
-    EUNIT_ASSERT( rect.iBr.iY == 400 );  
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetSecondaryRectLL()
+// HELPERS
+TBool UT_CMusEngMceSession::VerifySpeakersVolume(CMusEngMceSession& aSession, TInt aVolume)
     {
-    TRect rect;
-
-    rect.iTl.iX = 100;
-    rect.iTl.iY = 200;
-    rect.iBr.iX = 300;
-    rect.iBr.iY = 400;
-
-    iLiveSession->SetSecondaryRectL( rect );
-    
-    EUNIT_ASSERT( iLiveSession->iRect.iTl.iX == 100 );
-    EUNIT_ASSERT( iLiveSession->iRect.iTl.iY == 200 );
-    EUNIT_ASSERT( iLiveSession->iRect.iBr.iX == 300 );
-    EUNIT_ASSERT( iLiveSession->iRect.iBr.iY == 400 );
-
-    ESTABLISH_OUT_SESSION( iLiveSession );
-    
-    CMceDisplaySink* display = 
-                MusEngMceUtils::GetDisplayL( *( iLiveSession->iSession ) );
-    TRect displayRect = display->DisplayRectL();
+    TBool result = EFalse;
     
-    EUNIT_ASSERT( displayRect.iTl.iX == 100 );
-    EUNIT_ASSERT( displayRect.iTl.iY == 200 );
-    EUNIT_ASSERT( displayRect.iBr.iX == 300 );
-    EUNIT_ASSERT( displayRect.iBr.iY == 400 );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_EnableDisplayLL()
-    {
-    TRAPD( error, iLiveSession->EnableDisplayL( ETrue ) );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrNotReady );
-    
-    ESTABLISH_OUT_SESSION( iLiveSession );
-    
-    CMceDisplaySink* display = 
-                    MusEngMceUtils::GetDisplayL( *(iLiveSession->iSession) );
-    
-    // Disable
-    iLiveSession->EnableDisplayL( EFalse );
-    
-    EUNIT_ASSERT( !display->iIsEnabled );
-    
-    // Try to disable again, request should be ignored
-    
-    iLiveSession->EnableDisplayL( EFalse );
+    CMceSpeakerSink* speaker = NULL;    
+    CMceSession* session = aSession.iSession;
     
-    EUNIT_ASSERT( !display->iIsEnabled );
-
-    // Enable
-    
-    iLiveSession->EnableDisplayL( ETrue );
-    
-    EUNIT_ASSERT( display->iIsEnabled );
-    
-    // Try to enable again, request should be ignored
-    
-    iLiveSession->EnableDisplayL( ETrue );
-    
-    EUNIT_ASSERT( display->iIsEnabled );
-    
-    EUNIT_ASSERT( iLiveSession->IsDisplayEnabled() )
-    EUNIT_ASSERT( iLiveSession->IsDisplayActive() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_CMusEngMceSession_SetOrientationLL()
-    {
-    // Try without session, fails
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->SetOrientationL( 
-                                                CMusEngMceSession::EPortrait ), 
-                                 KErrNotReady )
-
-    // Establish a session
-    ESTABLISH_OUT_SESSION( iLiveSession )
-    
-    CMceDisplaySink* display = 
-                    MusEngMceUtils::GetDisplayL( *iLiveSession->iSession );
-    
-    // Check the initial state
-    display->iRotation = CMceDisplaySink::ENone;
-    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
-                         CMusEngMceSession::EPortrait )      
-                         
-    // Successfully change orientation
-    
-    iLiveSession->SetOrientationL( CMusEngMceSession::ELandscape );
-    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
-                         CMusEngMceSession::ELandscape )
-    
-    iLiveSession->SetOrientationL( CMusEngMceSession::EPortrait );
-    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
-                         CMusEngMceSession::EPortrait )
+    if ( session ) 
+        {
+        for ( TInt i = 0; i < session->Streams().Count(); ++i )
+            {
+            for ( TInt j = 0; j < session->Streams()[i]->Sinks().Count(); ++j )
+                {
+                if ( session->Streams()[i]->Sinks()[j]->Type() == KMceSpeakerSink )
+                    {
+                    speaker = static_cast<CMceSpeakerSink*>(
+                                              session->Streams()[i]->Sinks()[j] );
+                    result = ( speaker->VolumeL() == aVolume );
+                    }
+                }
+            } 
+        }
+    return result;
     }
 
 
@@ -1966,510 +1818,22 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngMceSession::UT_SetEncodingDeviceLL()
-    {
-    CMceAvcCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    
-    // Generic error in CenRep, leave expected
-    CRepository::iForceFailWithCode = KErrNotReady;
-    EUNIT_ASSERT_LEAVE( iLiveSession->SetEncodingDeviceL( *codec ) )
-    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, TUid::Uid( 0 ) )
-    
-    // No entry in CenRep, default value expected
-    CRepository::iForceFailWithCode = KErrNotFound;
-    const TUid KDefaultEncodingDevice( TUid::Uid( 0x20001C13 ) );
-    iLiveSession->SetEncodingDeviceL( *codec );
-    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, 
-                         KDefaultEncodingDevice )
-    
-    // Entry in CenRep
-    const TInt KSomeEncodingDevice( 0x20001C15 );
-    CRepository::iStaticEncoderUid = KSomeEncodingDevice;
-    iLiveSession->SetEncodingDeviceL( *codec );
-    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, 
-                         TUid::Uid( KSomeEncodingDevice ) )
-                                             
-    CleanupStack::PopAndDestroy( codec );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetCodecConfigKeyLL()
-    {
-    CMceAvcCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1b );
-
-    // Generic error in CenRep, leave expected
-    CRepository::iForceFailWithCode = KErrNotReady;
-    EUNIT_ASSERT_LEAVE( iLiveSession->SetCodecConfigKeyL( *codec ) );
-    EUNIT_ASSERT( !codec->iConfigKey )
-    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
-    CRepository::iForceFailWithCode = KErrNone;
-    
-    // No entry in CenRep, nothing happens
-    iLiveSession->SetCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( !codec->iConfigKey )
-    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
-    
-    // Empty entry in CenRep
-    CRepository::SetStubAvcConfigKeysL( KNullDesC8() );
-    iLiveSession->SetCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( !codec->iConfigKey )
-    EUNIT_ASSERT( iLiveSession->iStoreEncoderConfigInfo )
-    iLiveSession->iStoreEncoderConfigInfo = EFalse; // emulate original situation
-    
-    // Entry in CenRep
-    CRepository::SetStubAvcConfigKeysL( KMusAvcBitrateLevel_1b_ConfigKey );
-    iLiveSession->SetCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( codec->iConfigKey )
-    HBufC8* key = codec->ConfigKeyL();
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1bTestText() )
-    CleanupStack::PopAndDestroy( key );
-    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
-    
-    CleanupStack::PopAndDestroy( codec );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_ReadCodecConfigKeyLL()
+void UT_CMusEngMceSession::SetMaxVolForSpeakersL(CMceSession& aSession, TInt aMaxVol)
     {
-    HBufC8* key( NULL );
-    
-    // Try with H263, leave expected
-    CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() );  
-    EUNIT_ASSERT_LEAVE( key = iLiveSession->ReadCodecConfigKeyL( *codecH263 ) )
-    CleanupStack::PopAndDestroy( codecH263 );
-    
-    // Try without an entry in CenRep, leave expected
-    CMceVideoCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codec->SetAllowedBitrates( 0 | KMceAvcBitrateLevel1 );
-    EUNIT_ASSERT_LEAVE( key = iLiveSession->ReadCodecConfigKeyL( *codec ) )
-
-    // Create CenRep entry which does not include wanted bitrate, NULL value
-    // expected
-    CRepository::SetStubAvcConfigKeysL( KMusAvcBitrateLevel1bTestText() );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( !key )
-    
-    // Create entry with all AVC keys and try with all the values
-    CRepository::SetStubAvcConfigKeysL( KMusAvcAllLevelsConcatenation() );                           
-    
-    // KMceAvcBitrateLevel1
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1TestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel1b
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1b );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1bTestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel1_1
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_1 );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_1TestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel1_2
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_2 );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_2TestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel1_3
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_3 );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_3TestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel2
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel2 );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel2TestText );
-    CleanupStack::PopAndDestroy( key );
-   
-    CleanupStack::PopAndDestroy( codec );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_StoreEncoderConfigInfoLL()
-    {
-    CRepository::iStaticWriteAvcKeysToStaticData = ETrue;
-    
-    // Try with clean CenRep
-    MultimediaSharingSettings::SetEncoderConfigInfoL( KNullDesC8() );   
-    
-    ESTABLISH_OUT_SESSION( iLiveSession ) // calls StoreEncoderConfigInfoL
-    // If StoreEncoderConfigInfoL leaves with KErrNoMemory,
-    // MMusEngSessionObserver::SessionFailed will be called.
-    if ( iLcSessionObserver->iCalledFunction == CLcSessionObserverStub::ESessionFailed )
-        {
-        User::Leave( KErrNoMemory );
-        }
-
-    HBufC8* keys = MultimediaSharingSettings::EncoderConfigInfoLC();    
-    EUNIT_ASSERT_EQUALS( *keys, KMusAvcBitrateLevel_1b_ConfigKey() )
-    CleanupStack::PopAndDestroy( keys );
-    
-    // Try without a clean CenRep 
-    MultimediaSharingSettings::SetEncoderConfigInfoL(
-                                        KMusAvcBitrateLevel_1_1_ConfigKey() );   
-    
-    delete iLiveSession;
-    iLiveSession = NULL;
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );
-    
-    ESTABLISH_OUT_SESSION( iLiveSession ) // calls StoreEncoderConfigInfoL
-    // If StoreEncoderConfigInfoL leaves with KErrNoMemory,
-    // MMusEngSessionObserver::SessionFailed will be called.
-    if ( iLcSessionObserver->iCalledFunction == CLcSessionObserverStub::ESessionFailed )
-        {
-        User::Leave( KErrNoMemory );
-        }
-                     
-    keys = MultimediaSharingSettings::EncoderConfigInfoLC();
-    EUNIT_ASSERT_EQUALS( *keys, 
-                         KMusAvcBitrateLevels_1_1_And_1b_ConfigKeys() )
-    CleanupStack::PopAndDestroy( keys );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_StreamStreamingL()
-    {
-    // Wrong stream type, no callbacks to MLcSessionObserver
-    CMceAudioStream* audioStream = CMceAudioStream::NewLC();
-    iLiveSession->StreamStreaming( *audioStream );
-    CleanupStack::PopAndDestroy( audioStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
-    
-    // Wrong state, no callbacks to MLcSessionObserver
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    videoStream->iState = CMceMediaStream::EIdle;
-    iLiveSession->StreamStreaming( *videoStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
-    
-    // Receive session, RTP source and remote player present
-    iLcSessionObserver->Reset();
-    videoStream->iState = CMceMediaStream::EStreaming;
-    CMceRtpSource* rtpSource = CMceRtpSource::NewLC();
-    videoStream->SetSourceL( rtpSource );
-    CleanupStack::Pop( rtpSource );
-    iReceiveSession->StreamStreaming( *videoStream );
-    EUNIT_ASSERT_EQUALS( 
-        TInt( CLcSessionObserverStub::EPlayerStateChanged ),
-        iLcSessionObserver->iCalledFunction )
-    EUNIT_ASSERT_EQUALS( 
-        iReceiveSession->RemoteVideoPlayer(),
-        iLcSessionObserver->iCurrentPlayer )
-    
-    // Live session, RTP sink and local player present
-    iLcSessionObserver->Reset();
-    videoStream->SetSourceL( NULL );
-    CMceRtpSink* rtpSink = CMceRtpSink::NewLC();
-    videoStream->AddSinkL( rtpSink );
-    CleanupStack::Pop( rtpSink );
-    iLiveSession->StreamStreaming( *videoStream );
-    EUNIT_ASSERT_EQUALS( 
-        TInt( CLcSessionObserverStub::EPlayerStateChanged ),
-        iLcSessionObserver->iCalledFunction )
-    EUNIT_ASSERT_EQUALS( 
-        iLiveSession->LocalVideoPlayer(),
-        iLcSessionObserver->iCurrentPlayer )
-
-    // Live session, RTP sink present, but no local player
-    iLcSessionObserver->Reset();
-    delete iLiveSession->iLiveVideoPlayer;
-    iLiveSession->iLiveVideoPlayer = NULL;
-    iLiveSession->StreamStreaming( *videoStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
-        
-    CleanupStack::PopAndDestroy( videoStream );
+    for ( TInt i = 0; i < aSession.Streams().Count(); ++i )
+            {
+            for ( TInt j = 0; j < aSession.Streams()[i]->Sinks().Count(); ++j )
+                {
+                if ( aSession.Streams()[i]->Sinks()[j]->Type() == KMceSpeakerSink )
+                    {
+                    CMceSpeakerSink* speaker = static_cast<CMceSpeakerSink*>(
+                                                aSession.Streams()[i]->Sinks()[j] );
+                    speaker->iMaxVolume = aMaxVol;
+                    }
+                }
+            } 
     }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_InformObserverAboutSessionStateChangeL()
-    {
-    // Observer does not exist
-    iLiveSession->SetLcSessionObserver( NULL );
-    iLiveSession->InformObserverAboutSessionStateChange();
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )
-    
-    // Observer exists
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->InformObserverAboutSessionStateChange();
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::ESessionStateChanged, 
-        iLcSessionObserver->iCalledFunction )  
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_InformObserverAboutSessionUpdateL()
-    {
-    // Observer does not exist
-    iLiveSession->SetLcSessionObserver( NULL );
-    iLiveSession->InformObserverAboutSessionUpdate();
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )    
-       
-    // Observer exists
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->InformObserverAboutSessionUpdate();
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::ESessionUpdated, 
-        iLcSessionObserver->iCalledFunction )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_InformObserverAboutSessionFailureL()
-    {
-    // Observer does not exist
-    iLiveSession->SetLcSessionObserver( NULL );
-    iLiveSession->InformObserverAboutSessionFailure( KErrGeneral );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )
-    EUNIT_ASSERT_EQUALS( KErrNone, iLcSessionObserver->iError )    
-    
-    // Observer exists
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->InformObserverAboutSessionFailure( KErrGeneral );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::ESessionFailed, 
-        iLcSessionObserver->iCalledFunction )
-    EUNIT_ASSERT_EQUALS( KErrGeneral, iLcSessionObserver->iError )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_InformObserverAboutPlayerStateChangeL()
-    {
-    // Observer does not exist
-    iLiveSession->SetLcSessionObserver( NULL );
-    iLiveSession->InformObserverAboutPlayerStateChange( NULL );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )    
-    
-    // Observer exists, but the player is NULL
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->InformObserverAboutPlayerStateChange( NULL );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )    
-    
-    // Both observer and player exist
-    iLiveSession->InformObserverAboutPlayerStateChange( 
-        iLiveSession->LocalVideoPlayer() );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EPlayerStateChanged, 
-        iLcSessionObserver->iCalledFunction )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_InformObserverAboutPlayerUpdateL()
-    {
-    // Observer does not exist
-    iLiveSession->SetLcSessionObserver( NULL );
-    iLiveSession->InformObserverAboutPlayerUpdate( NULL );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )    
-    
-    // Observer exists, but the player is NULL
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->InformObserverAboutPlayerUpdate( NULL );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )    
-    
-    // Both observer and player exist
-    iLiveSession->InformObserverAboutPlayerUpdate( 
-        iLiveSession->LocalVideoPlayer() );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EPlayerUpdated, 
-        iLcSessionObserver->iCalledFunction )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_InformObserverAboutPlayerFailureL()
-    {
-    // Observer does not exist
-    iLiveSession->SetLcSessionObserver( NULL );
-    iLiveSession->InformObserverAboutPlayerFailure( NULL, KErrGeneral );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )
-    EUNIT_ASSERT_EQUALS( KErrNone, iLcSessionObserver->iError )
-    
-    // Observer exists, but the player is NULL
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->InformObserverAboutPlayerFailure( NULL, KErrGeneral );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EUnknown, 
-        iLcSessionObserver->iCalledFunction )
-    EUNIT_ASSERT_EQUALS( KErrNone, iLcSessionObserver->iError )
-    
-    // Both observer and player exist
-    iLiveSession->InformObserverAboutPlayerFailure( 
-        iLiveSession->LocalVideoPlayer(), KErrGeneral );
-    EUNIT_ASSERT_EQUALS( 
-        CLcSessionObserverStub::EPlayerFailed, 
-        iLcSessionObserver->iCalledFunction )
-    EUNIT_ASSERT_EQUALS( KErrGeneral, iLcSessionObserver->iError )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_LcUiProviderL()
-    {
-    // Provider does not exist 
-    iLiveSession->SetLcUiProvider( NULL );
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->LcUiProviderL(), KErrNotReady )
-    
-    // Provider exists
-    iLiveSession->SetLcUiProvider( iLcUiProvider  );
-    EUNIT_ASSERT( &iLiveSession->LcUiProviderL() == iLcUiProvider )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UI_IsBackgroundStartupL()
-    {
-    // fast mode is not defined
-    EUNIT_ASSERT( !iLiveSession->IsBackgroundStartup() )
-    
-    // fast mode is Off
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KFastMode,
-                                        1 ) );
-
-    EUNIT_ASSERT( !iLiveSession->IsBackgroundStartup() )
-
-    // fast mode is On
-    // Bg value would be set to true at session contruct phase if property
-    // is set to EFastModeOn at that time.
-    iLiveSession->iBackground = ETrue;
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KFastMode,
-                                        0 ) );
-
-    EUNIT_ASSERT( iLiveSession->IsBackgroundStartup() )    
-    
-    // Ensure after session recreation fast mode is off 
-    delete iLiveSession;
-    iLiveSession = NULL;
-    iLiveSession = CMusEngLiveSession::NewL();
-    EUNIT_ASSERT( !iLiveSession->IsBackgroundStartup() ) 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_InformUiProviderAboutReceivingStartL()
-    {
-    // Observer does not exist
-    iLiveSession->SetLcUiProvider( NULL );
-    iLiveSession->InformUiProviderAboutReceivingStart();
-    EUNIT_ASSERT_EQUALS( TInt( CLcUiProviderStub::EUnknown ), 
-                         iLcUiProvider->iCalledFunction )
-    
-    // Observer exists, but we are on foreground (fast mode is off)
-    iLiveSession->SetLcUiProvider( iLcUiProvider );
-    iLiveSession->InformUiProviderAboutReceivingStart();
-    EUNIT_ASSERT_EQUALS( TInt( CLcUiProviderStub::EUnknown ), 
-                         iLcUiProvider->iCalledFunction )
-    
-    // Observer exists, we are on background
-    iLiveSession->iBackground = ETrue;
-    EUNIT_ASSERT( !iLcUiProvider->iForeground )
-    iLiveSession->InformUiProviderAboutReceivingStart();
-    EUNIT_ASSERT_EQUALS( TInt( CLcUiProviderStub::EHandleForegroundStatus ),
-                         iLcUiProvider->iCalledFunction )
-    EUNIT_ASSERT( iLcUiProvider->iForeground ) 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_SetForegroundStatusL()
-    {
-    iLiveSession->iBackground = ETrue;
-    EUNIT_ASSERT( iLiveSession->SetForegroundStatus( ETrue ) == KErrNone );
-    EUNIT_ASSERT( !iLiveSession->iBackground );
-    EUNIT_ASSERT( iLiveSession->SetForegroundStatus( EFalse ) == KErrNone );
-    EUNIT_ASSERT( !iLiveSession->iBackground ); // Still bg
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngMceSession::UT_UpdateLcSessionLL()
-    {
-    // No MCE session
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->UpdateLcSessionL(), KErrNotReady )
-        
-    ESTABLISH_OUT_SESSION( iLiveSession );
-    
-    iLiveSession->UpdateLcSessionL();
-    
-    }
-
+ 
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE(
@@ -2478,442 +1842,264 @@
     "UNIT" )
 
 EUNIT_TEST(
-    "LcSessionState - test ",
-    "CMusEngMceSession",
-    "LcSessionState",
-    "FUNCTIONALITY",
-    SetupL, UT_LcSessionStateL, Teardown)
-        
-EUNIT_TEST(
-    "RemoteVideoPlayer - test ",
-    "CMusEngMceSession",
-    "RemoteVideoPlayer",
-    "FUNCTIONALITY",
-    SetupL, UT_RemoteVideoPlayerL, Teardown)
-        
-EUNIT_TEST(
-    "LocalVideoPlayer - test ",
-    "CMusEngMceSession",
-    "LocalVideoPlayer",
-    "FUNCTIONALITY",
-    SetupL, UT_LocalVideoPlayerL, Teardown) 
-        
-EUNIT_TEST(
-    "LocalDisplayNameL - test ",
-    "CMusEngMceSession",
-    "LocalDisplayNameL",
-    "FUNCTIONALITY",
-    SetupL, UT_LocalDisplayNameL, Teardown)
-
-EUNIT_TEST(
-    "RemoteDisplayName - test ",
-    "CMusEngMceSession",
-    "RemoteDisplayName",
-    "FUNCTIONALITY",
-    SetupL, UT_RemoteDisplayNameL, Teardown)
-    
-EUNIT_TEST(
-    "RemoteDetails - test ",
-    "CMusEngMceSession",
-    "RemoteDetails",
-    "FUNCTIONALITY",
-    SetupL, UT_RemoteDetailsL, Teardown)
-
-EUNIT_TEST(
-    "SetParameter - test ",
+    "TerminateL - test ",
     "CMusEngMceSession",
-    "SetParameter",
-    "FUNCTIONALITY",
-    SetupL, UT_SetParameterL, Teardown)
-        
-EUNIT_TEST(
-    "ParameterValue - test ",
-    "CMusEngMceSession",
-    "ParameterValue",
-    "FUNCTIONALITY",
-    SetupL, UT_ParameterValueL, Teardown)    
-        
-EUNIT_TEST(
-    "IsLcAudioMutedL - test ",
-    "CMusEngMceSession",
-    "IsLcAudioMutedL",
-    "FUNCTIONALITY",
-    SetupL, UT_IsLcAudioMutedL, Teardown)
-        
-EUNIT_TEST(
-    "MuteLcAudioL - test ",
-    "CMusEngMceSession",
-    "MuteLcAudioL",
+    "TerminateL",
     "FUNCTIONALITY",
-    SetupL, UT_MuteLcAudioL, Teardown)    
-
-EUNIT_TEST(
-    "MuteLcMicL - test ",
-    "CMusEngMceSession",
-    "MuteLcMicL",
-    "FUNCTIONALITY",
-    SetupL, UT_MuteLcMicL, Teardown)
-        
-EUNIT_TEST(
-    "EnableLcLoudspeakerL - test ",
-    "CMusEngMceSession",
-    "EnableLcLoudspeakerL",
-    "FUNCTIONALITY",
-    SetupL, UT_EnableLcLoudspeakerL, Teardown)
-        
-EUNIT_TEST(
-    "SetLcVolumeL - test ",
-    "CMusEngMceSession",
-    "SetLcVolumeL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetLcVolumeL, Teardown)
+    SetupL, UT_CMusEngMceSession_TerminateLL, Teardown)
 
 EUNIT_TEST(
     "GetSessionTime - test ",
     "CMusEngMceSession",
     "GetSessionTime",
     "FUNCTIONALITY",
-    SetupL, UT_GetSessionTimeL, Teardown)   
+    SetupL, UT_CMusEngMceSession_GetSessionTimeL, Teardown)
+
+EUNIT_TEST(
+    "ConnectionActive - test ",
+    "CMusEngMceSession",
+    "ConnectionActive",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_ConnectionActiveL, Teardown) 
+
+EUNIT_TEST(
+    "ContainsAudioL - test ",
+    "CMusEngMceSession",
+    "ContainsAudioL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_ContainsAudioLL, Teardown) 
+
+EUNIT_TEST(
+    "IsMutedL - test ",
+    "CMusEngMceSession",
+    "IsMutedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_IsMutedLL, Teardown) 
+
+EUNIT_TEST(
+    "OrientationL - test ",
+    "CMusEngMceSession",
+    "OrientationL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_OrientationLL, Teardown) 
+
+EUNIT_TEST(
+    "SetOrientationL - test ",
+    "CMusEngMceSession",
+    "SetOrientationL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_SetOrientationLL, Teardown) 
+    
+EUNIT_TEST(
+    "VolumeUpL - test ",
+    "CMusEngMceSession",
+    "VolumeUpL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_VolumeUpLL, Teardown) 
+
+EUNIT_TEST(
+    "VolumeDownL - test ",
+    "CMusEngMceSession",
+    "VolumeDownL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_VolumeDownLL, Teardown) 
+
+EUNIT_TEST(
+    "SetVolumeL - test ",
+    "CMusEngMceSession",
+    "SetVolumeL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_SetVolumeLL, Teardown)
+    
+EUNIT_TEST(
+    "EnableDisplay - test ",
+    "CMusEngMceSession",
+    "EnableDisplay",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_EnableDisplayL, Teardown)   
+
+EUNIT_TEST(
+    "MuteL - test ",
+    "CMusEngMceSession",
+    "MuteL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_MuteLL, Teardown)   
+
+EUNIT_TEST(
+    "UnmuteL - test ",
+    "CMusEngMceSession",
+    "UnmuteL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_UnmuteLL, Teardown)   
 
 EUNIT_TEST(
     "HandleTermination - test ",
     "CMusEngMceSession",
     "HandleTermination",
     "FUNCTIONALITY",
-    SetupL, UT_HandleTerminationL, Teardown)   
+    SetupL, UT_CMusEngMceSession_HandleTerminationL, Teardown)   
 
 EUNIT_TEST(
     "AdjustVideoCodecL - test ",
     "CMusEngMceSession",
     "AdjustVideoCodecL",
     "FUNCTIONALITY",
-    SetupL, UT_AdjustVideoCodecL, Teardown) 
+    SetupL, UT_CMusEngMceSession_AdjustVideoCodecLL, Teardown) 
 
 EUNIT_TEST(
     "AdjustAudioCodecL - test ",
     "CMusEngMceSession",
     "AdjustAudioCodecL",
     "FUNCTIONALITY",
-    SetupL, UT_AdjustAudioCodecL, Teardown) 
+    SetupL, UT_CMusEngMceSession_AdjustAudioCodecLL, Teardown) 
     
 EUNIT_TEST(
     "RectChangedL - test ",
     "CMusEngMceSession",
     "RectChangedL",
     "FUNCTIONALITY",
-    SetupL, UT_RectChangedL, Teardown) 
+    SetupL, UT_CMusEngMceSession_RectChangedLL, Teardown) 
 
 EUNIT_TEST(
     "SetSessionSdpLinesL - test ",
     "CMusEngMceSession",
     "SetSessionSdpLinesL",
     "FUNCTIONALITY",
-    SetupL, UT_SetSessionSdpLinesL, Teardown) 
+    SetupL, UT_CMusEngMceSession_SetSessionSdpLinesLL, Teardown) 
 
 EUNIT_TEST(
-    "SetSessionSdpLinesL - operator variant test ",
-    "CMusEngMceSession",
-    "SetSessionSdpLinesL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetSessionSdpLines_OperatorL, Teardown)
-    
-EUNIT_TEST(
-    "SetMediaSdpLinesL - test ",
-    "CMusEngMceSession",
-    "SetMediaSdpLinesL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetMediaSdpLinesL, Teardown) 
-
-EUNIT_TEST(
-    "SetMediaSdpLinesL - operator variant test ",
-    "CMusEngMceSession",
-    "SetMediaSdpLinesL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetMediaSdpLines_OperatorL, Teardown) 
-    
-EUNIT_TEST(
     "AdjustStreamsAndCodecsL - test ",
     "CMusEngMceSession",
     "AdjustStreamsAndCodecsL",
     "FUNCTIONALITY",
-    SetupL, UT_AdjustStreamsAndCodecsL, Teardown)
+    SetupL, UT_CMusEngMceSession_AdjustStreamsAndCodecsLL, Teardown)
 
 EUNIT_TEST(
     "IncomingSession - test ",
     "CMusEngMceSession",
     "IncomingSession",
     "FUNCTIONALITY",
-    SetupL, UT_IncomingSessionL, Teardown)          
+    SetupL, UT_CMusEngMceSession_IncomingSessionL, Teardown)          
 
 EUNIT_TEST(
     "IncomingUpdate - test ",
     "CMusEngMceSession",
     "IncomingUpdate",
     "FUNCTIONALITY",
-    SetupL, UT_IncomingUpdateL, Teardown)      
+    SetupL, UT_CMusEngMceSession_IncomingUpdateL, Teardown)      
 
 EUNIT_TEST(
     "StreamStateChangedL( source ) - test ",
     "CMusEngMceSession",
     "StreamStateChangedL( source )",
     "FUNCTIONALITY",
-    SetupL, UT_StreamStateChangedWithSourceL, Teardown)          
+    SetupL, UT_CMusEngMceSession_StreamStateChangedWithSourceL, Teardown)          
 
 EUNIT_TEST(
     "SessionStateChanged - test ",
     "CMusEngMceSession",
     "SessionStateChanged",
     "FUNCTIONALITY",
-    SetupL, UT_SessionStateChangedL, Teardown)
-    
-EUNIT_TEST(
-    "HandleSessionStateChanged - encoder key storing ",
-    "CMusEngMceSession",
-    "HandleSessionStateChanged",
-    "FUNCTIONALITY",
-    SetupL, UT_HandleSessionStateChanged_EncoderKeyStoringL, Teardown)
+    SetupL, UT_CMusEngMceSession_SessionStateChangedL, Teardown) 
     
 EUNIT_TEST(
     "SessionConnectionStateChanged - test ",
     "CMusEngMceSession",
     "SessionConnectionStateChanged",
     "FUNCTIONALITY",
-    SetupL, UT_SessionConnectionStateChangedL, Teardown) 
+    SetupL, UT_CMusEngMceSession_SessionConnectionStateChangedL, Teardown) 
 
 EUNIT_TEST(
     "Failed - test ",
     "CMusEngMceSession",
     "Failed",
     "FUNCTIONALITY",
-    SetupL, UT_FailedL, Teardown)     
+    SetupL, UT_CMusEngMceSession_FailedL, Teardown)     
 
 EUNIT_TEST(
     "UpdateFailed - test ",
     "CMusEngMceSession",
     "UpdateFailed",
     "FUNCTIONALITY",
-    SetupL, UT_UpdateFailedL, Teardown) 
+    SetupL, UT_CMusEngMceSession_UpdateFailedL, Teardown) 
 
 EUNIT_TEST(
     "StreamStateChanged - test ",
     "CMusEngMceSession",
     "StreamStateChanged",
     "FUNCTIONALITY",
-    SetupL, UT_StreamStateChangedL, Teardown)             
+    SetupL, UT_CMusEngMceSession_StreamStateChangedL, Teardown)             
 
 EUNIT_TEST(
     "StreamStateChangedL (sink ) - test ",
     "CMusEngMceSession",
     "StreamStateChangedL( sink )",
     "FUNCTIONALITY",
-    SetupL, UT_StreamStateChangedWithSinkL, Teardown) 
+    SetupL, UT_CMusEngMceSession_StreamStateChangedWithSinkL, Teardown) 
 
 EUNIT_TEST(
     "SRReceived - test ",
     "CMusEngMceSession",
     "SRReceived",
     "FUNCTIONALITY",
-    SetupL, UT_SRReceivedL, Teardown)     
+    SetupL, UT_CMusEngMceSession_SRReceivedL, Teardown)     
 
 EUNIT_TEST(
     "RRReceived - test ",
     "CMusEngMceSession",
     "RRReceived",
     "FUNCTIONALITY",
-    SetupL, UT_RRReceivedL, Teardown) 
+    SetupL, UT_CMusEngMceSession_RRReceivedL, Teardown) 
+
+EUNIT_TEST(
+    "InactivityTimeout - test ",
+    "CMusEngMceSession",
+    "InactivityTimeout",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_InactivityTimeoutL, Teardown)     
 
 EUNIT_TEST(
     "SsrcAdded - test ",
     "CMusEngMceSession",
     "SsrcAdded",
     "FUNCTIONALITY",
-    SetupL, UT_SsrcAddedL, Teardown) 
+    SetupL, UT_CMusEngMceSession_SsrcAddedL, Teardown) 
 
 EUNIT_TEST(
     "SsrcRemoved - test ",
     "CMusEngMceSession",
     "SsrcRemoved",
     "FUNCTIONALITY",
-    SetupL, UT_SsrcRemovedL, Teardown)         
+    SetupL, UT_CMusEngMceSession_SsrcRemovedL, Teardown)         
+EUNIT_TEST(
+    "IsDisplayEnabledL - test ",
+    "CMusEngMceSession",
+    "IsDisplayEnabledL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusEngMceSession_IsDisplayEnabledLL, Teardown)  	
 
 EUNIT_TEST(
     "UpdateTimerEvent - test ",
     "CMusEngMceSession",
     "UpdateTimerEvent",
     "FUNCTIONALITY",
-    SetupL, UT_UpdateTimerEventL, Teardown)              
+    SetupL, UT_CMusEngMceSession_UpdateTimerEventL, Teardown)              
 
 EUNIT_TEST(
     "IsRoamingBetweenAPsAllowed - test ",
     "CMusEngMceSession",
     "IsRoamingBetweenAPsAllowed",
     "FUNCTIONALITY",
-    SetupL, UT_IsRoamingBetweenAPsAllowedL, Teardown)
-
-EUNIT_TEST(
-    "SaveContactL - test ",
-    "CMusEngMceSession",
-    "SaveContactL",
-    "FUNCTIONALITY",
-    SetupL, UT_SaveContactL, Teardown)    
-
-EUNIT_TEST(
-    "Rect - test ",
-    "CMusEngMceSession",
-    "Rect",
-    "FUNCTIONALITY",
-    SetupL, UT_RectL, Teardown)
-
-EUNIT_TEST(
-    "SetRectL - test ",
-    "CMusEngMceSession",
-    "SetRectL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetRectLL, Teardown)
-
-EUNIT_TEST(
-    "SecondaryRect - test ",
-    "CMusEngMceSession",
-    "SecondaryRect",
-    "FUNCTIONALITY",
-    SetupL, UT_SecondaryRectL, Teardown)
-
-EUNIT_TEST(
-    "SetSecondaryRectL - test ",
-    "CMusEngMceSession",
-    "SetSecondaryRectL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetSecondaryRectLL, Teardown)
-
+    SetupL, UT_CMusEngMceSession_IsRoamingBetweenAPsAllowedL, Teardown)
+        
 EUNIT_TEST(
-    "EnableDisplayL - test ",
-    "CMusEngMceSession",
-    "EnableDisplayL",
-    "FUNCTIONALITY",
-    SetupL, UT_EnableDisplayLL, Teardown)
-    
-EUNIT_TEST(
-    "SetOrientationL - test ",
-    "CMusEngMceSession",
-    "SetOrientationL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusEngMceSession_SetOrientationLL, Teardown) 
-
-EUNIT_TEST(
-    "SetEncodingDeviceL - test ",
-    "CMusEngMceSession",
-    "SetEncodingDeviceL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetEncodingDeviceLL, Teardown)   
-
-EUNIT_TEST(
-    "SetCodecConfigKeyL - test ",
-    "CMusEngMceSession",
-    "SetCodecConfigKeyL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetCodecConfigKeyLL, Teardown)    
-
-EUNIT_TEST(
-    "ReadCodecConfigKeyL - test ",
-    "CMusEngMceSession",
-    "ReadCodecConfigKeyL",
-    "FUNCTIONALITY",
-    SetupL, UT_ReadCodecConfigKeyLL, Teardown)        
-
-EUNIT_TEST(
-    "StoreEncoderConfigInfoL - test ",
-    "CMusEngMceSession",
-    "StoreEncoderConfigInfoL",
-    "FUNCTIONALITY",
-    SetupL, UT_StoreEncoderConfigInfoLL, Teardown)   
-
-EUNIT_TEST(
-    "StreamStreaming - test ",
+    "VolumeChanged - test ",
     "CMusEngMceSession",
-    "StreamStreaming",
-    "FUNCTIONALITY",
-    SetupL, UT_StreamStreamingL, Teardown)   
-   
-EUNIT_TEST(
-    "InformObserverAboutSessionStateChange - test ",
-    "CMusEngMceSession",
-    "InformObserverAboutSessionStateChange",
-    "FUNCTIONALITY",
-    SetupL, UT_InformObserverAboutSessionStateChangeL, Teardown)
-
-EUNIT_TEST(
-    "InformObserverAboutSessionUpdate - test ",
-    "CMusEngMceSession",
-    "InformObserverAboutSessionUpdate",
+    "VolumeChanged",
     "FUNCTIONALITY",
-    SetupL, UT_InformObserverAboutSessionUpdateL, Teardown)
-
-EUNIT_TEST(
-    "InformObserverAboutSessionFailure - test ",
-    "CMusEngMceSession",
-    "InformObserverAboutSessionFailure",
-    "FUNCTIONALITY",
-    SetupL, UT_InformObserverAboutSessionFailureL, Teardown)
-
-EUNIT_TEST(
-    "InformObserverAboutPlayerStateChange - test ",
-    "CMusEngMceSession",
-    "InformObserverAboutPlayerStateChange",
-    "FUNCTIONALITY",
-    SetupL, UT_InformObserverAboutPlayerStateChangeL, Teardown)
-
-EUNIT_TEST(
-    "InformObserverAboutPlayerUpdate - test ",
-    "CMusEngMceSession",
-    "InformObserverAboutPlayerUpdate",
-    "FUNCTIONALITY",
-    SetupL, UT_InformObserverAboutPlayerUpdateL, Teardown)
+    SetupL, UT_CMusEngMceSession_VolumeChangedL, Teardown)
+    
 
-EUNIT_TEST(
-    "InformObserverAboutPlayerFailure - test ",
-    "CMusEngMceSession",
-    "InformObserverAboutPlayerFailure",
-    "FUNCTIONALITY",
-    SetupL, UT_InformObserverAboutPlayerFailureL, Teardown)
-    
-EUNIT_TEST(
-    "LcUiProviderL - test ",
-    "CMusEngMceSession",
-    "LcUiProviderL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcUiProviderL, Teardown)
-
-EUNIT_TEST(
-    "IsBackgroundStartup - test ",
-    "CMusEngMceSession",
-    "IsBackgroundStartup",
-    "FUNCTIONALITY",
-    SetupL, UI_IsBackgroundStartupL, Teardown)
-
-EUNIT_TEST(
-    "InformUiProviderAboutReceivingStart - test ",
-    "CMusEngMceSession",
-    "InformUiProviderAboutReceivingStart",
-    "FUNCTIONALITY",
-    SetupL, UT_InformUiProviderAboutReceivingStartL, Teardown)
-
-EUNIT_TEST(
-    "SetForegroundStatus - test ",
-    "CMusEngMceSession",
-    "SetForegroundStatus",
-    "FUNCTIONALITY",
-    SetupL, UT_SetForegroundStatusL, Teardown)
-    
-EUNIT_TEST(
-    "UpdateLcSessionL - test ",
-    "CMusEngMceSession",
-    "UpdateL",
-    "FUNCTIONALITY",
-    SetupL, UT_UpdateLcSessionLL, Teardown)
-
-    
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
-
-
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengmceutils.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengmceutils.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -97,6 +97,16 @@
     CEUnitTestSuiteClass::ConstructL();
     }
 
+    
+// -----------------------------------------------------------------------------
+// From MMusSipProfileUser
+// -----------------------------------------------------------------------------
+//
+TBool UT_MusEngMceUtils::IsRoamingBetweenAPsAllowed()
+    {
+    return ETrue; // Dummy implementation
+    }
+
 
 // -----------------------------------------------------------------------------
 //
@@ -105,9 +115,7 @@
 void UT_MusEngMceUtils::SetupL()
     {
     iManager = CMceManager::NewL( TUid::Null(), NULL );
-    iObserver = new( ELeave ) CMusEngObserverStub;
-    iObserver->iRoamingBetweenAPsAllowed = ETrue;
-    iProfileHandler = CMusSipProfileHandler::NewL( *iObserver );
+    iProfileHandler = CMusSipProfileHandler::NewL( *this );
     
     iProfileHandler->CreateProfileL( KSipProfileId );
     iEmptySession = CMceOutSession::NewL( *iManager, 
@@ -154,10 +162,8 @@
     // Video part
     CMceVideoStream* videoIn  = CMceVideoStream::NewLC();
     
-    CMceDisplaySink* receivingDisplay = CMceDisplaySink::NewLC( *iManager );
-    videoIn->AddSinkL( receivingDisplay );
+    videoIn->AddSinkL( CMceDisplaySink::NewLC( *iManager ) );
     CleanupStack::Pop();
-    iReceivingDisplay = receivingDisplay;
     
     videoIn->SetSourceL( CMceRtpSource::NewLC() );
     CleanupStack::Pop();
@@ -166,56 +172,6 @@
     CleanupStack::Pop( videoIn );
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_MusEngMceUtils::Setup2L()
-    {
-    iManager = CMceManager::NewL( TUid::Null(), NULL );
-    iObserver = new( ELeave ) CMusEngObserverStub;
-    iObserver->iRoamingBetweenAPsAllowed = ETrue;
-    iProfileHandler = CMusSipProfileHandler::NewL( *iObserver );
-    
-    iProfileHandler->CreateProfileL( KSipProfileId );
-    iEmptySession = CMceOutSession::NewL( *iManager, 
-                                          *iProfileHandler->Profile(),
-                                          KTestRecipientSipUri8() );
-    
-    // Contruct an outgoing video sesssion                                 
-    iVideoOutSession = CMceOutSession::NewL( *iManager,
-                                             *iProfileHandler->Profile(),
-                                             KTestRecipientSipUri8() );
-    
-    
-    CMceVideoStream* videoOut = CMceVideoStream::NewLC();
-    
-    videoOut->AddSinkL( CMceRtpSink::NewLC() );
-    CleanupStack::Pop();
-    
-    videoOut->AddSinkL( CMceDisplaySink::NewLC( *iManager ) );
-    CleanupStack::Pop();
-    
-    videoOut->SetSourceL( CMceCameraSource::NewLC( *iManager ) );
-    CleanupStack::Pop();
-    
-    // Video part
-    CMceVideoStream* videoIn  = CMceVideoStream::NewLC();
-    
-    CMceDisplaySink* receivingDisplay = CMceDisplaySink::NewLC( *iManager );
-    videoIn->AddSinkL( receivingDisplay );
-    CleanupStack::Pop();
-    iReceivingDisplay = receivingDisplay;
-    
-    videoIn->SetSourceL( CMceRtpSource::NewLC() );
-    CleanupStack::Pop();
-    
-    videoOut->BindL( videoIn );
-    CleanupStack::Pop( videoIn );
-    
-    iVideoOutSession->AddStreamL( videoOut );
-    CleanupStack::Pop( videoOut );
-    }
 
 // -----------------------------------------------------------------------------
 //
@@ -226,11 +182,8 @@
     delete iEmptySession;
     delete iVideoOutSession;
     delete iVideoInSession;
-    iVideoInSession = NULL;
     delete iProfileHandler;
-    delete iObserver;
     delete iManager;
-    iReceivingDisplay = NULL; // Not owned
     }
 
 
@@ -243,7 +196,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_IsVideoInStreamL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_IsVideoInStreamL()
     {
     // Stream 0 is audio stream
     EUNIT_ASSERT( !MusEngMceUtils::IsVideoInStream( 
@@ -268,31 +221,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_IsVideoOutStreamL()
-    {
-    // Stream 0 is audio stream
-    EUNIT_ASSERT( !MusEngMceUtils::IsVideoOutStream( 
-                                        *iVideoInSession->Streams()[0] ) )
-    
-    // No sink
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    EUNIT_ASSERT( !MusEngMceUtils::IsVideoOutStream( *videoStream ) )
-    CleanupStack::PopAndDestroy( videoStream );
-    
-    // display sink
-    EUNIT_ASSERT( !MusEngMceUtils::IsVideoOutStream( 
-                                        *iVideoInSession->Streams()[1] ) )
-                                        
-    // Video outstream
-    EUNIT_ASSERT( MusEngMceUtils::IsVideoOutStream( 
-                                        *iVideoOutSession->Streams()[0] ) )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_MusEngMceUtils::UT_IsAudioInStreamL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_IsAudioInStreamL()
     {
     // Stream 0 is video stream
     EUNIT_ASSERT( !MusEngMceUtils::IsAudioInStream( 
@@ -319,7 +248,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetVideoOutStreamLL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetVideoOutStreamLL()
     {
     // No streams, must fail
     EUNIT_ASSERT_SPECIFIC_LEAVE(
@@ -344,30 +273,15 @@
                 MusEngMceUtils::GetVideoOutStreamL( *iVideoInSession ),
                 KErrNotFound )
     
-    // One incoming video stream with bound outstream, must find bound stream
-    CMceVideoStream* boundVideoOut = CMceVideoStream::NewLC();
-    boundVideoOut->AddSinkL( CMceRtpSink::NewLC() );
-    CleanupStack::Pop();
-    boundVideoOut->SetSourceL( CMceCameraSource::NewLC( *iManager ) );
-    CleanupStack::Pop();
-    reinterpret_cast<CMceVideoStream*>( 
-            iVideoInSession->Streams()[ 1 ] )->BindL( boundVideoOut );
-    CleanupStack::Pop( boundVideoOut );
+    // One outgoing video stream, succeeds
     CMceVideoStream* videoStream = MusEngMceUtils::GetVideoOutStreamL( 
-                                                    *iVideoInSession );
-    EUNIT_ASSERT( videoStream )
-    EUNIT_ASSERT( videoStream->Type() == KMceVideo )
-    EUNIT_ASSERT( videoStream->Sinks().Count() == 1 ) // Rtp
-    EUNIT_ASSERT( videoStream->Sinks()[0]->Type() == KMceRTPSink )
-
-    // One outgoing video stream, succeeds
-    videoStream = MusEngMceUtils::GetVideoOutStreamL( *iVideoOutSession );
+                                                        *iVideoOutSession );
     EUNIT_ASSERT( videoStream )
     EUNIT_ASSERT( videoStream->Type() == KMceVideo )
     EUNIT_ASSERT( videoStream->Sinks().Count() == 2 ) // Rtp, Display
     EUNIT_ASSERT( videoStream->Sinks()[0]->Type() == KMceRTPSink )
     EUNIT_ASSERT( videoStream->Sinks()[1]->Type() == KMceDisplaySink )
-        
+    
     // Add another stream
     CMceVideoStream* videoOut = CMceVideoStream::NewLC();
     
@@ -392,7 +306,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetVideoInStreamLL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetVideoInStreamLL()
     {
     // No streams, must fail
     EUNIT_ASSERT_SPECIFIC_LEAVE( 
@@ -448,7 +362,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetRecordingStreamL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetRecordingStreamL()
     {
     CMceVideoStream* recordingStream = 
                         MusEngMceUtils::GetRecordingStream( *iVideoInSession );
@@ -478,7 +392,7 @@
 // From stream
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetMediaSinkFromStreamL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetMediaSinkL()
     {    
     CMceMediaSink* sink = MusEngMceUtils::GetMediaSink( 
                                             *(iVideoInSession->Streams()[0]), 
@@ -498,7 +412,7 @@
 // From stream
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetMediaSinkLFromStreamL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetMediaSinkLL()
     {                                                      
     CMceMediaSink* sink = NULL;
     EUNIT_ASSERT_SPECIFIC_LEAVE(
@@ -516,7 +430,7 @@
 // From session
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetMediaSinkFromSessionL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetMediaSink2L()
     {
     CMceMediaSink* sink = MusEngMceUtils::GetMediaSink( *iEmptySession, 
                                                         KMceRTPSink );
@@ -533,7 +447,7 @@
 // From session
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetMediaSinkLFromSessionL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetMediaSinkL2L()
     {
     CMceMediaSink* sink = NULL;
     EUNIT_ASSERT_SPECIFIC_LEAVE( MusEngMceUtils::GetMediaSinkL( *iEmptySession, 
@@ -549,7 +463,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetCameraLL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetCameraLL()
     {
     // empty session fails
     EUNIT_ASSERT_SPECIFIC_LEAVE( MusEngMceUtils::GetCameraL( *iEmptySession ),
@@ -583,7 +497,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetFileSourceLL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetFileSourceLL()
     {
     // empty session fails
     EUNIT_ASSERT_SPECIFIC_LEAVE( 
@@ -624,7 +538,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetDisplayL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetDisplayL()
     {
     CMceDisplaySink* display = MusEngMceUtils::GetDisplay( *iEmptySession );
     
@@ -641,7 +555,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_GetDisplayLL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_GetDisplayLL()
     {
     CMceDisplaySink* display = NULL;
     
@@ -659,7 +573,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_AddDisplayLL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_AddDisplayLL()
     {
    
     TRect rect( 110, 111, 112, 113 );
@@ -703,14 +617,6 @@
     EUNIT_ASSERT_EQUALS( display->DisplayRectL(), newRect );
     
     CleanupStack::PopAndDestroy( videoStream );
-    
-    // Add disabled display
-    CMceVideoStream* videoStream2 = CMceVideoStream::NewLC();
-    MusEngMceUtils::AddDisplayL( *videoStream2, *iManager, rect, ETrue );
-    EUNIT_ASSERT_EQUALS( videoStream2->Sinks().Count(), 1 )
-    EUNIT_ASSERT_EQUALS( videoStream2->Sinks()[0]->Type(), KMceDisplaySink )
-    EUNIT_ASSERT( !videoStream2->Sinks()[0]->IsEnabled() );
-    CleanupStack::PopAndDestroy( videoStream2 );
     }
 
 
@@ -718,7 +624,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_AddSpeakerLL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_AddSpeakerLL()
     {
     // Check that speaker cannot be added to video stream
     
@@ -760,7 +666,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_MusEngMceUtils::UT_DisableStreamLL()
+void UT_MusEngMceUtils::UT_MusEngMceUtils_DisableStreamLL()
     {
     CMceAudioStream* audioStream = CMceAudioStream::NewLC();
 
@@ -801,72 +707,8 @@
     CleanupStack::PopAndDestroy( audioStream );
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_MusEngMceUtils::UT_GetReceivingDisplayL()
-    {
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iEmptySession );
-    
-    EUNIT_ASSERT( !display )
-    
-    display = MusEngMceUtils::GetReceivingDisplay( *iVideoOutSession );
-    
-    EUNIT_ASSERT( display )
-    EUNIT_ASSERT( display->Type() == KMceDisplaySink )
-    EUNIT_ASSERT( display == iReceivingDisplay )
-    }  
 
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_MusEngMceUtils::UT_GetReceivingDisplayLL()
-    {
-    CMceDisplaySink* display = NULL;
-    
-    EUNIT_ASSERT_SPECIFIC_LEAVE( MusEngMceUtils::GetReceivingDisplayL( *iEmptySession ),
-                                 KErrNotFound )
-    
-    display = MusEngMceUtils::GetReceivingDisplayL( *iVideoOutSession );
-    
-    EUNIT_ASSERT( display )
-    EUNIT_ASSERT( display->Type() == KMceDisplaySink )
-    EUNIT_ASSERT( display == iReceivingDisplay )
-    }  
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_MusEngMceUtils::UT_GetVfDisplayL()
-    {
-    CMceDisplaySink* display = MusEngMceUtils::GetVfDisplay( *iEmptySession );
-    
-    EUNIT_ASSERT( !display )
-    
-    display = MusEngMceUtils::GetVfDisplay( *iVideoOutSession );
-    
-    EUNIT_ASSERT( display )
-    EUNIT_ASSERT( display->Type() == KMceDisplaySink )
-    EUNIT_ASSERT( display != iReceivingDisplay )
-    } 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_MusEngMceUtils::UT_EnableInactivityTimerL()
-    {
-    // Instream not found, nothing is done
-    EUNIT_ASSERT_EQUALS( MusEngMceUtils::EnableInactivityTimer( *iEmptySession, 1000 ), KErrNotFound );
-
-    // In stream found
-    EUNIT_ASSERT_EQUALS( MusEngMceUtils::EnableInactivityTimer( *iVideoOutSession, 1000 ), KErrNone );
-    } 
-
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE(
@@ -879,147 +721,113 @@
     "MusEngMceUtils",
     "IsVideoInStream",
     "FUNCTIONALITY",
-    SetupL, UT_IsVideoInStreamL, Teardown)
+    SetupL, UT_MusEngMceUtils_IsVideoInStreamL, Teardown)
 
 EUNIT_TEST(
-    "IsVideoOutStream - test ",
-    "MusEngMceUtils",
-    "IsVideoOutStream",
-    "FUNCTIONALITY",
-    SetupL, UT_IsVideoOutStreamL, Teardown)
-    
-EUNIT_TEST(
     "IsAudioInStream - test ",
     "MusEngMceUtils",
     "IsAudioInStream",
     "FUNCTIONALITY",
-    SetupL, UT_IsAudioInStreamL, Teardown)
+    SetupL, UT_MusEngMceUtils_IsAudioInStreamL, Teardown)
 
 EUNIT_TEST(
     "GetVideoOutStreamL - test ",
     "MusEngMceUtils",
     "GetVideoOutStreamL",
     "FUNCTIONALITY",
-    SetupL, UT_GetVideoOutStreamLL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetVideoOutStreamLL, Teardown)
 
 EUNIT_TEST(
     "GetVideoInStreamL - test ",
     "MusEngMceUtils",
     "GetVideoInStreamL",
     "FUNCTIONALITY",
-    SetupL, UT_GetVideoInStreamLL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetVideoInStreamLL, Teardown)
 
 EUNIT_TEST(
     "GetRecordingStream - test ",
     "MusEngMceUtils",
     "GetRecordingStream",
     "FUNCTIONALITY",
-    SetupL, UT_GetRecordingStreamL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetRecordingStreamL, Teardown)
 
 EUNIT_TEST(
     "GetMediaSink - test ",
     "MusEngMceUtils",
     "GetMediaSink",
     "FUNCTIONALITY",
-    SetupL, UT_GetMediaSinkFromStreamL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetMediaSinkL, Teardown)
 
 EUNIT_TEST(
     "GetMediaSinkL - test ",
     "MusEngMceUtils",
     "GetMediaSinkL",
     "FUNCTIONALITY",
-    SetupL, UT_GetMediaSinkLFromStreamL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetMediaSinkLL, Teardown)
 
 EUNIT_TEST(
     "GetMediaSink2 - test ",
     "MusEngMceUtils",
     "GetMediaSink2",
     "FUNCTIONALITY",
-    SetupL, UT_GetMediaSinkFromSessionL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetMediaSink2L, Teardown)
 
 EUNIT_TEST(
     "GetMediaSinkL2 - test ",
     "MusEngMceUtils",
     "GetMediaSinkL2",
     "FUNCTIONALITY",
-    SetupL, UT_GetMediaSinkLFromSessionL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetMediaSinkL2L, Teardown)
 
 EUNIT_TEST(
     "GetCameraL - test ",
     "MusEngMceUtils",
     "GetCameraL",
     "FUNCTIONALITY",
-    SetupL, UT_GetCameraLL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetCameraLL, Teardown)
 
 EUNIT_TEST(
     "GetFileSourceL - test ",
     "MusEngMceUtils",
     "GetFileSourceL",
     "FUNCTIONALITY",
-    SetupL, UT_GetFileSourceLL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetFileSourceLL, Teardown)
 
 EUNIT_TEST(
     "GetDisplay - test ",
     "MusEngMceUtils",
     "GetDisplay",
     "FUNCTIONALITY",
-    SetupL, UT_GetDisplayL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetDisplayL, Teardown)
 
 EUNIT_TEST(
     "GetDisplayL - test ",
     "MusEngMceUtils",
     "GetDisplayL",
     "FUNCTIONALITY",
-    SetupL, UT_GetDisplayLL, Teardown)
+    SetupL, UT_MusEngMceUtils_GetDisplayLL, Teardown)
 
 EUNIT_TEST(
     "AddDisplayL - test ",
     "MusEngMceUtils",
     "AddDisplayL",
     "FUNCTIONALITY",
-    SetupL, UT_AddDisplayLL, Teardown)
+    SetupL, UT_MusEngMceUtils_AddDisplayLL, Teardown)
 
 EUNIT_TEST(
     "AddSpeakerL - test ",
     "MusEngMceUtils",
     "AddSpeakerL",
     "FUNCTIONALITY",
-    SetupL, UT_AddSpeakerLL, Teardown)    
+    SetupL, UT_MusEngMceUtils_AddSpeakerLL, Teardown)    
 
 EUNIT_TEST(
     "DisableStreamL - test ",
     "MusEngMceUtils",
     "DisableStreamL",
     "FUNCTIONALITY",
-    SetupL, UT_DisableStreamLL, Teardown)        
-
-EUNIT_TEST(
-    "GetReceivingDisplay - test ",
-    "MusEngMceUtils",
-    "GetReceivingDisplay",
-    "FUNCTIONALITY",
-    Setup2L, UT_GetReceivingDisplayL, Teardown)
+    SetupL, UT_MusEngMceUtils_DisableStreamLL, Teardown)        
 
-EUNIT_TEST(
-    "GetReceivingDisplayL - test ",
-    "MusEngMceUtils",
-    "GetReceivingDisplayL",
-    "FUNCTIONALITY",
-    Setup2L, UT_GetReceivingDisplayLL, Teardown)
-    
-EUNIT_TEST(
-    "GetVfDisplay - test ",
-    "MusEngMceUtils",
-    "GetVfDisplay",
-    "FUNCTIONALITY",
-    Setup2L, UT_GetVfDisplayL, Teardown)
-
-EUNIT_TEST(
-    "EnableInactivityTimer - test ",
-    "MusEngMceUtils",
-    "EnableInactivityTimer",
-    "FUNCTIONALITY",
-    Setup2L, UT_EnableInactivityTimerL, Teardown)
     
 EUNIT_END_TEST_TABLE
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengorientationhandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,217 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+//  INTERNAL INCLUDES
+#include "ut_musengorientationhandler.h"
+#include "musengorientationhandler.h"
+#include "musengstubs.h"
+#include "musengtestdefs.h"
+#include "musenglivesession.h"
+#include "musengmceutils.h"
+#include <mcecamerasource.h>
+#include <mcedisplaysink.h>
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/eunitmacros.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusEngOrientationHandler* UT_CMusEngOrientationHandler::NewL()
+    {
+    UT_CMusEngOrientationHandler* self = UT_CMusEngOrientationHandler::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusEngOrientationHandler* UT_CMusEngOrientationHandler::NewLC()
+    {
+    UT_CMusEngOrientationHandler* self = new( ELeave ) UT_CMusEngOrientationHandler();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusEngOrientationHandler::~UT_CMusEngOrientationHandler()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Default constructor
+// -----------------------------------------------------------------------------
+//
+UT_CMusEngOrientationHandler::UT_CMusEngOrientationHandler()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase construct
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngOrientationHandler::ConstructL()
+    {
+    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
+    // It generates the test case table.
+    CEUnitTestSuiteClass::ConstructL();
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngOrientationHandler::SetupL()
+    {
+    iObserver = new( ELeave ) CMusEngObserverStub;
+    
+    iLiveSession = CMusEngLiveSession::NewL( TRect(0, 0, 100, 100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );   
+
+    iLiveSession->iOperatorVariant = EFalse;
+    
+    iHandler = CMusEngOrientationHandler::NewL( *iLiveSession, *iObserver );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngOrientationHandler::Teardown()
+    {
+    delete iHandler;
+    delete iLiveSession;
+    delete iObserver;
+    }
+
+
+
+// TEST CASES
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngOrientationHandler::UT_NewLL()
+    {
+    EUNIT_ASSERT( iHandler );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngOrientationHandler::UT_RefreshOrientationL()
+    { 
+    ESTABLISH_OUT_SESSION( iLiveSession )
+        
+    // Refresh when both camera and display are enabled
+    CMceCameraSource* camera = 
+        MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) );
+    camera->iIsEnabled = ETrue;
+    CMceDisplaySink* display = 
+        MusEngMceUtils::GetDisplayL( *(iLiveSession->iSession) );
+    display->iIsEnabled = ETrue;
+    EUNIT_ASSERT( !iHandler->IsActive() );
+    iHandler->RefreshOrientationL();
+    EUNIT_ASSERT( iHandler->IsActive() );
+    EUNIT_ASSERT( !camera->iIsEnabled );
+    EUNIT_ASSERT( !display->iIsEnabled );
+    iHandler->Cancel();
+    iHandler->RunL(); // Simulate completion
+    EUNIT_ASSERT( !iHandler->IsActive() );
+    EUNIT_ASSERT( camera->iIsEnabled );
+    EUNIT_ASSERT( display->iIsEnabled );
+       
+    // Refresh when camera is disabled, display disabled
+    camera->iIsEnabled = EFalse;
+    display->iIsEnabled = ETrue;
+    iHandler->RefreshOrientationL();
+    EUNIT_ASSERT( iHandler->IsActive() );
+    EUNIT_ASSERT( !camera->iIsEnabled );
+    EUNIT_ASSERT( !display->iIsEnabled );
+    iHandler->Cancel();
+    iHandler->RunL(); // Simulate completion
+    EUNIT_ASSERT( !iHandler->IsActive() );
+    EUNIT_ASSERT( !camera->iIsEnabled );
+    EUNIT_ASSERT( display->iIsEnabled );
+    
+    // Display and camera gets resumed while delayed orientation handling is ongoing, pausing
+    // display after handling completes should not happen
+    camera->iIsEnabled = ETrue;
+    display->iIsEnabled = EFalse;
+    iHandler->RefreshOrientationL();
+    EUNIT_ASSERT( iHandler->IsActive() );
+    EUNIT_ASSERT( !camera->iIsEnabled );
+    EUNIT_ASSERT( !display->iIsEnabled );
+    display->iIsEnabled = ETrue;
+    camera->iIsEnabled = ETrue;
+    iHandler->UpdateL();
+    iHandler->Cancel();
+    iHandler->RunL(); // Simulate completion
+    EUNIT_ASSERT( !iHandler->IsActive() );
+    EUNIT_ASSERT( camera->iIsEnabled );
+    EUNIT_ASSERT( display->iIsEnabled );     
+    }
+
+
+//  TEST TABLE
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusEngOrientationHandler,
+    "UT_CMusEngLiveSesssion",
+    "UNIT" )
+
+EUNIT_TEST(
+    "NewL - test ",
+    "CMusEngOrienationHandler",
+    "NewL",
+    "FUNCTIONALITY",
+    SetupL, UT_NewLL, Teardown)
+    
+EUNIT_TEST(
+    "UT_RefreshOrientationL - test ",
+    "CMusEngOrienationHandler",
+    "NewL",
+    "FUNCTIONALITY",
+    SetupL, UT_RefreshOrientationL, Teardown)
+      
+EUNIT_END_TEST_TABLE
+
+//  END OF FILE
+
+
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengoutsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengoutsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -20,16 +20,15 @@
 #include "ut_musengoutsession.h"
 #include "musengstubs.h"
 #include "musengtestdefs.h"
-#include "sipprofile.h"
+
 #include "musenglivesession.h"
 #include "musengclipsession.h"
 #include "mussipprofilehandler.h"
-#include "mussessionproperties.h"
-#include "contactenginestub.h"
+
 
 //  SYSTEM INCLUDES
-#include <lcsourcefilecontrol.h>
 #include <digia/eunit/eunitmacros.h>
+
 #include <mceoutsession.h>
 #include <mcestreambundle.h>
 #include <mceaudiostream.h>
@@ -39,15 +38,13 @@
 #include <mceh263codec.h>
 #include <mceavccodec.h>
 #include <mceaudiocodec.h>
-#include <mcecamerasource.h>
 
-
+#include <sipprofile.h>
 #include <sipstrings.h>
 
 #include <audiopreference.h>
 #include <uri8.h>
 
-_LIT( KTestContactName, "nokia" );
 
 // -----------------------------------------------------------------------------
 //
@@ -112,25 +109,17 @@
 //
 void UT_CMusEngOutSession::SetupL()
     {
-    
-    PropertyHelper::SetErrorCode( KErrNone );
-    
-    iLcSessionObserver = new( ELeave )CLcSessionObserverStub;
-    iLcUiProvider = new( ELeave )CLcUiProviderStub;
-    iAudioRoutingObserver = new( ELeave )CMusEngObserverStub;
-    // Name is published using publish/subscribe key by Availblity
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KContactName,
-                                        KTestContactName ) );
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-
+    iObserver = new( ELeave ) CMusEngObserverStub;
+    iLiveSession = CMusEngLiveSession::NewL( KNullDesC(),
+                                             TRect(0,0, 100,100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );
     SIPStrings::OpenL();
     
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        KTestRecipientSipUri ) );
+    iLiveSession->iPrivate = EFalse;
+    iLiveSession->iPrivateNumber = EFalse;
+    
     }
 
 
@@ -142,28 +131,26 @@
     {
     SIPStrings::Close();
     delete iLiveSession;
-    delete iLcSessionObserver;
-    delete iLcUiProvider;
-    delete iAudioRoutingObserver;
-    PropertyHelper::SetErrorCode( KErrNone );
-    PropertyHelper::Close();
+    delete iObserver;
     }
 
 
+
 // TEST CASES
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngOutSession::UT_EstablishLcSessionL()
+void UT_CMusEngOutSession::UT_CMusEngOutSession_InviteLL()
     {
+
     // Initial state
     EUNIT_ASSERT( !iLiveSession->iSession );
     
-    ///////////////////////////////////////////////////////////////////////////
-    // 1. Simulate failing session structure construction.
-    iLiveSession->EstablishLcSessionL();
+    // Simulate failing session structure construction.
+    iLiveSession->InviteL( KTestRecipientSipUri );
     
     iLiveSession->iSession->iState = CMceSession::EIdle;
     delete iLiveSession->iSession->Streams()[0];
@@ -171,13 +158,11 @@
                                             iLiveSession->iSession->Streams();
     const_cast<RPointerArray<CMceMediaStream>&>(constStreams)[0] = NULL;
 
-    ///////////////////////////////////////////////////////////////////////////
-    // 2. Normal invite
-    iLiveSession->EstablishLcSessionL();
+    // Normal invite
+    iLiveSession->InviteL( KTestRecipientSipUri );
     
     EUNIT_ASSERT( iLiveSession->iSession );
     // Next assertion ensures that session structure is new
-    EUNIT_ASSERT( iLiveSession->iSession->Streams().Count() > 0 );   
     EUNIT_ASSERT( iLiveSession->iSession->Streams()[0] ); 
     EUNIT_ASSERT( *(iLiveSession->iRecipient) == KTestRecipientSipUri8() );
     EUNIT_ASSERT( iLiveSession->iSession->State() == CMceSession::EOffering );
@@ -192,20 +177,15 @@
     EUNIT_ASSERT( iLiveSession->iSession->iSessionSDPLines->Count() == 1 );
     EUNIT_ASSERT( iLiveSession->iSession->iSessionSDPLines->MdcaPoint( 0 ) ==
                   KMusEngSessionSdpLineXApplication() );
-        
-    // Ensure there is no SDP lines at media level
-    MDesC8Array* mediaSdpLines = 
-        iLiveSession->iSession->Streams()[0]->iMediaSDPLines;
-    EUNIT_ASSERT( mediaSdpLines );
-    EUNIT_ASSERT( mediaSdpLines->MdcaCount() == 0 );
-
-    ///////////////////////////////////////////////////////////////////////////
-    // 3. Normal operator invite
+    
+    // Normal operator invite
     delete iLiveSession;
     iLiveSession = NULL;
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
+    iLiveSession = CMusEngLiveSession::NewL( KNullDesC,
+                                             TRect(0,0, 100,100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );
    	iLiveSession->iOperatorVariant = ETrue;
    	CSIPProfile* profile = iLiveSession->iSipProfileHandler->Profile();
     delete profile->iArray;
@@ -213,10 +193,11 @@
     profile->iArray = new ( ELeave ) CDesC8ArrayFlat( 1 );
     profile->iArray->AppendL( KMusTestUri );
 
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri );
     
     EUNIT_ASSERT( iLiveSession->iSession );
     // Next assertion ensures that session structure is new
+    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0] ); 
     EUNIT_ASSERT( *(iLiveSession->iRecipient) == KTestRecipientSipUri8() );
     EUNIT_ASSERT( iLiveSession->iSession->State() == CMceSession::EOffering );
     
@@ -230,8 +211,6 @@
     EUNIT_ASSERT( iLiveSession->iSession->iHeaders->MdcaPoint( 2 ) ==
                   KMusPPreferredIdentityTestHeader() );
     
-    // Ensure there is only a=type and a=application attributes (and no b=TIAS)
-    // at session level for operator variant
     EUNIT_ASSERT( iLiveSession->iSession->iSessionSDPLines );
     EUNIT_ASSERT( iLiveSession->iSession->iSessionSDPLines->Count() == 2 );
     EUNIT_ASSERT( iLiveSession->iSession->iSessionSDPLines->MdcaPoint( 0 ) ==
@@ -240,223 +219,77 @@
                   KMusEngSessionSdpLineType() )
                   
     EUNIT_ASSERT( iLiveSession->iSession->Streams().Count() > 0 );   
-    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0] ); 
-    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Type() == KMceVideo );
-
-    // Ensure there is only b=AS and no b=TIAS present at media level
-    // for operator variant
-    mediaSdpLines = iLiveSession->iSession->Streams()[0]->iMediaSDPLines;
-    EUNIT_ASSERT( mediaSdpLines );
-    EUNIT_ASSERT( mediaSdpLines->MdcaCount() == 1 );
-    EUNIT_ASSERT( mediaSdpLines->MdcaPoint( 0 ) == 
-                  KMusEngSessionSdpLineBandwidthField() );
-    
-    ///////////////////////////////////////////////////////////////////////////
-    // 4. Try invite again, must fail
-    TRAPD( error, iLiveSession->EstablishLcSessionL() );
+    TBool foundBandwidthLineFromMediaLevel( EFalse );
+    for ( TInt i = 0; i <  iLiveSession->iSession->Streams().Count(); i++ )
+        {
+        if ( iLiveSession->iSession->Streams()[0]->Type() == KMceVideo )
+            {
+            if ( iLiveSession->iSession->Streams()[0]->iMediaSDPLines->MdcaCount() > 0 &&
+                 iLiveSession->iSession->Streams()[0]->iMediaSDPLines->MdcaPoint( 0 ) ==
+                    KMusEngSessionSdpLineBandwidthField() )
+                {
+                foundBandwidthLineFromMediaLevel = ETrue;
+                }
+            }
+        }
+    EUNIT_ASSERT( foundBandwidthLineFromMediaLevel );
+                      
+    // Try invite again, must fail
+    TRAPD( error, iLiveSession->InviteL( KTestRecipientSipUri ) );
     MUS_TEST_FORWARD_ALLOC_FAILURE( error );
     EUNIT_ASSERT( error == KErrAlreadyExists );
     
-    // 5. Simulate normal session ending, no need for observer call in this case
+    // Simulate normal session ending, no need for observer call in this case
     iLiveSession->iSession->iState = CMceSession::ETerminated;
     
     // Try again. Establishment must be OK with new MceSession object
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri );
     EUNIT_ASSERT( iLiveSession->iSession->State() == CMceSession::EOffering );
+
+      
     }
     
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngOutSession::UT_EstablishLcSession_RecipientResolvingL()
-    {   
-    // Manual query from user, 
-    // the user cancels the query (MLcUiProvider::Query returns EFalse)
-    PropertyHelper::SetErrorCode( KErrNotFound );
-    TRAPD( err, iLiveSession->EstablishLcSessionL() )
-    if ( err == KErrNoMemory )
-        {
-        User::Leave( err );
-        }
-    EUNIT_ASSERT_EQUALS( KErrCancel, err )        
- 
-    // Manual query from user succeeds
-    iLcSessionObserver->Reset();
-    iLcUiProvider->Reset();        
-    delete iLiveSession;
-    iLiveSession = NULL;
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    iLcUiProvider->iSimulatedReturnValue = ETrue;
-    iLcUiProvider->iRecipient.Set( KTestRecipient2SipUri );
-    PropertyHelper::SetErrorCode( KErrNotFound );
-    iLiveSession->EstablishLcSessionL();
-    EUNIT_ASSERT_EQUALS( 1, iLiveSession->iTriedInvitations )
-    EUNIT_ASSERT_EQUALS( 
-        TInt( CLcUiProviderStub::EInputRecipient ),
-        iLcUiProvider->iCalledFunction )
-    EUNIT_ASSERT_EQUALS( 
-        KTestRecipient2SipUri8(), 
-        *( iLiveSession->iRecipient ) )        
-    EUNIT_ASSERT_EQUALS( KTestRecipient2SipUri(),iLiveSession->RemoteDisplayName() )  
-
-    // Multiple resolved recipients
-    iLcSessionObserver->Reset();
-    iLcUiProvider->Reset();
-    iLcUiProvider->iSimulatedReturnValue = ETrue;
-    PropertyHelper::SetErrorCode( KErrNone );
-    TBuf<200> multipleAddr;
-    multipleAddr.Append( KTestRecipient2SipUri );
-    multipleAddr.Append( _L(",") );
-    multipleAddr.Append( KTestRecipientSipUri );
-    
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        multipleAddr ) );
-    delete iLiveSession;
-    iLiveSession = NULL;
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    iLiveSession->EstablishLcSessionL();
-        
-    EUNIT_ASSERT_EQUALS( 0, iLiveSession->iTriedInvitations )
-    EUNIT_ASSERT_EQUALS( 
-        TInt( CLcUiProviderStub::ESelectRecipient ),
-        iLcUiProvider->iCalledFunction )
-    // Stub selected first one from multiple addresses list
-    EUNIT_ASSERT_EQUALS( 
-        KTestRecipient2SipUri8(), 
-        *( iLiveSession->iRecipient ) )    
-       
-    // Multiple resolved recipient, user doesn't select any
-    iLcSessionObserver->Reset();
-    iLcUiProvider->Reset();
-    delete iLiveSession;
-    iLiveSession = NULL;
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    TRAP( err, iLiveSession->EstablishLcSessionL() );
-    if ( err == KErrNoMemory )
-        {
-        User::Leave( err );
-        }
-    EUNIT_ASSERT_EQUALS( KErrNotFound, err )   
-    EUNIT_ASSERT_EQUALS( 0, iLiveSession->iTriedInvitations )
-    EUNIT_ASSERT_EQUALS( 
-        TInt( CLcUiProviderStub::ESelectRecipient ),
-        iLcUiProvider->iCalledFunction )
-    
-    // Malformed multiple addresses, selection fails, manual entry is launched
-    iLcSessionObserver->Reset();
-    iLcUiProvider->Reset();
-    iLcUiProvider->iSimulatedReturnValue = ETrue;
-    iLcUiProvider->iRecipient.Set( KTestRecipient2SipUri );
-    PropertyHelper::SetErrorCode( KErrNone );
-    multipleAddr.Copy( _L(",") );
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        multipleAddr ) );
-    delete iLiveSession;
-    iLiveSession = NULL;
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    TRAP( err, iLiveSession->EstablishLcSessionL() );
-    if ( err == KErrNoMemory )
-       {
-       User::Leave( err );
-       }
-    EUNIT_ASSERT_EQUALS( 
-        TInt( CLcUiProviderStub::EInputRecipient ),
-        iLcUiProvider->iCalledFunction )    
-    EUNIT_ASSERT_EQUALS( KErrNone, err );
-    EUNIT_ASSERT_EQUALS( 1, iLiveSession->iTriedInvitations )
-    EUNIT_ASSERT_EQUALS( 
-        KTestRecipient2SipUri8(), 
-        *( iLiveSession->iRecipient ) )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngOutSession::UT_EstablishLcSession_RegistrationPendingL()
-    {
-    // Set registration as pending
-    iLiveSession->iSipProfileHandler->Profile()->iTBoolValue = EFalse;
-    
-    iLiveSession->EstablishLcSessionL();
-    EUNIT_ASSERT( !iLiveSession->iSession )
-    EUNIT_ASSERT( iLiveSession->iRegistrationPending )
-    
-    // Fake registration, session starts
-    iLiveSession->iSipProfileHandler->Profile()->iTBoolValue = ETrue;
-    iLiveSession->ProfileRegistered();
-    
-    if ( iLcSessionObserver->iCalledFunction == CLcSessionObserverStub::ESessionFailed )
-        {
-        // Session didn't start because of running out of memory
-        User::Leave( KErrNoMemory );
-        }
-    
-    iLiveSession->iDeltaTimer->Remove( iLiveSession->iInvitationResponseEntry );
-    CMusEngMceOutSession::InvitationResponseTimerExpired( iLiveSession );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ENoAnswer ) )    
-    iLcSessionObserver->Reset();
-    
-    EUNIT_ASSERT( iLiveSession->iSession )
-    EUNIT_ASSERT_EQUALS( iLiveSession->iSession->State(), 
-                         CMceSession::EOffering )
-    EUNIT_ASSERT( !iLiveSession->iRegistrationPending )    
-    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //    
-void UT_CMusEngOutSession::UT_TerminateLcSessionL()
+void UT_CMusEngOutSession::UT_CMusEngOutSession_CancelInviteLL()
     {
-    // No MCE session
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iLiveSession->TerminateLcSessionL(), KErrNotReady )
+    // Try to cancel, must fail
+    TRAPD( error, iLiveSession->CancelInviteL() );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // Invite
+    iLiveSession->InviteL( KTestRecipientSipUri );
+    EUNIT_ASSERT( iLiveSession->iSession->State() == CMceSession::EOffering );
+    
+    // Cancel
+    iLiveSession->CancelInviteL();
+    EUNIT_ASSERT( iLiveSession->iSession->State() == CMceSession::ECancelling );
+    
+    // Try to cancel again, does nothing
+    iLiveSession->CancelInviteL();
+    EUNIT_ASSERT( iLiveSession->iSession->State() == CMceSession::ECancelling );
+    }
 
-    // Cancel a session that is in offering state
-    iLiveSession->EstablishLcSessionL();
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::EOffering ),
-                         TInt( iLiveSession->iSession->iState ) )
-    iLiveSession->TerminateLcSessionL();
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::ECancelling ),
-                         TInt( iLiveSession->iSession->iState ) )
-    
-    // Terminate an established session
-    iLiveSession->iSession->iState = CMceSession::ETerminated;
-    iLiveSession->EstablishLcSessionL();
-    iLiveSession->iSession->iState = CMceSession::EEstablished;
-    iLiveSession->TerminateLcSessionL();
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::ETerminating ),
-                         TInt( iLiveSession->iSession->iState ) )
-    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //  
-void UT_CMusEngOutSession::UT_EstablishSessionLL()
+void UT_CMusEngOutSession::UT_CMusEngOutSession_EstablishSessionLL()
     {
     // Try to establish, must fail, because of missing session
     TRAPD( error, iLiveSession->EstablishSessionL() );
     MUS_TEST_FORWARD_ALLOC_FAILURE( error );
     EUNIT_ASSERT( error == KErrNotReady );
+    iLiveSession->iPrivate = ETrue;
+    iLiveSession->iPrivateNumber = EFalse;
     
     // Call to CMusEngOutMceSession::InviteL leads to call to EstablishL
-    iLiveSession->EstablishLcSessionL();
+    iLiveSession->InviteL( KTestRecipientSipUri );
     
     // Check that ports are correct
     
@@ -482,205 +315,160 @@
     EUNIT_ASSERT( iLiveSession->iSession->iHeaders->MdcaPoint( 1 ) ==
                   KMusAcceptHeader() );   
     EUNIT_ASSERT( iLiveSession->iSession->State() == CMceSession::EOffering );
+    
+    // Privacy test : Check Private -header & originator
+    delete iLiveSession;
+    iLiveSession = NULL;
+    iLiveSession = CMusEngLiveSession::NewL( KNullDesC(),
+                                                TRect(0,0, 100,100),
+                                                *iObserver,
+                                                *iObserver,
+                                                *iObserver );
+    iLiveSession->iPrivate = ETrue;
+    iLiveSession->iPrivateNumber = ETrue;
+    
+    // Call to CMusEngOutMceSession::InviteL leads to call to EstablishL
+    iLiveSession->InviteL( KTestRecipientSipUri );
+    EUNIT_ASSERT( *iLiveSession->iSession->iOriginator == KMusAnonymousHeader );
+    
+    EUNIT_ASSERT( iLiveSession->iSession->iHeaders )
+    EUNIT_ASSERT( iLiveSession->iSession->iHeaders->Count() == 3 )
+    EUNIT_ASSERT( iLiveSession->iSession->iHeaders->MdcaPoint( 0 ) ==
+                  KMusEngAcceptContactHeader() )
+    EUNIT_ASSERT( iLiveSession->iSession->iHeaders->MdcaPoint( 1 ) ==
+                  KMusAcceptHeader() );   
+    EUNIT_ASSERT( iLiveSession->iSession->iHeaders->MdcaPoint( 2 ).Find( KMusPrivacyHeader() ) == 0 );
+    
+    
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //    
-void UT_CMusEngOutSession::UT_HandleTerminationL()
+void UT_CMusEngOutSession::UT_CMusEngOutSession_HandleTerminationL()
     {
-    // Try different values    
+
+    // Try different values
+    iLiveSession->HandleTermination( KSipStatusCode400BadRequest, 
+                                     KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionBadRequestCalled );
+    iObserver->Reset();
+    
+    iLiveSession->HandleTermination( KSipStatusCode401Unauthorized, 
+                                     KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionUnauthorizedCalled );
+    iObserver->Reset();
+    
+    iLiveSession->HandleTermination( KSipStatusCode402PaymentRequired, 
+                                     KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionPaymentRequiredCalled );
+    iObserver->Reset();
+    
+    iLiveSession->HandleTermination( KSipStatusCode404RecipientNotFound, 
+                                     KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionRecipientNotFoundCalled );
+    iObserver->Reset();
+    
+    iLiveSession->HandleTermination( KSipStatusCode416UnsupportedUriScheme, 
+                                     KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionRecipientNotFoundCalled );
+    iObserver->Reset();
+
+    iLiveSession->HandleTermination( KSipStatusCode479NotAbleToProcessURI, 
+                                     KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionRecipientNotFoundCalled );
+    iObserver->Reset();
+    
+    iLiveSession->HandleTermination( 
+                            KSipStatusCode407ProxyAuthenticationRequired, 
+                            KNullDesC8() );
+    EUNIT_ASSERT( iObserver->iSessionProxyAuthenticationRequiredCalled );
+    iObserver->Reset();
+    
     iLiveSession->HandleTermination( KSipStatusCode408ConnectionTimeOut, 
                                      KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ENoAnswer ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionRequestTimeOutCalled );
+    iObserver->Reset();
     
     iLiveSession->HandleTermination( KSipStatusCode415UnsupportedMediaType, 
                                      KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ESessionRejected ) ) 
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionUnsupportedMediaTypeCalled );
+    iObserver->Reset();
     
     iLiveSession->HandleTermination( KSipStatusCode488NotAcceptableHere, 
                                      KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ESessionRejected ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionUnsupportedMediaTypeCalled );
+    iObserver->Reset();
     
     iLiveSession->HandleTermination( KSipStatusCode606NotAcceptable, 
                                      KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ESessionRejected ) )
-    iLcSessionObserver->Reset(); 
+    EUNIT_ASSERT( iObserver->iSessionUnsupportedMediaTypeCalled );
+    iObserver->Reset(); 
     
     iLiveSession->HandleTermination( KSipStatusCode486BusyHere, 
                                      KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ERecipientBusy ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionBusyHereCalled );
+    iObserver->Reset();
     
     iLiveSession->HandleTermination( KSipStatusCode487RequestCancelled, 
                                      KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ESessionCancelled ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionRequestCancelledCalled );
+    iObserver->Reset();
     
     iLiveSession->HandleTermination( KSipStatusCode603Decline, KNullDesC8()  );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ESessionRejected ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionRejectedCalled );
+    iObserver->Reset();
 
     iLiveSession->HandleTermination( KSipStatusCode480TemporarilyNotAvailable, 
                                      KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ERecipientTemporarilyNotAvailable ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionTemporarilyNotAvailable );
+    iObserver->Reset();
     
     // Receive 486 with operator variant
     iLiveSession->iOperatorVariant = ETrue;
     iLiveSession->HandleTermination( KSipStatusCode486BusyHere, KNullDesC8()  );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ESessionRejected ) )    
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionRejectedCalled )
+    EUNIT_ASSERT( !iObserver->iSessionBusyHereCalled )
+    iObserver->Reset();
     iLiveSession->iOperatorVariant = EFalse;
     
     // Normal termination, let the base class handle
     iLiveSession->HandleTermination(  KSipStatusCode200OK, KNullDesC8()  );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionStateChanged ) )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iSessionTerminatedCalled ); // called by base class
+    iObserver->Reset();
+
     }    
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//    
-void UT_CMusEngOutSession::UT_HandleRecipientNotFoundTerminationL()
-    {
-    EUNIT_ASSERT_EQUALS( iLiveSession->iTriedInvitations, 0 );
-    
-    // Retry possible when 404 is received but fails because of recipient 
-    // proposal is missing for some reason, recipient not found callback
-    // is called instead of retry
-    delete iLiveSession->iRemoteSipAddressProposal;
-    iLiveSession->iRemoteSipAddressProposal = NULL;
-    iLcSessionObserver->Reset();
-    iLiveSession->HandleTermination( KSipStatusCode404RecipientNotFound, 
-                                     KNullDesC8() );
-    
-    EUNIT_ASSERT( iLiveSession->iDeltaTimer->IsActive() == ETrue )
-    iLiveSession->AsyncBrakeCompleted( iLiveSession );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ERecipientNotFound ) )
-    
-    // Retry possible when 404 is received
-    delete iLiveSession->iRemoteSipAddressProposal;
-    iLiveSession->iRemoteSipAddressProposal = NULL;
-    iLiveSession->iRemoteSipAddressProposal = KTestRecipient2SipUri().AllocL();
-    iLcSessionObserver->Reset();
-    iLcUiProvider->iRecipient.Set( KTestRecipient2SipUri );
-    iLcUiProvider->iSimulatedReturnValue = ETrue;
-    iLiveSession->HandleTermination( KSipStatusCode404RecipientNotFound, 
-                                     KNullDesC8() );
-       
-    EUNIT_ASSERT( iLiveSession->iDeltaTimer->IsActive() == ETrue );
-    iLiveSession->AsyncBrakeCompleted( iLiveSession );
-
-    // Memory running out might cause that retry is not done
-    if ( iLcSessionObserver->iCalledFunction == CLcSessionObserverStub::ESessionFailed )
-        {
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT_EQUALS( 1, iLiveSession->iTriedInvitations )    
-    EUNIT_ASSERT_EQUALS( 
-        KTestRecipient2SipUri8(), 
-        *( iLiveSession->iRecipient ) )
-    
-    // Retry not anymore possible when 404 received (e.g. manual address query
-    // was done for invite).
-    iLcSessionObserver->Reset();
-    iLiveSession->HandleTermination( KSipStatusCode404RecipientNotFound, 
-                                     KNullDesC8() );
-    EUNIT_ASSERT( iLiveSession->iDeltaTimer->IsActive() == ETrue )
-    iLiveSession->AsyncBrakeCompleted( iLiveSession );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ERecipientNotFound ) )
-    
-    // 416 has identical handling
-    iLcSessionObserver->Reset();
-    iLiveSession->HandleTermination( KSipStatusCode416UnsupportedUriScheme, 
-                                     KNullDesC8() );
-    EUNIT_ASSERT( iLiveSession->iDeltaTimer->IsActive() == ETrue );
-    iLiveSession->AsyncBrakeCompleted( iLiveSession );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ERecipientNotFound ) )
-   
-    // 479 has identical handling
-    iLcSessionObserver->Reset();
-    iLiveSession->HandleTermination( KSipStatusCode479NotAbleToProcessURI, 
-                                    KNullDesC8() );
-    EUNIT_ASSERT( iLiveSession->iDeltaTimer->IsActive() == ETrue );
-    iLiveSession->AsyncBrakeCompleted( iLiveSession );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError,
-                         TInt( MLcSession::ERecipientNotFound ) )
-    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //   
-void UT_CMusEngOutSession::UT_AdjustVideoCodecLL()
+void UT_CMusEngOutSession::UT_CMusEngOutSession_AdjustVideoCodecLL()
     {
     //H263
     CMceH263Codec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH2632000() );
-    iLiveSession->CMusEngMceOutSession::AdjustVideoCodecL( *codecH263,
-                                                           KMceCameraSource );
+    iLiveSession->CMusEngMceOutSession::AdjustVideoCodecL( *codecH263 );
     // Test payloadtype
     EUNIT_ASSERT( codecH263->iPayloadType == 96 )
     CleanupStack::PopAndDestroy( codecH263 );
     
     //H264
     CMceAvcCodec* codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    iLiveSession->CMusEngMceOutSession::AdjustVideoCodecL( *codecAvc,
-                                                           KMceCameraSource  );
+    iLiveSession->CMusEngMceOutSession::AdjustVideoCodecL( *codecAvc );
     // Test payloadtype
     EUNIT_ASSERT( codecAvc->iPayloadType == 98 )
     CleanupStack::PopAndDestroy( codecAvc );
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //   
-void UT_CMusEngOutSession::UT_AdjustAudioCodecLL()
+void UT_CMusEngOutSession::UT_CMusEngOutSession_AdjustAudioCodecLL()
     {
     CMceAudioCodec* codec = 
                 iLiveSession->iManager->SupportedAudioCodecs()[0]->CloneL();
@@ -699,11 +487,12 @@
     CleanupStack::PopAndDestroy( codec );
     }
         
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //   
-void UT_CMusEngOutSession::UT_CreateMceSessionStructureLL()
+void UT_CMusEngOutSession::UT_CMusEngOutSession_CreateMceSessionStructureLL()
     {
     // Test removal of QoS-lines
     
@@ -735,12 +524,14 @@
     
     EUNIT_ASSERT( iLiveSession->iSession->Bundles().Count() == 0 )
 
-    CMusEngClipSession* clipSession = CMusEngClipSession::NewL();
+    CMusEngClipSession* clipSession = CMusEngClipSession::NewL(
+                                                    TRect(0, 100, 200, 300 ),
+                                                    *iObserver,
+                                                    *iObserver,
+                                                    *iObserver );
     CleanupStack::PushL( clipSession );
-    clipSession->SetLcSessionObserver( iLcSessionObserver );
-    clipSession->SetLcUiProvider( iLcUiProvider );    
-    clipSession->LocalVideoPlayer()->LcSourceFileControl()->SetLcFileNameL(
-        KTestVideoFileName() );
+    
+    clipSession->SetClipL( KTestVideoFileName );
     
     clipSession->iRecipient = KTestRecipientSipUri8().AllocL();
     
@@ -760,230 +551,6 @@
     CleanupStack::PopAndDestroy( clipSession );
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//   
-void UT_CMusEngOutSession::UT_ConstructLL()
-    {
-    TUint32 profileid = 0;
-    CSIPProfile* profile = iLiveSession->iSipProfileHandler->Profile();
-    profile->GetParameter( KSIPProfileId, profileid );
-    //stub creates defaultprofile if profileid is zero
-    //stub does not care if the profileid is given or not
-    //profileid of new profile is always 1
-    EUNIT_ASSERT(profile->iIsDefaultProfile)
-
-    TInt error = NULL;
-    const TUint KSipProfileId2( 2 );
-    TRAP( error, RProperty::Set( NMusSessionApi::KCategoryUid,
-                                 NMusSessionApi::KSipProfileId,
-                                 KSipProfileId2 ) );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-    profile = NULL;
-    profileid = 0;
-    
-    SIPStrings::Close();
-    delete iLcSessionObserver;
-    iLcSessionObserver = NULL;
-    delete iLiveSession;
-    iLiveSession = NULL;
-        
-    iLcSessionObserver = new( ELeave )CLcSessionObserverStub;
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    
-    SIPStrings::OpenL();
-    
-    profile = iLiveSession->iSipProfileHandler->Profile();
-    profile->GetParameter( KSIPProfileId, profileid );
-    EUNIT_ASSERT( !profile->iIsDefaultProfile )
-    
-    
-    TRAP( error, RProperty::Delete( NMusSessionApi::KCategoryUid,
-                                     NMusSessionApi::KSipProfileId ) );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-    profile = NULL;
-    profileid = 0;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngOutSession::UT_ContactSavingLL()
-    {
-    ContactEngineStubHelper::Reset();
-    
-    // Saving of contact is done at destruction phase only if recipient
-    // has been queried from client
-    //
-    CMusEngLiveSession* liveSession = CMusEngLiveSession::NewL();
-    liveSession->SetLcSessionObserver( iLcSessionObserver );
-    liveSession->SetLcUiProvider( iLcUiProvider );    
-    delete liveSession;
-    liveSession = NULL;
-    EUNIT_ASSERT( ContactEngineStubHelper::GetCalledFunction() == EContactEngineStubNone );
-    
-    
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KContactId,
-                                        2 ) );
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KTelNumber,
-                                        _L("12341234") ) );
-    
-    liveSession = CMusEngLiveSession::NewL();
-    CleanupStack::PushL( liveSession );
-    liveSession->SetLcSessionObserver( iLcSessionObserver );
-    liveSession->SetLcUiProvider( iLcUiProvider );    
-    
-    delete liveSession->iRecipient;
-    liveSession->iRecipient = NULL;
-    liveSession->iRecipient = _L8("sip:yep@10.10.10.10").AllocL();
-    liveSession->iAddressQueried = ETrue;
-    CleanupStack::PopAndDestroy( liveSession );
-    if ( ContactEngineStubHelper::GetCalledFunction() != EContactEngineStubSetText )
-        {
-        // out-of-memory was trap ignored and saving failed because of that
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( ContactEngineStubHelper::GetCalledFunction() == EContactEngineStubSetText );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-void UT_CMusEngOutSession::UT_RemoteAddressLL()
-    {
-    delete iLiveSession->iRecipient;
-    iLiveSession->iRecipient = NULL;
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->RemoteAddressL(), KErrNotReady )
-    
-    iLiveSession->iRecipient = KTestRecipient2SipUri8().AllocL();
-    
-    HBufC* remoteAddr = iLiveSession->RemoteAddressL();
-    CleanupStack::PushL( remoteAddr );
-    EUNIT_ASSERT_EQUALS( KTestRecipient2SipUri(), *remoteAddr )
-    CleanupStack::PopAndDestroy( remoteAddr );
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngOutSession::UT_RemoteDisplayNameL()
-    {
-    // Test 1 : Default setting, contact name set
-    EUNIT_ASSERT_EQUALS ( KTestContactName(), iLiveSession->RemoteDisplayName() )    
-    
-    // Test 2 : Contact name set to null descriptor
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                       NMusSessionApi::KContactName,
-                                       KNullDesC) );
-    delete iLiveSession;
-    iLiveSession = NULL;
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    EUNIT_ASSERT( iLiveSession->RemoteDisplayName().Length() == 0 );
-    
-    // Test 3 : Manual address entered
-    PropertyHelper::SetErrorCode( KErrNone );
-    delete iLiveSession;
-    iLiveSession = NULL;
-    iLcSessionObserver->Reset();
-    iLcUiProvider->Reset();
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KContactName,
-                                        KTestContactName ) );    
-    iLcUiProvider->iSimulatedReturnValue = ETrue;
-    iLcUiProvider->iRecipient.Set( KTestRecipientSipUri );
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    PropertyHelper::SetErrorCode( KErrNotFound );
-    iLiveSession->EstablishLcSessionL();    
-    EUNIT_ASSERT_EQUALS( 1, iLiveSession->iTriedInvitations )
-    EUNIT_ASSERT_EQUALS( KTestRecipientSipUri(),iLiveSession->RemoteDisplayName() )
-    
-    // Test 4 : Contact name has zero lenth and multiple address entry query. 
-    //          Displayname should have user selected address.
-    //          Rare scenario.
-    PropertyHelper::SetErrorCode( KErrNone );
-    iLcSessionObserver->Reset();
-    iLcUiProvider->Reset();
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KContactName,
-                                        KNullDesC) );
-    delete iLiveSession;
-    iLiveSession = NULL;    
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    iLcUiProvider->iSimulatedReturnValue = ETrue;    
-    PropertyHelper::SetErrorCode( KErrNone );
-    TBuf<200> multipleAddr;
-    multipleAddr.Append( KTestRecipientTelUri );
-    multipleAddr.Append( _L(",") );
-    multipleAddr.Append( KTestRecipientSipUri );
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        multipleAddr ) );
-    iLiveSession->EstablishLcSessionL();    
-    /* Stub selects the first one automatically */
-    EUNIT_ASSERT_EQUALS( KTestRecipientTelUri(),iLiveSession->RemoteDisplayName() );
-    
-    // Test 5 : Contact name has zero lenth and no manual entry queried. 
-    //          Recipient has only teluri. So displayname should have tel uri address.
-    PropertyHelper::SetErrorCode( KErrNone );
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KContactName,
-                                        KNullDesC) );
-    delete iLiveSession;
-    iLiveSession = NULL;    
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    iLcUiProvider->iSimulatedReturnValue = ETrue;
-    TBuf<200> singleAddr;
-    singleAddr.Append( KTestRecipientTelUri );    
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        singleAddr ) );
-    PropertyHelper::SetErrorCode( KErrNone );
-    iLiveSession->EstablishLcSessionL();
-    EUNIT_ASSERT_EQUALS( KTestRecipientTelUri(),iLiveSession->RemoteDisplayName() );
-    
-    // Test 6 : Contact name has zero lenth and recipient has teluri 
-    //          and invitation fails to teluri.
-    //          Manual address query entered and now display should have entered 
-    //          manual address.
-    PropertyHelper::SetErrorCode( KErrNone );
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                           NMusSessionApi::KContactName,
-                                           KNullDesC) );
-    delete iLiveSession;
-    iLiveSession = NULL;    
-    iLiveSession = CMusEngLiveSession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-    iLcUiProvider->iRecipient.Set( KTestRecipientSipUri );
-    iLcUiProvider->iSimulatedReturnValue = ETrue;
-    singleAddr.Copy( KTestRecipientTelUri );
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        singleAddr ) );
-    PropertyHelper::SetErrorCode( KErrNotFound );
-    iLiveSession->EstablishLcSessionL(); 
-    EUNIT_ASSERT_EQUALS( 1, iLiveSession->iTriedInvitations )
-    EUNIT_ASSERT_EQUALS( KTestRecipientSipUri(),iLiveSession->RemoteDisplayName() );
-    }
-
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE(
@@ -992,102 +559,53 @@
     "UNIT" )
 
 EUNIT_TEST(
-    "EstablishLcSessionL - test ",
+    "InviteL - test ",
     "CMusEngOutSession",
-    "EstablishLcSessionL",
+    "InviteL",
     "FUNCTIONALITY",
-    SetupL, UT_EstablishLcSessionL, Teardown)
+    SetupL, UT_CMusEngOutSession_InviteLL, Teardown)
 
 EUNIT_TEST(
-    "TerminateLcSessionL - test ",
-    "CMusEngOutSession",
-    "TerminateLcSessionL",
-    "FUNCTIONALITY",
-    SetupL, UT_TerminateLcSessionL, Teardown)    
-    
-EUNIT_TEST(
-    "EstablishLcSessionL recipient resolving - test ",
+    "CancelInviteL - test ",
     "CMusEngOutSession",
-    "EstablishLcSessionL",
+    "CancelInviteL",
     "FUNCTIONALITY",
-    SetupL, UT_EstablishLcSession_RecipientResolvingL, Teardown)
-
-EUNIT_TEST(
-    "EstablishLcSessionL registration pending - test ",
-    "CMusEngOutSession",
-    "EstablishLcSessionL",
-    "FUNCTIONALITY",
-    SetupL, UT_EstablishLcSession_RegistrationPendingL, Teardown)
+    SetupL, UT_CMusEngOutSession_CancelInviteLL, Teardown)
 
 EUNIT_TEST(
     "EstablishSessionL - test ",
     "CMusEngOutSession",
     "EstablishSessionL",
     "FUNCTIONALITY",
-    SetupL, UT_EstablishSessionLL, Teardown)   
+    SetupL, UT_CMusEngOutSession_EstablishSessionLL, Teardown)   
 
 EUNIT_TEST(
     "HandleTermination - test ",
     "CMusEngOutSession",
     "HandleTermination",
     "FUNCTIONALITY",
-    SetupL, UT_HandleTerminationL, Teardown)   
+    SetupL, UT_CMusEngOutSession_HandleTerminationL, Teardown)   
 
 EUNIT_TEST(
-    "HandleTermination recipient not found - test ",
-    "CMusEngOutSession",
-    "HandleTermination recipient not found",
-    "FUNCTIONALITY",
-    SetupL, UT_HandleRecipientNotFoundTerminationL, Teardown)  
-    
-EUNIT_TEST(
     "AdjustVideoCodecL - test ",
     "CMusEngOutSession",
     "AdjustVideoCodecL",
     "FUNCTIONALITY",
-    SetupL, UT_AdjustVideoCodecLL, Teardown)   
+    SetupL, UT_CMusEngOutSession_AdjustVideoCodecLL, Teardown)   
 
 EUNIT_TEST(
     "AdjustAudioCodecL - test ",
     "CMusEngOutSession",
     "AdjustAudioCodecL",
     "FUNCTIONALITY",
-    SetupL, UT_AdjustAudioCodecLL, Teardown)   
+    SetupL, UT_CMusEngOutSession_AdjustAudioCodecLL, Teardown)   
     
 EUNIT_TEST(
     "CreateMceSessionStructureL - test ",
     "CMusEngOutSession",
     "CreateMceSessionStructureL",
     "FUNCTIONALITY",
-    SetupL, UT_CreateMceSessionStructureLL, Teardown)    
-  
-EUNIT_TEST(
-    "ConstructLL - test ",
-    "CMusEngOutSession",
-    "ConstructLL",
-    "FUNCTIONALITY",
-    SetupL, UT_ConstructLL, Teardown) 
-
-EUNIT_TEST(
-    "ContactSavingL - test ",
-    "CMusEngOutSession",
-    "ContactSavingL",
-    "FUNCTIONALITY",
-    SetupL, UT_ContactSavingLL, Teardown) 
-
-EUNIT_TEST(
-    "RemoteAddressLL - test ",
-    "CMusEngOutSession",
-    "RemoteAddressLL",
-    "FUNCTIONALITY",
-    SetupL, UT_RemoteAddressLL, Teardown)
-
-EUNIT_TEST(
-    "RemoteDisplayName - test ",
-    "CMusEngOutSession",
-    "RemoteDisplayName",
-    "FUNCTIONALITY",
-    SetupL, UT_RemoteDisplayNameL, Teardown)
+    SetupL, UT_CMusEngOutSession_CreateMceSessionStructureLL, Teardown)    
 
 EUNIT_END_TEST_TABLE
 
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengreceivesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengreceivesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -21,9 +21,7 @@
 #include "musengstubs.h"
 #include "musengtestdefs.h"
 #include "musengreceivesession.h"
-#include "mussessionproperties.h"
-#include "contactenginestub.h"
-#include "musengremotevideoplayer.h"
+#include "centralrepository.h"
 
 //  SYSTEM INCLUDES
 #include <digia/eunit/eunitmacros.h>
@@ -43,20 +41,8 @@
 #include <mceavccodec.h>
 
 #include <audiopreference.h>
-#include <centralrepository.h>
 
 
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-const TInt KMusEngTresholdToSecondsFactor = 20;
-const TInt KMusEngTwoSecondInMilliSeconds = 2000; 
-// Use inactivity timer value that is a little bigger than treshold in seconds
-const TUint KMusEngInactivityTimer = KMusEngTresholdToSecondsFactor * 
-                                     KMusEngJitterBufferTreshold + 
-                                     KMusEngTwoSecondInMilliSeconds;
-
-_LIT( KTestContactName, "nokia" );
 
 
 // -----------------------------------------------------------------------------
@@ -122,31 +108,25 @@
 //
 void UT_CMusEngReceiveSession::SetupL(  )
     {
-    // set fast mode ON
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KFastMode,
-                                        0 ) );
-    iLcSessionObserver = new( ELeave )CLcSessionObserverStub;
-    iLcUiProvider = new( ELeave )CLcUiProviderStub;    
-    iReceiveSession = CMusEngReceiveSession::NewL();
-    iReceiveSession->SetLcSessionObserver( iLcSessionObserver );  
-    iReceiveSession->SetLcUiProvider( iLcUiProvider );    
+    CRepository::iStaticEncoderUid = 0;
+    iObserver = new( ELeave ) CMusEngObserverStub;
+    iReceiveSession = CMusEngReceiveSession::NewL( TRect(0,0, 100,100), 
+                                                   *iObserver,
+                                                   *iObserver );
+    
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void UT_CMusEngReceiveSession::Teardown(  )
     {
-    PropertyHelper::Close();
     delete iReceiveSession;
-    delete iLcUiProvider;
-    delete iLcSessionObserver;
-    PropertyHelper::Close();
-    // Delete static data from CenRep stub
-    CRepository::ResetStubGlobal();
-    CRepository::iForceFailWithCode = KErrNone;
+    delete iObserver;
+    CRepository::iStaticEncoderUid = 0;
+    
     }
 
 
@@ -298,145 +278,67 @@
     {
     EUNIT_ASSERT( iReceiveSession );
     EUNIT_ASSERT( !iReceiveSession->iSession );
-    EUNIT_ASSERT( iReceiveSession->iMceManagerUid == TUid::Uid( KMusUiUid ) );
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngReceiveSession::UT_LcSessionStateL()
-    {
-    // No MCE session -> Convert to MLcSession::EReceived
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EReceived ), 
-                         TInt( iReceiveSession->LcSessionState() ) )
-                         
-    // Some other state -> State returned from the base class 
-    TMceTransactionDataContainer container;
-    CMceInSession* inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    iReceiveSession->iSession->iState = CMceSession::EProceeding;
-    iReceiveSession->EstablishLcSessionL();  
-    EUNIT_ASSERT_EQUALS( TInt( MLcSession::EOpening ), 
-                         TInt( iReceiveSession->LcSessionState() ) )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngReceiveSession::UT_EstablishLcSessionL()
-    {
-    // No MCE session
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iReceiveSession->EstablishLcSessionL(), KErrNotReady )    
- 
-    // Construct a new session and accept it
-    TMceTransactionDataContainer container;
-    CMceInSession* inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    iReceiveSession->iSession->iState = CMceSession::EProceeding;
-    iReceiveSession->EstablishLcSessionL();
-    EUNIT_ASSERT( iReceiveSession->iSession )
-    EUNIT_ASSERT_EQUALS( inSession, iReceiveSession->iSession );
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::EAnswering ),
-                         TInt( iReceiveSession->iSession->iState ) )    
-    }   
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngReceiveSession::UT_TerminateLcSessionL()
+void UT_CMusEngReceiveSession::UT_AcceptInvitationLL()
     {
-    // No MCE session
-    EUNIT_ASSERT_SPECIFIC_LEAVE( 
-        iReceiveSession->TerminateLcSessionL(), KErrNotReady )
+    TMceTransactionDataContainer container;
     
-    // Reject session, session state incoming, no operator variant
-    TMceTransactionDataContainer container;
+    // There is no pending session to accept, must fail
+    TRAPD( error, iReceiveSession->AcceptInvitationL( ETrue ) );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+
+    // There is pending session, but it is not yet reserved resources,
+    // so accepting fails
     CMceInSession* inSession = ConstructInSessionLC( 1, 0 );
     iReceiveSession->IncomingSession( inSession, &container );
     CleanupStack::Pop( inSession );
-    iReceiveSession->iSession->iState = CMceSession::EIncoming;
-    iReceiveSession->iOperatorVariant = EFalse;
-    iReceiveSession->TerminateLcSessionL();   
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::ETerminated ),
-                         TInt( iReceiveSession->iSession->iState ) )
- 
-    // Reject session, session state proceeding, no operator variant
-    inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
+    
+    TRAP( error, iReceiveSession->AcceptInvitationL( ETrue ) );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrNotReady );
+    
+    // Simulate resource reservation and reject
     iReceiveSession->iSession->iState = CMceSession::EProceeding;
-    iReceiveSession->iOperatorVariant = EFalse;
-    iReceiveSession->TerminateLcSessionL();   
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::ETerminated ),
-                         TInt( iReceiveSession->iSession->iState ) )
+    iReceiveSession->AcceptInvitationL( EFalse );
     
-    // Reject session, operator variant
+    EUNIT_ASSERT( iReceiveSession->iSession->iState ==
+                  CMceSession::ETerminated );
+    
+    // Construct new session and reject it with operator variant
     inSession = ConstructInSessionLC( 1, 0 );
     iReceiveSession->IncomingSession( inSession, &container );
     CleanupStack::Pop( inSession );
     iReceiveSession->iSession->iState = CMceSession::EProceeding;
     iReceiveSession->iOperatorVariant = ETrue;
-    iReceiveSession->TerminateLcSessionL(); 
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::ETerminated ),
-                         TInt( iReceiveSession->iSession->iState ) )
+    
+    iReceiveSession->AcceptInvitationL( EFalse );
     
-    // Terminate an established session
+    EUNIT_ASSERT( iReceiveSession->iSession->iState ==
+                  CMceSession::ETerminated );
+
+    // Construct new session and accept it
     inSession = ConstructInSessionLC( 1, 0 );
     iReceiveSession->IncomingSession( inSession, &container );
     CleanupStack::Pop( inSession );
-    iReceiveSession->iSession->iState = CMceSession::EEstablished;
-    iReceiveSession->iOperatorVariant = EFalse;
-    iReceiveSession->TerminateLcSessionL(); 
-    EUNIT_ASSERT_EQUALS( TInt( CMceSession::ETerminating ),
-                         TInt( iReceiveSession->iSession->iState ) )    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngReceiveSession::UT_RemoteVideoPlayerL()
-    {
-    EUNIT_ASSERT( iReceiveSession->RemoteVideoPlayer() == 
-                  iReceiveSession->iRemoteVideoPlayer )
-    }
+    iReceiveSession->iSession->iState = CMceSession::EProceeding;
 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngReceiveSession::UT_RemoteDisplayName()
-    {
-
-    // Creating Valid Session     
-    CMceInSession* inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->iSession = inSession; // Transfers ownership
-    CleanupStack::Pop( inSession );
-    iReceiveSession->CompleteSessionStructureL();
-    EUNIT_ASSERT( inSession->Streams().Count() == 1 );
+    iReceiveSession->AcceptInvitationL( ETrue );   
     
-
-    // Name is published using publish/subscribe key by Availblity
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KContactName,
-                                        KTestContactName ) );
-
-    EUNIT_ASSERT_EQUALS ( KTestContactName(), iReceiveSession->RemoteDisplayName() )
+    EUNIT_ASSERT( iReceiveSession->iSession );
+    EUNIT_ASSERT( iReceiveSession->iSession == inSession );
+    EUNIT_ASSERT( iReceiveSession->iSession->iState == 
+                  CMceSession::EAnswering );
     
     
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                       NMusSessionApi::KContactName,
-                                       KNullDesC) );
-    
-    // Ensure its not null and its not equal
-    EUNIT_ASSERT( KTestContactName() != iReceiveSession->RemoteDisplayName() );
-    }
+    }    
+
 
 // -----------------------------------------------------------------------------
 //
@@ -462,26 +364,23 @@
     
     // 1 ) First transition to state EProceeding, user and remote end should
     //     be notified
-    inSession->iState = CMceSession::EProceeding;   
+    inSession->iState = CMceSession::EProceeding;
+    
     iReceiveSession->HandleSessionStateChanged( *inSession, 0, KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionStateChanged ) )
+    EUNIT_ASSERT( iObserver->iIncomingSessionCalled )
     EUNIT_ASSERT( iReceiveSession->iRingLCalled )
-
-    // Ensure Originator is taken from the incoming session
-    EUNIT_ASSERT_EQUALS ( KTestOriginator(), *iReceiveSession->iOriginator )
-    
-    iLcSessionObserver->Reset();
+    iObserver->Reset();
     
     // 2 ) Now simulate second transition to EProceeding state which can happen
     //     if we force 100rel to be used. User and remote end should not be 
     //     notified anymore but change should be ignored.
-    inSession->iState = CMceSession::EProceeding;
     iReceiveSession->HandleSessionStateChanged( *inSession, 0, KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( CLcSessionObserverStub::EUnknown ),
-                         TInt( iLcSessionObserver->iCalledFunction ) )
+    EUNIT_ASSERT( iObserver->IsReseted() )
+    iObserver->Reset();
+    
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -493,10 +392,10 @@
     CMceVideoCodec* codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );
     CMceVideoCodec* codecUnknown = CMceH263Codec::NewLC( KNullDesC8() );
     
-    iReceiveSession->AdjustVideoCodecL( *codecH263, KMceRTPSource );
-    iReceiveSession->AdjustVideoCodecL( *codecH2632000, KMceRTPSource );
-    iReceiveSession->AdjustVideoCodecL( *codecAvc, KMceRTPSource );
-    iReceiveSession->AdjustVideoCodecL( *codecUnknown, KMceRTPSource );
+    iReceiveSession->AdjustVideoCodecL( *codecH263 );
+    iReceiveSession->AdjustVideoCodecL( *codecH2632000 );
+    iReceiveSession->AdjustVideoCodecL( *codecAvc );
+    iReceiveSession->AdjustVideoCodecL( *codecUnknown );
     
     EUNIT_ASSERT_EQUALS( codecH263->KeepAliveTimer(), 5 )
     EUNIT_ASSERT_EQUALS( codecH263->KeepAlivePayloadType(), 96 )
@@ -685,6 +584,8 @@
     CleanupStack::Pop( inSession );
     container.Clear();
     
+    EUNIT_ASSERT( iObserver->iIncomingSessionPreNotificationCalled )
+    
     EUNIT_ASSERT( iReceiveSession->iSession );
     EUNIT_ASSERT( iReceiveSession->iSession->iState == 
                   CMceSession::ETerminated );
@@ -729,6 +630,46 @@
     EUNIT_ASSERT( iReceiveSession->iSession != inSession );
     EUNIT_ASSERT( iReceiveSession->iSession->iState == 
                   CMceSession::EReserving );
+    
+    // Try again when there is usage of avc is turned off
+    iReceiveSession->iSession->iState = CMceSession::ETerminated;
+    TInt32 KMusDisableAVC = 0x0fffffff;
+    CRepository::iStaticEncoderUid = KMusDisableAVC;
+
+    inSession = ConstructInSessionLC( 1, 0 );
+    
+    // There will 3 AVC codecs and 1 H263 codec
+    EUNIT_ASSERT( static_cast<CMceVideoStream*>( inSession->Streams()[0] )->Codecs().Count() == 4 );
+    iReceiveSession->IncomingSession( inSession, &container );    
+    CleanupStack::Pop( inSession );
+    
+    EUNIT_ASSERT( iReceiveSession->iSession->iState == 
+                  CMceSession::EReserving ||
+                  iReceiveSession->iSession->iState == 
+                  CMceSession::ETerminated );
+    
+    // Should be only the H263 codec
+    EUNIT_ASSERT( static_cast<CMceVideoStream*>( iReceiveSession->iSession->Streams()[0] )->Codecs().Count() <= 4 );
+    
+    //No supported codecs
+    iReceiveSession->iSession->iState = CMceSession::ETerminated;
+    iReceiveSession->iManager->iSupportedVideoCodecs.ResetAndDestroy();
+    inSession = ConstructInSessionLC( 1, 0 );
+    
+    // There will no codecs, simulates situation where no codecs were match
+    //currently session is not been rejected
+    EUNIT_ASSERT( static_cast<CMceVideoStream*>( inSession->Streams()[0] )->Codecs().Count() == 0 );
+    iReceiveSession->IncomingSession( inSession, &container );    
+    CleanupStack::Pop( inSession );
+    
+    EUNIT_ASSERT( iReceiveSession->iSession->iState == 
+                  CMceSession::EReserving ||
+                  iReceiveSession->iSession->iState == 
+                  CMceSession::ETerminated );
+    
+    // Should be only the H263 codec
+    EUNIT_ASSERT( static_cast<CMceVideoStream*>( inSession->Streams()[0] )->Codecs().Count() == 0 );
+    
     }
 
 
@@ -754,7 +695,7 @@
     CleanupStack::Pop( inSession );
     
     iReceiveSession->iSession->iState = CMceSession::EProceeding;
-    iReceiveSession->EstablishLcSessionL();
+    iReceiveSession->AcceptInvitationL( ETrue );
     
     // Now we have an insession, try to update session that is not ours, 
     // new one gets rejected and deleted.
@@ -811,28 +752,36 @@
     // Try without a session, nothing happens
     iReceiveSession->StreamStateChanged( *audioStream );
     
-    // Establish session
+    // Establish session 
+    
     iReceiveSession->IncomingSession( inSession, &container );    
     CleanupStack::Pop( inSession );
-    iLcSessionObserver->Reset();
+    iObserver->Reset();
 
     // Try with audiostream, nothing happens
     audioStream->iState = CMceMediaStream::EBuffering;
     iReceiveSession->StreamStateChanged( *audioStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
-    // Try with videostream, but without a source, nothing happens
-    CMceRtpSource* rtpSource = 
-        static_cast<CMceRtpSource*>( videoStream->Source() ); //hack
-    videoStream->iSource = NULL;   
+    // Try with videostream, but without a source, nothing happens 
+        
+        // Needed hacking
+        CMceRtpSource* rtpSource = 
+                        static_cast<CMceRtpSource*>( videoStream->Source() );
+    videoStream->iSource = NULL;
+    
     iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // Try with videostream and a camera source, nothing happens 
-    videoStream->iSource = 
-        CMceCameraSource::NewL( *iReceiveSession->iManager ); //hack
+        
+        // Needed hacking
+        videoStream->iSource = 
+                    CMceCameraSource::NewLC( *iReceiveSession->iManager );
+        CleanupStack::Pop();
+    
     iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->IsReseted() )
     
     // Remove hacks
     delete videoStream->iSource;
@@ -841,72 +790,21 @@
     // Buffering, normal case
     videoStream->iState = CMceMediaStream::EBuffering;
     iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    EUNIT_ASSERT( iReceiveSession->iBuffered )
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamBufferingCalled )
+    iObserver->Reset();
     
     // Streaming, normal case
     videoStream->iState = CMceMediaStream::EStreaming;
-    iReceiveSession->iReceiving = EFalse;
-    iReceiveSession->iBuffered = ETrue;
     iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    EUNIT_ASSERT_EQUALS( KMusEngInactivityTimer, rtpSource->iInactivityTimer ) 
-    iLcSessionObserver->Reset();
-    EUNIT_ASSERT_EQUALS( TInt( iLcUiProvider->iCalledFunction ),
-                         TInt( CLcUiProviderStub::EHandleForegroundStatus ) )    
-    iLcUiProvider->Reset();
-    // Normally background info will be cleared once ui comes to foreground and
-    // notifies engine about it
-    iReceiveSession->iBackground = EFalse;
-
-    // Streaming, event is received even when already receiving. Streaming
-    // event is anyway notified.
-    videoStream->iState = CMceMediaStream::EStreaming;
-    iReceiveSession->iReceiving = ETrue;
-    iReceiveSession->iBuffered = ETrue;
-    iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    EUNIT_ASSERT_EQUALS( KMusEngInactivityTimer, rtpSource->iInactivityTimer ) 
-    iLcSessionObserver->Reset();
-    EUNIT_ASSERT_EQUALS( TInt( iLcUiProvider->iCalledFunction ),
-                         TInt( CLcUiProviderStub::EUnknown ) )
-      
-    // Streaming and receiving started already. Streaming is not notified because
-    // of buffering event hasn't been received
-    videoStream->iState = CMceMediaStream::EStreaming;
-    iReceiveSession->iReceiving = ETrue;
-    iReceiveSession->iBuffered = EFalse;
-    iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
-    iLcSessionObserver->Reset();
-    
-    // Streaming, receiving not started and buffering not happened ( means no packet
-    // received yet. Ignore this event too.
-    videoStream->iState = CMceMediaStream::EStreaming;
-    iReceiveSession->iReceiving = EFalse;
-    iReceiveSession->iBuffered = EFalse;
-    iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
-    iLcSessionObserver->Reset();
-    
-    // Streaming, receiving not started and buffering happened.
-    // Enabling RTP timer leaves. Should be a failure case.
-    videoStream->iState = CMceMediaStream::EStreaming;
-    iReceiveSession->iReceiving = EFalse;
-    iReceiveSession->iBuffered = ETrue;
-    iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT_NOT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                             TInt( CLcSessionObserverStub::EPlayerFailed ) )    
-    iLcSessionObserver->Reset();
+    EUNIT_ASSERT( iObserver->iStreamStreamingCalled )
+    EUNIT_ASSERT( rtpSource->iInactivityTimer == 2000 ) 
+    iObserver->Reset();
     
     // Try default behaviors
     videoStream->iState = CMceMediaStream::EIdle;
     iReceiveSession->StreamStateChanged( *videoStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() )
+    EUNIT_ASSERT( iObserver->iStreamIdleCalled );
+    
     }
 
 
@@ -983,6 +881,7 @@
     
     // No audio, bundle is not constructed
     EUNIT_ASSERT( inSession->Bundles().Count() == 0 )
+
     }
 
 
@@ -1165,7 +1064,7 @@
                   KMceSpeakerSink );
     CMceSpeakerSink* speaker = 
         static_cast<CMceSpeakerSink*>(inSession->Streams()[1]->Sinks()[0]);
-    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->LcVolumeL() )
+    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->VolumeL() )
     
     // Stream 2 and bound stream
     EUNIT_ASSERT( inSession->Streams()[2]->Type() == KMceAudio )
@@ -1174,7 +1073,7 @@
     EUNIT_ASSERT( inSession->Streams()[2]->Sinks()[0]->Type() == 
                   KMceSpeakerSink );
     speaker = static_cast<CMceSpeakerSink*>(inSession->Streams()[2]->Sinks()[0]);
-    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->LcVolumeL() )
+    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->VolumeL() )
 
     EUNIT_ASSERT( inSession->Streams()[2]->BoundStream() )
     EUNIT_ASSERT( !inSession->Streams()[2]->BoundStreamL().IsEnabled() )
@@ -1199,7 +1098,7 @@
                   KMceSpeakerSink )
     speaker = static_cast<CMceSpeakerSink*>
                         (inSession->Streams()[3]->BoundStreamL().Sinks()[0]);
-    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->LcVolumeL() )
+    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->VolumeL() )
               
     // Check for bundles
     EUNIT_ASSERT( inSession->Bundles().Count() == 1 )
@@ -1265,39 +1164,28 @@
     EUNIT_ASSERT_EQUALS( inSession->Bundles().Count(), 0 )
     
     
-    // Session with bandwidth attributes b=AS and b=TIAS at session and media
-    // levels -> b=AS is taken in use at session level (b=TIAS is ignored)
+    // Session with bandwidth attribute at sessionlevel
+    // -> bandwidth is taken in use at session level
     //
     delete iReceiveSession->iSession;
     iReceiveSession->iSession = NULL;
     
     inSession = ConstructInSessionLC( 1, 0 );
-    //setting session level SDP attributes
-    CDesC8Array* sdpLines = new ( ELeave ) CDesC8ArrayFlat( 2 );
+    CDesC8Array* sdpLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
     CleanupStack::PushL( sdpLines );
     sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    sdpLines->AppendL( KMusEngSessionSdpLineTiasLine() );
     inSession->SetSessionSDPLinesL( sdpLines );
     CleanupStack::Pop( sdpLines );
     
-    //setting media level SDP attributes
-    sdpLines = new ( ELeave ) CDesC8ArrayFlat( 2 );
-    CleanupStack::PushL( sdpLines );
-    sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    sdpLines->AppendL( KMusEngSessionSdpLineTiasLine() );
-    inSession->Streams()[ 0 ]->SetMediaAttributeLinesL( sdpLines );
-    CleanupStack::Pop( sdpLines );
- 
     // Transfers ownership
     iReceiveSession->iSession = inSession; 
     CleanupStack::Pop( inSession );
     
     iReceiveSession->CompleteSessionStructureL();
- 
-    // Ensure there is only b=AS and no b=TIAS present at session level 
-    MDesC8Array* newSdpLines = iReceiveSession->iSession->iSessionSDPLines;
-    TBool bandwidthFoundFromSessionLevel = EFalse;
-    TBool tiasFoundFromSessionLevel = EFalse;
+    
+    MDesC8Array* newSdpLines = iReceiveSession->iSession->SessionSDPLinesL();
+    CleanupDeletePushL( newSdpLines );
+    TBool bandwidthFoundFromSessionLevel( EFalse );
     for ( TInt i = 0; newSdpLines && i < newSdpLines->MdcaCount(); i++ )
         {
         if ( newSdpLines->MdcaPoint( i ).Compare( 
@@ -1305,32 +1193,35 @@
             {
             bandwidthFoundFromSessionLevel = ETrue;
             }
-        else if ( newSdpLines->MdcaPoint( i ).Find( 
-                KMusEngSessionSdpLineTiasLine() ) == 0 )
-            {
-            tiasFoundFromSessionLevel = ETrue;
-            }
         }
     EUNIT_ASSERT( bandwidthFoundFromSessionLevel );
-    EUNIT_ASSERT( !tiasFoundFromSessionLevel );
- 
-    // Ensure there is no bandwidth attributes at media level 
-    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( !newSdpLines->MdcaCount() );
-
+    CleanupStack::PopAndDestroy( newSdpLines );
     
-    // Session with bandwidth AS and TIAS attributes at media level
-    // -> bandwidth AS is taken in use at media level
+    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->MediaAttributeLinesL();
+    CleanupDeletePushL( newSdpLines );
+    TBool bandwidthFoundFromMediaLevel( EFalse );
+    for ( TInt i = 0; newSdpLines && i < newSdpLines->MdcaCount(); i++ )
+        {
+        if ( newSdpLines->MdcaPoint( i ).Compare( 
+                KMusEngSessionSdpLineBandwidthField() ) == 0 )
+            {
+            bandwidthFoundFromMediaLevel = ETrue;
+            }
+        }
+    EUNIT_ASSERT( !bandwidthFoundFromMediaLevel );
+    CleanupStack::PopAndDestroy( newSdpLines );
+    
+    // Session with bandwidth attribute at media level
+    // -> bandwidth is taken in use at media level
     //
     delete iReceiveSession->iSession;
     iReceiveSession->iSession = NULL;
     
     inSession = ConstructInSessionLC( 1, 0 );
     
-    sdpLines = new ( ELeave ) CDesC8ArrayFlat( 2 );
+    sdpLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
     CleanupStack::PushL( sdpLines );
     sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    sdpLines->AppendL( KMusEngSessionSdpLineTiasLine() );
     inSession->Streams()[ 0 ]->SetMediaAttributeLinesL( sdpLines );
     CleanupStack::Pop( sdpLines );
     
@@ -1340,180 +1231,35 @@
     
     iReceiveSession->CompleteSessionStructureL();
     
-    // Ensure there is no bandwidth attribute at session level  
-    newSdpLines = iReceiveSession->iSession->iSessionSDPLines;
+    newSdpLines = iReceiveSession->iSession->SessionSDPLinesL();
+    CleanupDeletePushL( newSdpLines );
     bandwidthFoundFromSessionLevel = EFalse;
     for ( TInt i = 0; newSdpLines && i < newSdpLines->MdcaCount(); i++ )
         {
         if ( newSdpLines->MdcaPoint( i ).Compare( 
-                KMusEngSessionSdpLineBandwidthField() ) == 0
-             || newSdpLines->MdcaPoint( i ).Find( 
-                     KMusEngSessionSdpLineTiasLine() ) == 0 )
+                KMusEngSessionSdpLineBandwidthField() ) == 0 )
             {
             bandwidthFoundFromSessionLevel = ETrue;
             }
         }
     EUNIT_ASSERT( !bandwidthFoundFromSessionLevel );
+    CleanupStack::PopAndDestroy( newSdpLines );
     
-    // Ensure media level has only b=AS attribute
-    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( newSdpLines );
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 1 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineBandwidthField() );
+    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->MediaAttributeLinesL();
+    CleanupDeletePushL( newSdpLines );
+    bandwidthFoundFromMediaLevel = EFalse;
+    for ( TInt i = 0; newSdpLines && i < newSdpLines->MdcaCount(); i++ )
+        {
+        if ( newSdpLines->MdcaPoint( i ).Compare( 
+                KMusEngSessionSdpLineBandwidthField() ) == 0 )
+            {
+            bandwidthFoundFromMediaLevel = ETrue;
+            }
+        }
+    EUNIT_ASSERT( bandwidthFoundFromMediaLevel );
+    CleanupStack::PopAndDestroy( newSdpLines );
     }
     
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-// 
-void UT_CMusEngReceiveSession::UT_CompleteSessionStructureL_SdpBandwidthAttributesL()
-    {
-    CRepository::SetStubGlobal( MusSettingsKeys::KVideoBandwidth,
-                                128 );
-
-    // 1. Session without bandwidth attributes. => b=AS and b=TIAS will be
-    //    taken at media level
-    CMceInSession* inSession = ConstructInSessionLC( 1, 0 );
-
-    iReceiveSession->iSession = inSession; // Transfers ownership
-    CleanupStack::Pop( inSession );
-
-    iReceiveSession->CompleteSessionStructureL();
-
-    // Ensure b=AS and b=TIAS present at media level only
-    MDesC8Array* newSdpLines = iReceiveSession->iSession->iSessionSDPLines;
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 1 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
-
-    // Ensure b=AS and b=TIAS present at media level
-    EUNIT_ASSERT( iReceiveSession->iSession->Streams().Count() > 0 );
-    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( newSdpLines );
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 0 ).Find(
-                  KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 1 ).Find( 
-                  KMusEngSessionSdpLineTiasLine() ) == 0 );    
-    
-    
-    // 2. Session with b=AS bandwidth attribute at session level
-    //     => b=AS and b=TIAS will be taken at session level
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    
-    inSession = ConstructInSessionLC( 1, 0 );
-    //setting session level SDP attributes
-    CDesC8Array* sdpLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    CleanupStack::PushL( sdpLines );
-    sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    inSession->SetSessionSDPLinesL( sdpLines );
-    CleanupStack::Pop( sdpLines );
- 
-    // Transfers ownership
-    iReceiveSession->iSession = inSession; 
-    CleanupStack::Pop( inSession );
-    
-    iReceiveSession->CompleteSessionStructureL();
- 
-    // Ensure b=AS and b=TIAS present at session level only 
-    newSdpLines = iReceiveSession->iSession->iSessionSDPLines;
-    EUNIT_ASSERT( newSdpLines );
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 3 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 1 ).Find ( 
-                  KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 2 ).Find( 
-                  KMusEngSessionSdpLineTiasLine() ) == 0 );    
-
-    EUNIT_ASSERT( iReceiveSession->iSession->Streams().Count() > 0 );    
-    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( newSdpLines );
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 0 );
-
-    // 3. Session with b=AS bandwidth attribute at media level
-    //     => b=AS and b=TIAS will be taken at media level
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    
-    inSession = ConstructInSessionLC( 1, 0 );
-    //setting media level SDP attributes
-    sdpLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    CleanupStack::PushL( sdpLines );
-    sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    inSession->Streams()[ 0 ]->SetMediaAttributeLinesL( sdpLines );
-    CleanupStack::Pop( sdpLines );
- 
-    // Transfers ownership
-    iReceiveSession->iSession = inSession; 
-    CleanupStack::Pop( inSession );
-    
-    iReceiveSession->CompleteSessionStructureL();
- 
-    // Ensure b=AS and b=TIAS present only at media level 
-    newSdpLines = iReceiveSession->iSession->iSessionSDPLines;
-    EUNIT_ASSERT( newSdpLines );
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 1 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
-
-    EUNIT_ASSERT( iReceiveSession->iSession->Streams().Count() > 0 );    
-    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( newSdpLines );
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 0 ).Find ( 
-                  KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 1 ).Find( 
-                  KMusEngSessionSdpLineTiasLine() ) == 0 );    
-
-   
-    // 4. Session with b=AS attribute at session level and
-    //    b=AS and b=TIAS at media level
-    //    => b=AS and b=TIAS will be taken at session and media level
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    
-    inSession = ConstructInSessionLC( 1, 0 );
-    //setting session level SDP attributes
-    sdpLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    CleanupStack::PushL( sdpLines );
-    sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    inSession->SetSessionSDPLinesL( sdpLines );
-    CleanupStack::Pop( sdpLines );
- 
-    //setting media level SDP attributes
-    sdpLines = new ( ELeave ) CDesC8ArrayFlat( 2 );
-    CleanupStack::PushL( sdpLines );
-    sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    sdpLines->AppendL( KMusEngSessionSdpLineTiasLine() );
-    inSession->Streams()[ 0 ]->SetMediaAttributeLinesL( sdpLines );
-    CleanupStack::Pop( sdpLines );
-
-    // Transfers ownership
-    iReceiveSession->iSession = inSession; 
-    CleanupStack::Pop( inSession );
-    
-    iReceiveSession->CompleteSessionStructureL();
- 
-    // Ensure b=AS and b=TIAS present at session and media level 
-    newSdpLines = iReceiveSession->iSession->iSessionSDPLines;
-    EUNIT_ASSERT( newSdpLines );
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 3 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 0 ) == KMusEngSessionSdpLineXApplication() );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 1 ).Find ( 
-                  KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 2 ).Find( 
-                  KMusEngSessionSdpLineTiasLine() ) == 0 );    
-
-    EUNIT_ASSERT( iReceiveSession->iSession->Streams().Count() > 0 );    
-    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->iMediaSDPLines;
-    EUNIT_ASSERT( newSdpLines );
-    EUNIT_ASSERT( newSdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 0 ).Find ( 
-                  KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( newSdpLines->MdcaPoint( 1 ).Find( 
-                  KMusEngSessionSdpLineTiasLine() ) == 0 );
-    }
-
     
 // -----------------------------------------------------------------------------
 //
@@ -1587,88 +1333,6 @@
     EUNIT_ASSERT_EQUALS( iReceiveSession->iIdentity, KNullDesC8 )    
     }
 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngReceiveSession::UT_ContactSavingLL()
-    {
-    ContactEngineStubHelper::Reset();
-    
-    // Saving of contact is done at destruction phase only if originator value
-    // exists
-    //
-    CMusEngReceiveSession* receiveSession = CMusEngReceiveSession::NewL();
-    receiveSession->SetLcSessionObserver( iLcSessionObserver );    
-    delete receiveSession;
-    receiveSession = NULL;
-    EUNIT_ASSERT( ContactEngineStubHelper::GetCalledFunction() == EContactEngineStubNone );
-    
-    
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KContactId,
-                                        2 ) );
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KTelNumber,
-                                        _L("12341234") ) );
-    
-    receiveSession = CMusEngReceiveSession::NewL();
-    CleanupStack::PushL( receiveSession );
-    receiveSession->SetLcSessionObserver( iLcSessionObserver );
-    delete receiveSession->iOriginator;
-    receiveSession->iOriginator = NULL;
-    receiveSession->iOriginator = _L8("sip:yep@10.10.10.10").AllocL();
-    CleanupStack::PopAndDestroy( receiveSession );
-    if ( ContactEngineStubHelper::GetCalledFunction() != EContactEngineStubSetText )
-        {
-        // out-of-memory was trap ignored and saving failed because of that
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( ContactEngineStubHelper::GetCalledFunction() == EContactEngineStubSetText );
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngReceiveSession::UT_IsDisplayActive()
-    {
-    // Display is active only if receiving and display is explicitly enabled
-    CMceInSession* inSession = ConstructInSessionLC( 1, 1 );
-    iReceiveSession->iSession = inSession; // Transfers ownership
-    CleanupStack::Pop( inSession );
-    iReceiveSession->EnableDisplayL( ETrue );
-    EUNIT_ASSERT( !iReceiveSession->IsDisplayActive() )
-    iReceiveSession->iReceiving = ETrue;
-    EUNIT_ASSERT( iReceiveSession->IsDisplayActive() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngReceiveSession::UT_InactivityTimeoutL()
-    {
-    // Not receiving, no effect
-    iReceiveSession->iReceiving = EFalse;
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    CMceRtpSource* rtpSource = CMceRtpSource::NewLC();
-    iReceiveSession->InactivityTimeout( *videoStream, *rtpSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // Receiving, state change is notified and
-    // receiving and buffering status are cleared
-    iReceiveSession->iBuffered = ETrue;
-    iReceiveSession->iReceiving = ETrue;
-    iReceiveSession->InactivityTimeout( *videoStream, *rtpSource );
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iCalledFunction, 
-                         CLcSessionObserverStub::EPlayerStateChanged );
-    EUNIT_ASSERT( !iReceiveSession->iReceiving );
-    EUNIT_ASSERT( !iReceiveSession->iBuffered );
-    CleanupStack::PopAndDestroy( rtpSource );
-    CleanupStack::PopAndDestroy( videoStream );
-    }
-
 
 //  TEST TABLE
 
@@ -1685,39 +1349,11 @@
     SetupL, UT_NewLL, Teardown)
 
 EUNIT_TEST(
-    "LcSessionState - test ",
-    "CMusEngReceiveSession",
-    "LcSessionState",
-    "FUNCTIONALITY",
-    SetupL, UT_LcSessionStateL, Teardown)
-    
-EUNIT_TEST(
-    "EstablishLcSessionL - test ",
-    "CMusEngReceiveSession",
-    "EstablishLcSessionL",
-    "FUNCTIONALITY",
-    SetupL, UT_EstablishLcSessionL, Teardown)    
-    
-EUNIT_TEST(
-    "TerminateLcSessionL - test ",
+    "AcceptInvitationL - test ",
     "CMusEngReceiveSession",
-    "TerminateLcSessionL",
-    "FUNCTIONALITY",
-    SetupL, UT_TerminateLcSessionL, Teardown)
-
-EUNIT_TEST(
-    "RemoteVideoPlayer - test ",
-    "CMusEngReceiveSession",
-    "RemoteVideoPlayer",
+    "AcceptInvitationL",
     "FUNCTIONALITY",
-    SetupL, UT_RemoteVideoPlayerL, Teardown)
-    
-EUNIT_TEST(
-    "RemoteDisplayName - test ",
-    "CMusEngReceiveSession",
-    "RemoteDisplayName",
-    "FUNCTIONALITY",
-    SetupL, UT_RemoteDisplayName, Teardown)
+    SetupL, UT_AcceptInvitationLL, Teardown)
 
 EUNIT_TEST(
     "HandleSessionStateChanged - test ",
@@ -1832,40 +1468,13 @@
     SetupL, UT_CompleteSessionStructureL_OperatorVariant, Teardown)
    
 EUNIT_TEST(
-    "CompleteSessionStructureL - test SDP bandwidth attributes handling",
-    "CMusEngReceiveSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_SdpBandwidthAttributesL, Teardown)
-
-EUNIT_TEST(
     "ParseAssertedIdentity",
     "CMusEngReceiveSession",
     "ParseAssertedIdentity",
     "FUNCTIONALITY",
     SetupL, UT_ParseAssertedIdentityL, Teardown)
       
-EUNIT_TEST(
-    "ContactSavingL - test",
-    "CMusEngReceiveSession",
-    "ContactSavingL",
-    "FUNCTIONALITY",
-    SetupL, UT_ContactSavingLL, Teardown)
-
-EUNIT_TEST(
-    "IsDisplayActive - test",
-    "CMusEngReceiveSession",
-    "IsDisplayActive",
-    "FUNCTIONALITY",
-    SetupL, UT_IsDisplayActive, Teardown)
-    
-EUNIT_TEST(
-    "InactivityTimeout - test ",
-    "CMusEngReceiveSession",
-    "InactivityTimeout",
-    "FUNCTIONALITY",
-    SetupL, UT_InactivityTimeoutL, Teardown)      
-    
+   
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengremotevideoplayer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,440 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include "ut_musengremotevideoplayer.h"
-#include "musengremotevideoplayer.h"
-#include "mceinsession.h"
-#include "mcevideostream.h"
-#include "mcertpsource.h"
-#include "mcedisplaysink.h"
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngRemoteVideoPlayer* UT_CMusEngRemoteVideoPlayer::NewL()
-    {
-    UT_CMusEngRemoteVideoPlayer* self = UT_CMusEngRemoteVideoPlayer::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngRemoteVideoPlayer* UT_CMusEngRemoteVideoPlayer::NewLC()
-    {
-    UT_CMusEngRemoteVideoPlayer* self = new( ELeave ) UT_CMusEngRemoteVideoPlayer();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngRemoteVideoPlayer::~UT_CMusEngRemoteVideoPlayer()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngRemoteVideoPlayer::UT_CMusEngRemoteVideoPlayer()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::SetupL()
-    {
-    iMceSession = CMceInSession::NewL();
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC(); 
-    CMceRtpSource* source = CMceRtpSource::NewLC();
-    videoStream->SetSourceL( source );
-    CleanupStack::Pop( source );
-    CMceDisplaySink* sink = CMceDisplaySink::NewLC();
-    videoStream->AddSinkL( sink );
-    CleanupStack::Pop( sink );
-    iMceSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );    
-    
-    iRemoteVideoPlayer = CMusEngRemoteVideoPlayer::NewL( 
-        iDisplayHandlerStub,
-        iLcAudioControlStub );
-    iRemoteVideoPlayer->SetMceSession( iMceSession );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::Teardown()
-    {
-    delete iRemoteVideoPlayer;
-    delete iMceSession;
-    iLcAudioControlStub.Reset();  
-    }
-
-
-
-// TEST CASES
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_NewLL()
-    {    
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcVideoPlayerStateL()
-    {
-    // iMceSession not set
-    iRemoteVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-    iRemoteVideoPlayer->SetMceSession( iMceSession );
-    
-    // Establish Session and simulate media playing.
-    iMceSession->iState = CMceSession::EEstablished;
-    for ( TInt i = 0; i < iMceSession->Streams().Count(); i++ )
-        {
-        iMceSession->Streams()[i]->iState = CMceMediaStream::EStreaming;
-        }
-    
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPlaying ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-                                                
-    // Media streams unavailable
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EUninitialized;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-
-    // All other stream states
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EInitialized;  
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EInit ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )  
-    
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EBuffering;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EBuffering ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-        
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EIdle;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPaused ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )  
-    
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EDisabled;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPaused ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-    
-    iDisplayHandlerStub.iIsActive = ETrue;
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EStreaming;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPlaying ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-    
-    iDisplayHandlerStub.iIsActive = EFalse;
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EStreaming;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EPaused ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ENoResources;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-    
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ETranscodingRequired;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )
-    
-    iMceSession->Streams()[0]->iState = CMceMediaStream::ETranscoding;
-    EUNIT_ASSERT_EQUALS( TInt( MLcVideoPlayer::EUnavailable ), 
-                         TInt( iRemoteVideoPlayer->LcVideoPlayerState() ) )                      
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcPlayL()
-    {
-    // iMceSession not set
-    iRemoteVideoPlayer->SetMceSession( NULL );
-    EUNIT_ASSERT( !iRemoteVideoPlayer->LcIsPlayingL() )
-    iRemoteVideoPlayer->SetMceSession( iMceSession );
-    
-    iMceSession->iState = CMceSession::EEstablished;
-    for ( TInt i = 0; i < iMceSession->Streams().Count(); i++ )
-        {
-        iMceSession->Streams()[i]->iState = CMceMediaStream::EStreaming;
-        }
-
-    // Play Test
-    iRemoteVideoPlayer->LcPlayL();
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcIsPlayingL() )
-    
-    // Pause Test
-    iMceSession->Streams()[0]->iState = CMceMediaStream::EDisabled;
-    iRemoteVideoPlayer->LcPauseL();
-    EUNIT_ASSERT( !iRemoteVideoPlayer->LcIsPlayingL() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcWindowL()
-    {
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcWindow() == iRemoteVideoPlayer )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcCameraControlL()
-    {
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcCameraControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcSourceFileControlL()
-    {
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcSourceFileControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcDestinationFileControlL()
-    {
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcDestinationFileControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcAudioControlL()
-    {
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcAudioControl() == &iLcAudioControlStub )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcZoomControlL()
-    {
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcZoomControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcBrightnessControlL()
-    {
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcBrightnessControl() == NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_EnableLcWindowL()
-    {
-    EUNIT_ASSERT( !iRemoteVideoPlayer->IsLcWindowEnabled() )
-    
-    // Enable
-    iRemoteVideoPlayer->EnableLcWindowL( ETrue );
-    EUNIT_ASSERT( iRemoteVideoPlayer->IsLcWindowEnabled() )
-    
-    // Disable
-    iRemoteVideoPlayer->EnableLcWindowL( EFalse );
-    EUNIT_ASSERT( !iRemoteVideoPlayer->IsLcWindowEnabled() )    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcWindowRectL()
-    {
-    TRect rect( 12, 34, 56, 78 );
-    iRemoteVideoPlayer->SetLcWindowRectL( rect );
-    EUNIT_ASSERT( iRemoteVideoPlayer->LcWindowRect() == rect )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngRemoteVideoPlayer::UT_LcWindowOrientationL()
-    {
-    iRemoteVideoPlayer->SetLcWindowOrientationL( MLcWindow::EPortrait );
-    EUNIT_ASSERT_EQUALS( TInt( MLcWindow::EPortrait ), 
-                         TInt( iRemoteVideoPlayer->LcWindowOrientationL() ) )
-    
-    iRemoteVideoPlayer->SetLcWindowOrientationL( MLcWindow::ELandscape );
-    EUNIT_ASSERT_EQUALS( TInt( MLcWindow::ELandscape ), 
-                         TInt( iRemoteVideoPlayer->LcWindowOrientationL() ) )
-    }
-
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusEngRemoteVideoPlayer,
-    "UT_CMusEngRemoteVideoPlayer",
-    "UNIT" )
-
-EUNIT_TEST(
-    "NewL - test ",
-    "CMusEngRemoteVideoPlayer",
-    "NewL",
-    "FUNCTIONALITY",
-    SetupL, UT_NewLL, Teardown)    
-    
-EUNIT_TEST(
-    "LcVideoPlayerState - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcVideoPlayerState",
-    "FUNCTIONALITY",
-    SetupL, UT_LcVideoPlayerStateL, Teardown)
-
-EUNIT_TEST(
-    "LcPlayL - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcPlayL",
-    "FUNCTIONALITY",
-    SetupL, UT_LcPlayL, Teardown)
-
-EUNIT_TEST(
-    "LcWindow - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcWindow",
-    "FUNCTIONALITY",
-    SetupL, UT_LcWindowL, Teardown)
-
-EUNIT_TEST(
-    "LcCameraControl - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcCameraControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcCameraControlL, Teardown)
-
-EUNIT_TEST(
-    "LcSourceFile - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcSourceFile",
-    "FUNCTIONALITY",
-    SetupL, UT_LcSourceFileControlL, Teardown)
-
-EUNIT_TEST(
-    "LcDestinationFile - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcDestinationFile",
-    "FUNCTIONALITY",
-    SetupL, UT_LcDestinationFileControlL, Teardown)
-
-EUNIT_TEST(
-    "LcAudioControl - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcAudioControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcAudioControlL, Teardown)
-
-EUNIT_TEST(
-    "LcZoomControl - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcZoomControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcZoomControlL, Teardown)
-
-EUNIT_TEST(
-    "LcBrightnessControl - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcBrightnessControl",
-    "FUNCTIONALITY",
-    SetupL, UT_LcBrightnessControlL, Teardown)
-
-EUNIT_TEST(
-    "EnableLcWindowL - test ",
-    "CMusEngRemoteVideoPlayer",
-    "EnableLcWindowL",
-    "FUNCTIONALITY",
-    SetupL, UT_EnableLcWindowL, Teardown)    
-        
-EUNIT_TEST(
-    "LcWindowRect - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcWindowRect",
-    "FUNCTIONALITY",
-    SetupL, UT_LcWindowRectL, Teardown)  
-        
-EUNIT_TEST(
-    "LcWindowOrientation - test ",
-    "CMusEngRemoteVideoPlayer",
-    "LcWindowOrientation",
-    "FUNCTIONALITY",
-    SetupL, UT_LcWindowOrientationL, Teardown)
-    
-    
-EUNIT_END_TEST_TABLE
-
-//  END OF FILE
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,637 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+//  INTERNAL INCLUDES
+#include "telephonyaudiorouting.h"
+#include "ut_musengsession.h"
+#include "musengstubs.h"
+#include "musengtestdefs.h"
+
+#include "musenglivesession.h"
+#include "musengtelephoneutils.h"
+#include "musengmceutils.h"
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/eunitmacros.h>
+#include <centralrepository.h>
+#include <mcedisplaysink.h>
+#include <e32property.h>
+#include <telephonydomainpskeys.h>
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusEngSession* UT_CMusEngSession::NewL()
+    {
+    UT_CMusEngSession* self = UT_CMusEngSession::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusEngSession* UT_CMusEngSession::NewLC()
+    {
+    UT_CMusEngSession* self = new( ELeave ) UT_CMusEngSession();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusEngSession::~UT_CMusEngSession()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Default constructor
+// -----------------------------------------------------------------------------
+//
+UT_CMusEngSession::UT_CMusEngSession()
+    :iLiveSession( NULL ),
+     iObserver( NULL )
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase construct
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::ConstructL()
+    {
+    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
+    // It generates the test case table.
+    CEUnitTestSuiteClass::ConstructL();
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::SetupL()
+    {
+    iObserver = new( ELeave ) CMusEngObserverStub;
+    iLiveSession = CMusEngLiveSession::NewL( KNullDesC(),
+                                             TRect(0,0, 100,100),
+                                             *iObserver,
+                                             *iObserver,
+                                             *iObserver );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::Teardown()
+    {
+    delete iLiveSession;
+    delete iObserver;
+    }
+
+
+
+// TEST CASES
+
+
+
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_RectL()
+    {
+    TRect rect = iLiveSession->Rect();
+    
+    // Initial values
+    EUNIT_ASSERT( rect.iTl.iX == 0 );
+    EUNIT_ASSERT( rect.iTl.iY == 0 );
+    EUNIT_ASSERT( rect.iBr.iX == 100 );
+    EUNIT_ASSERT( rect.iBr.iY == 100 );
+    
+    iLiveSession->iRect.iTl.iX = 100;
+    iLiveSession->iRect.iTl.iY = 200;
+    iLiveSession->iRect.iBr.iX = 300;
+    iLiveSession->iRect.iBr.iY = 400;
+    
+    rect = iLiveSession->Rect();
+    
+    EUNIT_ASSERT( rect.iTl.iX == 100 );
+    EUNIT_ASSERT( rect.iTl.iY == 200 );
+    EUNIT_ASSERT( rect.iBr.iX == 300 );
+    EUNIT_ASSERT( rect.iBr.iY == 400 );    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_SetRectLL()
+    {
+    TRect rect;
+
+    rect.iTl.iX = 100;
+    rect.iTl.iY = 200;
+    rect.iBr.iX = 300;
+    rect.iBr.iY = 400;
+
+    iLiveSession->SetRectL( rect );
+    
+    EUNIT_ASSERT( iLiveSession->iRect.iTl.iX == 100 );
+    EUNIT_ASSERT( iLiveSession->iRect.iTl.iY == 200 );
+    EUNIT_ASSERT( iLiveSession->iRect.iBr.iX == 300 );
+    EUNIT_ASSERT( iLiveSession->iRect.iBr.iY == 400 );
+
+    ESTABLISH_OUT_SESSION( iLiveSession );
+    
+    CMceDisplaySink* display = 
+                MusEngMceUtils::GetDisplayL( *( iLiveSession->iSession ) );
+    
+    TRect displayRect = display->DisplayRectL();
+    
+    EUNIT_ASSERT( displayRect.iTl.iX == 100 );
+    EUNIT_ASSERT( displayRect.iTl.iY == 200 );
+    EUNIT_ASSERT( displayRect.iBr.iX == 300 );
+    EUNIT_ASSERT( displayRect.iBr.iY == 400 );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_AudioRoutingCanBeChangedL()
+    {
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ELoudspeaker;
+    EUNIT_ASSERT( iLiveSession->AudioRoutingCanBeChanged() );
+    
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::EWiredAudioAccessory;
+    EUNIT_ASSERT( !iLiveSession->AudioRoutingCanBeChanged() );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//	
+void UT_CMusEngSession::UT_IsAudioRoutingHeadsetL()
+    {
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::EBTAudioAccessory;
+	EUNIT_ASSERT( iLiveSession->IsAudioRoutingHeadset() );
+    
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ENotActive;
+    EUNIT_ASSERT( !iLiveSession->IsAudioRoutingHeadset());
+    
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ENone;
+    EUNIT_ASSERT( !iLiveSession->IsAudioRoutingHeadset());
+    
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::EHandset;
+    EUNIT_ASSERT( !iLiveSession->IsAudioRoutingHeadset());
+    
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ELoudspeaker;
+    EUNIT_ASSERT( !iLiveSession->IsAudioRoutingHeadset());
+    
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::EWiredAudioAccessory;
+    EUNIT_ASSERT( iLiveSession->IsAudioRoutingHeadset());
+    
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ETTY;
+    EUNIT_ASSERT( !iLiveSession->IsAudioRoutingHeadset());
+    
+    }
+
+void UT_CMusEngSession::UT_IsAudioRoutingLoudSpeakerL()
+	{
+	iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+	              CTelephonyAudioRouting::ELoudspeaker;
+	iLiveSession->iTelephoneUtils->iAudioOutputAtStartup = 
+			      CTelephonyAudioRouting::ELoudspeaker;
+	EUNIT_ASSERT( !iLiveSession->IsAudioRoutingLoudSpeaker());
+	
+	iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+				  CTelephonyAudioRouting::ELoudspeaker;
+	iLiveSession->iTelephoneUtils->iAudioOutputAtStartup = 
+			      CTelephonyAudioRouting::EHandset;
+	EUNIT_ASSERT( iLiveSession->IsAudioRoutingLoudSpeaker() );
+	
+	iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+				  CTelephonyAudioRouting::ELoudspeaker;
+	iLiveSession->iTelephoneUtils->iAudioOutputAtStartup = 
+    		      CTelephonyAudioRouting::EBTAudioAccessory;
+    EUNIT_ASSERT( iLiveSession->IsAudioRoutingLoudSpeaker() );
+		
+    iLiveSession->iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ELoudspeaker;
+    iLiveSession->iTelephoneUtils->iAudioOutputAtStartup = 
+    		      CTelephonyAudioRouting::EWiredAudioAccessory;
+    EUNIT_ASSERT( iLiveSession->IsAudioRoutingLoudSpeaker() );
+	}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//        
+void UT_CMusEngSession::UT_EnableLoudspeakerLL()
+    {
+    // Almost dummy case is enough, because IsLoudSpeakerEnabled forwards 
+    // requests to CMusEngTelephonyUtils and is tested there. So test only
+    // fail handling
+    iLiveSession->EnableLoudspeakerL( EFalse, EFalse );
+    
+    CMusEngTelephoneUtils* telephone = iLiveSession->iTelephoneUtils;
+    
+    EUNIT_ASSERT( telephone->iTelephonyAudioRouting->iShowNoteMode == EFalse );
+    EUNIT_ASSERT( telephone->iTelephonyAudioRouting->iCurrentOutput != 
+                  CTelephonyAudioRouting::ELoudspeaker );
+    
+    telephone->iTelephonyAudioRouting->iForceFailWithCode = KErrNotSupported;
+    
+    //Must fail in HW, but not in emulator
+    TRAPD( error, iLiveSession->EnableLoudspeakerL( ETrue, ETrue ) );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    
+    #if (!defined (__WINS__) && !defined(__WINSCW__))
+        EUNIT_ASSERT( error == KErrNotSupported );
+    #else
+        EUNIT_ASSERT( error == KErrNone );
+    #endif
+    
+    EUNIT_ASSERT( telephone->iTelephonyAudioRouting->iCurrentOutput != 
+                  CTelephonyAudioRouting::ELoudspeaker );
+    
+    telephone->iTelephonyAudioRouting->iForceFailWithCode = KErrGeneral;
+
+    // Must fail in all cases 
+    TRAP( error, iLiveSession->EnableLoudspeakerL( EFalse, ETrue ) );
+    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
+    EUNIT_ASSERT( error == KErrGeneral );
+
+    EUNIT_ASSERT( telephone->iTelephonyAudioRouting->iCurrentOutput != 
+                  CTelephonyAudioRouting::ELoudspeaker );
+                  
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_IsLoudSpeakerEnabledL()
+    {
+    // Dummy case is enough, because IsLoudSpeakerEnabled forwards requests
+    // to CMusEngTelephonyUtils and is tested there.
+    
+    // By default loudspeaker is not enabled.
+    EUNIT_ASSERT( !iLiveSession->IsLoudSpeakerEnabled() );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_VolumeLL()
+    {
+    // Dummy case is enough, because VolumeL forwards requests
+    // to CMusEngTelephonyUtils and is tested there.
+    
+    iLiveSession->IsLoudSpeakerEnabled();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_MuteMicLL()
+    {
+    // Cannot test since EUnit notices some error leak if 
+    // the state of the mute is actually changed. Still, from MusEngine
+    // point of view everything is done identically despite the fact if
+    // real state changes or not. => Problem is in EUnit or leak happens
+    // elsewhere.
+    }
+
+
+// -----------------------------------------------------------------------------
+// Almost a dummy test since we cannot write
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_IsMicMutedLL()
+    {
+	// Ignore error (KErrAlreadyExists etc), just make sure this property exists
+    RProperty::Define( KPSUidTelMicrophoneMuteStatus,
+                       KTelMicrophoneMuteState,
+                       RProperty::EInt,
+                       0 );
+
+    User::LeaveIfError( RProperty::Set( KPSUidTelMicrophoneMuteStatus,
+                                        KTelMicrophoneMuteState,
+                                        EPSTelMicMuteStateUninitialized ) );
+    
+    EUNIT_ASSERT( !iLiveSession->IsMicMutedL() )
+
+    User::LeaveIfError( RProperty::Set( KPSUidTelMicrophoneMuteStatus,
+                                        KTelMicrophoneMuteState,
+                                        EPSTelMicMuteOn ) );
+    
+    EUNIT_ASSERT( iLiveSession->IsMicMutedL() )
+    
+    User::LeaveIfError( RProperty::Set( KPSUidTelMicrophoneMuteStatus,
+                                        KTelMicrophoneMuteState,
+                                        EPSTelMicMuteOff ) );
+    
+    EUNIT_ASSERT( !iLiveSession->IsMicMutedL() ) 
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_SetAudioRoutingObserverL()
+    {
+    EUNIT_ASSERT( !iLiveSession->iTelephoneUtils->iAudioRoutingObserver )
+    
+    iLiveSession->SetAudioRoutingObserver( iObserver );
+    
+    EUNIT_ASSERT_EQUALS( iLiveSession->iTelephoneUtils->iAudioRoutingObserver,
+                         iObserver )
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_VolumeUpLL()
+    {
+    CMusEngTelephoneUtils* telephone = iLiveSession->iTelephoneUtils;
+    
+    // Next ones must leave if runs out of memory, so that test
+    // does not fail when executed with alloc fail simulation 
+    User::LeaveIfError( telephone->iRepository->Set( 
+                                 KTelIncallEarVolume,
+                                 KTelephonyVolumeDefaultValue ) );
+    User::LeaveIfError( telephone->iRepository->Set( 
+                                 KTelIncallLoudspeakerVolume,
+                                 KTelephonyVolumeDefaultValue ) );
+    
+    
+    TInt earVolume = 0;
+    TInt speakerVolume = 0;
+                                 
+    iLiveSession->CMusEngSession::VolumeUpL();
+    
+    telephone->iRepository->Get( KTelIncallEarVolume,
+                                 earVolume );
+    telephone->iRepository->Get( KTelIncallLoudspeakerVolume,
+                                 speakerVolume );
+                                 
+    EUNIT_ASSERT( earVolume == KTelephonyVolumeDefaultValue + 1 );
+    EUNIT_ASSERT( speakerVolume == KTelephonyVolumeDefaultValue );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_VolumeDownLL()
+    {
+    CMusEngTelephoneUtils* telephone = iLiveSession->iTelephoneUtils;
+    
+    // Next ones must leave if runs out of memory, so that test
+    // does not fail when executed with alloc fail simulation 
+    User::LeaveIfError( telephone->iRepository->Set( 
+                                 KTelIncallEarVolume,
+                                 KTelephonyVolumeDefaultValue ) );
+    User::LeaveIfError( telephone->iRepository->Set( 
+                                 KTelIncallLoudspeakerVolume,
+                                 KTelephonyVolumeDefaultValue ) );
+    
+    
+    TInt earVolume = 0;
+    TInt speakerVolume = 0;
+                                 
+    iLiveSession->CMusEngSession::VolumeDownL();
+    
+    telephone->iRepository->Get( KTelIncallEarVolume,
+                                 earVolume );
+    telephone->iRepository->Get( KTelIncallLoudspeakerVolume,
+                                 speakerVolume );
+                                 
+    EUNIT_ASSERT( earVolume == KTelephonyVolumeDefaultValue - 1 );
+    EUNIT_ASSERT( speakerVolume == KTelephonyVolumeDefaultValue );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_SetVolumeLL()
+    {
+    CMusEngTelephoneUtils* telephone = iLiveSession->iTelephoneUtils;
+    
+    // Next ones must leave if runs out of memory, so that test
+    // does not fail when executed with alloc fail simulation 
+    User::LeaveIfError( telephone->iRepository->Set( 
+                                 KTelIncallEarVolume,
+                                 KTelephonyVolumeDefaultValue ) );
+    User::LeaveIfError( telephone->iRepository->Set( 
+                                 KTelIncallLoudspeakerVolume,
+                                 KTelephonyVolumeDefaultValue ) );
+    
+    
+    TInt earVolume = 0;
+    TInt speakerVolume = 0;
+    TInt newVolume = KTelephonyVolumeDefaultValue + 1;
+    
+    iLiveSession->CMusEngSession::SetVolumeL( newVolume );
+    
+    telephone->iRepository->Get( KTelIncallEarVolume,
+                                 earVolume );
+    telephone->iRepository->Get( KTelIncallLoudspeakerVolume,
+                                 speakerVolume );
+                                 
+    EUNIT_ASSERT( earVolume == newVolume );
+    EUNIT_ASSERT( speakerVolume == KTelephonyVolumeDefaultValue );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngSession::UT_SetVolumeChangeObserverL()
+    {
+    EUNIT_ASSERT( !iLiveSession->iVolumeObserver )
+    
+    iLiveSession->SetVolumeChangeObserver( iObserver );
+    
+    EUNIT_ASSERT_EQUALS( iLiveSession->iVolumeObserver, iObserver )
+    
+    iObserver->VolumeChanged( 2, EFalse );
+    EUNIT_ASSERT( iObserver->iVolume == 2 );
+    }
+
+
+//  TEST TABLE
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusEngSession,
+    "UT_CMusEngSesssion",
+    "UNIT" )
+
+EUNIT_TEST(
+    "Rect - test ",
+    "CMusEngSession",
+    "Rect",
+    "FUNCTIONALITY",
+    SetupL, UT_RectL, Teardown)
+
+EUNIT_TEST(
+    "SetRectL - test ",
+    "CMusEngSession",
+    "SetRectL",
+    "FUNCTIONALITY",
+    SetupL, UT_SetRectLL, Teardown)
+
+EUNIT_TEST(
+    "AudioRoutingCanBeChanged - test ",
+    "CMusEngSession",
+    "AudioRoutingCanBeChanged",
+    "FUNCTIONALITY",
+    SetupL, UT_AudioRoutingCanBeChangedL, Teardown)
+
+EUNIT_TEST(
+    "IsAudioRoutingHeadsetL - test ",
+    "CMusEngSession",
+    "IsAudioRoutingHeadsetL",
+    "FUNCTIONALITY",
+    SetupL, UT_IsAudioRoutingHeadsetL, Teardown)
+    
+EUNIT_TEST(
+    "IsAudioRoutingLoudSpeakerL - test ",
+    "CMusEngSession",
+    "IsAudioRoutingLoudSpeakerL",
+    "FUNCTIONALITY",
+    SetupL, UT_IsAudioRoutingLoudSpeakerL, Teardown)
+
+EUNIT_TEST(
+    "EnableLoudspeakerL - test ",
+    "CMusEngSession",
+    "EnableLoudspeakerL",
+    "FUNCTIONALITY",
+    SetupL, UT_EnableLoudspeakerLL, Teardown)
+
+EUNIT_TEST(
+    "IsLoudSpeakerEnabled - test ",
+    "CMusEngSession",
+    "IsLoudSpeakerEnabled",
+    "FUNCTIONALITY",
+    SetupL, UT_IsLoudSpeakerEnabledL, Teardown)
+
+EUNIT_TEST(
+    "VolumeL - test ",
+    "CMusEngSession",
+    "VolumeL",
+    "FUNCTIONALITY",
+    SetupL, UT_VolumeLL, Teardown)
+
+EUNIT_TEST(
+    "MuteMicL - test ",
+    "CMusEngSession",
+    "MuteMicL",
+    "FUNCTIONALITY",
+    SetupL, UT_MuteMicLL, Teardown)
+
+EUNIT_TEST(
+    "IsMicMutedL - test ",
+    "CMusEngSession",
+    "IsMicMutedL",
+    "FUNCTIONALITY",
+    SetupL, UT_IsMicMutedLL, Teardown)    
+
+EUNIT_TEST(
+    "SetAudioRoutingObserverL - test ",
+    "CMusEngSession",
+    "SetAudioRoutingObserverL",
+    "FUNCTIONALITY",
+    SetupL, UT_SetAudioRoutingObserverL, Teardown)    
+        
+EUNIT_TEST(
+    "VolumeUpL - test ",
+    "CMusEngSession",
+    "VolumeUpL",
+    "FUNCTIONALITY",
+    SetupL, UT_VolumeUpLL, Teardown)
+
+EUNIT_TEST(
+    "VolumeDownL - test ",
+    "CMusEngSession",
+    "VolumeDownL",
+    "FUNCTIONALITY",
+    SetupL, UT_VolumeDownLL, Teardown)        
+
+EUNIT_TEST(
+    "SetVolumeL - test ",
+    "CMusEngSession",
+    "SetVolumeL",
+    "FUNCTIONALITY",
+    SetupL, UT_SetVolumeLL, Teardown) 
+    
+EUNIT_TEST(
+    "SetVolumeChangeObserver - test ",
+    "CMusEngSession",
+    "SetVolumeChangeObserver",
+    "FUNCTIONALITY",
+    SetupL, UT_SetVolumeChangeObserverL, Teardown) 
+
+
+EUNIT_END_TEST_TABLE
+
+//  END OF FILE
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengsessionmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include "musengstubs.h"
-#include "ut_musengsessionmanager.h"
-#include "musengsessionmanager.h"
-#include "musengmcesession.h"
-#include "musengmceoutsession.h"
-#include "mussessionproperties.h"
-#include "centralrepository.h"
-#include "e32property.h"
-#include "musengtestdefs.h"
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngSessionManager* UT_CMusEngSessionManager::NewL()
-    {
-    UT_CMusEngSessionManager* self = UT_CMusEngSessionManager::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngSessionManager* UT_CMusEngSessionManager::NewLC()
-    {
-    UT_CMusEngSessionManager* self = new( ELeave )UT_CMusEngSessionManager();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngSessionManager::~UT_CMusEngSessionManager()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngSessionManager::UT_CMusEngSessionManager()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSessionManager::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }
-    
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSessionManager::SetupL()
-    {
-    User::LeaveIfError(
-        RProperty::Set( 
-            NMusSessionApi::KCategoryUid, 
-            NMusSessionApi::KUseCase, 
-            MultimediaSharing::EMusLiveVideo ) );
-    iSessionManager = CMusEngSessionManager::NewL();
-    
-    iLcUiProvider = new( ELeave )CLcUiProviderStub;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSessionManager::Teardown()
-    {
-    delete iSessionManager;
-    delete iLcUiProvider;
-    // The Central Repository stub is using RProperty stub to store global data. 
-    // The global data must be freed here.
-    PropertyHelper::Close(); 
-    }
-
-// TEST CASES
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSessionManager::UT_NewL()
-    {
-    EUNIT_ASSERT( iSessionManager->iSession != NULL )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSessionManager::UT_SessionL()
-    {
-    EUNIT_ASSERT( iSessionManager->iSession == &( iSessionManager->Session() ) )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSessionManager::UT_IsFeatureSupportedL()
-    {
-    EUNIT_ASSERT( 
-        iSessionManager->IsFeatureSupported( CLcEngine::ELcShowAcceptQuery ) )
-        
-    EUNIT_ASSERT( 
-        iSessionManager->IsFeatureSupported( CLcEngine::ELcShowInvitingNote ) )
-        
-    EUNIT_ASSERT( 
-        iSessionManager->IsFeatureSupported( CLcEngine::ELcShowWaitingNote ) )        
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSessionManager::UT_CreateMusSessionL()
-    {
-    CMusEngMceSession* session = NULL;
-
-    // Live session
-    session = 
-        iSessionManager->CreateMusSessionL( 
-            MultimediaSharing::EMusLiveVideo );
-    EUNIT_ASSERT( session != NULL )
-    delete session;
-
-    // Clip session
-    session =
-        iSessionManager->CreateMusSessionL( 
-            MultimediaSharing::EMusClipVideo );
-    EUNIT_ASSERT( session != NULL )
-    delete session;    
-    
-    // Receive session
-    session = 
-        iSessionManager->CreateMusSessionL( 
-            MultimediaSharing::EMusReceive );   
-    EUNIT_ASSERT( session != NULL )
-    delete session;
-
-    // Two way session
-    session = 
-        iSessionManager->CreateMusSessionL( 
-            MultimediaSharing::EMusTwoWayVideo );
-    EUNIT_ASSERT( session != NULL )
-    delete session;
-    
-    // Two way receive session
-    session = 
-        iSessionManager->CreateMusSessionL( 
-            MultimediaSharing::EMusReceiveTwoWayVideo );   
-    EUNIT_ASSERT( session != NULL )
-    delete session;    
-    
-    // Other session types
-    EUNIT_ASSERT_SPECIFIC_LEAVE(
-        iSessionManager->CreateMusSessionL( MultimediaSharing::EMusStillImage ),
-        KErrNotSupported )
-
-    EUNIT_ASSERT_SPECIFIC_LEAVE(
-        iSessionManager->CreateMusSessionL( MultimediaSharing::EMusContinue ),
-        KErrNotSupported )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSessionManager::UT_PropertyChangedL()
-    {
-    iSessionManager->Session().SetLcUiProvider( iLcUiProvider );
-
-    // Background startup not active, property change ignored
-    MLcSession* origSession = &iSessionManager->Session();
-    iSessionManager->PropertyChanged( 
-            NMusSessionApi::KUseCase, MultimediaSharing::EMusReceiveTwoWayVideo );
-    
-    EUNIT_ASSERT( origSession == &iSessionManager->Session() );
-    EUNIT_ASSERT( iLcUiProvider->iCalledFunction != CLcUiProviderStub::EHandleForegroundStatus );
-    
-    // Background startup active, usecase not changed, no effect
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid, 
-                    NMusSessionApi::KFastMode, 
-                    MusSettingsKeys::EFastModeOn ) );
-    iSessionManager->iSession->iBackground = ETrue;
-    origSession = &iSessionManager->Session();
-    iSessionManager->PropertyChanged( 
-            NMusSessionApi::KUseCase, iSessionManager->iCurrentUseCase );
-    
-    EUNIT_ASSERT( origSession == &iSessionManager->Session() );
-    EUNIT_ASSERT( iLcUiProvider->iCalledFunction != CLcUiProviderStub::EHandleForegroundStatus );
-
-    // Background startup active, usecase changed, uiprovider informed and
-    // new session replaces old one
-    origSession = &iSessionManager->Session();
-    iSessionManager->PropertyChanged( 
-            NMusSessionApi::KUseCase, MultimediaSharing::EMusClipVideo );
-    if ( origSession == &iSessionManager->Session() )
-        {
-        // Couldn't create new session because running out of memory
-        User::Leave( KErrNoMemory );
-        }
-    EUNIT_ASSERT( origSession != &iSessionManager->Session() );
-    EUNIT_ASSERT( iLcUiProvider->iCalledFunction == CLcUiProviderStub::EHandleForegroundStatus );
-    EUNIT_ASSERT( iLcUiProvider->iForeground );
-    }
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusEngSessionManager,
-    "UT_CMusEngSessionManager",
-    "UNIT" )
-
-EUNIT_TEST(
-    "NewL - test ",
-    "CMusEngSessionManager",
-    "NewL",
-    "FUNCTIONALITY",
-    SetupL, UT_NewL, Teardown)
-
-EUNIT_TEST(
-    "Session - test ",
-    "CMusEngSessionManager",
-    "Session",
-    "FUNCTIONALITY",
-    SetupL, UT_SessionL, Teardown)
-
-EUNIT_TEST(
-    "IsFeatureSupported - test ",
-    "CMusEngSessionManager",
-    "IsFeatureSupported",
-    "FUNCTIONALITY",
-    SetupL, UT_IsFeatureSupportedL, Teardown)
-
-EUNIT_TEST(
-    "CreateMusSessionL - test ",
-    "CMusEngSessionManager",
-    "CreateMusSessionL",
-    "FUNCTIONALITY",
-    SetupL, UT_CreateMusSessionL, Teardown)
-
-EUNIT_TEST(
-    "PropertyChanged - test ",
-    "CMusEngSessionManager",
-    "PropertyChanged",
-    "FUNCTIONALITY",
-    SetupL, UT_PropertyChangedL, Teardown)
-    
-EUNIT_END_TEST_TABLE
-
-
-//  END OF FILE
-
-
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengsipprofilehandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengsipprofilehandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -23,6 +23,7 @@
 #include "musengtestdefs.h"
 #include "sipprofilealrcontroller.h"
 
+
 //  SYSTEM INCLUDES
 #include <sipprofile.h>
 #include <digia/eunit/eunitmacros.h>
@@ -30,6 +31,7 @@
 
 const TUint KSipProfileId( 1 );
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -85,16 +87,25 @@
     // It generates the test case table.
     CEUnitTestSuiteClass::ConstructL();
     }
+    
 
-
+// -----------------------------------------------------------------------------
+// From MMusSipProfileUser
+// -----------------------------------------------------------------------------
+//
+TBool UT_CMusEngSipProfileHandler::IsRoamingBetweenAPsAllowed()
+    {
+    return iRoamingBetweenAPsAllowed;
+    }
+    
+   
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void UT_CMusEngSipProfileHandler::SetupL()
     {
-    iObserver = new( ELeave ) CMusEngObserverStub;
-    iProfileHandler = CMusSipProfileHandler::NewL( *iObserver );
+    iProfileHandler = CMusSipProfileHandler::NewL( *this );
     }
 
 
@@ -105,7 +116,7 @@
 void UT_CMusEngSipProfileHandler::Teardown()
     {
     delete iProfileHandler;
-    delete iObserver;
+    iRoamingBetweenAPsAllowed = EFalse;
     }
 
 
@@ -116,7 +127,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngSipProfileHandler::UT_CreateSipProfileLL()
+void UT_CMusEngSipProfileHandler::UT_CMusEngSipProfileHandler_CreateSipProfileLL()
     {
     // SIP profile ID zero
     iProfileHandler->CreateProfileL( 0 );
@@ -137,7 +148,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngSipProfileHandler::UT_ProfileIdL()
+void UT_CMusEngSipProfileHandler::UT_CMusEngSipProfileHandler_ProfileIdL()
     {
     // SIP profile does not yet exist
     EUNIT_ASSERT_EQUALS( 0, iProfileHandler->ProfileId() )
@@ -151,7 +162,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngSipProfileHandler::UT_AlrEventL()
+void UT_CMusEngSipProfileHandler::UT_CMusEngSipProfileHandler_AlrEventL()
     {
     const TUint32 KSnapId( 1 );
     const TUint32 KIapId( 1 );
@@ -218,7 +229,7 @@
     iProfileHandler->iProfileAlrController->iLastUsedIap = 0;
     
     // Event is EIapAvailable, SIP profile ID matches, roaming not allowed
-    iObserver->iRoamingBetweenAPsAllowed = ETrue;
+    iRoamingBetweenAPsAllowed = ETrue;
     iProfileHandler->AlrEvent( 
         MSipProfileAlrObserver::EIapAvailable, 
         KSipProfileId, KSnapId, KIapId );
@@ -240,10 +251,9 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngSipProfileHandler::UT_NullTestsL()
+void UT_CMusEngSipProfileHandler::UT_CMusEngSipProfileHandler_NullTestsL()
     {
     // Dummies
-    
     CSIPTransactionBase transactionBase;
     CSIPServerTransaction serverTransaction;
     CSIPDialog dialog;
@@ -253,7 +263,8 @@
     CSIPRefresh refresh;
     
     // Tests
-
+    iProfileHandler->ProfileRegistryEventOccurred( 0,
+                                MSIPProfileRegistryObserver::EProfileCreated );
     iProfileHandler->ProfileRegistryErrorOccurred( 0, 0 );
     iProfileHandler->IncomingRequest( 0, NULL );
     iProfileHandler->TimedOut( serverTransaction );
@@ -279,7 +290,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusEngSipProfileHandler::UT_UserFromProfileLCL()
+void UT_CMusEngSipProfileHandler::UT_CMusEngSipProfileHandler_UserFromProfileLCL()
     {
     iProfileHandler->CreateProfileL( KSipProfileId );
     CSIPProfile* profile = iProfileHandler->Profile();
@@ -302,58 +313,6 @@
     CleanupStack::PopAndDestroy( user );
     }
 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSipProfileHandler::UT_IsRegisteredL()
-    {
-    EUNIT_ASSERT( !iProfileHandler->IsRegistered( ) )
-    iProfileHandler->CreateProfileL( KSipProfileId );
-    EUNIT_ASSERT( iProfileHandler->IsRegistered( ) )   
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngSipProfileHandler::UT_ProfileRegistryEventOccurredL()
-    {    
-    // No profile yet
-    iProfileHandler->ProfileRegistryEventOccurred( 0,
-                            MSIPProfileRegistryObserver::EProfileRegistered );
-    EUNIT_ASSERT( iObserver->IsReseted() )
-    
-    // Create profile, but notify about registration of some other profile
-    iProfileHandler->CreateProfileL( 1 );
-    iProfileHandler->ProfileRegistryEventOccurred( 2,
-                            MSIPProfileRegistryObserver::EProfileRegistered );
-    EUNIT_ASSERT( iObserver->IsReseted() )
-    
-    // Normal case
-    iProfileHandler->ProfileRegistryEventOccurred( 1,
-                                MSIPProfileRegistryObserver::EProfileRegistered );
-    EUNIT_ASSERT( iObserver->iProfileRegisteredCalled )
-    iObserver->Reset();
-    
-    // React exclusively to EProfileRegistered
-    iProfileHandler->ProfileRegistryEventOccurred( 1,
-                            MSIPProfileRegistryObserver::EProfileCreated );
-    EUNIT_ASSERT( iObserver->IsReseted() )
-    iProfileHandler->ProfileRegistryEventOccurred( 1,
-                            MSIPProfileRegistryObserver::EProfileUpdated );
-    EUNIT_ASSERT( iObserver->IsReseted() )
-    iProfileHandler->ProfileRegistryEventOccurred( 1,
-                            MSIPProfileRegistryObserver::EProfileDeregistered );
-    EUNIT_ASSERT( iObserver->IsReseted() )
-    iProfileHandler->ProfileRegistryEventOccurred( 1,
-                            MSIPProfileRegistryObserver::EProfileDestroyed );
-    EUNIT_ASSERT( iObserver->IsReseted() )
-    }
-
-
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE(
@@ -366,50 +325,36 @@
     "CMusSipProfileHandler",
     "CreateSipProfileL",
     "FUNCTIONALITY",
-    SetupL, UT_CreateSipProfileLL, Teardown)    
-    
+    SetupL, UT_CMusEngSipProfileHandler_CreateSipProfileLL, Teardown)
+
 EUNIT_TEST(
     "ProfileId - test ",
     "CMusSipProfileHandler",
     "ProfileId",
     "FUNCTIONALITY",
-    SetupL, UT_ProfileIdL, Teardown)
+    SetupL, UT_CMusEngSipProfileHandler_ProfileIdL, Teardown)
     
 EUNIT_TEST(
     "AlrEventL - test ",
     "CMusEngSipProfileHandler",
     "AlrEventL",
     "FUNCTIONALITY",
-    SetupL, UT_AlrEventL, Teardown)
-    
+    SetupL, UT_CMusEngSipProfileHandler_AlrEventL, Teardown)
+
 EUNIT_TEST(
     "Null tests for NOP functions",
     "CMusEngSipProfileHandler",
     "Several NOP functions",
     "FUNCTIONALITY",
-    SetupL, UT_NullTestsL, Teardown)
+    SetupL, UT_CMusEngSipProfileHandler_NullTestsL, Teardown)
 
 EUNIT_TEST(
     "UserFromProfileLC - test ",
-    "CMusEngSipProfileHandler",
+    "CMusEngOutSession",
     "UserFromProfileLC",
     "FUNCTIONALITY",
-    SetupL, UT_UserFromProfileLCL, Teardown)
-
-EUNIT_TEST(
-    "IsRegistered - test ",
-    "CMusEngSipProfileHandler",
-    "IsRegistered",
-    "FUNCTIONALITY",
-    SetupL, UT_IsRegisteredL, Teardown)
-
-EUNIT_TEST(
-    "ProfileRegistryEventOccurred - test ",
-    "CMusEngSipProfileHandler",
-    "ProfileRegistryEventOccurred",
-    "FUNCTIONALITY",
-    SetupL, UT_ProfileRegistryEventOccurredL, Teardown)    
-    
+    SetupL, UT_CMusEngSipProfileHandler_UserFromProfileLCL, Teardown)
+        
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtelephoneutils.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtelephoneutils.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -27,7 +27,7 @@
 //  SYSTEM INCLUDES
 #include <digia/eunit/eunitmacros.h>
 #include <centralrepository.h>
-#include <e32property.h>
+
 
 
 
@@ -95,24 +95,27 @@
 void UT_CMusEngTelephoneUtils::SetupL()
     {
     iObserver = new( ELeave ) CMusEngObserverStub;
-    iTelephoneUtils = CMusEngTelephoneUtils::NewL( *iObserver );
+    iTelephoneUtils = CMusEngTelephoneUtils::NewL();
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void UT_CMusEngTelephoneUtils::Teardown()
     {
+    delete iObserver;
     delete iTelephoneUtils;
-    iTelephoneUtils = NULL;
-    delete iObserver;
-    iObserver = NULL;
-    PropertyHelper::Close();
     }
 
 
-// TEST CASES  
+
+// TEST CASES
+
+
+
+    
 
 // -----------------------------------------------------------------------------
 //
@@ -152,13 +155,77 @@
     
     iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
                   CTelephonyAudioRouting::EBTAudioAccessory;
-    EUNIT_ASSERT( !iTelephoneUtils->AudioRoutingCanBeChanged() );
+    EUNIT_ASSERT( iTelephoneUtils->AudioRoutingCanBeChanged() );
     
     iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
                   CTelephonyAudioRouting::ETTY;
-    EUNIT_ASSERT( !iTelephoneUtils->AudioRoutingCanBeChanged() );         
+    EUNIT_ASSERT( !iTelephoneUtils->AudioRoutingCanBeChanged() );
+            
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//	   
+void UT_CMusEngTelephoneUtils::UT_IsAudioRoutingHeadsetL()
+    {
+    iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::EBTAudioAccessory;
+    EUNIT_ASSERT( iTelephoneUtils->IsAudioRoutingHeadset());
+    
+    iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ENotActive;
+    EUNIT_ASSERT( !iTelephoneUtils->IsAudioRoutingHeadset() );
+       
+    iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ENone;
+    EUNIT_ASSERT( !iTelephoneUtils->IsAudioRoutingHeadset() );
+    
+    iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::EHandset;
+    EUNIT_ASSERT( !iTelephoneUtils->IsAudioRoutingHeadset() );
+    
+    iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ELoudspeaker;
+    EUNIT_ASSERT( !iTelephoneUtils->IsAudioRoutingHeadset() );
+    
+    iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::EWiredAudioAccessory;
+    EUNIT_ASSERT( iTelephoneUtils->IsAudioRoutingHeadset() );
+    
+    iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ETTY;
+    EUNIT_ASSERT( !iTelephoneUtils->IsAudioRoutingHeadset() );
+            
     }
 
+void UT_CMusEngTelephoneUtils::UT_IsAudioRoutingLoudSpeakerL()
+	{
+	iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+	              CTelephonyAudioRouting::ELoudspeaker;
+	iTelephoneUtils->iAudioOutputAtStartup = 
+			      CTelephonyAudioRouting::ELoudspeaker;
+	EUNIT_ASSERT( !iTelephoneUtils->IsAudioRoutingLoudSpeaker());
+	
+	iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+				  CTelephonyAudioRouting::ELoudspeaker;
+	iTelephoneUtils->iAudioOutputAtStartup = 
+			      CTelephonyAudioRouting::EHandset;
+	EUNIT_ASSERT( iTelephoneUtils->IsAudioRoutingLoudSpeaker() );
+	
+	iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+				  CTelephonyAudioRouting::ELoudspeaker;
+    iTelephoneUtils->iAudioOutputAtStartup = 
+    		      CTelephonyAudioRouting::EBTAudioAccessory;
+    EUNIT_ASSERT( iTelephoneUtils->IsAudioRoutingLoudSpeaker() );
+		
+    iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
+                  CTelephonyAudioRouting::ELoudspeaker;
+    iTelephoneUtils->iAudioOutputAtStartup = 
+    		      CTelephonyAudioRouting::EWiredAudioAccessory;
+    EUNIT_ASSERT( iTelephoneUtils->IsAudioRoutingLoudSpeaker() );
+	}
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -170,18 +237,19 @@
                   CTelephonyAudioRouting::EHandset;
     
     // Set loudspeaker on, succeeds
-    iTelephoneUtils->LoudspeakerL( ETrue );
+    iTelephoneUtils->LoudspeakerL( ETrue, ETrue );
     EUNIT_ASSERT( iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput ==
                   CTelephonyAudioRouting::ELoudspeaker );
     EUNIT_ASSERT( iTelephoneUtils->iTelephonyAudioRouting->iShowNoteMode ==
                   EFalse );
+    EUNIT_ASSERT( iTelephoneUtils->iShowDialog == ETrue );
     
     // Change conditions
     iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput =
                   CTelephonyAudioRouting::EWiredAudioAccessory;              
     
     // Try to set loudspeaker on, fails because current set is not handset
-    iTelephoneUtils->LoudspeakerL( ETrue );
+    iTelephoneUtils->LoudspeakerL( ETrue, ETrue );
     EUNIT_ASSERT( iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput ==
                   CTelephonyAudioRouting::EWiredAudioAccessory );  
     
@@ -192,7 +260,7 @@
                   CTelephonyAudioRouting::ELoudspeaker;  
                               
     // Try to set loudspeaker off, goes to handset
-    iTelephoneUtils->LoudspeakerL( EFalse );   
+    iTelephoneUtils->LoudspeakerL( EFalse, ETrue );   
     EUNIT_ASSERT( iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput ==
                   CTelephonyAudioRouting::EHandset );  
     
@@ -203,11 +271,12 @@
                   CTelephonyAudioRouting::EWiredAudioAccessory; 
     
     // Try to set loudspeaker off, goes to wired
-    iTelephoneUtils->LoudspeakerL( EFalse );   
+    iTelephoneUtils->LoudspeakerL( EFalse, ETrue );   
     EUNIT_ASSERT( iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput ==
                   CTelephonyAudioRouting::EWiredAudioAccessory ); 
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -223,6 +292,7 @@
     EUNIT_ASSERT( !iTelephoneUtils->IsLoudSpeakerEnabled() );
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -240,8 +310,10 @@
     
     volume = iTelephoneUtils->GetVolumeL();
     EUNIT_ASSERT( volume == 8 );
+    
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -292,6 +364,7 @@
     EUNIT_ASSERT( loudSpeakerVolume == 10 );
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -304,56 +377,94 @@
                             *iTelephoneUtils->iTelephonyAudioRouting );
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void UT_CMusEngTelephoneUtils::UT_OutputChangedL()
     {
-    // Loudspeaker
     iTelephoneUtils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
     
     iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput = 
-        CTelephonyAudioRouting::ELoudspeaker;
+                                        CTelephonyAudioRouting::ELoudspeaker;
+    iTelephoneUtils->iRepository->Set( KTelIncallLoudspeakerVolume, 8 );
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 4 )
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
     
     iTelephoneUtils->OutputChanged( *iTelephoneUtils->iTelephonyAudioRouting );
                                                                 
     EUNIT_ASSERT_EQUALS( iTelephoneUtils->iAudioOutputAtStartup, 
                          CTelephonyAudioRouting::ELoudspeaker )
-    EUNIT_ASSERT( iObserver->iAudioRoutingChangedCalled )
+    
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 8 )
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
+    // Test observer
     
-    // Handset   
+    iTelephoneUtils->SetAudioRoutingObserver( iObserver );
+    iTelephoneUtils->SetVolumeChangeObserver(iObserver);
+    
     iTelephoneUtils->iTelephonyAudioRouting->iCurrentOutput = 
-        CTelephonyAudioRouting::EHandset;
+                                        CTelephonyAudioRouting::EHandset;
     
     iTelephoneUtils->OutputChanged( *iTelephoneUtils->iTelephonyAudioRouting );
-                                                                
+    
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 4 )
+    EUNIT_ASSERT( iObserver->iVolume == 4 );                                                               
     EUNIT_ASSERT_EQUALS( iTelephoneUtils->iAudioOutputAtStartup,
                          CTelephonyAudioRouting::EHandset )
     
     EUNIT_ASSERT( iObserver->iAudioRoutingChangedCalled )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void UT_CMusEngTelephoneUtils::UT_SetOutputCompleteL()
     {
+    iTelephoneUtils->SetAudioRoutingObserver( iObserver );
+    iTelephoneUtils->SetVolumeChangeObserver(iObserver);
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 4 )
+
     // Setoutput fails
     iTelephoneUtils->SetOutputComplete( 
                             *iTelephoneUtils->iTelephonyAudioRouting,
-                            KErrGeneral );                         
+                            KErrGeneral );
+                            
     EUNIT_ASSERT( !iObserver->iAudioRoutingChangedCalled )
-    iObserver->Reset();
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
     
-    // Setoutput ok
+    // Setoutput succesful and note is shown by audiorouting api
+    // There's already next pending setoutput for which we are going to
+    // show note -> that cannot be forgotten
+    iTelephoneUtils->iRepository->Set( KTelIncallEarVolume, 5 );
+    iTelephoneUtils->iShowDialog = ETrue;
+    iTelephoneUtils->iTelephonyAudioRouting->SetShowNote( ETrue );
     iTelephoneUtils->SetOutputComplete( 
                             *iTelephoneUtils->iTelephonyAudioRouting,
                             KErrNone );
-    EUNIT_ASSERT( iObserver->iAudioRoutingChangedCalled )
+    EUNIT_ASSERT( iObserver->iAudioRoutingChangedCalled == ETrue )
+    EUNIT_ASSERT( iObserver->iShowNote == EFalse )
+    EUNIT_ASSERT( iTelephoneUtils->iShowDialog == ETrue )
+    EUNIT_ASSERT( iObserver->iVolume == 5 );
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 5 )
+    
+    iObserver->Reset();
+    
+    // Setoutput succesful and note is shown by us
+    iTelephoneUtils->iTelephonyAudioRouting->SetShowNote( EFalse );
+    iTelephoneUtils->SetOutputComplete( 
+                            *iTelephoneUtils->iTelephonyAudioRouting,
+                            KErrNone );
+    EUNIT_ASSERT( iObserver->iAudioRoutingChangedCalled == ETrue )
+    EUNIT_ASSERT( iObserver->iShowNote == ETrue )
+    EUNIT_ASSERT( iTelephoneUtils->iShowDialog == EFalse )
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -365,6 +476,7 @@
     EUNIT_ASSERT( iTelephoneUtils->ValidateVolume( 5 ) == 5 );
     }
 
+
 // -----------------------------------------------------------------------------
 // We cannot assert anything after destruction. All we can do is to make
 // such condition before destruction that coverage will be achieved.
@@ -373,48 +485,139 @@
 void UT_CMusEngTelephoneUtils::UT_DestructorL()
     {
     // Simulate that 2nd phase construction has not succeeded
-    CMusEngTelephoneUtils* utils = CMusEngTelephoneUtils::NewL( *iObserver );
+    CMusEngTelephoneUtils* utils = CMusEngTelephoneUtils::NewL();
     CleanupStack::PushL( utils );
     delete utils->iTelephonyAudioRouting;
     utils->iTelephonyAudioRouting = NULL;
     CleanupStack::PopAndDestroy( utils );
     
     // Simulate that current audio output mode is same as original
-    utils = CMusEngTelephoneUtils::NewL( *iObserver );
+    utils = CMusEngTelephoneUtils::NewL();
     CleanupStack::PushL( utils );
     utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
     utils->iTelephonyAudioRouting->iCurrentOutput = 
-                                            CTelephonyAudioRouting::EHandset;
+                                        CTelephonyAudioRouting::EHandset;
+    CTelephonyAudioRouting::iPreviousOutput = 
+                                        CTelephonyAudioRouting::ELoudspeaker;
     CleanupStack::PopAndDestroy( utils );
+    EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput == 
+                  CTelephonyAudioRouting::ELoudspeaker )
     
     // Simulate that current audio output mode is not the same as original,
     // Setting fails
-    utils = CMusEngTelephoneUtils::NewL( *iObserver );
+    utils = CMusEngTelephoneUtils::NewL();
+    CleanupStack::PushL( utils );
+    utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
+    utils->iTelephonyAudioRouting->iCurrentOutput = 
+                                    CTelephonyAudioRouting::ELoudspeaker;
+    CTelephonyAudioRouting::iPreviousOutput = 
+                                    CTelephonyAudioRouting::EHandset;
+    utils->iTelephonyAudioRouting->iForceFailWithCode = KErrGeneral;
+    CleanupStack::PopAndDestroy( utils );
+    EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput == 
+                  CTelephonyAudioRouting::EHandset )
+    EUNIT_ASSERT( CTelephonyAudioRouting::iCurrentOutput == 
+                  CTelephonyAudioRouting::ELoudspeaker )
+    
+    // Simulate that current audio output mode is not the same as original,
+    // Setting succeeds
+    utils = CMusEngTelephoneUtils::NewL();
     CleanupStack::PushL( utils );
     utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
     utils->iTelephonyAudioRouting->iCurrentOutput = 
                                     CTelephonyAudioRouting::ELoudspeaker;
-    utils->iTelephonyAudioRouting->iForceFailWithCode = KErrGeneral;
+    CTelephonyAudioRouting::iPreviousOutput = 
+                                    CTelephonyAudioRouting::EHandset;
     CleanupStack::PopAndDestroy( utils );
+    EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput == 
+                  CTelephonyAudioRouting::ELoudspeaker )
+    EUNIT_ASSERT( CTelephonyAudioRouting::iCurrentOutput == 
+                  CTelephonyAudioRouting::EHandset )
     
     // Simulate that current audio output mode is not the same as original,
-    // Setting succeeds
-    utils = CMusEngTelephoneUtils::NewL( *iObserver );
+    // Setting not done due to special case handling (ENotActive)
+    utils = CMusEngTelephoneUtils::NewL();
+    CleanupStack::PushL( utils );
+    utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
+    utils->iTelephonyAudioRouting->iCurrentOutput = 
+                                    CTelephonyAudioRouting::ENotActive;
+    CTelephonyAudioRouting::iPreviousOutput = 
+                                    CTelephonyAudioRouting::ELoudspeaker;
+    CleanupStack::PopAndDestroy( utils );
+    EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput == 
+                  CTelephonyAudioRouting::ELoudspeaker )
+    EUNIT_ASSERT( CTelephonyAudioRouting::iCurrentOutput == 
+                  CTelephonyAudioRouting::ENotActive )                  
+                  
+    // Simulate that current audio output mode is not the same as original,
+    // Setting does not succeed as observer does not allow changes anymore
+    utils = CMusEngTelephoneUtils::NewL();
+    iObserver->iAudioRouteChangeAllowed = EFalse;
+    utils->SetAudioRoutingObserver( iObserver );
     CleanupStack::PushL( utils );
     utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
     utils->iTelephonyAudioRouting->iCurrentOutput = 
                                     CTelephonyAudioRouting::ELoudspeaker;
+    CTelephonyAudioRouting::iPreviousOutput = 
+                                    CTelephonyAudioRouting::EHandset;
     CleanupStack::PopAndDestroy( utils );
+    EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput == 
+                  CTelephonyAudioRouting::EHandset )
+    EUNIT_ASSERT( CTelephonyAudioRouting::iCurrentOutput == 
+                  CTelephonyAudioRouting::ELoudspeaker )
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngTelephoneUtils::UT_UpdateCurrentVolumeL()
+    {    
+    //Volume changed, no observer
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 4 )
+    iTelephoneUtils->iRepository->Set( KTelIncallEarVolume, 5 );
+    iTelephoneUtils->UpdateCurrentVolume(EFalse);
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 5 )
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
+
+    //Volume changed, observer set
+    iTelephoneUtils->SetVolumeChangeObserver(iObserver);
+    iTelephoneUtils->iRepository->Set( KTelIncallEarVolume, 6 );
+    iTelephoneUtils->UpdateCurrentVolume(EFalse);
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 6 )
+    EUNIT_ASSERT( iObserver->iVolume == 6 );
+
+    //Volume didn't change, observer not notified
+    iObserver->iVolume = 0;
+    iTelephoneUtils->UpdateCurrentVolume(EFalse);
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 6 )
+    EUNIT_ASSERT( iObserver->iVolume == 0 );    
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusEngTelephoneUtils::UT_HandleNotifyGenericL()
+    {
+    //Loudspeakers volume changed, no observer
+    iTelephoneUtils->iRepository->Set( KTelIncallLoudspeakerVolume, 8 );
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 4 )
+    iTelephoneUtils->HandleNotifyGeneric(KTelIncallLoudspeakerVolume);    
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 8 )
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
     
-    // Simulate that current audio output mode is not the same as original,
-    // Setting does not succeed as observer does not allow changes anymore
-    utils = CMusEngTelephoneUtils::NewL( *iObserver );
-    CleanupStack::PushL( utils );
-    utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
-    utils->iTelephonyAudioRouting->iCurrentOutput = 
-                                    CTelephonyAudioRouting::ELoudspeaker;
-    CleanupStack::PopAndDestroy( utils );
-    // Cannot really assert anything
+    //Ear volume changed, observer set => observer notified
+    iTelephoneUtils->SetVolumeChangeObserver(iObserver);
+    iTelephoneUtils->HandleNotifyGeneric(KTelIncallEarVolume);    
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 4 )
+    EUNIT_ASSERT( iObserver->iVolume == 4 );
+    
+    //Volume hasn't changed => observer not notifies
+    iObserver->iVolume = 0;
+    iTelephoneUtils->HandleNotifyGeneric(KTelIncallEarVolume);    
+    EUNIT_ASSERT( iTelephoneUtils->iCurrentVolume == 4 )
+    EUNIT_ASSERT( iObserver->iVolume == 0 );
     }
 
 
@@ -440,6 +643,20 @@
     SetupL, UT_AudioRoutingCanBeChangedL, Teardown)
 
 EUNIT_TEST(
+    "IsAudioRoutingHeadset - test ",
+    "CMusEngTelephoneUtils",
+    "IsAudioRoutingHeadset",
+    "FUNCTIONALITY",
+    SetupL, UT_IsAudioRoutingHeadsetL, Teardown)
+    
+EUNIT_TEST(
+    "IsAudioRoutingLoudSpeaker - test ",
+    "CMusEngTelephoneUtils",
+    "IsAudioRoutingLoudSpeaker",
+    "FUNCTIONALITY",
+    SetupL, UT_IsAudioRoutingLoudSpeakerL, Teardown)    
+    
+EUNIT_TEST(
     "LoudspeakerL - test ",
     "CMusEngTelephoneUtils",
     "LoudspeakerL",
@@ -502,7 +719,20 @@
     "FUNCTIONALITY",
     SetupL, UT_DestructorL, Teardown)
 
-     
+EUNIT_TEST(
+    "UpdateCurrentVolume - test ",
+    "UpdateCurrentVolume",
+    "Destructor",
+    "FUNCTIONALITY",
+    SetupL, UT_UpdateCurrentVolumeL, Teardown)
+    
+EUNIT_TEST(
+    "HandleNotifyGeneric - test ",
+    "CMusEngTelephoneUtils",
+    "HandleNotifyGeneric",
+    "FUNCTIONALITY",
+    SetupL, UT_HandleNotifyGenericL, Teardown)
+
     
 EUNIT_END_TEST_TABLE
 
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtwowayrecvsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1582 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include "ut_musengtwowayrecvsession.h"
-#include "musengstubs.h"
-#include "musengtestdefs.h"
-#include "musengtwowayrecvsession.h"
-#include "musengmceutils.h"
-#include "mussessionproperties.h"
-#include "contactenginestub.h"
-#include "musenglivevideoplayer.h"
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-
-#include <mceinsession.h>
-#include <mcestreambundle.h>
-#include <mcevideostream.h>
-#include <mceaudiostream.h>
-#include <mcertpsource.h>
-#include <mcedisplaysink.h>
-#include <mcespeakersink.h>
-#include <mcecamerasource.h>
-#include <mcefilesource.h>
-#include <mcertpsink.h>
-#include <mceaudiocodec.h>
-#include <mceh263codec.h>
-#include <mceavccodec.h>
-#include <musmanager.h>
-
-#include <audiopreference.h>
-
-// Incoming session may be rejected silently due memory running out. Ensure that 
-// incoming session was handled fully by using this macro.
-#define MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L \
-__ASSERT_ALWAYS( iReceiveSession->iSession && \
-iReceiveSession->iSession->iState != CMceSession::ETerminated, User::Leave( KErrNoMemory ) );
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngTwoWayRecvSession* UT_CMusEngTwoWayRecvSession::NewL()
-    {
-    UT_CMusEngTwoWayRecvSession* self = UT_CMusEngTwoWayRecvSession::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-// 
-UT_CMusEngTwoWayRecvSession* UT_CMusEngTwoWayRecvSession::NewLC()
-    {
-    UT_CMusEngTwoWayRecvSession* self = new( ELeave ) UT_CMusEngTwoWayRecvSession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngTwoWayRecvSession::~UT_CMusEngTwoWayRecvSession()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngTwoWayRecvSession::UT_CMusEngTwoWayRecvSession()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::SetupL(  )
-    {
-    iLcSessionObserver = new( ELeave )CLcSessionObserverStub;
-    iReceiveSession = CMusEngTwoWayRecvSession::NewL();
-    iReceiveSession->SetLcSessionObserver( iLcSessionObserver );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::Teardown(  )
-    {
-    delete iReceiveSession;
-    delete iLcSessionObserver;
-    PropertyHelper::Close();
-    }
-
-
-// TEST HELPERS
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* UT_CMusEngTwoWayRecvSession::ConstructVideoInStreamLC()
-    {
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    
-    videoStream->SetSourceL( CMceRtpSource::NewLC() );
-    CleanupStack::Pop();
-    
-    videoStream->AddSinkL( 
-                CMceDisplaySink::NewLC( *iReceiveSession->iManager ) );
-    CleanupStack::Pop();    
-    
-    return videoStream;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* UT_CMusEngTwoWayRecvSession::ConstructVideoOutStreamLC()
-    {
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();    
-       
-    videoStream->SetSourceL( 
-                CMceCameraSource::NewLC( *iReceiveSession->iManager ) );
-    CleanupStack::Pop();
-    
-    videoStream->AddSinkL( CMceRtpSink::NewLC() );
-    CleanupStack::Pop();
-    
-    return videoStream;
-    }    
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//   
-CMceAudioStream* UT_CMusEngTwoWayRecvSession::ConstructAudioInStreamLC()
-    {
-    CMceAudioStream* audioStream = CMceAudioStream::NewLC();
-   
-    audioStream->SetSourceL( CMceRtpSource::NewLC() );
-    CleanupStack::Pop();
-    
-    audioStream->AddSinkL( CMceSpeakerSink::NewLC() );
-    CleanupStack::Pop();
-    
-    return audioStream;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//   
-CMceAudioStream* UT_CMusEngTwoWayRecvSession::ConstructAudioOutStreamLC()
-    {
-    CMceAudioStream* audioStream = CMceAudioStream::NewLC();
-
-    audioStream->SetSourceL( 
-        CMceFileSource::NewLC( *iReceiveSession->iManager, KNullDesC() ) );
-    CleanupStack::Pop();
-    
-    audioStream->AddSinkL( CMceRtpSink::NewLC() );
-    CleanupStack::Pop();
-
-    return audioStream;
-
-    }
-                                                 
-
-// -----------------------------------------------------------------------------
-// Helper to construct incoming sessions.
-// -----------------------------------------------------------------------------
-//
-CMceInSession* UT_CMusEngTwoWayRecvSession::ConstructInSessionLC( 
-                                             TInt aVideoStreamCount,
-                                             TInt aAudioStreamCount,
-                                             TBool aConstructSinks )
-    {
-    CMceInSession* inSession = CMceInSession::NewL( 
-                                        *(iReceiveSession->iManager), 
-                                        KTestOriginator() );
-    CleanupStack::PushL( inSession );
-                                        
-    for ( TInt i = 0; i < aVideoStreamCount; ++i )
-        {
-        CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-        
-        CMceRtpSource* rtpSource = CMceRtpSource::NewLC();
-        videoStream->SetSourceL( rtpSource );
-        CleanupStack::Pop( rtpSource );
-        
-        if ( aConstructSinks )
-            {
-            CMceDisplaySink* display = CMceDisplaySink::NewLC( 
-                                                *(iReceiveSession->iManager) );
-            videoStream->AddSinkL( display );
-            CleanupStack::Pop( display );
-            }
-        
-        inSession->AddStreamL( videoStream );
-        CleanupStack::Pop( videoStream );
-        }
-    
-    for ( TInt i = 0; i < aAudioStreamCount; ++i )
-        {
-        CMceAudioStream* audioStream = CMceAudioStream::NewLC();
-        
-        CMceRtpSource* rtpSource = CMceRtpSource::NewLC();
-        audioStream->SetSourceL( rtpSource );
-        CleanupStack::Pop( rtpSource );
-        
-        if ( aConstructSinks )
-            {
-            CMceSpeakerSink* speaker = CMceSpeakerSink::NewLC();
-            audioStream->AddSinkL( speaker );
-            CleanupStack::Pop( speaker );
-            }
-        
-        inSession->AddStreamL( audioStream );
-        CleanupStack::Pop( audioStream );
-        }    
-    
-    return inSession;
-    }
-                                             
-// -----------------------------------------------------------------------------
-// Helper to construct incoming two-way video session.
-// -----------------------------------------------------------------------------
-//
-CMceInSession* UT_CMusEngTwoWayRecvSession::ConstructTwoWayInSessionLC( TBool aConstructSinks )
-    {
-    CMceInSession* inSession = CMceInSession::NewL( 
-                                        *(iReceiveSession->iManager), 
-                                        KTestOriginator() );
-    CleanupStack::PushL( inSession );
-                                        
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-        
-    CMceRtpSource* rtpSource = CMceRtpSource::NewLC();
-    videoStream->SetSourceL( rtpSource );
-    CleanupStack::Pop( rtpSource );
-    
-    if ( aConstructSinks )
-        {
-        CMceDisplaySink* display = CMceDisplaySink::NewLC( 
-                                            *(iReceiveSession->iManager) );
-        videoStream->AddSinkL( display );
-        CleanupStack::Pop( display );
-        }
-    
-    CMceVideoStream* videoOutStream = CMceVideoStream::NewLC();
-          
-    CMceCameraSource* cameraSource = CMceCameraSource::NewLC( *(iReceiveSession->iManager) );
-    videoOutStream->SetSourceL( cameraSource );
-    CleanupStack::Pop( cameraSource );
-      
-    if ( aConstructSinks )
-        {
-        CMceRtpSink* rtpSink = CMceRtpSink::NewLC();
-        videoOutStream->AddSinkL( rtpSink );
-        CleanupStack::Pop( rtpSink );
-        }
-    videoStream->BindL( videoOutStream );
-    CleanupStack::Pop( videoOutStream );
-    
-    inSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );
-    
-    return inSession;
-    }                                             
-
-
-// TEST CASES
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_NewLL(  )
-    {
-    EUNIT_ASSERT( iReceiveSession );
-    EUNIT_ASSERT( !iReceiveSession->iSession );
-    EUNIT_ASSERT( iReceiveSession->iMceManagerUid == 
-                  TUid::Uid(CMusManager::ESipInviteDesired2WayVideo) );
-    }
-
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_EnableDisplayLL()
-    {
-    TRAPD( error, iReceiveSession->EnableDisplayL( ETrue ) );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrNotReady );
-    
-    TMceTransactionDataContainer container;
-    CMceInSession* inSession = ConstructTwoWayInSessionLC();
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    
-    CMceDisplaySink* display = 
-                    MusEngMceUtils::GetDisplayL( *(iReceiveSession->iSession) );
-    
-    CMceDisplaySink* receivingDisplay = 
-                    MusEngMceUtils::GetReceivingDisplayL( *iReceiveSession->iSession );
-    
-    // Disable
-    iReceiveSession->EnableDisplayL( EFalse );
-    
-    EUNIT_ASSERT( !display->iIsEnabled );
-    EUNIT_ASSERT( !receivingDisplay->iIsEnabled );
-    
-    // Try to disable again, request should be ignored
-    
-    iReceiveSession->EnableDisplayL( EFalse );
-    
-    EUNIT_ASSERT( !display->iIsEnabled );
-    EUNIT_ASSERT( !receivingDisplay->iIsEnabled );
-
-    // Enable
-    
-    iReceiveSession->EnableDisplayL( ETrue );
-    
-    EUNIT_ASSERT( display->iIsEnabled );
-    EUNIT_ASSERT( receivingDisplay->iIsEnabled );
-    
-    // Try to enable again, request should be ignored
-    
-    iReceiveSession->EnableDisplayL( ETrue );
-    
-    EUNIT_ASSERT( display->iIsEnabled );
-    EUNIT_ASSERT( receivingDisplay->iIsEnabled );
-        
-    // Session does not have sending stream (viewfinder does not exist)
-    //
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    display = MusEngMceUtils::GetVfDisplay( *(iReceiveSession->iSession) );  
-    EUNIT_ASSERT( display == NULL );
-    receivingDisplay = MusEngMceUtils::GetReceivingDisplayL( *iReceiveSession->iSession );
-    iReceiveSession->EnableDisplayL( EFalse );
-    EUNIT_ASSERT( !receivingDisplay->iIsEnabled );  
-
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_SetOrientationLL()
-    {
-    // Try without session, fails
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iReceiveSession->SetOrientationL( 
-                                               CMusEngMceSession::EPortrait ), 
-                                KErrNotReady )
-    
-    TMceTransactionDataContainer container;
-    CMceInSession* inSession = ConstructTwoWayInSessionLC();
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    
-    CMceDisplaySink* display = 
-                   MusEngMceUtils::GetDisplayL( *iReceiveSession->iSession );
-    
-    CMceDisplaySink* receivingDisplay = 
-                   MusEngMceUtils::GetReceivingDisplayL( *iReceiveSession->iSession );
-       
-    
-    // Check the initial state
-    display->iRotation = CMceDisplaySink::ENone;
-    receivingDisplay->iRotation = CMceDisplaySink::ENone;
-    EUNIT_ASSERT_EQUALS( iReceiveSession->OrientationL(), 
-                        CMusEngMceSession::EPortrait )      
-                        
-    // Successfully change orientation
-    
-    iReceiveSession->SetOrientationL( CMusEngMceSession::ELandscape );
-    EUNIT_ASSERT_EQUALS( iReceiveSession->OrientationL(), 
-                        CMusEngMceSession::ELandscape )
-    
-    EUNIT_ASSERT_EQUALS( display->iRotation, CMceDisplaySink::EClockwise90Degree );
-    EUNIT_ASSERT_EQUALS( receivingDisplay->iRotation, CMceDisplaySink::EClockwise90Degree );
-    
-    iReceiveSession->SetOrientationL( CMusEngMceSession::EPortrait );
-    EUNIT_ASSERT_EQUALS( iReceiveSession->OrientationL(), 
-                        CMusEngMceSession::EPortrait )          
-    
-    EUNIT_ASSERT_EQUALS( display->iRotation, CMceDisplaySink::ENone );
-    EUNIT_ASSERT_EQUALS( receivingDisplay->iRotation, CMceDisplaySink::ENone );
-    
-    // Session does not have sending stream (viewfinder does not exist)
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    display = MusEngMceUtils::GetVfDisplay( *(iReceiveSession->iSession) );  
-    EUNIT_ASSERT( display == NULL );
-    receivingDisplay = MusEngMceUtils::GetReceivingDisplayL( *iReceiveSession->iSession );
-    iReceiveSession->SetOrientationL( CMusEngMceSession::ELandscape );
-    EUNIT_ASSERT_EQUALS( receivingDisplay->iRotation, CMceDisplaySink::EClockwise90Degree );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_OrientationLL()
-    {
-    // Try without session, fails
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iReceiveSession->OrientationL(), 
-                                KErrNotReady )
-    
-    TMceTransactionDataContainer container;
-    CMceInSession* inSession = ConstructTwoWayInSessionLC();
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    
-    CMceDisplaySink* receivingDisplay = 
-         MusEngMceUtils::GetReceivingDisplayL( *iReceiveSession->iSession );
-    receivingDisplay->iRotation = CMceDisplaySink::ENone;
-    
-    EUNIT_ASSERT_EQUALS( iReceiveSession->OrientationL(), 
-                           CMusEngMceSession::EPortrait )      
-    
-    receivingDisplay->iRotation = CMceDisplaySink::EClockwise90Degree;
-        
-    EUNIT_ASSERT_EQUALS( iReceiveSession->OrientationL(), 
-                               CMusEngMceSession::ELandscape ) 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_SetLocalRectLL()
-    {
-    // Does nothing real before session establishment
-    TRect rect1( 100, 200, 300, 500 );
-    iReceiveSession->SetSecondaryRectL( rect1 ); 
-    
-    EUNIT_ASSERT( rect1 == iReceiveSession->iLocalRect );
-    
-    // Local rect changing affects to viewfinder display sink not to receiving video
-    //
-    TMceTransactionDataContainer container;
-    CMceInSession* inSession = ConstructTwoWayInSessionLC();
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    
-    CMceDisplaySink* vfDisplay = 
-                   MusEngMceUtils::GetDisplayL( *( iReceiveSession->iSession ) );
-    CMceDisplaySink* receivingDisplay = 
-                   MusEngMceUtils::GetReceivingDisplayL( *( iReceiveSession->iSession ) );
-
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() == iReceiveSession->iLocalRect );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() != iReceiveSession->iLocalRect );
-        
-    TRect rect2( 200, 200, 300, 500 );
-    iReceiveSession->SetSecondaryRectL( rect2 ); 
-    EUNIT_ASSERT( rect2 == iReceiveSession->iLocalRect );
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() == iReceiveSession->iLocalRect );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() != iReceiveSession->iLocalRect );
-    
-    // Terminate session and try again, rect must not be changed
-    
-    iReceiveSession->iSession->iState = CMceSession::ETerminated;
-    
-    TRect rect3( 300, 300, 400, 600 );
-    
-    iReceiveSession->SetSecondaryRectL( rect3 ); 
-    
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() != rect3 )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_SetRectsLL()
-    {
-    // Does nothing real before session establishment
-    TRect localrect1( 100, 200, 300, 400 );
-    TRect remoterect1( 100, 200, 300, 500 );
-    iReceiveSession->SetRectsL( remoterect1, localrect1 ); 
-    
-    EUNIT_ASSERT( localrect1 == iReceiveSession->iLocalRect );
-    EUNIT_ASSERT( remoterect1 == iReceiveSession->iRect );
-    
-    // Local rect changing affects to viewfinder display sink and remote rect to
-    // receiving video display sink
-    //
-    TMceTransactionDataContainer container;
-    CMceInSession* inSession = ConstructTwoWayInSessionLC();
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    
-    CMceDisplaySink* vfDisplay = 
-                   MusEngMceUtils::GetDisplayL( *( iReceiveSession->iSession ) );
-    CMceDisplaySink* receivingDisplay = 
-                   MusEngMceUtils::GetReceivingDisplayL( *( iReceiveSession->iSession ) );
-
-    TRect localrect2( 200, 200, 300, 400 );
-    TRect remoterect2( 200, 200, 300, 500 );
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() != localrect2 );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() != remoterect2 );
-
-    iReceiveSession->SetRectsL( remoterect2, localrect2 ); 
-    EUNIT_ASSERT( localrect2 == iReceiveSession->iLocalRect );
-    EUNIT_ASSERT( remoterect2 == iReceiveSession->iRect );
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() == iReceiveSession->iLocalRect );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() == iReceiveSession->iRect );
-    
-    // Terminate session and try again, rect must not be changed
-    
-    iReceiveSession->iSession->iState = CMceSession::ETerminated;
-    
-    TRect localrect3( 300, 200, 300, 400 );
-    TRect remoterect3( 300, 200, 300, 500 );
-    
-    iReceiveSession->SetRectsL( remoterect3, localrect3 );
-    
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() != localrect3 )
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() != remoterect3 );
-    
-    // Session does not have sending stream (viewfinder does not exist)
-    
-    TRect localrect4( 400, 200, 300, 400 );
-    TRect remoterect4( 400, 200, 300, 500 );
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    vfDisplay = MusEngMceUtils::GetVfDisplay( *(iReceiveSession->iSession) );  
-    EUNIT_ASSERT( vfDisplay == NULL );
-    receivingDisplay = MusEngMceUtils::GetReceivingDisplayL( *iReceiveSession->iSession );
-    iReceiveSession->SetRectsL( remoterect4, localrect4 );
-    EUNIT_ASSERT( localrect4 == iReceiveSession->iLocalRect );
-    EUNIT_ASSERT( remoterect4 == iReceiveSession->iRect );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() == iReceiveSession->iRect );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_CameraL()
-    {
-    // Camera cannot be used without MCE session
-    //
-    EUNIT_ASSERT_LEAVE( iReceiveSession->Camera().ChangeCameraL( 
-            TMusEngCameraHandler::EFrontCamera ) );
-    
-    // Camera cannot be used without video out stream
-    //
-    TMceTransactionDataContainer container;
-    CMceInSession* inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    EUNIT_ASSERT_LEAVE( iReceiveSession->Camera().ChangeCameraL( 
-            TMusEngCameraHandler::EFrontCamera ) );
-    
-    // Camera can be used when video out stream exists
-    //
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    inSession = ConstructTwoWayInSessionLC();
-    iReceiveSession->IncomingSession( inSession, &container );
-    CleanupStack::Pop( inSession );
-    MUSENG_TEST_ASSERT_INCOMING_SESSION_ALLOC_FAILURE_L
-    iReceiveSession->Camera().ChangeCameraL( 
-            TMusEngCameraHandler::EFrontCamera );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_LocalVideoPlayerL()
-    {
-    EUNIT_ASSERT( iReceiveSession->LocalVideoPlayer() == 
-                  iReceiveSession->iLiveVideoPlayer )
-    }
-   
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_HandleSessionStateChangedL()
-    {
-    // Unknown session, let the base class handle 
-    CMceInSession* inSession = ConstructInSessionLC( 1, 1 );
-
-    iReceiveSession->HandleSessionStateChanged( *inSession, 0, KNullDesC8() );
-    
-    // Simulate incoming session
-    TMceTransactionDataContainer container;
-    
-    iReceiveSession->IncomingSession( inSession, &container ); 
-    CleanupStack::Pop( inSession );
-    
-    // Session is in state EReserving, let the base class handle
-    iReceiveSession->HandleSessionStateChanged( *inSession, 0, KNullDesC8() );
-    
-    // The normal cases:
-    
-    // 1 ) First transition to state EProceeding, user and remote end should
-    //     be notified
-    inSession->iState = CMceSession::EProceeding;
-    iReceiveSession->HandleSessionStateChanged( *inSession, 0, KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionStateChanged ) )
-    EUNIT_ASSERT( iReceiveSession->iRingLCalled )
-    iLcSessionObserver->Reset();
-    
-    // 2 ) Now simulate second transition to EProceeding state which can happen
-    //     if we force 100rel to be used. User and remote end should not be 
-    //     notified anymore but change should be ignored.
-    inSession->iState = CMceSession::EProceeding;
-    iReceiveSession->HandleSessionStateChanged( *inSession, 0, KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( CLcSessionObserverStub::EUnknown ),
-                         TInt( iLcSessionObserver->iCalledFunction ) )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-// 
-void UT_CMusEngTwoWayRecvSession::UT_AdjustVideoCodecLL()
-    {
-    CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() );    
-    CMceVideoCodec* codecH2632000 = CMceH263Codec::NewLC( KMceSDPNameH2632000() );
-    CMceVideoCodec* codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    CMceVideoCodec* codecUnknown = CMceH263Codec::NewLC( KNullDesC8() );
-    
-    iReceiveSession->AdjustVideoCodecL( *codecH263, KMceRTPSource );
-    iReceiveSession->AdjustVideoCodecL( *codecH2632000, KMceRTPSource );
-    iReceiveSession->AdjustVideoCodecL( *codecAvc, KMceRTPSource );
-    iReceiveSession->AdjustVideoCodecL( *codecUnknown, KMceRTPSource );
-    
-    EUNIT_ASSERT_EQUALS( codecH263->KeepAliveTimer(), 6 )
-    EUNIT_ASSERT_EQUALS( codecH263->KeepAlivePayloadType(), 96 )
-    EUNIT_ASSERT_EQUALS( codecH263->KeepAliveData(), KNullDesC8() )
-    
-    EUNIT_ASSERT_EQUALS( codecH2632000->KeepAliveTimer(), 6 )
-    EUNIT_ASSERT_EQUALS( codecH2632000->KeepAlivePayloadType(), 96 )
-    EUNIT_ASSERT_EQUALS( codecH2632000->KeepAliveData(), KNullDesC8() )
-    
-    EUNIT_ASSERT_EQUALS( codecAvc->KeepAliveTimer(), 6 )
-    EUNIT_ASSERT_EQUALS( codecAvc->KeepAlivePayloadType(), 98 )
-    EUNIT_ASSERT_EQUALS( codecAvc->KeepAliveData(), KNullDesC8() )
-    
-    EUNIT_ASSERT_EQUALS( codecUnknown->KeepAliveTimer(), 6 )
-    EUNIT_ASSERT_EQUALS( codecUnknown->KeepAlivePayloadType(), 0 )
-    EUNIT_ASSERT_EQUALS( codecUnknown->KeepAliveData(), KNullDesC8() )
-                
-    CleanupStack::PopAndDestroy( codecUnknown );
-    CleanupStack::PopAndDestroy( codecAvc );
-    CleanupStack::PopAndDestroy( codecH2632000 );
-    CleanupStack::PopAndDestroy( codecH263 );
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-// 
-void UT_CMusEngTwoWayRecvSession::UT_AdjustAudioCodecLL()
-    {
-    CMceAudioCodec* codec = 
-                iReceiveSession->iManager->SupportedAudioCodecs()[0]->CloneL();
-    CleanupStack::PushL( codec );
-    iReceiveSession->AdjustAudioCodecL( *codec );
-    
-    // Test keepalive timer
-    
-    TUint8 keepAliveTimer = codec->KeepAliveTimer();
-    EUNIT_ASSERT( codec->KeepAliveTimer() == 6 )
-    EUNIT_ASSERT( codec->KeepAlivePayloadType() == 97 )
-    EUNIT_ASSERT( codec->KeepAliveData() == KNullDesC8() )
-
-    // Test that base class has been called
-    
-    EUNIT_ASSERT( codec->iMMFPriority == KAudioPrioritySwisPlayback )
-    EUNIT_ASSERT( codec->iMMFPriorityPreference == KAudioPrefSwisPlayback )
-    
-    CleanupStack::PopAndDestroy( codec );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-// 
-void UT_CMusEngTwoWayRecvSession::UT_DoCodecSelectionLL()
-    {    
-    // Check that Non-Interleaved AVC is preferred over single NAL 
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    
-    CMceVideoCodec* codecAvcSingleNal = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codecAvcSingleNal->iCodecMode = KMceAvcModeSingleNal; 
-    videoStream->AddCodecL( codecAvcSingleNal );
-    CleanupStack::Pop( codecAvcSingleNal );
-    
-    CMceVideoCodec* codecAvcNonInterleaved = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codecAvcNonInterleaved->iCodecMode = KMceAvcModeNonInterleaved;
-    videoStream->AddCodecL( codecAvcNonInterleaved );
-    CleanupStack::Pop( codecAvcNonInterleaved );
-    
-    iReceiveSession->DoCodecSelectionL( *videoStream );
-    
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs().Count(), 1 )
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs()[0]->SdpName(), KMceSDPNameH264() )
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs()[0]->CodecMode(),
-                         KMceAvcModeNonInterleaved )
-    
-    CleanupStack::PopAndDestroy( videoStream );
-                         
-    // Check that Single NAL AVC is preferred over H263
-    videoStream = CMceVideoStream::NewLC();
-    
-    CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() );    
-    videoStream->AddCodecL( codecH263 );
-    CleanupStack::Pop( codecH263 );
-    
-    codecAvcSingleNal = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codecAvcSingleNal->iCodecMode = KMceAvcModeSingleNal; 
-    videoStream->AddCodecL( codecAvcSingleNal );
-    CleanupStack::Pop( codecAvcSingleNal );
-
-    iReceiveSession->DoCodecSelectionL( *videoStream );
-    
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs().Count(), 1 )
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs()[0]->SdpName(), KMceSDPNameH264() )
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs()[0]->CodecMode(),
-                         KMceAvcModeSingleNal )
-                         
-    CleanupStack::PopAndDestroy( videoStream );
-    
-    // Check that H263 codecs without AVC are handled correctly (in base class)
-    videoStream = CMceVideoStream::NewLC();
-    
-    codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() );    
-    videoStream->AddCodecL( codecH263 );
-    CleanupStack::Pop( codecH263 );
-    
-    CMceVideoCodec* codecH2632000 = CMceH263Codec::NewLC( KMceSDPNameH2632000() );   
-    videoStream->AddCodecL( codecH2632000 );
-    CleanupStack::Pop( codecH2632000 );
-    
-    iReceiveSession->DoCodecSelectionL( *videoStream );
-    
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs().Count(), 1 )
-    
-    CleanupStack::PopAndDestroy( videoStream );
-    
-    // Check that AVC non-interleaved with best bitrate is preferred
-    videoStream = CMceVideoStream::NewLC();
-    
-    codecAvcNonInterleaved = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codecAvcNonInterleaved->iCodecMode = KMceAvcModeNonInterleaved;
-    codecAvcNonInterleaved->SetMaxBitrateL( 80000 );
-    videoStream->AddCodecL( codecAvcNonInterleaved );
-    CleanupStack::Pop( codecAvcNonInterleaved );
-    
-    CMceVideoCodec* codecAvcNonInterleaved128 = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codecAvcNonInterleaved128->iCodecMode = KMceAvcModeNonInterleaved;
-    codecAvcNonInterleaved128->SetMaxBitrateL( 128000 );
-    videoStream->AddCodecL( codecAvcNonInterleaved128 );
-    CleanupStack::Pop( codecAvcNonInterleaved128 );
-    
-    iReceiveSession->DoCodecSelectionL( *videoStream );
-    
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs().Count(), 1 )
-    EUNIT_ASSERT( videoStream->Codecs()[0] == codecAvcNonInterleaved128 )
-
-    CleanupStack::PopAndDestroy( videoStream );
-    
-    // Check that in case of several AVC single NALs, the best bitrate is preferred
-    videoStream = CMceVideoStream::NewLC();
-    
-    codecAvcSingleNal = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codecAvcSingleNal->iCodecMode = KMceAvcModeSingleNal;
-    codecAvcSingleNal->SetMaxBitrateL( 80000 );
-    videoStream->AddCodecL( codecAvcSingleNal );
-    CleanupStack::Pop( codecAvcSingleNal );
-    
-    CMceVideoCodec* codecAvcSingleNal128 = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codecAvcSingleNal128->iCodecMode = KMceAvcModeSingleNal;
-    codecAvcSingleNal128->SetMaxBitrateL( 128000 );
-    videoStream->AddCodecL( codecAvcSingleNal128 );
-    CleanupStack::Pop( codecAvcSingleNal128 );
-    
-    iReceiveSession->DoCodecSelectionL( *videoStream );
-    
-    EUNIT_ASSERT_EQUALS( videoStream->Codecs().Count(), 1 )
-    EUNIT_ASSERT( videoStream->Codecs()[0] == codecAvcSingleNal128 )
-
-    CleanupStack::PopAndDestroy( videoStream );
-   
-    }
-            
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//    
-void UT_CMusEngTwoWayRecvSession::UT_IncomingSessionL()
-    {
-    _LIT8( KMusEngSwisTestIdentifier, "Require: precondition" );
-    _LIT8( KMusEngTestHeader, "Some header" );
-
-    TMceTransactionDataContainer container;
-    
-    // Simulate SWIS 2.2 invite. There are no streams, so completion fails and 
-    // session gets rejected. Still prenotification has been given.
-    CMceInSession* inSession = ConstructInSessionLC( 0, 0 );
-    CDesC8Array* headers = new ( ELeave ) CDesC8ArrayFlat( 2 );
-    CleanupStack::PushL( headers );
-    headers->AppendL( KMusEngTestHeader() );
-    headers->AppendL( KMusEngSwisTestIdentifier() );
-    container.SetHeaders( headers );
-    CleanupStack::Pop( headers );
-    iReceiveSession->IncomingSession( inSession, &container );    
-    CleanupStack::Pop( inSession );
-    container.Clear();
-    
-    EUNIT_ASSERT( iReceiveSession->iSession );
-    EUNIT_ASSERT( iReceiveSession->iSession->iState == 
-                  CMceSession::ETerminated );
-    
-    EUNIT_ASSERT( iReceiveSession->iSession->i100RelUsage == 
-                  KMce100RelRequired )
-    EUNIT_ASSERT( !iReceiveSession->iRingLCalled )              
-
-    // Try again with valid session, normal case
-    inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );    
-    CleanupStack::Pop( inSession );
-    
-    EUNIT_ASSERT( iReceiveSession->iSession );
-    // Next state depends on success of completion of session structure.
-    // When using alloc failure state is ETerminated, in succesfull case it is
-    // EReserving. However it is set to "normal" state EReserving after 
-    // assertion
-    EUNIT_ASSERT( iReceiveSession->iSession->iState == 
-                  CMceSession::EReserving ||
-                  iReceiveSession->iSession->iState == 
-                  CMceSession::ETerminated );
-    iReceiveSession->iSession->iState = CMceSession::EReserving;
-    
-    // Try again without container, new session gets terminated and deleted
-    inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, NULL );    
-    CleanupStack::Pop( inSession );
-    
-    EUNIT_ASSERT( iReceiveSession->iSession );
-    EUNIT_ASSERT( iReceiveSession->iSession != inSession );
-    EUNIT_ASSERT( iReceiveSession->iSession->iState == 
-                  CMceSession::EReserving );
-                               
-    // Try again when there is session pending, new session gets terminated
-    // and deleted
-    inSession = ConstructInSessionLC( 1, 0 );
-    iReceiveSession->IncomingSession( inSession, &container );    
-    CleanupStack::Pop( inSession );
-    
-    EUNIT_ASSERT( iReceiveSession->iSession );
-    EUNIT_ASSERT( iReceiveSession->iSession != inSession );
-    EUNIT_ASSERT( iReceiveSession->iSession->iState == 
-                  CMceSession::EReserving );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_CompleteSessionStructureL_WithoutSessionL()
-    {
-    TRAPD( error, iReceiveSession->CompleteSessionStructureL() );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrNotReady );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_CompleteSessionStructureL_WithoutStreamsL()
-    {
-    CMceInSession* inSession = ConstructInSessionLC( 0, 0 );
-    iReceiveSession->iSession = inSession; // Transfers ownership
-    CleanupStack::Pop( inSession );
-    
-    TRAPD( error, iReceiveSession->CompleteSessionStructureL() );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrCorrupt );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_CompleteSessionStructureL_WithOutgoingStreamL()
-    {    
-    // Stream will be removed.
-    CMceInSession* inSession = ConstructInSessionLC( 0, 0 );
-    
-    inSession->AddStreamL( ConstructVideoOutStreamLC() );
-    CleanupStack::Pop();
-    
-    iReceiveSession->iSession = inSession; // Transfers ownership
-    CleanupStack::Pop( inSession );
-    
-    TRAPD( error, iReceiveSession->CompleteSessionStructureL() )
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrCorrupt );
-    EUNIT_ASSERT( inSession->Streams().Count() == 0 );
-    EUNIT_ASSERT( inSession->Bundles().Count() == 0 );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_CompleteSessionStructureL_WithVideoInL()
-    {
-    CMceInSession* inSession = ConstructInSessionLC( 1, 0 );
-
-    iReceiveSession->iSession = inSession; // Transfers ownership
-    CleanupStack::Pop( inSession );
-
-    iReceiveSession->CompleteSessionStructureL();
-
-    EUNIT_ASSERT( inSession->Streams().Count() == 1 );
-    EUNIT_ASSERT( inSession->Streams()[0]->IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[0]->Type() == KMceVideo )
-    EUNIT_ASSERT( inSession->Streams()[0]->Sinks().Count() == 1 )
-    EUNIT_ASSERT( inSession->Streams()[0]->Sinks()[0]->Type() == 
-                  KMceDisplaySink )
-    
-    // No audio, bundle is not constructed
-    EUNIT_ASSERT( inSession->Bundles().Count() == 0 )
-
-    }
-
-
-// -----------------------------------------------------------------------------
-// Two-way video in incoming session. Incoming stream is the main stream.
-// Both directions are enabled. Local viewfinder stream is added to display
-// outgoing video locally
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_CompleteSessionStructureL_WithVideoOutBoundToVideoInL()
-    {    
-    CMceInSession* inSession = ConstructInSessionLC( 1, 0 );
-
-    CMceVideoStream* videoOut = ConstructVideoOutStreamLC();
-    inSession->Streams()[0]->BindL( videoOut );
-    CleanupStack::Pop( videoOut );
-    
-    iReceiveSession->iSession = inSession; // Transfers ownership
-    CleanupStack::Pop( inSession );
-
-    iReceiveSession->CompleteSessionStructureL();
-
-    EUNIT_ASSERT( inSession->Streams().Count() == 2 );
-
-    CMceMediaStream* videoIn = inSession->Streams()[0];
-     
-    EUNIT_ASSERT( videoIn->IsEnabled() )
-    EUNIT_ASSERT( videoIn->Type() == KMceVideo )
-    EUNIT_ASSERT( videoIn->Sinks().Count() == 1 )
-    EUNIT_ASSERT( videoIn->Sinks()[0]->Type() == KMceDisplaySink )
-
-    EUNIT_ASSERT( videoIn->BoundStream() )
-    EUNIT_ASSERT( videoIn->BoundStreamL().IsEnabled() )    
-    
-    CMceMediaStream* videoVf = inSession->Streams()[1];
-    EUNIT_ASSERT( videoVf->IsEnabled() )
-    EUNIT_ASSERT( videoVf->Type() == KMceVideo )
-    EUNIT_ASSERT( videoVf->Sinks().Count() == 1 )
-    EUNIT_ASSERT( videoVf->Sinks()[0]->Type() == KMceDisplaySink )
-    EUNIT_ASSERT( videoVf->Source()->Type() == KMceCameraSource )
-  
-    // No audio, bundle is not constructed
-    EUNIT_ASSERT( inSession->Bundles().Count() == 0 )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Two-way video in incoming session. Incoming stream is the bound stream.
-// Both directions are enabled. Local viewfinder stream is added to display
-// outgoing video locally
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_CompleteSessionStructureL_WithVideoInBoundToVideoOutL()
-    {
-    CMceInSession* inSession = ConstructInSessionLC( 0, 0 );
-
-    CMceVideoStream* videoOut = ConstructVideoOutStreamLC();
-
-    CMceVideoStream* videoIn = ConstructVideoInStreamLC();
-    videoOut->BindL( videoIn );
-    CleanupStack::Pop( videoIn );
-    
-    inSession->AddStreamL( videoOut );
-    CleanupStack::Pop( videoOut );
-    
-    iReceiveSession->iSession = inSession; // Transfers ownership
-    CleanupStack::Pop( inSession );
-
-    iReceiveSession->CompleteSessionStructureL();
-
-    EUNIT_ASSERT( inSession->Streams().Count() == 2 );
-    EUNIT_ASSERT( videoOut->IsEnabled() )
-    EUNIT_ASSERT( videoOut->Type() == KMceVideo )
-    EUNIT_ASSERT( videoOut->Sinks().Count() == 1 )
-    EUNIT_ASSERT( videoOut->Sinks()[0]->Type() == KMceRTPSink )
-    EUNIT_ASSERT( videoOut->Sinks()[0]->IsEnabled() )
-
-    EUNIT_ASSERT( videoOut->BoundStream() )
-    EUNIT_ASSERT( videoOut->BoundStreamL().IsEnabled() )
-    EUNIT_ASSERT( videoOut->BoundStreamL().Type() == KMceVideo )
-    EUNIT_ASSERT( videoOut->BoundStreamL().Sinks().Count() == 1 )
-    EUNIT_ASSERT( videoOut->BoundStreamL().Sinks()[0]->Type() == 
-                  KMceDisplaySink )   
-    EUNIT_ASSERT( videoOut->BoundStreamL().Sinks()[0]->IsEnabled() )
-    
-    CMceMediaStream* videoVf = inSession->Streams()[1];
-    EUNIT_ASSERT( videoVf->IsEnabled() )
-    EUNIT_ASSERT( videoVf->Type() == KMceVideo )
-    EUNIT_ASSERT( videoVf->Sinks().Count() == 1 )
-    EUNIT_ASSERT( videoVf->Sinks()[0]->Type() == KMceDisplaySink )
-    EUNIT_ASSERT( videoVf->Source()->Type() == KMceCameraSource )
-    
-    // No audio, bundle is not constructed
-    EUNIT_ASSERT( inSession->Bundles().Count() == 0 )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Construct 3 video instreams:
-// 0. Without bound stream
-// 1. Bounds video out stream
-// 2. Bounded by video out stream
-// Bound stream should be selected and vf stream is added
-// -----------------------------------------------------------------------------
-//    
-void UT_CMusEngTwoWayRecvSession::UT_CompleteSessionStructureL_WithMultipleVideoInsL()
-    {
-    // construct session and stream 0
-    CMceInSession* inSession = ConstructInSessionLC( 2, 0 );
-    
-    // finish constructing stream 1
-    CMceVideoStream* videoOut = ConstructVideoOutStreamLC();
-    inSession->Streams()[1]->BindL( videoOut );
-    CleanupStack::Pop( videoOut );
-
-    // finish constructing stream 2
-    videoOut = ConstructVideoOutStreamLC();
-
-    CMceVideoStream* videoIn = ConstructVideoInStreamLC();
-    videoOut->BindL( videoIn );
-    CleanupStack::Pop( videoIn );
-    
-    inSession->AddStreamL( videoOut );
-    CleanupStack::Pop( videoOut );
-    
-    // Transfers ownership
-    iReceiveSession->iSession = inSession; 
-    CleanupStack::Pop( inSession );
-    
-    // complete
-    iReceiveSession->CompleteSessionStructureL();
-    
-    // Bound stream should be used, other original streams should be deleted
-    // but vf stream is added
-    EUNIT_ASSERT( inSession->Streams().Count() == 2 );
-    
-    // First stream
-    EUNIT_ASSERT( inSession->Streams()[0]->IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[0]->Type() == KMceVideo )
-    EUNIT_ASSERT( inSession->Streams()[0]->Sinks().Count() == 1 )
-    EUNIT_ASSERT( inSession->Streams()[0]->Sinks()[0]->Type() == KMceDisplaySink )
-    EUNIT_ASSERT( inSession->Streams()[0]->Sinks()[0]->IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[0]->BoundStream() )
-    EUNIT_ASSERT( inSession->Streams()[0]->BoundStreamL().Type() == KMceVideo )
-    
-    CMceMediaStream* videoVf = inSession->Streams()[1];
-    EUNIT_ASSERT( videoVf->IsEnabled() )
-    EUNIT_ASSERT( videoVf->Type() == KMceVideo )
-    EUNIT_ASSERT( videoVf->Sinks().Count() == 1 )
-    EUNIT_ASSERT( videoVf->Sinks()[0]->Type() == KMceDisplaySink )
-    EUNIT_ASSERT( videoVf->Source()->Type() == KMceCameraSource )
-
-    // No audio, bundle is not constructed
-    EUNIT_ASSERT( inSession->Bundles().Count() == 0 )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Streams in this test case
-// 0. Video in
-// 1. Audio in
-// 2. Audio out bound to audio in
-// 3. Audio in bound to audio out
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::
-                UT_CompleteSessionStructureL_WithVideoAndMultipleAudioInsL()
-    {
-    // Construct session and streams 0 and 1
-    CMceInSession* inSession = inSession = ConstructInSessionLC( 1, 2 );
-    
-    // Construct stream 2
-    CMceAudioStream* audioOut = ConstructAudioOutStreamLC();
-    inSession->Streams()[2]->BindL( audioOut );
-    CleanupStack::Pop( audioOut );
-    
-    // Construct stream 3
-    
-    audioOut = ConstructAudioOutStreamLC();
-    
-    CMceAudioStream* audioIn = ConstructAudioInStreamLC();
-    audioOut->BindL( audioIn );
-    CleanupStack::Pop( audioIn );
-    
-    inSession->AddStreamL( audioOut );
-    CleanupStack::Pop( audioOut );
-    
-    // Transfers ownership
-    iReceiveSession->iSession = inSession; 
-    CleanupStack::Pop( inSession );
-
-    // Complete
-    iReceiveSession->CompleteSessionStructureL();
-    EUNIT_ASSERT( inSession->Streams().Count() == 4 );
-    
-    // Stream 0
-    EUNIT_ASSERT( inSession->Streams()[0]->Type() == KMceVideo )
-    EUNIT_ASSERT( inSession->Streams()[0]->IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[0]->Sinks().Count() == 1 )
-    EUNIT_ASSERT( inSession->Streams()[0]->Sinks()[0]->Type() == 
-                  KMceDisplaySink )
-    
-    // Stream 1
-    EUNIT_ASSERT( inSession->Streams()[1]->Type() == KMceAudio )
-    EUNIT_ASSERT( inSession->Streams()[1]->IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[1]->Sinks().Count() == 1 )
-    EUNIT_ASSERT( inSession->Streams()[1]->Sinks()[0]->Type() == 
-                  KMceSpeakerSink );
-    CMceSpeakerSink* speaker = 
-        static_cast<CMceSpeakerSink*>(inSession->Streams()[1]->Sinks()[0]);
-    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->LcVolumeL() )
-    
-    // Stream 2 and bound stream
-    EUNIT_ASSERT( inSession->Streams()[2]->Type() == KMceAudio )
-    EUNIT_ASSERT( inSession->Streams()[2]->IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[2]->Sinks().Count() == 1 )
-    EUNIT_ASSERT( inSession->Streams()[2]->Sinks()[0]->Type() == 
-                  KMceSpeakerSink );
-    speaker = static_cast<CMceSpeakerSink*>(inSession->Streams()[2]->Sinks()[0]);
-    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->LcVolumeL() )
-
-    EUNIT_ASSERT( inSession->Streams()[2]->BoundStream() )
-    EUNIT_ASSERT( !inSession->Streams()[2]->BoundStreamL().IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[2]->BoundStreamL().Type() == KMceAudio )
-    
-    EUNIT_ASSERT( inSession->Streams()[2]->BoundStreamL().Sinks().Count() == 1 )
-    EUNIT_ASSERT( inSession->Streams()[2]->BoundStreamL().Sinks()[0]->Type() == 
-                  KMceRTPSink );
-    
-    // Stream 3 and bound stream
-    EUNIT_ASSERT( inSession->Streams()[3]->Type() == KMceAudio )
-    EUNIT_ASSERT( !inSession->Streams()[3]->IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[3]->Sinks().Count() == 1 )
-    EUNIT_ASSERT( inSession->Streams()[3]->Sinks()[0]->Type() == KMceRTPSink )
-    EUNIT_ASSERT( !inSession->Streams()[3]->Sinks()[0]->IsEnabled() )
-
-    EUNIT_ASSERT( inSession->Streams()[3]->BoundStream() )
-    EUNIT_ASSERT( inSession->Streams()[3]->BoundStreamL().IsEnabled() )
-    EUNIT_ASSERT( inSession->Streams()[3]->BoundStreamL().Type() == KMceAudio )
-    EUNIT_ASSERT( inSession->Streams()[3]->BoundStreamL().Sinks().Count() == 1 )    
-    EUNIT_ASSERT( inSession->Streams()[3]->BoundStreamL().Sinks()[0]->Type() == 
-                  KMceSpeakerSink )
-    speaker = static_cast<CMceSpeakerSink*>
-                        (inSession->Streams()[3]->BoundStreamL().Sinks()[0]);
-    EUNIT_ASSERT( speaker->VolumeL() == iReceiveSession->LcVolumeL() )
-              
-    // Check for bundles
-    EUNIT_ASSERT( inSession->Bundles().Count() == 1 )
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams().Count() == 4 )
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams()[0]->Type() == KMceAudio  )              
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams()[0]->Sinks()[0]->Type() == 
-                  KMceSpeakerSink  )
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams()[1]->Type() == KMceAudio  )              
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams()[1]->Sinks()[0]->Type() == 
-                  KMceSpeakerSink  )
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams()[2]->Type() == KMceAudio  )              
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams()[2]->Sinks()[0]->Type() == 
-                  KMceSpeakerSink  )
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams()[3]->Type() == KMceVideo )
-    EUNIT_ASSERT( inSession->Bundles()[0]->Streams()[3]->Sinks()[0]->Type() == 
-                  KMceDisplaySink )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Streams in this test case
-// 0. Video in
-// 1. Audio in
-// 2. Audio out bound to audio in
-// 3. Audio in bound to audio out
-// All audio will be removed because of operator variant
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWayRecvSession::UT_CompleteSessionStructureL_OperatorVariant()
-    {  
-    iReceiveSession->iOperatorVariant = ETrue;
-    
-    // Construct session and streams 0 and 1
-    CMceInSession* inSession = inSession = ConstructInSessionLC( 1, 2 );
-    
-    // Construct stream 2
-    CMceAudioStream* audioOut = ConstructAudioOutStreamLC();
-    inSession->Streams()[2]->BindL( audioOut );
-    CleanupStack::Pop( audioOut );
-    
-    // Construct stream 3
-    
-    audioOut = ConstructAudioOutStreamLC();
-    
-    CMceAudioStream* audioIn = ConstructAudioInStreamLC();
-    audioOut->BindL( audioIn );
-    CleanupStack::Pop( audioIn );
-    
-    inSession->AddStreamL( audioOut );
-    CleanupStack::Pop( audioOut );
-    
-    // Transfers ownership
-    iReceiveSession->iSession = inSession; 
-    CleanupStack::Pop( inSession );
-
-    // Complete
-    iReceiveSession->CompleteSessionStructureL();
-    
-    // Check that all audio has been removed and no  bundles has been
-    // constructed
-    EUNIT_ASSERT_EQUALS( inSession->Streams().Count(), 1 )
-    EUNIT_ASSERT_EQUALS( inSession->Streams()[0]->Type(), KMceVideo )
-    EUNIT_ASSERT_EQUALS( inSession->Bundles().Count(), 0 )
-    
-    
-    // Session with bandwidth attribute at sessionlevel
-    // -> bandwidth is taken in use at session level
-    //
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    
-    inSession = ConstructInSessionLC( 1, 0 );
-    CDesC8Array* sdpLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    CleanupStack::PushL( sdpLines );
-    sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    inSession->SetSessionSDPLinesL( sdpLines );
-    CleanupStack::Pop( sdpLines );
-    
-    // Transfers ownership
-    iReceiveSession->iSession = inSession; 
-    CleanupStack::Pop( inSession );
-    
-    iReceiveSession->CompleteSessionStructureL();
-    
-    MDesC8Array* newSdpLines = iReceiveSession->iSession->SessionSDPLinesL();
-    CleanupDeletePushL( newSdpLines );
-    TBool bandwidthFoundFromSessionLevel( EFalse );
-    for ( TInt i = 0; newSdpLines && i < newSdpLines->MdcaCount(); i++ )
-        {
-        if ( newSdpLines->MdcaPoint( i ).Compare( 
-                KMusEngSessionSdpLineBandwidthField() ) == 0 )
-            {
-            bandwidthFoundFromSessionLevel = ETrue;
-            }
-        }
-    EUNIT_ASSERT( bandwidthFoundFromSessionLevel );
-    CleanupStack::PopAndDestroy( newSdpLines );
-    
-    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->MediaAttributeLinesL();
-    CleanupDeletePushL( newSdpLines );
-    TBool bandwidthFoundFromMediaLevel( EFalse );
-    for ( TInt i = 0; newSdpLines && i < newSdpLines->MdcaCount(); i++ )
-        {
-        if ( newSdpLines->MdcaPoint( i ).Compare( 
-                KMusEngSessionSdpLineBandwidthField() ) == 0 )
-            {
-            bandwidthFoundFromMediaLevel = ETrue;
-            }
-        }
-    EUNIT_ASSERT( !bandwidthFoundFromMediaLevel );
-    CleanupStack::PopAndDestroy( newSdpLines );
-    
-    // Session with bandwidth attribute at media level
-    // -> bandwidth is taken in use at media level
-    //
-    delete iReceiveSession->iSession;
-    iReceiveSession->iSession = NULL;
-    
-    inSession = ConstructInSessionLC( 1, 0 );
-    
-    sdpLines = new ( ELeave ) CDesC8ArrayFlat( 1 );
-    CleanupStack::PushL( sdpLines );
-    sdpLines->AppendL( KMusEngSessionSdpLineBandwidthField() );
-    inSession->Streams()[ 0 ]->SetMediaAttributeLinesL( sdpLines );
-    CleanupStack::Pop( sdpLines );
-    
-    // Transfers ownership
-    iReceiveSession->iSession = inSession; 
-    CleanupStack::Pop( inSession );
-    
-    iReceiveSession->CompleteSessionStructureL();
-    
-    newSdpLines = iReceiveSession->iSession->SessionSDPLinesL();
-    CleanupDeletePushL( newSdpLines );
-    bandwidthFoundFromSessionLevel = EFalse;
-    for ( TInt i = 0; newSdpLines && i < newSdpLines->MdcaCount(); i++ )
-        {
-        if ( newSdpLines->MdcaPoint( i ).Compare( 
-                KMusEngSessionSdpLineBandwidthField() ) == 0 )
-            {
-            bandwidthFoundFromSessionLevel = ETrue;
-            }
-        }
-    EUNIT_ASSERT( !bandwidthFoundFromSessionLevel );
-    CleanupStack::PopAndDestroy( newSdpLines );
-    
-    newSdpLines = iReceiveSession->iSession->Streams()[ 0 ]->MediaAttributeLinesL();
-    CleanupDeletePushL( newSdpLines );
-    bandwidthFoundFromMediaLevel = EFalse;
-    for ( TInt i = 0; newSdpLines && i < newSdpLines->MdcaCount(); i++ )
-        {
-        if ( newSdpLines->MdcaPoint( i ).Compare( 
-                KMusEngSessionSdpLineBandwidthField() ) == 0 )
-            {
-            bandwidthFoundFromMediaLevel = ETrue;
-            }
-        }
-    EUNIT_ASSERT( bandwidthFoundFromMediaLevel );
-    CleanupStack::PopAndDestroy( newSdpLines );
-    }
-
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusEngTwoWayRecvSession,
-    "UT_CMusEngTwoWayRecvSession",
-    "UNIT" )
-
-    
-EUNIT_TEST(
-    "NewL - test ",
-    "CMusEngTwoWayRecvSession",
-    "NewL",
-    "FUNCTIONALITY",
-    SetupL, UT_NewLL, Teardown)
-        
-EUNIT_TEST(
-    "EnableDisplayL - test ",
-    "CMusEngTwoWayRecvSession",
-    "EnableDisplayL",
-    "FUNCTIONALITY",
-    SetupL, UT_EnableDisplayLL, Teardown)   
-    
-EUNIT_TEST(
-    "SetOrientationL - test ",
-    "CMusEngTwoWayRecvSession",
-    "SetOrientationL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetOrientationLL, Teardown)
-
-EUNIT_TEST(
-    "OrientationL - test ",
-    "CMusEngTwoWayRecvSession",
-    "OrientationL",
-    "FUNCTIONALITY",
-    SetupL, UT_OrientationLL, Teardown)
-    
-EUNIT_TEST(
-    "SetLocalRectL - test ",
-    "CMusEngTwoWayRecvSession",
-    "SetLocalRectL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetLocalRectLL, Teardown)
-    
-EUNIT_TEST(
-    "SetRectsL - test ",
-    "CMusEngTwoWayRecvSession",
-    "SetRectsL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetRectsLL, Teardown)
-
-EUNIT_TEST(
-    "Camera - test ",
-    "CMusEngTwoWayRecvSession",
-    "Camera",
-    "FUNCTIONALITY",
-    SetupL, UT_CameraL, Teardown)
-    
-EUNIT_TEST(
-    "LocalVideoPlayer - test ",
-    "CMusEngTwoWayRecvSession",
-    "LocalVideoPlayer",
-    "FUNCTIONALITY",
-    SetupL, UT_LocalVideoPlayerL, Teardown)
-
-EUNIT_TEST(
-    "HandleSessionStateChanged - test ",
-    "CMusEngTwoWayRecvSession",
-    "HandleSessionStateChanged",
-    "FUNCTIONALITY",
-    SetupL, UT_HandleSessionStateChangedL, Teardown)
-
-EUNIT_TEST(
-    "AdjustVideoCodecL - test ",
-    "CMusEngTwoWayRecvSession",
-    "AdjustVideoCodecL",
-    "FUNCTIONALITY",
-    SetupL, UT_AdjustVideoCodecLL, Teardown)
-
-EUNIT_TEST(
-    "AdjustAudioCodecL - test ",
-    "CMusEngTwoWayRecvSession",
-    "AdjustAudioCodecL",
-    "FUNCTIONALITY",
-    SetupL, UT_AdjustAudioCodecLL, Teardown)
-
-EUNIT_TEST(
-    "DoCodecSelectionL - test ",
-    "CMusEngTwoWayRecvSession",
-    "DoCodecSelectionL",
-    "FUNCTIONALITY",
-    SetupL, UT_DoCodecSelectionLL, Teardown)
-
-EUNIT_TEST(
-    "IncomingSession - test ",
-    "CMusEngTwoWayRecvSession",
-    "IncomingSession",
-    "FUNCTIONALITY",
-    SetupL, UT_IncomingSessionL, Teardown)
-
-EUNIT_TEST(
-    "UT_CompleteSessionStructureL_WithoutSessionL - test without a session",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_WithoutSessionL, Teardown)
-
-EUNIT_TEST(
-    "UT_CompleteSessionStructureL_WithoutStreamsL - without streams",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_WithoutStreamsL, Teardown)
-
-EUNIT_TEST(
-    "UT_CompleteSessionStructureL_WithOutgoingStreamL - with outgoing stream",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_WithOutgoingStreamL, Teardown)
-
-EUNIT_TEST(
-    "UT_CompleteSessionStructureL_WithVideoInL - with video in stream",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_WithVideoInL, Teardown)
-
-EUNIT_TEST(
-    "UT_CompleteSessionStructureL_WithVideoOutBoundToVideoInL - with sendrecv video, video out bound to video in",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_WithVideoOutBoundToVideoInL, Teardown)
-
-EUNIT_TEST(
-    "UT_CompleteSessionStructureL_WithVideoInBoundToVideoOutL - with sendrecv video, video in bound to video out",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_WithVideoInBoundToVideoOutL, Teardown)
-
-EUNIT_TEST(
-    "UT_CompleteSessionStructureL_WithMultipleVideoInsL - with multiple video in streams",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_WithMultipleVideoInsL, Teardown)
-        
-EUNIT_TEST(
-    "CompleteSessionStructureL - test one video and multiple  audio streams",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_WithVideoAndMultipleAudioInsL, Teardown)
-    
-EUNIT_TEST(
-    "CompleteSessionStructureL - test operator variant",
-    "CMusEngTwoWayRecvSession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureL_OperatorVariant, Teardown)
-    
-EUNIT_END_TEST_TABLE
-
-//  END OF FILE
-
-
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtwowaysession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1217 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include "ut_musengtwowaysession.h"
-#include "musengstubs.h"
-#include "musengtestdefs.h"
-#include "musengtwowaysession.h"
-#include "mussipprofilehandler.h"
-#include "musengmceutils.h"
-#include "mussettings.h"
-#include "mussessionproperties.h"
-#include "musengremotevideoplayer.h"
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-#include <mceoutsession.h>
-#include <mcestreambundle.h>
-#include <mcevideostream.h>
-#include <mcecamerasource.h>
-#include <mcertpsink.h>
-#include <mcefilesink.h>
-#include <mceh263codec.h>
-#include <mceavccodec.h>
-#include <mceaudiocodec.h>
-#include <mcedisplaysink.h>
-#include <mcertpsource.h>
-
-
-_LIT8( KMusAvcBitrateLevel1TestText, "TestTextForAvcBrL1Level" );
-_LIT8( KMusAvcBitrateLevel1bTestText, "TestTextForAvcBrL1bLevel" );
-_LIT8( KMusAvcBitrateLevel1_1TestText, "TestTextForAvcBrL1_1Level" );
-_LIT8( KMusAvcBitrateLevel1_2TestText, "TestTextForAvcBrL1_2Level" );
-_LIT8( KMusAvcBitrateLevel1_3TestText, "TestTextForAvcBrL1_3Level" );
-_LIT8( KMusAvcBitrateLevel2TestText, "TestTextForAvcBrL2Level" );
-
-_LIT8( KMusAvcBitrateLevel_1b_ConfigKey, "AvcBrL1b=TestTextForAvcBrL1bLevel;" );
-
-_LIT8( KMusAvcBitrateLevel_1_1_ConfigKey, 
-"AvcBrL1_1=TestTextForAvcBrL1_1Level;");
-
-_LIT8( KMusAvcBitrateLevels_1_1_And_1b_ConfigKeys, 
-"AvcBrL1_1=TestTextForAvcBrL1_1Level;\
-AvcBrL1b=TestTextForAvcBrL1bLevel;" );
-
-_LIT8( KMusAvcAllLevelsConcatenation,
-"AvcBrL1=TestTextForAvcBrL1Level;\
-AvcBrL1b=TestTextForAvcBrL1bLevel;\
-AvcBrL1_1=TestTextForAvcBrL1_1Level;\
-AvcBrL1_2=TestTextForAvcBrL1_2Level;\
-AvcBrL1_3=TestTextForAvcBrL1_3Level;\
-AvcBrL2=TestTextForAvcBrL2Level;" );
-
-
-
-//use step in different time period
-const TInt KZoomBigStepCount = 15;
-const TInt KZoomSmallStepCount = KZoomBigStepCount*2;
-const TInt KZoomStepMinSize = 1;
-
-// 0.4 second
-const TInt64 KZoomFasterTime = 400000;//must bigger than 1/3 second
-
-//insure that step is 1
-#define USER_SLEEP  User::After(KZoomFasterTime)
-
-
-// NOTE!!!!!!!!!!
-// There are intentianally many same cases as already in CMusEngLiveSession 
-// as two-way session derives from livesession. These cases therefore
-// ensure that live session changes are not breaking two-way session.
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngTwoWaySession* UT_CMusEngTwoWaySession::NewL()
-    {
-    UT_CMusEngTwoWaySession* self = UT_CMusEngTwoWaySession::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngTwoWaySession* UT_CMusEngTwoWaySession::NewLC()
-    {
-    UT_CMusEngTwoWaySession* self = new( ELeave ) UT_CMusEngTwoWaySession();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngTwoWaySession::~UT_CMusEngTwoWaySession()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusEngTwoWaySession::UT_CMusEngTwoWaySession()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::SetupL()
-    {
-    iLcSessionObserver = new( ELeave )CLcSessionObserverStub;
-    iLcUiProvider = new( ELeave )CLcUiProviderStub;    
-    iLiveSession = CMusEngTwoWaySession::NewL();
-    iLiveSession->SetLcSessionObserver( iLcSessionObserver );
-    iLiveSession->SetLcUiProvider( iLcUiProvider );    
-
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid,
-                                        NMusSessionApi::KRemoteSipAddress,
-                                        KTestRecipientSipUri ) );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::Teardown()
-    {
-    delete iLiveSession;
-    delete iLcSessionObserver;
-    delete iLcUiProvider;
-    PropertyHelper::Close();
-    // Delete static data from CenRep stub
-    CRepository::iStaticWriteAvcKeysToStaticData = EFalse;
-    CRepository::DeleteStubAvcConfigKeys();
-    CRepository::ResetStubGlobal();
-    CRepository::iForceFailWithCode = KErrNone;
-    }
-
-
-
-// TEST CASES
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_NewLL()
-    {
-    EUNIT_ASSERT( iLiveSession )
-    EUNIT_ASSERT( iLiveSession->iCameraHandler.iCameraUsage == MusSettingsKeys::EUseCameraSwapping );     
-    EUNIT_ASSERT( iLiveSession->iMceManagerUid == TUid::Uid( KMusUiUid ) );
-
-    delete iLiveSession;
-    iLiveSession = NULL;
-    CRepository::SetStubGlobal( MusSettingsKeys::KCameraUsage,
-                                MusSettingsKeys::EUseOnlySecondaryCamera );
-
-    iLiveSession = CMusEngTwoWaySession::NewL();   
-    
-    EUNIT_ASSERT( iLiveSession->iCameraHandler.iCameraUsage == MusSettingsKeys::EUseOnlySecondaryCamera );     
-    
-    delete iLiveSession;
-    iLiveSession = NULL;
-    CRepository::SetStubGlobal( MusSettingsKeys::KCameraUsage,
-                                MusSettingsKeys::EUseOnlyMainCamera );
-
-    iLiveSession = CMusEngTwoWaySession::NewL();  
-    
-    EUNIT_ASSERT_EQUALS( TInt( MusSettingsKeys::EUseOnlyMainCamera ),
-                         TInt( iLiveSession->iCameraHandler.iCameraUsage ) )      
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_EstablishLcSessionLL()
-    {
-    CRepository::SetStubGlobal( MusSettingsKeys::KVideoBandwidth,
-                                128 );
-    iLiveSession->EstablishLcSessionL();
-    
-    EUNIT_ASSERT( iLiveSession->iSession );
-    // Next assertion ensures that session structure is new
-    EUNIT_ASSERT( iLiveSession->iSession->Streams().Count() > 0 );   
-    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0] ); 
-    EUNIT_ASSERT( *(iLiveSession->iRecipient) == KTestRecipientSipUri8() );
-    EUNIT_ASSERT( iLiveSession->iSession->State() == CMceSession::EOffering );
-    
-    EUNIT_ASSERT( iLiveSession->iSession->iHeaders );
-    EUNIT_ASSERT( iLiveSession->iSession->iHeaders->Count() == 2 );
-    EUNIT_ASSERT( iLiveSession->iSession->iHeaders->MdcaPoint( 0 ) ==
-                  KMusEngAcceptContactHeader() );
-    EUNIT_ASSERT( iLiveSession->iSession->iHeaders->MdcaPoint( 1 ) ==
-                  KMusAcceptHeader() );
-    
-    // Ensure there is no SDP lines at session level
-    EUNIT_ASSERT( iLiveSession->iSession->iSessionSDPLines );
-    EUNIT_ASSERT( iLiveSession->iSession->iSessionSDPLines->Count() == 1 );
-    EUNIT_ASSERT( iLiveSession->iSession->iSessionSDPLines->MdcaPoint( 0 ) ==
-                  KMusEngSessionSdpLineXApplication() );
-        
-    // Ensure b=AS and b=TIAS attributes are taken at media level   
-    MDesC8Array* mediaSdpLines = 
-        iLiveSession->iSession->Streams()[0]->iMediaSDPLines;
-
-    EUNIT_ASSERT( mediaSdpLines );
-    EUNIT_ASSERT( mediaSdpLines->MdcaCount() == 2 );
-    EUNIT_ASSERT( mediaSdpLines->MdcaPoint( 0 ).Find( 
-                  KMusEngSessionSdpLineBandwidthLine() ) == 0 );
-    EUNIT_ASSERT( mediaSdpLines->MdcaPoint( 1 ).Find( 
-                  KMusEngSessionSdpLineTiasLine() ) == 0 ); 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_EnableDisplayLL()
-    {
-    TRAPD( error, iLiveSession->EnableDisplayL( ETrue ) );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrNotReady );
-    
-    ESTABLISH_OUT_SESSION( iLiveSession );
-    
-    CMceDisplaySink* display = 
-                    MusEngMceUtils::GetDisplayL( *(iLiveSession->iSession) );
-    
-    CMceDisplaySink* receivingDisplay = 
-                    MusEngMceUtils::GetReceivingDisplayL( *iLiveSession->iSession );
-    
-    // Disable
-    iLiveSession->EnableDisplayL( EFalse );
-    
-    EUNIT_ASSERT( !display->iIsEnabled );
-    EUNIT_ASSERT( !receivingDisplay->iIsEnabled );
-    
-    // Try to disable again, request should be ignored
-    
-    iLiveSession->EnableDisplayL( EFalse );
-    
-    EUNIT_ASSERT( !display->iIsEnabled );
-    EUNIT_ASSERT( !receivingDisplay->iIsEnabled );
-
-    // Enable
-    
-    iLiveSession->EnableDisplayL( ETrue );
-    
-    EUNIT_ASSERT( display->iIsEnabled );
-    EUNIT_ASSERT( receivingDisplay->iIsEnabled );
-    
-    // Try to enable again, request should be ignored
-    
-    iLiveSession->EnableDisplayL( ETrue );
-    
-    EUNIT_ASSERT( display->iIsEnabled );
-    EUNIT_ASSERT( receivingDisplay->iIsEnabled );
-    
-    // Display is active only if receiving and display is explicitly enabled
-    EUNIT_ASSERT( !iLiveSession->IsDisplayActive() )
-    iLiveSession->iReceiving = ETrue;
-    EUNIT_ASSERT( iLiveSession->IsDisplayActive() )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_SetOrientationLL()
-    {
-    // Try without session, fails
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->SetOrientationL( 
-                                               CMusEngMceSession::EPortrait ), 
-                                KErrNotReady )
-    
-    // Establish a session
-    ESTABLISH_OUT_SESSION( iLiveSession )
-    
-    CMceDisplaySink* display = 
-                   MusEngMceUtils::GetDisplayL( *iLiveSession->iSession );
-    
-    CMceDisplaySink* receivingDisplay = 
-                   MusEngMceUtils::GetReceivingDisplayL( *iLiveSession->iSession );
-       
-    
-    // Check the initial state
-    display->iRotation = CMceDisplaySink::ENone;
-    receivingDisplay->iRotation = CMceDisplaySink::ENone;
-    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
-                         MLcWindow::EPortrait )      
-                        
-    // Successfully change orientation
-    
-    iLiveSession->SetOrientationL( CMusEngMceSession::ELandscape );
-    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
-                         MLcWindow::ELandscape )
-    
-    EUNIT_ASSERT_EQUALS( display->iRotation, CMceDisplaySink::EClockwise90Degree );
-    EUNIT_ASSERT_EQUALS( receivingDisplay->iRotation, CMceDisplaySink::EClockwise90Degree );
-    
-    iLiveSession->SetOrientationL( CMusEngMceSession::EPortrait );
-    EUNIT_ASSERT_EQUALS( iLiveSession->OrientationL(), 
-                         MLcWindow::EPortrait )          
-    
-    EUNIT_ASSERT_EQUALS( display->iRotation, CMceDisplaySink::ENone );
-    EUNIT_ASSERT_EQUALS( receivingDisplay->iRotation, CMceDisplaySink::ENone );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_SetLocalRectLL()
-    {
-    // Does nothing real before session establishment
-    TRect rect1( 100, 200, 300, 500 );
-    iLiveSession->SetSecondaryRectL( rect1 ); 
-    
-    EUNIT_ASSERT( rect1 == iLiveSession->iLocalRect );
-    
-    // Local rect changing affects to viewfinder display sink not to receiving video
-    //
-    ESTABLISH_OUT_SESSION( iLiveSession );
-    
-    CMceDisplaySink* vfDisplay = 
-                   MusEngMceUtils::GetDisplayL( *( iLiveSession->iSession ) );
-    CMceDisplaySink* receivingDisplay = 
-                   MusEngMceUtils::GetReceivingDisplayL( *( iLiveSession->iSession ) );
-
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() == iLiveSession->iLocalRect );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() != iLiveSession->iLocalRect );
-        
-    TRect rect2( 200, 200, 300, 500 );
-    iLiveSession->SetSecondaryRectL( rect2 ); 
-    EUNIT_ASSERT( rect2 == iLiveSession->iLocalRect );
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() == iLiveSession->iLocalRect );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() != iLiveSession->iLocalRect );
-    
-    // Terminate session and try again, rect must not be changed
-    
-    iLiveSession->iSession->iState = CMceSession::ETerminated;
-    
-    TRect rect3( 300, 300, 400, 600 );
-    
-    iLiveSession->SetSecondaryRectL( rect3 ); 
-    
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() != rect3 )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_SetRectsLL()
-    {
-    // Does nothing real before session establishment
-    TRect localrect1( 100, 200, 300, 400 );
-    TRect remoterect1( 100, 200, 300, 500 );
-    iLiveSession->SetRectsL( remoterect1, localrect1 ); 
-    
-    EUNIT_ASSERT( localrect1 == iLiveSession->iLocalRect );
-    EUNIT_ASSERT( remoterect1 == iLiveSession->iRect );
-    
-    // Local rect changing affects to viewfinder display sink and remote rect to
-    // receiving video display sink
-    //
-    ESTABLISH_OUT_SESSION( iLiveSession );
-    
-    CMceDisplaySink* vfDisplay = 
-                   MusEngMceUtils::GetDisplayL( *( iLiveSession->iSession ) );
-    CMceDisplaySink* receivingDisplay = 
-                   MusEngMceUtils::GetReceivingDisplayL( *( iLiveSession->iSession ) );
-
-    TRect localrect2( 200, 200, 300, 400 );
-    TRect remoterect2( 200, 200, 300, 500 );
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() != localrect2 );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() != remoterect2 );
-
-    iLiveSession->SetRectsL( remoterect2, localrect2 ); 
-    EUNIT_ASSERT( localrect2 == iLiveSession->iLocalRect );
-    EUNIT_ASSERT( remoterect2 == iLiveSession->iRect );
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() == iLiveSession->iLocalRect );
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() == iLiveSession->iRect );
-    
-    // Terminate session and try again, rect must not be changed
-    
-    iLiveSession->iSession->iState = CMceSession::ETerminated;
-    
-    TRect localrect3( 300, 200, 300, 400 );
-    TRect remoterect3( 300, 200, 300, 500 );
-    
-    iLiveSession->SetRectsL( remoterect3, localrect3 );
-    
-    EUNIT_ASSERT( vfDisplay->DisplayRectL() != localrect3 )
-    EUNIT_ASSERT( receivingDisplay->DisplayRectL() != remoterect3 );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_EnableLcFileL()
-    {
-    // Recording is not supported for two-way session
-    EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->EnableLcFileL( ETrue ),
-                                 KErrNotSupported )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_CompleteSessionStructureLL()
-    {
-    
-    CMceStreamBundle* localBundle = 
-                            CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
-    
-    // Check that structure cannot be completed before creating the session
-    TRAPD( error, iLiveSession->CompleteSessionStructureL( *localBundle ) );
-    MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT( error == KErrNotReady );
-    
-    // Normal case
-  
-    CSIPProfile* profile = iLiveSession->iSipProfileHandler->Profile();
-    
-    iLiveSession->iSession = CMceOutSession::NewL( 
-                                    *(iLiveSession->iManager),
-                                    *profile,
-                                    KTestRecipientSipUri8() );
-                             
-    iLiveSession->CompleteSessionStructureL( *localBundle );
-    
-    EUNIT_ASSERT( localBundle->Streams().Count() == 0 )
-    
-    EUNIT_ASSERT( iLiveSession->iSession->Streams().Count() == 1 );
-    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Type() == KMceVideo );
-    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Source() );
-    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Source()->Type() ==
-                  KMceCameraSource );
-    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Sinks().Count() == 1 );
-    EUNIT_ASSERT( iLiveSession->iSession->Streams()[0]->Sinks()[0]->Type() ==
-                  KMceRTPSink );
-
-    EUNIT_ASSERT( iLiveSession->iCameraHandler.iCurrentCamera ==
-                        TMusEngCameraHandler::EBackCamera );
-    
-    CMceVideoStream* vidStream = static_cast<CMceVideoStream*>( iLiveSession->iSession->Streams()[0] );
-    EUNIT_ASSERT( vidStream->BoundStream() );
-    CMceVideoStream& inStream = static_cast<CMceVideoStream&>( vidStream->BoundStreamL() );
-    EUNIT_ASSERT( inStream.Source() );
-    EUNIT_ASSERT( inStream.Source()->Type() == KMceRTPSource );
-    EUNIT_ASSERT( inStream.Sinks().Count() == 1 );
-    EUNIT_ASSERT( inStream.Sinks()[0]->Type() == KMceDisplaySink );
-
-    delete iLiveSession->iSession; 
-    iLiveSession->iSession = NULL; 
-    
-    iLiveSession->iSession = CMceOutSession::NewL( 
-                                    *(iLiveSession->iManager),
-                                    *profile,
-                                    KTestRecipientSipUri8() );
-    
-    iLiveSession->iCameraHandler.iCameraUsage = MusSettingsKeys::EUseOnlySecondaryCamera;     
-    iLiveSession->CompleteSessionStructureL( *localBundle );
-    
-    EUNIT_ASSERT( iLiveSession->iCameraHandler.iCurrentCamera ==
-                        TMusEngCameraHandler::EFrontCamera );
-    
-    
-    CleanupStack::PopAndDestroy( localBundle );                                
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_HandleSessionStateChangedL()
-    {
-    // Make Repository empty, config keys must be written
-    CRepository::SetStubAvcConfigKeysL( KNullDesC8() );
-    
-    // Invite    
-    iLiveSession->EstablishLcSessionL();
-    iLiveSession->iSession->iState = CMceSession::EEstablished;  
-    CRepository::iForceFailWithCode = KErrNone;
-    
-    // Simulate session state transition notification
-    iLiveSession->HandleSessionStateChanged( 
-                        *iLiveSession->iSession,
-                        200, KNullDesC8() );
-    
-    HBufC8* info = MultimediaSharingSettings::EncoderConfigInfoLC();
-    EUNIT_ASSERT_NOT_EQUALS( *info, KMusAvcBitrateLevel_1b_ConfigKey() )
-    CleanupStack::PopAndDestroy( info );
-    
-    // sendrecv->recvonly downgrade terminates session
-    iLcSessionObserver->Reset();
-    iLiveSession->iSession->iState = CMceSession::EEstablished;
-    CMceVideoStream* inStream = 
-        MusEngMceUtils::GetVideoInStreamL( *iLiveSession->iSession );    
-    inStream->EnableL();
-    CMceVideoStream* outStream = 
-        MusEngMceUtils::GetVideoOutStreamL( *iLiveSession->iSession );
-    outStream->DisableL();
-    iLiveSession->HandleSessionStateChanged( 
-        *iLiveSession->iSession, 200, KNullDesC8() );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::ESessionFailed ) )
-    }   
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_AdjustVideoCodecLL()
-    {
-    CRepository::SetStubAvcConfigKeysL( KNullDesC8() );
-    
-    CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() );    
-    CMceVideoCodec* codecH2632000 = CMceH263Codec::NewLC( KMceSDPNameH2632000() );
-    CMceVideoCodec* codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    CMceVideoCodec* codecUnknown = CMceH263Codec::NewLC( KNullDesC8() );
-        
-    iLiveSession->AdjustVideoCodecL( *codecH263, KMceCameraSource );
-    iLiveSession->AdjustVideoCodecL( *codecH2632000, KMceCameraSource );    
-    iLiveSession->AdjustVideoCodecL( *codecAvc, KMceCameraSource );  
-    iLiveSession->AdjustVideoCodecL( *codecUnknown, KMceCameraSource );
-
-    // Test that bit rates and keepalive has been set to H263 & AVC codecs
-    EUNIT_ASSERT( codecH263->iAllowedBitrates == KMceAllowedH263BitrateAll )
-    EUNIT_ASSERT( codecH263->iMaxBitRate == KMceH263Level45Bitrate )
-    EUNIT_ASSERT( codecH263->iBitrate == 80000 )
-    EUNIT_ASSERT_EQUALS( codecH263->KeepAliveTimer(), 6 )
-    EUNIT_ASSERT_EQUALS( codecH263->KeepAlivePayloadType(), 96 )
-    EUNIT_ASSERT_EQUALS( codecH263->KeepAliveData(), KNullDesC8() )
-    
-    EUNIT_ASSERT( codecH2632000->iAllowedBitrates == 
-                  KMceAllowedH263BitrateAll )
-    EUNIT_ASSERT( codecH2632000->iMaxBitRate == KMceH263Level45Bitrate )
-    EUNIT_ASSERT( codecH2632000->iBitrate == 80000 )
-    EUNIT_ASSERT_EQUALS( codecH2632000->KeepAliveTimer(), 6 )
-    EUNIT_ASSERT_EQUALS( codecH2632000->KeepAlivePayloadType(), 96 )
-    EUNIT_ASSERT_EQUALS( codecH2632000->KeepAliveData(), KNullDesC8() )
-    
-    EUNIT_ASSERT( codecAvc->iAllowedBitrates == 
-                                        KMceAvcCodecProfileIdBaseline | 
-                                        KMceAvcCodecProfileIopConstraintSet | 
-                                        KMceAvcBitrateLevel1b )
-    EUNIT_ASSERT_EQUALS( codecAvc->KeepAliveTimer(), 6 )
-    EUNIT_ASSERT_EQUALS( codecAvc->KeepAlivePayloadType(), 98 )
-    EUNIT_ASSERT_EQUALS( codecAvc->KeepAliveData(), KNullDesC8() )
-    EUNIT_ASSERT( iLiveSession->iStoreEncoderConfigInfo )
-
-
-    // Test that bitrates and keepalive has not been set to unknown codecs
-    EUNIT_ASSERT( codecUnknown->iAllowedBitrates != 
-                  KMceAllowedH263BitrateAll )
-    EUNIT_ASSERT( codecUnknown->iMaxBitRate != KMceH263Level45Bitrate )
-    EUNIT_ASSERT( codecUnknown->iBitrate != KMceH263Level10Bitrate )
-    EUNIT_ASSERT_EQUALS( codecUnknown->KeepAliveTimer(), 6 )
-    EUNIT_ASSERT_EQUALS( codecUnknown->KeepAlivePayloadType(), 0 )
-    EUNIT_ASSERT_EQUALS( codecUnknown->KeepAliveData(), KNullDesC8() )
-
-    // Test that base class has been called to all codecs
-    EUNIT_ASSERT( codecH263->iPayloadType == 96 )
-    EUNIT_ASSERT( codecH2632000->iPayloadType == 96 )
-    EUNIT_ASSERT( codecAvc->iPayloadType == 98 )
-    EUNIT_ASSERT( codecUnknown->iPayloadType == 0 )
-        
-    CleanupStack::PopAndDestroy( codecUnknown );
-    CleanupStack::PopAndDestroy( codecAvc );
-    CleanupStack::PopAndDestroy( codecH2632000 );
-    CleanupStack::PopAndDestroy( codecH263 );    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_AdjustAudioCodecLL()
-    {
-    CMceAudioCodec* codec = 
-                iLiveSession->iManager->SupportedAudioCodecs()[0]->CloneL();
-    CleanupStack::PushL( codec );
-    iLiveSession->AdjustAudioCodecL( *codec );
-    
-    // Does nothing so just test that base class has been called
-    
-    EUNIT_ASSERT( codec->iPayloadType == 97 )
-    
-    CleanupStack::PopAndDestroy( codec );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_DoCodecSelectionLL()
-    {
-    CMceVideoStream* stream = CMceVideoStream::NewLC();
-    
-    CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( _L8( "Foo" ) );
-    stream->AddCodecL( codecH263 );
-    CleanupStack::Pop( codecH263 );
-        
-    CMceVideoCodec* codecH2632000 = CMceH263Codec::NewLC( _L8( "Bar" ) );
-    stream->AddCodecL( codecH2632000 );
-    CleanupStack::Pop( codecH2632000 );
-    
-    CMceVideoCodec* codecAvc = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    stream->AddCodecL( codecAvc );
-    CleanupStack::Pop( codecAvc );
-   
-    // No assumptions so all the codecs are left to stream 
-    iLiveSession->DoCodecSelectionL( *stream );    
-    EUNIT_ASSERT_EQUALS( stream->Codecs().Count(), 3 )
-    
-    // Check that AVC codecs are removed if they are known to be not supported
-    delete iLiveSession->iVideoCodecList;
-    iLiveSession->iVideoCodecList = NULL;
-    iLiveSession->iVideoCodecList = _L8("SomethingThatIsNotAVC").AllocL();
-    iLiveSession->DoCodecSelectionL( *stream );
-    EUNIT_ASSERT_EQUALS( stream->Codecs().Count(), 2 )
-    EUNIT_ASSERT( stream->Codecs()[0]->SdpName() != KMceSDPNameH264() )
-    EUNIT_ASSERT( stream->Codecs()[1]->SdpName() != KMceSDPNameH264() )
-    
-    CleanupStack::PopAndDestroy( stream );
-    }
-
-// -----------------------------------------------------------------------------
-// Although all states are not meaningfull for LiveSession, all states are
-// tested in order to force the updating of unit tests when behavior is changed 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_StreamStateChangedL()
-    {
-    // Try without a session, nothing happens
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *videoStream );
-    CleanupStack::PopAndDestroy( videoStream );
-    
-    // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
-    
-    // Try all the stream states
-    CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0];
-    
-    // EUninitialized, stream is created, unexpected change, nothing happens
-    changedStream->iState = CMceMediaStream::EUninitialized;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // EInitialized, stream is initialized
-    changedStream->iState = CMceMediaStream::EInitialized;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // EBuffering, outgoing stream is buffering
-    changedStream->iState = CMceMediaStream::EBuffering;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-     
-    // EBuffering, incoming stream is buffering
-    EUNIT_ASSERT( !iLiveSession->iBuffered );
-    CMceMediaStream* changedInStream = &iLiveSession->iSession->Streams()[0]->BoundStreamL();
-    changedInStream->iState = CMceMediaStream::EBuffering;
-    iLiveSession->StreamStateChanged( *changedInStream );
-    EUNIT_ASSERT( iLiveSession->iBuffered );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // EIdle, stream is not receiving RTP
-    changedStream->iState = CMceMediaStream::EIdle;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // EStreaming, outgoing stream is streaming, no effect on receiving information
-    changedStream->iState = CMceMediaStream::EStreaming;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
-    
-    // EStreaming, incoming stream is streaming, receiving information is updated and notified
-    EUNIT_ASSERT( !iLiveSession->iReceiving );
-    changedInStream->iState = CMceMediaStream::EStreaming;
-    iLiveSession->StreamStateChanged( *changedInStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    EUNIT_ASSERT( iLiveSession->iReceiving );
-    iLcSessionObserver->Reset();
-    
-    // EStreaming, incoming stream is streaming, state is notified even if receiving information
-    // says we are already receiving
-    changedInStream->iState = CMceMediaStream::EStreaming;
-    iLiveSession->StreamStateChanged( *changedInStream );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
-    
-    // EDisabled, stream is explicitly disabled
-    changedStream->iState = CMceMediaStream::EDisabled;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // ENoResources, stream has no needed resources to stream
-    changedStream->iState = CMceMediaStream::ENoResources;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // ETranscodingRequired, stream requires non-realtime transcoding
-    changedStream->iState = CMceMediaStream::ETranscodingRequired;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // ETranscoding, stream is transcoding in non-realtime
-    changedStream->iState = CMceMediaStream::ETranscoding;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                                                            *changedStream );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    }
-
-// -----------------------------------------------------------------------------
-// Although all states are not meaningfull for LiveSession, all states are
-// tested in order to force the updating of unit tests when behavior is changed 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_StreamStateChangedWithSourceL()
-    {
-    // Try without a session, nothing happens
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                    *videoStream, 
-                    *CMceCameraSource::NewLC( *iLiveSession->iManager ) );
-    CleanupStack::PopAndDestroy(); // camera
-    CleanupStack::PopAndDestroy( videoStream );
-    
-    // Simulate sending invite
-    iLiveSession->EstablishLcSessionL();
-    
-    // Try all the stream states
-    CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0];
-    CMceMediaSource* changedSource = changedStream->Source();
-    
-    // EUninitialized, stream is created, unexpected change, nothing happens
-    changedStream->iState = CMceMediaStream::EUninitialized;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // EInitialized, stream is initialized
-    changedStream->iState = CMceMediaStream::EInitialized;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );;
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // EBuffering, stream is buffering
-    changedStream->iState = CMceMediaStream::EBuffering;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // EIdle, stream is not receiving RTP
-    changedStream->iState = CMceMediaStream::EIdle;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // EStreaming, stream is streaming
-    changedStream->iState = CMceMediaStream::EStreaming;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );
-    EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ),
-                         TInt( CLcSessionObserverStub::EPlayerStateChanged ) )
-    iLcSessionObserver->Reset();
-    
-    // EDisabled, stream is explicitly disabled
-    changedStream->iState = CMceMediaStream::EDisabled;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // ENoResources, stream has no needed resources to stream
-    changedStream->iState = CMceMediaStream::ENoResources;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // ETranscodingRequired, stream requires non-realtime transcoding
-    changedStream->iState = CMceMediaStream::ETranscodingRequired;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // ETranscoding, stream is transcoding in non-realtime
-    changedStream->iState = CMceMediaStream::ETranscoding;
-    static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( 
-                            *changedStream, *changedSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_SetEncodingDeviceLL()
-    {
-    CMceAvcCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    
-    // Generic error in CenRep, leave expected
-    CRepository::iForceFailWithCode = KErrNotReady;
-    EUNIT_ASSERT_LEAVE( iLiveSession->SetEncodingDeviceL( *codec ) )
-    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, TUid::Uid( 0 ) )
-    
-    // No entry in CenRep, default value expected
-    CRepository::iForceFailWithCode = KErrNotFound;
-    const TUid KDefaultEncodingDevice( TUid::Uid( 0x20001C13 ) );
-    iLiveSession->SetEncodingDeviceL( *codec );
-    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, 
-                         KDefaultEncodingDevice )
-    
-    // Entry in CenRep
-    const TInt KSomeEncodingDevice( 0x20001C15 );
-    CRepository::iStaticEncoderUid = KSomeEncodingDevice;
-    iLiveSession->SetEncodingDeviceL( *codec );
-    EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, 
-                         TUid::Uid( KSomeEncodingDevice ) )
-                                             
-    CleanupStack::PopAndDestroy( codec );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_SetCodecConfigKeyLL()
-    {
-    CMceAvcCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1b );
-
-    // Generic error in CenRep, leave expected
-    CRepository::iForceFailWithCode = KErrNotReady;
-    EUNIT_ASSERT_LEAVE( iLiveSession->SetCodecConfigKeyL( *codec ) );
-    EUNIT_ASSERT( !codec->iConfigKey )
-    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
-    CRepository::iForceFailWithCode = KErrNone;
-    
-    // No entry in CenRep, nothing happens
-    iLiveSession->SetCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( !codec->iConfigKey )
-    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
-    
-    // Empty entry in CenRep
-    CRepository::SetStubAvcConfigKeysL( KNullDesC8() );
-    iLiveSession->SetCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( !codec->iConfigKey )
-    EUNIT_ASSERT( iLiveSession->iStoreEncoderConfigInfo )
-    iLiveSession->iStoreEncoderConfigInfo = EFalse; // emulate original situation
-    
-    // Entry in CenRep
-    CRepository::SetStubAvcConfigKeysL( KMusAvcBitrateLevel_1b_ConfigKey );
-    iLiveSession->SetCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( codec->iConfigKey )
-    HBufC8* key = codec->ConfigKeyL();
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1bTestText() )
-    CleanupStack::PopAndDestroy( key );
-    EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo )
-    
-    CleanupStack::PopAndDestroy( codec );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_ReadCodecConfigKeyLL()
-    {
-    HBufC8* key( NULL );
-    
-    // Try with H263, leave expected
-    CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() );  
-    EUNIT_ASSERT_LEAVE( key = iLiveSession->ReadCodecConfigKeyL( *codecH263 ) )
-    CleanupStack::PopAndDestroy( codecH263 );
-    
-    // Try without an entry in CenRep, leave expected
-    CMceVideoCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() );
-    codec->SetAllowedBitrates( 0 | KMceAvcBitrateLevel1 );
-    EUNIT_ASSERT_LEAVE( key = iLiveSession->ReadCodecConfigKeyL( *codec ) )
-
-    // Create CenRep entry which does not include wanted bitrate, NULL value
-    // expected
-    CRepository::SetStubAvcConfigKeysL( KMusAvcBitrateLevel1bTestText() );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( !key )
-    
-    // Create entry with all AVC keys and try with all the values
-    CRepository::SetStubAvcConfigKeysL( KMusAvcAllLevelsConcatenation() );                           
-    
-    // KMceAvcBitrateLevel1
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1TestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel1b
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1b );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1bTestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel1_1
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_1 );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_1TestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel1_2
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_2 );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_2TestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel1_3
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel1_3 );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_3TestText );
-    CleanupStack::PopAndDestroy( key );
-    
-    // KMceAvcBitrateLevel2
-    codec->SetAllowedBitrates( KMceAvcBitrateLevel2 );
-    key = iLiveSession->ReadCodecConfigKeyL( *codec );
-    EUNIT_ASSERT( key );
-    CleanupStack::PushL( key );
-    EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel2TestText );
-    CleanupStack::PopAndDestroy( key );
-   
-    CleanupStack::PopAndDestroy( codec );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_StoreEncoderConfigInfoLL()
-    {
-    CRepository::iStaticWriteAvcKeysToStaticData = ETrue;
-    
-    // Try with clean CenRep
-    MultimediaSharingSettings::SetEncoderConfigInfoL( KNullDesC8() );   
-    
-    ESTABLISH_OUT_SESSION( iLiveSession ) // calls StoreEncoderConfigInfoL
-    // If StoreEncoderConfigInfoL leaves with KErrNoMemory,
-    // MMusEngSessionObserver::SessionFailed will be called.
-    if ( iLcSessionObserver->iCalledFunction == CLcSessionObserverStub::ESessionFailed )
-        {
-        User::Leave( KErrNoMemory );
-        }
-                     
-    HBufC8* keys = MultimediaSharingSettings::EncoderConfigInfoLC();    
-    EUNIT_ASSERT_EQUALS( *keys, KMusAvcBitrateLevel_1b_ConfigKey() )
-    CleanupStack::PopAndDestroy( keys );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_RemoteVideoPlayerL()
-    {
-    EUNIT_ASSERT( iLiveSession->RemoteVideoPlayer() == 
-                  iLiveSession->iRemoteVideoPlayer )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusEngTwoWaySession::UT_InactivityTimeoutL()
-    {
-    // Not receiving, no effect
-    iLiveSession->iReceiving = EFalse;
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    CMceRtpSource* rtpSource = CMceRtpSource::NewLC();
-    iLiveSession->InactivityTimeout( *videoStream, *rtpSource );
-    EUNIT_ASSERT( iLcSessionObserver->IsReseted() );
-    
-    // Receiving, state change is notified and
-    // receiving and buffering status are cleared
-    iLiveSession->iBuffered = ETrue;
-    iLiveSession->iReceiving = ETrue;
-    iLiveSession->InactivityTimeout( *videoStream, *rtpSource );
-    EUNIT_ASSERT_EQUALS( iLcSessionObserver->iCalledFunction, 
-                         CLcSessionObserverStub::EPlayerStateChanged );
-    EUNIT_ASSERT( !iLiveSession->iReceiving );
-    EUNIT_ASSERT( !iLiveSession->iBuffered );
-    CleanupStack::PopAndDestroy( rtpSource );
-    CleanupStack::PopAndDestroy( videoStream );
-    }
-
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusEngTwoWaySession,
-    "UT_CMusEngTwoWaySession",
-    "UNIT" )
-
-EUNIT_TEST(
-    "NewL - test ",
-    "CMusEngTwoWaySession",
-    "NewL",
-    "FUNCTIONALITY",
-    SetupL, UT_NewLL, Teardown)
-
-EUNIT_TEST(
-    "EstablishLcSessionL - test ",
-    "CMusEngTwoWaySession",
-    "EstablishLcSessionL",
-    "FUNCTIONALITY",
-    SetupL, UT_EstablishLcSessionLL, Teardown)
-
-EUNIT_TEST(
-    "EnableDisplayL - test ",
-    "CMusEngTwoWaySession",
-    "EnableDisplayL",
-    "FUNCTIONALITY",
-    SetupL, UT_EnableDisplayLL, Teardown)
-    
-EUNIT_TEST(
-    "SetOrientationL - test ",
-    "CMusEngTwoWaySession",
-    "SetOrientationL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetOrientationLL, Teardown)
-    
-EUNIT_TEST(
-    "SetLocalRectL - test ",
-    "CMusEngTwoWaySession",
-    "SetLocalRectL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetLocalRectLL, Teardown)
-    
-EUNIT_TEST(
-    "SetRectsL - test ",
-    "CMusEngTwoWaySession",
-    "SetRectsL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetRectsLL, Teardown)
-
-EUNIT_TEST(
-    "CompleteSessionStructureL - test ",
-    "CMusEngTwoWaySession",
-    "CompleteSessionStructureL",
-    "FUNCTIONALITY",
-    SetupL, UT_CompleteSessionStructureLL, Teardown)
-
-EUNIT_TEST(
-    "HandleSessionStateChanged - test ",
-    "CMusEngTwoWaySession",
-    "HandleSessionStateChanged",
-    "FUNCTIONALITY",
-    SetupL, UT_HandleSessionStateChangedL, Teardown)
-
-EUNIT_TEST(
-    "AdjustVideoCodecL - test ",
-    "CMusEngTwoWaySession",
-    "AdjustVideoCodecL",
-    "FUNCTIONALITY",
-    SetupL, UT_AdjustVideoCodecLL, Teardown)
-
-EUNIT_TEST(
-    "AdjustAudioCodecL - test ",
-    "CMusEngTwoWaySession",
-    "AdjustAudioCodecL",
-    "FUNCTIONALITY",
-    SetupL, UT_AdjustAudioCodecLL, Teardown)
-
-EUNIT_TEST(
-    "DoCodecSelectionL- test ",
-    "CMusEngTwoWaySession",
-    "DoCodecSelectionL",
-    "FUNCTIONALITY",
-    SetupL, UT_DoCodecSelectionLL, Teardown)
-
-EUNIT_TEST(
-    "StreamStateChangedL() - test ",
-    "CMusEngTwoWaySession",
-    "StreamStateChangedL()",
-    "FUNCTIONALITY",
-    SetupL, UT_StreamStateChangedL, Teardown)
-
-EUNIT_TEST(
-    "StreamStateChangedL( src ) - test ",
-    "CMusEngTwoWaySession",
-    "StreamStateChangedL( src )",
-    "FUNCTIONALITY",
-    SetupL, UT_StreamStateChangedWithSourceL, Teardown)        
-
-EUNIT_TEST(
-    "SetEncodingDeviceL - test ",
-    "CMusEngTwoWaySession",
-    "SetEncodingDeviceL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetEncodingDeviceLL, Teardown)   
-
-EUNIT_TEST(
-    "SetCodecConfigKeyL - test ",
-    "CMusEngTwoWaySession",
-    "SetCodecConfigKeyL",
-    "FUNCTIONALITY",
-    SetupL, UT_SetCodecConfigKeyLL, Teardown)    
-
-EUNIT_TEST(
-    "ReadCodecConfigKeyL - test ",
-    "CMusEngTwoWaySession",
-    "ReadCodecConfigKeyL",
-    "FUNCTIONALITY",
-    SetupL, UT_ReadCodecConfigKeyLL, Teardown)        
-
-EUNIT_TEST(
-    "StoreEncoderConfigInfoL - test ",
-    "CMusEngTwoWaySession",
-    "StoreEncoderConfigInfoL",
-    "FUNCTIONALITY",
-    SetupL, UT_StoreEncoderConfigInfoLL, Teardown)    
-    
-EUNIT_TEST(
-    "RemoteVideoPlayer - test ",
-    "CMusEngTwoWaySession",
-    "RemoteVideoPlayer",
-    "FUNCTIONALITY",
-    SetupL, UT_RemoteVideoPlayerL, Teardown)    
-   
-EUNIT_TEST(
-    "EnableLcFileL - test ",
-    "CMusEngTwoWaySession",
-    "EnableLcFileL",
-    "FUNCTIONALITY",
-    SetupL, UT_EnableLcFileL, Teardown)    
-
-EUNIT_TEST(
-    "InactivityTimeout - test ",
-    "CMusEngTwoWaySession",
-    "InactivityTimeout",
-    "FUNCTIONALITY",
-    SetupL, UT_InactivityTimeoutL, Teardown)  
-    
-EUNIT_END_TEST_TABLE
-
-//  END OF FILE
-
-
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenguriparser.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenguriparser.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -25,7 +25,7 @@
 
 //  SYSTEM INCLUDES
 #include <digia/eunit/eunitmacros.h>
-#include <e32property.h>
+
 
 
 // -----------------------------------------------------------------------------
@@ -101,9 +101,7 @@
 //
 void UT_TMusEngUriParser::Teardown()
     {
-    MultimediaSharingSettings::SetOperatorVariantSettingL(
-                             MusSettingsKeys::EStandard );
-    PropertyHelper::Close();
+    
     }
 
 
@@ -247,7 +245,7 @@
     parser.iUri = KTestRecipientRandomText8();
     TRAPD( error, parser.ParseUriL() );
     MUS_TEST_FORWARD_ALLOC_FAILURE( error );
-    EUNIT_ASSERT_EQUALS( error, KErrArgument );
+    EUNIT_ASSERT_EQUALS( error, KErrCorrupt );
     
     // Unsuccessful case, tel prefix and at sign present
     parser.iUri = KTestRecipientTelUriWithAtSign8();
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_muspropertywatch.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include "ut_muspropertywatch.h"
-#include "muspropertywatch.h"
-
-#include "mussessionproperties.h"
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-#include <e32property.h>
-
-using namespace NMusSessionApi;
-
-const TInt KMusUiTestKey = 1100;
-const TInt KMusUiTestPropertyReadInteger = 200;
-_LIT( KMusUiTestPropertyReadDesc, "testread" ); 
-TUid KMusUiDummyUid = { 1000 }; // Unit testing dummy
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusPropertyWatch* UT_CMusPropertyWatch::NewL()
-    {
-    UT_CMusPropertyWatch* self = UT_CMusPropertyWatch::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusPropertyWatch* UT_CMusPropertyWatch::NewLC()
-    {
-    UT_CMusPropertyWatch* self = new( ELeave ) UT_CMusPropertyWatch();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-UT_CMusPropertyWatch::~UT_CMusPropertyWatch()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusPropertyWatch::UT_CMusPropertyWatch()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyWatch::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyWatch::SetupL()
-    {
-    PropertyHelper::SetErrorCode( KErrNone );
-    RProperty::Set( KMusUiDummyUid, KMusUiTestKey, KMusUiTestPropertyReadInteger );
-    iPropertyWatch = CMusPropertyWatch::NewL( iPropertyObserver,
-                                                KMusUiDummyUid,
-                                                KMusUiTestKey );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyWatch::Teardown()
-    {
-    delete iPropertyWatch;
-    PropertyHelper::Close();
-    }
-
-
-
-// TEST CASES
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyWatch::UT_CMusPropertyWatch_ReadIntPropertyLL()
-    {
-
-    // Teesting leave
-    PropertyHelper::SetErrorCode( KErrNotFound );
-    RProperty::Set( KMusUiDummyUid, KMusUiTestKey, KMusUiTestPropertyReadInteger );
-    TInt value;
-    TRAPD( err, value = CMusPropertyWatch::ReadIntPropertyL( KMusUiTestKey ) );
-    EUNIT_ASSERT( err == KErrNotFound );
-
-    // Testing return value
-    PropertyHelper::SetErrorCode( KErrNone );
-    RProperty::Set( KMusUiDummyUid, KMusUiTestKey, KMusUiTestPropertyReadInteger );
-    EUNIT_ASSERT(  CMusPropertyWatch::ReadIntPropertyL( KMusUiTestKey ) ==
-                   KMusUiTestPropertyReadInteger );
-
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyWatch::UT_CMusPropertyWatch_ReadDescPropertyLL()
-    {
-    // Teesting leave
-    PropertyHelper::SetErrorCode( KErrNotFound );
-    TRAPD( err,  CMusPropertyWatch::ReadDescPropertyL( KMusUiTestKey ) );
-    EUNIT_ASSERT( err == KErrNotFound );
-
-    // Testing return value
-    RProperty::Set( KMusUiDummyUid, KMusUiTestKey, KMusUiTestPropertyReadDesc );
-    PropertyHelper::SetErrorCode( KErrNone );
-    HBufC* result = CMusPropertyWatch::ReadDescPropertyL( KMusUiTestKey );
-    CleanupStack::PushL( result );
-    EUNIT_ASSERT(  KMusUiTestPropertyReadDesc().Compare( result->Des() ) == 0 );
-    CleanupStack::PopAndDestroy( result );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyWatch::UT_CMusPropertyWatch_DoCancelL()
-    {
-    PropertyHelper::SetErrorCode( KErrNone );
-    iPropertyWatch->Cancel();
-    EUNIT_ASSERT( PropertyHelper::GetCalledFunction() == RProperty::ECancel );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyWatch::UT_CMusPropertyWatch_RunLL()
-    {
-
-    // Leave test
-    PropertyHelper::SetErrorCode( KErrNotFound );
-    iPropertyWatch->Cancel();
-    TRAPD( err, iPropertyWatch->RunL() );
-    EUNIT_ASSERT( err == KErrNotFound );
-
-
-    // SessionPropertyChanged
-    PropertyHelper::SetErrorCode( KErrNone );
-    iPropertyWatch->Cancel();
-    iPropertyWatch->RunL();
-    EUNIT_ASSERT( iPropertyObserver.iCalledFunction ==
-                  TMusPropertyObserverStub::EPropertyChanged );
-
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyWatch::UT_CMusPropertyWatch_RunErrorL()
-    {
-
-    // Allways returns KErrNone
-    PropertyHelper::SetErrorCode( KErrNone );
-    EUNIT_ASSERT( iPropertyWatch->RunError( KErrNotFound ) == KErrNone );
-
-    // is right observer called
-    PropertyHelper::SetErrorCode( KErrNone );
-    EUNIT_ASSERT( iPropertyObserver.iCalledFunction ==
-                  TMusPropertyObserverStub::EHandlePropertyError );
-    }
-
-
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusPropertyWatch,
-    "UT_CMusPropertyWatch",
-    "UNIT" )
-
-EUNIT_TEST(
-    "ReadIntPropertyLL - test ",
-    "CMusPropertyWatch",
-    "ReadIntPropertyLL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusPropertyWatch_ReadIntPropertyLL, Teardown)
-
-EUNIT_TEST(
-    "ReadDescPropertyLL - test ",
-    "CMusPropertyWatch",
-    "ReadDescPropertyLL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusPropertyWatch_ReadDescPropertyLL, Teardown)
-
-EUNIT_TEST(
-    "DoCancelL - test ",
-    "CMusPropertyWatch",
-    "DoCancelL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusPropertyWatch_DoCancelL, Teardown)
-
-EUNIT_TEST(
-    "RunLL - test ",
-    "CMusPropertyWatch",
-    "RunLL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusPropertyWatch_RunLL, Teardown)
-
-EUNIT_TEST(
-    "RunErrorL - test ",
-    "CMusPropertyWatch",
-    "RunErrorL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusPropertyWatch_RunErrorL, Teardown)
-
-
-EUNIT_END_TEST_TABLE
-
-
-//  END OF FILE
-
-
--- a/mmsharing/mmshindicator/bwins/musindicatoru.def	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/bwins/musindicatoru.def	Wed Sep 01 12:31:01 2010 +0100
@@ -1,7 +1,6 @@
 EXPORTS
-	?ConfirmationQueryL@CMusIndicatorApi@@SAHW4TVsPopupQuery@1@@Z @ 1 NONAME ; int CMusIndicatorApi::ConfirmationQueryL(enum CMusIndicatorApi::TVsPopupQuery)
-	?IndicateAvailabilityL@CMusIndicatorApi@@QAEXXZ @ 2 NONAME ; void CMusIndicatorApi::IndicateAvailabilityL(void)
-	?NewL@CMusIndicatorApi@@SAPAV1@AAVMMusIndicatorObserver@@@Z @ 3 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewL(class MMusIndicatorObserver &)
-	?NewLC@CMusIndicatorApi@@SAPAV1@AAVMMusIndicatorObserver@@@Z @ 4 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewLC(class MMusIndicatorObserver &)
-	?NewL@CMusIndicatorApi@@SAPAV1@XZ @ 5 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewL(void)
+	?NewL@CMusIndicatorApi@@SAPAV1@AAVMMusIndicatorObserver@@@Z @ 1 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewL(class MMusIndicatorObserver &)
+	?NewL@CMusIndicatorApi@@SAPAV1@XZ @ 2 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewL(void)
+	?NewLC@CMusIndicatorApi@@SAPAV1@AAVMMusIndicatorObserver@@@Z @ 3 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewLC(class MMusIndicatorObserver &)
+	?IndicateAvailabilityL@CMusIndicatorApi@@QAEXXZ @ 4 NONAME ; void CMusIndicatorApi::IndicateAvailabilityL(void)
 
--- a/mmsharing/mmshindicator/eabi/musindicatoru.def	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/eabi/musindicatoru.def	Wed Sep 01 12:31:01 2010 +0100
@@ -1,13 +1,10 @@
 EXPORTS
-	_ZN16CMusIndicatorApi18ConfirmationQueryLENS_13TVsPopupQueryE @ 1 NONAME
-	_ZN16CMusIndicatorApi21IndicateAvailabilityLEv @ 2 NONAME
-	_ZN16CMusIndicatorApi4NewLER21MMusIndicatorObserver @ 3 NONAME
+	_ZN16CMusIndicatorApi21IndicateAvailabilityLEv @ 1 NONAME
+	_ZN16CMusIndicatorApi4NewLER21MMusIndicatorObserver @ 2 NONAME
+	_ZN16CMusIndicatorApi4NewLEv @ 3 NONAME
 	_ZN16CMusIndicatorApi5NewLCER21MMusIndicatorObserver @ 4 NONAME
-	_ZTI15CMusSoundPlayer @ 5 NONAME ; #<TI>#
-	_ZTI16CMusIndicatorApi @ 6 NONAME ; #<TI>#
-	_ZTI16CMusIndicatorDsa @ 7 NONAME ; #<TI>#
-	_ZTV15CMusSoundPlayer @ 8 NONAME ; #<VT>#
-	_ZTV16CMusIndicatorApi @ 9 NONAME ; #<VT>#
-	_ZTV16CMusIndicatorDsa @ 10 NONAME ; #<VT>#
-	_ZN16CMusIndicatorApi4NewLEv @ 11 NONAME
+	_ZTI15CMusSoundPlayer @ 5 NONAME
+	_ZTI16CMusIndicatorApi @ 6 NONAME
+	_ZTV15CMusSoundPlayer @ 7 NONAME
+	_ZTV16CMusIndicatorApi @ 8 NONAME
 
--- a/mmsharing/mmshindicator/group/musindicator.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/group/musindicator.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -38,7 +38,6 @@
 SOURCEPATH              ../src
 SOURCE                  musindicatorapi.cpp
 SOURCE                  mussoundplayer.cpp
-SOURCE                  musindicatordsa.cpp
 SOURCE                  musresourceutil.cpp
 
 USERINCLUDE             ../inc
--- a/mmsharing/mmshindicator/inc/musindicatordsa.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Draws availability indication to screen using direct screen
-*                access.
-*
-*/
-
-
-
-#ifndef C_MUSINDICATORDSA_H
-#define C_MUSINDICATORDSA_H
-
-
-#include "musunittesting.h"
-#include <e32base.h>
-#include <w32std.h>
-#include <coecntrl.h>
-
-const TInt KMusIndicatorDelay = 400000;
-const TInt KMusRedrawDelay = 25000;
-
-/**
- *  CMusIndicatorDsa provides multimedia sharing ready indicator "box" 
- *  indcating videosharing availability to user.
- *
- *  @code
- *   // Activates indication
- *  CMusIndicatorDsa* dsa = CMusIndicatorDsa::NewL();
- *
- *  // Deactivates indication
- *  delete dsa;
- *
- *  @endcode
- *
- *  @lib musindicator.lib
- */
-class CMusIndicatorDsa : public CCoeControl
-    {
-public:
-
-    MUS_UNITTEST( UT_CMusIndicatorDsa )
-
-    static CMusIndicatorDsa* NewL();
-
-    /**
-     * Destructor.
-     */
-    ~CMusIndicatorDsa();
-
-    
-public: //from CCoeControl
-    
-    
-    /**
-     * Draws video sharing ready box and text
-     */
-    void Draw( const TRect& aRect ) const;
-    
-    /**
-     * Hanldes resource change i.e layout change
-     * 
-     */
-    void HandleResourceChange( TInt aType);
-    
-private:
-
-    /**
-     * Initializes
-     */
-     void Initialize();
-
-    /**
-     * Loads image.
-     */
-    void LoadImageL();
-
-    /**
-     * Loads resource string.
-     */
-    void LoadResourceStringL();
-
-
-private:
-
-    CMusIndicatorDsa();
-
-    void ConstructL();
-
-    const CFont& Font() const;
-
-    void TryActivateL();
-
-    
-    /**
-    * Callback function to periodic timer.
-    *
-    * @param instanse of this.
-    * @return TInt value indicating if function completed succesfully
-    */
-   static TInt TryActivate( TAny* aThis );
-
-    /**
-     * Callback function to periodic timer.
-     *
-     * @param instanse of this.
-     * @return TInt value indicating if function completed succesfully
-     */
-    static TInt DoHandleResourceChange( TAny* aThis );
-   
-    void StartPeriodicTimer( const TCallBack& aCallBack) const;
-    
-    /**
-     * Stops peridoic timer.
-     */
-    void StopPeriodicTimer();
-    
-    
-private: // data
-
-
-    /**
-     * Periodic timer.
-     * Own.
-     */
-    CPeriodic* iPeriodic;
-
-    /**
-     * Used screen rectangle.
-     */
-    TRect iScreenRect;
-
-    /**
-     * Used client area size
-     */
-    TSize iScreenSize;
-    
-    /**
-     * Calculated position of left-top point of text.
-     */
-    TPoint iTextpos;
-
-    /**
-     * Color of DSA boxes border.
-     */
-    TRgb iBorderColor;
-
-    /**
-     * DSA boxes background color.
-     */
-    TRgb iBorderBgColor;
-
-    /**
-     * Color of used font.
-     */
-    TRgb iFontColor;
-
-    /**
-     * Displayed text.
-     * Own.
-     */
-    HBufC* iText;
-    
-    CFbsBitmap* iIcon;
-    CFbsBitmap* iIconMask;
-    
-    TSize iImageSize;
-    TPoint iImagepos;
-    
-    TCallBack iActivateCallBack;
-    TCallBack iRedrawCallBack;
-    
-    
-    };
-
-#endif // C_MUSINDICATORDSA_H
--- a/mmsharing/mmshindicator/src/musindicatorapi.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/src/musindicatorapi.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -21,25 +21,20 @@
 #include "musindicatorapi.h"
 #include "musresourcefinderutil.h"
 #include "muslogger.h"
-#include "musindicatordsa.h"
 #include "mussettings.h"
 #include "mussettingskeys.h"
 #include "mussoundplayer.h"
 #include "musresourceutil.h"
 #include <musindicator.rsg>
-#include <AknGlobalConfirmationQuery.h>
-#include <AknGlobalMsgQuery.h>
 #include <coreapplicationuisdomainpskeys.h>
 
 
-const TInt KMusLiveSharingQueryTimeout = 5000000;
-
-
 // ======== MEMBER FUNCTIONS ========
 
-using namespace MusSettingsKeys;
-
-
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 EXPORT_C CMusIndicatorApi* CMusIndicatorApi::NewL( MMusIndicatorObserver& aObserver )
     {
     CMusIndicatorApi* self = CMusIndicatorApi::NewLC( aObserver );
@@ -48,6 +43,10 @@
     }
 
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 EXPORT_C CMusIndicatorApi* CMusIndicatorApi::NewLC( MMusIndicatorObserver& aObserver )
     {
     CMusIndicatorApi* self = new (ELeave) CMusIndicatorApi( &aObserver );
@@ -56,6 +55,11 @@
     return self;
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 EXPORT_C CMusIndicatorApi* CMusIndicatorApi::NewL()
     {
     CMusIndicatorApi* self = new (ELeave) CMusIndicatorApi( NULL );
@@ -66,19 +70,19 @@
     }
 
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 CMusIndicatorApi::~CMusIndicatorApi()
     {
     MUS_LOG( "mus: [MUSIND ]  ->  MusIndicatorApi::~CMusIndicatorApi" );
     
     Cancel();
-    delete iQuery;
-    delete iIndicatorWindow;
     delete iSoundPlayer;
-    delete iLiveSharingQueryTimeout;
-    if ( !IsSubscriber() )
-        {
-        Indicator( EFalse );
-        }
+
+    Indicator( EFalse );
+
     
     iProperty.Close();
 
@@ -86,58 +90,21 @@
     }
 
 
-TBool CMusIndicatorApi::IsSubscriber() const
-    {
-    return !iObserver;
-    }
-
-
-    
-// ---------------------------------------------------------------------------
-// Provides a confirmation query to user and returns true if user selected
-// "yes".
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CMusIndicatorApi::ConfirmationQueryL( TVsPopupQuery aQuery )
-    {
-    MUS_LOG( "mus: [MUSIND ]  ->  MusIndicatorApi::ConfirmationQueryL" );
-    
-    CAknGlobalConfirmationQuery* dlg = CAknGlobalConfirmationQuery::NewLC();
-    TRequestStatus status( KRequestPending );
-    HBufC* prompt = NoteTextLC( aQuery );
-    dlg->ShowConfirmationQueryL( status, *prompt, R_AVKON_SOFTKEYS_YES_NO );
-    User::WaitForRequest( status );
-    CleanupStack::PopAndDestroy( prompt );
-    CleanupStack::PopAndDestroy( dlg );
-    MUS_LOG( "mus: [MUSIND ]  <-  MusIndicatorApi::ConfirmationQueryL" );
-    return status == EAknSoftkeyYes;
-    }
-
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Indicates VS availability to user.
-// In operator specific variant this can include a popup-note, DSA note and
-// an audio tone played with CMdaAudioPlayerUtility.
-// ---------------------------------------------------------------------------
+// In operator specific variant this can include DSA note and an audio tone
+// played with CMdaAudioPlayerUtility.
+// -----------------------------------------------------------------------------
 //
 EXPORT_C void CMusIndicatorApi::IndicateAvailabilityL()
     {
     MUS_LOG( "mus: [MUSIND]  -> CMusIndicatorApi::IndicateAvailabilityL" )
-    __ASSERT_ALWAYS( !IsSubscriber(), User::Leave( KErrArgument ) );
-    
     Indicator( ETrue );
 
-    if( MultimediaSharingSettings::PopupNotificationSettingL() ==
-        EPopupNotificationOn )
+    if( MultimediaSharingSettings::AuditoryNotificationSettingL() ==
+        MusSettingsKeys::EAuditoryNotificationOn )
         {
-        // Show dialog
-        MUS_LOG( "mus: [MUSIND]  CMusIndicatorApi::IndicateAvailabilityL - Show popup" )
-        ShowLiveSharingQueryL( EFalse );
-        }
-
-    if( MultimediaSharingSettings::AuditoryNotificationSettingL() ==
-        EAuditoryNotificationOn )
-        {
-        MUS_LOG( "mus: [MUSIND]  CMusIndicatorApi::IndicateAvailabilityL - Play tone" )
+        MUS_LOG( "mus: [MUSIND]     Play tone" )
         PlayToneL();
         }
 
@@ -145,46 +112,31 @@
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From CActive.
 // Handles completion of an outstanding asynchronous request.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusIndicatorApi::RunL()
     {
     MUS_LOG( "mus: [MUSIND]  <- CMusIndicatorApi::RunL" )
     
-    if ( !IsSubscriber() )
-        {
-        MUS_LOG( "mus: [MUSIND ] : publisher" )
-        StartLiveSharingL();
-        }
-    else
-        {
-        MUS_LOG( "mus: [MUSIND ] : subscriber" )
-        ToggleIndicatorL();
-        }
+
+    MUS_LOG( "mus: [MUSIND ] : publisher" )
+    StartLiveSharingL();
+
 
     MUS_LOG( "mus: [MUSIND]  -> CMusIndicatorApi::RunL" )
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusIndicatorApi::StartLiveSharingL()
     {
     MUS_LOG( "mus: [MUSIND]  -> CMusIndicatorApi::StartLiveSharingL" )
-    delete iQuery;
-    iQuery = NULL;
-   
-    if( iLiveSharingQueryTimeout )
-        {
-        iLiveSharingQueryTimeout->Cancel();
-        }  
-    delete iLiveSharingQueryTimeout;
-    iLiveSharingQueryTimeout = NULL;
 
     if( iStatus.Int() != KErrNotFound ) // eq. Cancel -button
         {
@@ -198,80 +150,24 @@
     }
 
 
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void CMusIndicatorApi::ToggleIndicatorL()
-    {
-    MUS_LOG( "mus: [MUSIND]  -> CMusIndicatorApi::ToggleIndicatorL" )
-    TInt val;
-    
-
-    
-    User::LeaveIfError( RProperty::Get( KPSUidCoreApplicationUIs,
-                                        KCoreAppUIsVideoSharingIndicator,
-                                        val ) );
-    iProperty.Subscribe( iStatus );
-    SetActive();
-    
-    TBool on = ( val == ECoreAppUIsVideoSharingIndicatorOn );
-    
-    if ( on && !iIndicatorWindow 
-         && MultimediaSharingSettings::OperatorVariantSettingL() ==
-         EOperatorSpecific )
-        {
-        iIndicatorWindow = CMusIndicatorDsa::NewL();
-        }
-    else if ( !on )
-        {
-        delete iIndicatorWindow;
-        iIndicatorWindow = NULL;
-        }
-    else
-        {
-        //NOP
-        }
-    
-    MUS_LOG( "mus: [MUSIND]  <- CMusIndicatorApi::ToggleIndicatorL" )
-    }
-
-
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From CActive.
 // Cancels an outstanding asynchronous request.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusIndicatorApi::DoCancel()
     {
     MUS_LOG( "mus: [MUSIND]  <- CMusIndicatorApi::DoCancel" )
+    
 
-    if( iLiveSharingQueryTimeout )
-        {
-        iLiveSharingQueryTimeout->Cancel();
-        }
-    delete iLiveSharingQueryTimeout;
-    iLiveSharingQueryTimeout = NULL;
-        
-    if ( iQuery )
-        {
-        iQuery->CancelMsgQuery();
-        }
-    delete iQuery;
-    iQuery = NULL;
-    
-    if ( IsSubscriber() )
-        {
-        iProperty.Cancel();
-        }
     MUS_LOG( "mus: [MUSIND]  -> CMusIndicatorApi::DoCancel" )
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From CActive.
 // Handles a leave occurring in the request completion event handler RunL.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 #ifdef _DEBUG
 TInt CMusIndicatorApi::RunError( TInt aError )
@@ -323,21 +219,10 @@
     {
     MUS_LOG( "mus: [MUSIND ]  ->  MusIndicatorApi::ConstructL" )
     
-    if ( IsSubscriber() )
-        {
-        MUS_LOG( "mus: [MUSIND ] :  subscriber (called by aiwprovider)" )
+    
+    MUS_LOG( "mus: [MUSIND ] : publisher (called by manager)" )
+    CActiveScheduler::Add( this );
 
-        User::LeaveIfError( iProperty.Attach( KPSUidCoreApplicationUIs,
-                                              KCoreAppUIsVideoSharingIndicator ) );
-        CActiveScheduler::Add( this );
-        iProperty.Subscribe( iStatus );
-        SetActive();
-        }
-    else
-        {
-        MUS_LOG( "mus: [MUSIND ] : publisher (called by manager)" )
-        CActiveScheduler::Add( this );
-        }
     MUS_LOG( "mus: [MUSIND ]  <-  MusIndicatorApi::ConstructL" )
     }
 
@@ -389,107 +274,3 @@
     }
 
 
-// ---------------------------------------------------------------------------
-// Returns text associated with specified dialog.
-// ---------------------------------------------------------------------------
-//
-HBufC* CMusIndicatorApi::NoteTextLC( TVsPopupQuery aQuery )
-    {
-    MUS_LOG1( "mus: [MUSIND]  -> MusIndicatorApi::NoteTextLC( %d )", aQuery )
-
-    HBufC* dlgPrompt( NULL );
-
-    switch ( aQuery )
-        {
-        case EVsRoamingActivationQuery:
-            {
-            dlgPrompt = MusResourceUtil::ReadResourceString16LC(
-                R_MUSINDICATOR_MANUAL_ACTIVATION_TXT,
-                KMusIndicatorResource );
-            break;
-            }
-
-        default:
-            {
-            MUS_LOG( "mus: [MUSIND]   MusIndicatorApi::NoteTextLC, UNKNOWN" )
-            User::Leave( KErrNotFound );
-            }
-        }
-    // now pop and destroy the resource reader
-
-    MUS_LOG( "mus: [MUSIND]  <- MusIndicatorApi::NoteTextLC" )
-
-    return dlgPrompt;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Reads resource string
-// -----------------------------------------------------------------------------
-//
-void CMusIndicatorApi::ShowLiveSharingQueryL( TBool aPlayTone )
-    {
-    MUS_LOG( "mus: [MUSIND]  -> CMusIndicatorApi::ShowLiveSharingQuery" )
-    Cancel();
-
-    delete iQuery;
-    iQuery = NULL;
-
-    HBufC* dlgPrompt = MusResourceUtil::ReadResourceString16LC(
-                                            R_MUSINDICATOR_NOTE_CAPABILITY_TXT,
-                                            KMusIndicatorResource );
-
-    HBufC* dlgHeader = MusResourceUtil::ReadResourceString16LC(
-                                            R_MUSINDICATOR_NOTE_VSREADY_TXT,
-                                            KMusIndicatorResource );
-
-    iQuery = CAknGlobalMsgQuery::NewL();
-    TRAPD( error,
-        iQuery->ShowMsgQueryL(
-            iStatus,
-            *dlgPrompt,
-            R_AVKON_SOFTKEYS_OK_CANCEL,
-            *dlgHeader,
-            KNullDesC,
-            0,  // default image id
-            -1, // default image mask id
-            ( aPlayTone ?
-                CAknQueryDialog::EConfirmationTone :
-                CAknQueryDialog::ENoTone ) ) );
-
-    CleanupStack::PopAndDestroy( dlgHeader );
-    CleanupStack::PopAndDestroy( dlgPrompt );
-
-    if ( !error )
-        {
-        SetActive();
-        
-        delete iLiveSharingQueryTimeout;
-        iLiveSharingQueryTimeout = NULL;
-        iLiveSharingQueryTimeout = 
-                        CPeriodic::NewL( CActive::EPriorityStandard );
-        
-        iLiveSharingQueryTimeout->Start( 
-                            KMusLiveSharingQueryTimeout,
-                            KMusLiveSharingQueryTimeout,
-                            TCallBack( LiveSharingQueryTimeout, this ) );
-        
-        }
-    else
-        {
-        delete iQuery;
-        iQuery = NULL;
-        }
-
-    MUS_LOG( "mus: [MUSIND]  <- CMusIndicatorApi::ShowLiveSharingQuery" )
-    }
-
-
-
-TInt CMusIndicatorApi::LiveSharingQueryTimeout( TAny* aThis )
-    {
-    static_cast< CMusIndicatorApi* >( aThis )->Cancel();    
-    return KErrNone;
-    }
-
-
--- a/mmsharing/mmshindicator/src/musindicatordsa.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,467 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  MusIndicatorApi provides means to show notes and indicate
-*                availability of videosharing to user.
-*
-*/
-
-
-#include "musindicatordsa.h"
-#include "muslogger.h"
-#include "musresourceutil.h"
-#include "musresourcefinderutil.h"
-#include <e32cmn.h>
-#include <e32std.h>
-#include <musindicator.rsg>
-#include <eikenv.h>
-#include <coefontprovider.h>
-#include <AknsDrawUtils.h>
-#include <eikappui.h>
-#include <musindicatoricons.mbg>
-#include <AknUtils.h>
-
-// constants
-// Size and positions
-
-const TInt KMusIndicatorWindowHeight = 50;
-const TInt KMusIndicatorWindowShrink = 2;
-const TInt KMusSpaceBetweenImageAndText = 5;
-
-// appereance
-const TInt KMusIndicatorBorderRoundedCorners = 6;
-const TInt KMusIndicatorBorderSize = 1;
-//const TInt KMusIndicatorFontPenSize = 1;
-
-
-
-
-CMusIndicatorDsa* CMusIndicatorDsa::NewL()
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::NewL" )
-    CMusIndicatorDsa* self = new (ELeave) CMusIndicatorDsa();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::NewL" )
-    return self;
-    }
-
-
-CMusIndicatorDsa::CMusIndicatorDsa()
-    : iActivateCallBack( CMusIndicatorDsa::TryActivate, this ),
-      iRedrawCallBack( CMusIndicatorDsa::DoHandleResourceChange, this )
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::CMusIndicatorDsa" )
-        
-    iBorderColor = KRgbBlack;
-    iBorderBgColor = KRgbWhite;
-    iFontColor = KRgbBlack;
-    
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::CMusIndicatorDsa" )
-    }
-
-
-CMusIndicatorDsa::~CMusIndicatorDsa()
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::~CMusIndicatorDsa" )
-    
-    StopPeriodicTimer();    
-    delete iPeriodic;
-
-    delete iIcon;
-    delete iIconMask;
-    
-    delete iText;
-    
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::~CMusIndicatorDsa" )
-    }
-
-
-const CFont& CMusIndicatorDsa::Font() const
-    {
-    TCoeFont coeFont = TCoeFont::NormalFont();
-    TZoomFactor zoomFactor = AccumulatedZoom();
-    return FindFontProvider().Font(coeFont, zoomFactor);
-    }
-
-//------------------------------------------------------------------------------
-//
-//------------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::ConstructL()
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::ConstructL" )
-
-    iPeriodic = CPeriodic::NewL( CActive::EPriorityStandard );
-    
-    LoadResourceStringL();
-    LoadImageL();
-    CreateWindowL();
-    
-    Initialize();
-    TryActivateL();
-    
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::ConstructL" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::TryActivateL()
-    {
-    MAknsControlContext* cc = 
-        AknsDrawUtils::ControlContext( ControlEnv()->AppUi()->TopFocusedControl() );
-
-    if ( cc )
-        {
-        StopPeriodicTimer();
-        ActivateL();
-        }
-    else
-        {
-        StartPeriodicTimer( iActivateCallBack );
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// Called by framework to redraw the screen area.
-// -----------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::Draw( const TRect& aRect ) const
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::Draw" )
-    MUS_LOG2( "mus: [MUSIND] : x=%d,y=%d", aRect.iTl.iX, aRect.iTl.iY )
-    MUS_LOG2( "mus: [MUSIND] : x=%d,y=%d", aRect.iBr.iX, aRect.iBr.iY )
-    
-    CWindowGc& gc = SystemGc();
-    
-    TSize screenSizeNow = ControlEnv()->ScreenDevice()->SizeInPixels();
-    
-    if ( screenSizeNow != iScreenSize )
-        {
-        StartPeriodicTimer( iRedrawCallBack );
-        }
-    
-    MAknsControlContext* cc = 
-        AknsDrawUtils::ControlContext( ControlEnv()->AppUi()->TopFocusedControl() );
-    MUS_LOG1( "mus: [MUSIND] : cc = %d", cc )
-
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    MUS_LOG1( "mus: [MUSIND] : skin = %d", skin )
-
-    TRgb fontColor;
-    AknsUtils::GetCachedColor( skin, fontColor, 
-                               KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
-    TRgb borderColor = fontColor;
-    
-    TBool backgroundWithBitmap = 
-                ( skin && !cc ) ? 
-                 EFalse :
-                 AknsDrawUtils::Background( skin, cc,this,gc,aRect,KAknsDrawParamDefault );
-    
-    if( !backgroundWithBitmap )
-        {
-        MUS_LOG( "mus: [MUSIND] : Clearing rect with null brush") 
-        gc.SetBrushStyle( CGraphicsContext::ENullBrush );
-        gc.Clear( aRect );
-        }
-    else
-        {
-        MUS_LOG( "mus: [MUSIND] : rect was cleared with bitmap") 
-        }
-    
-    gc.UseFont( &Font() );
-    
-    // Border initialization                   
-    gc.SetBrushStyle( CGraphicsContext::ENullBrush );
-
-    // Draw border
-    MUS_LOG( "mus: [MUSIND] : Draw border") 
-    gc.SetPenStyle( CGraphicsContext::ESolidPen );
-    gc.SetPenColor( borderColor );
-    gc.SetPenSize(
-        TSize( KMusIndicatorBorderSize, KMusIndicatorBorderSize ) );
-    gc.DrawRoundRect( iScreenRect,
-                        TSize( KMusIndicatorBorderRoundedCorners,
-                               KMusIndicatorBorderRoundedCorners ) );
-    
-    /* 
-    // Draw smaller border with other color
-    MUS_LOG( "mus: [MUSIND] : Draw smaller border with other color") 
-    gc.SetPenColor( iBorderBgColor );
-    TRect smallerRect = iScreenRect;
-    smallerRect.Shrink( KMusIndicatorBorderSize, KMusIndicatorBorderSize );
-    gc.DrawRoundRect( smallerRect,
-                        TSize( KMusIndicatorBorderRoundedCorners,
-                               KMusIndicatorBorderRoundedCorners ) );
-                              
-    // Font outline initialization
-    
-    MUS_LOG( "mus: [MUSIND] : Draw text outlines") 
-    gc.SetPenColor( iBorderBgColor );
-    gc.SetPenSize( TSize( KMusIndicatorFontPenSize, KMusIndicatorFontPenSize ) );
-
-    // Draw text outlines
-    TPoint outlineTextPos = iTextpos;
-    outlineTextPos -= TPoint( 1, 1 );
-    gc.DrawText( *iText, outlineTextPos );
-    */
-   
-    // Font initialization
-    gc.SetPenColor( fontColor );
-
-    // Draw text
-    MUS_LOG( "mus: [MUSIND] : Draw text") 
-    gc.DrawText( *iText, iTextpos );
-    
-    gc.BitBltMasked( iImagepos, 
-                       iIcon, 
-                       TRect( 0, 0, iImageSize.iWidth, iImageSize.iHeight ),
-                       iIconMask, 
-                       EFalse );
-
-
-    
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::Draw" )
-    }
-
-
-//------------------------------------------------------------------------------
-// 
-//------------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::HandleResourceChange( TInt aType )
-    {
-    
-    if ( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        Initialize();
-        DrawDeferred();
-        }
-    
-    StopPeriodicTimer();
-    
-    }
-
-
-
-//------------------------------------------------------------------------------
-// Calculates topleft position of drawn text.
-//------------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::Initialize()
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::Initialize" )
-    
-    TRect clientRect = CEikonEnv::Static()->EikAppUi()->ClientRect();
-    MUS_LOG2( "mus: [MUSIND] clientrect : x=%d,y=%d", clientRect.iTl.iX, clientRect.iTl.iY )
-    MUS_LOG2( "mus: [MUSIND] clientrect : x=%d,y=%d", clientRect.iBr.iX, clientRect.iBr.iY )
-    
-    iScreenSize = ControlEnv()->ScreenDevice()->SizeInPixels();
-
-    //test (indicator goes inside options menu area)  
-    //clientRect.iTl.iY = 150;
-    
-    SetPosition( clientRect.iTl );
-    SetSize(
-        TSize( iScreenSize.iWidth, KMusIndicatorWindowHeight ) );
-    
-    iScreenRect = TRect(
-        TPoint( 0, 0 ),
-        TSize( iScreenSize.iWidth, KMusIndicatorWindowHeight ) );
-    iScreenRect.Shrink( KMusIndicatorWindowShrink, KMusIndicatorWindowShrink );
-    
-    
-    TInt imagePlusTextWidth = Font().TextWidthInPixels( *iText ) + 
-            iImageSize.iWidth + KMusSpaceBetweenImageAndText;
-
-    iImagepos.iX = ( iScreenRect.Width() - imagePlusTextWidth )  >> 1;
-    iImagepos.iY = ( iScreenRect.Height() - iImageSize.iHeight ) >> 1;
-    
-    // Text position
-    iTextpos.iX = iImagepos.iX + iImageSize.iWidth + KMusSpaceBetweenImageAndText;
-
-    iTextpos.iY = ( iScreenRect.Height() >> 1 ) +
-                  ( Font().HeightInPixels() >> 1 ) +
-                    iScreenRect.iTl.iY;
-    
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::Initialize" )
-    }
-
-
-
-//------------------------------------------------------------------------------
-// Loads displayed image.
-//------------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::LoadImageL()
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::LoadImageL" )
-    
-    if ( iIcon || iIconMask )
-        {
-        MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::LoadImageL" )
-        return;
-        }
-    
-    _LIT( KMyBitmapRomFile, "Z:\\resource\\apps\\musindicatoricons.mbm" );
-    _LIT( KMyBitmapRamFile, "C:\\resource\\apps\\musindicatoricons.mbm" );
-
-    TFileName imageFileName;
-    if ( MusResourceFinderUtil::IsExistL( KMyBitmapRomFile ) ) 
-        {
-        imageFileName = KMyBitmapRomFile;
-        }
-    else if ( MusResourceFinderUtil::IsExistL( KMyBitmapRamFile ) ) 
-        {
-        imageFileName = KMyBitmapRamFile;
-        }
-    else
-        {
-        MUS_LOG( "mus: [MUSIND]  Icon File Not Found!" );
-        User::Leave( KErrNotFound );
-        } 
-        
-    iIcon = new ( ELeave ) CFbsBitmap();
-    iIconMask = new ( ELeave ) CFbsBitmap();
-    
-    // Enumerations of mbg file are usable only when vector images
-    // in mif file are used. Those cannot be loaded without UI components.
-    const TInt KMusIndicatorIconIndex = 0;
-    const TInt KMusIndicatorIconMaskIndex = 1;
-    User::LeaveIfError( 
-        iIcon->Load( imageFileName, KMusIndicatorIconIndex ) );
-    User::LeaveIfError( 
-        iIconMask->Load( imageFileName, KMusIndicatorIconMaskIndex ) );
-    
-    iImageSize = iIcon->SizeInPixels();
-    
-    // Crop icon if it is too big
-    if ( iImageSize.iHeight > KMusIndicatorWindowHeight )
-        {
-        TInt newHeight = KMusIndicatorWindowHeight >> 1;
-        TInt newWidth = 
-            TReal( iImageSize.iHeight / iImageSize.iWidth  ) * newHeight;
-        iIcon->Resize( TSize( newHeight, newWidth ) );
-        iIconMask->Resize( TSize( newHeight, newWidth ) );
-        }
-    
-    
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::LoadImageL" )
-    }
-
-
-//------------------------------------------------------------------------------
-//
-//------------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::LoadResourceStringL()
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::LoadResourceStringL" )
-    delete iText;
-    iText = NULL;
-    iText = MusResourceUtil::ReadResourceString16L(
-        R_MUSINDICATOR_NOTE_VSREADY_TXT,
-        KMusIndicatorResource );
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::LoadResourceStringL" )
-    }
-
-//------------------------------------------------------------------------------
-// Periodic timer completion
-//------------------------------------------------------------------------------
-//
-TInt CMusIndicatorDsa::TryActivate( TAny* aThis )
-    {
-    if ( !aThis )
-        {
-        return KErrArgument;
-        }
-
-    CMusIndicatorDsa* handle = static_cast< CMusIndicatorDsa* > ( aThis );
-    
-    TInt error = KErrNone;
-    TRAP( error, handle->TryActivateL() );
-
-    return error;
-    }
-    
-
-//------------------------------------------------------------------------------
-// Periodic timer completion
-//------------------------------------------------------------------------------
-//
-TInt CMusIndicatorDsa::DoHandleResourceChange( TAny* aThis )
-    {
-
-    if ( !aThis )
-        {
-        return KErrArgument;
-        }
-
-    CMusIndicatorDsa* handle = static_cast< CMusIndicatorDsa* > ( aThis );
-
-    handle->HandleResourceChange( KEikDynamicLayoutVariantSwitch );
-    
-    return KErrNone;
-    
-    }
-
-
-
-//------------------------------------------------------------------------------
-//
-//------------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::StartPeriodicTimer( const TCallBack& aCallBack) const
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::StartPeriodicTimer" )
-    
-    if ( iPeriodic->IsActive() )
-        {
-        return;
-        }
-    
-    TTimeIntervalMicroSeconds32 delay = 
-            aCallBack.iFunction == CMusIndicatorDsa::TryActivate ?
-                                  KMusIndicatorDelay : KMusRedrawDelay;
-    
-    iPeriodic->Start( delay, delay, aCallBack );
-    
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::StartPeriodicTimer" )
-    }
-
-
-//------------------------------------------------------------------------------
-//
-//------------------------------------------------------------------------------
-//
-void CMusIndicatorDsa::StopPeriodicTimer()
-    {
-    MUS_LOG( "mus: [MUSIND] -> CMusIndicatorDsa::StopPeriodicTimer" )
-    if( iPeriodic )
-        {
-        iPeriodic->Cancel();
-        }
-    MUS_LOG( "mus: [MUSIND] <- CMusIndicatorDsa::StopPeriodicTimer" )
-    }
-
-    
-
-
-
-// End of file
-
--- a/mmsharing/mmshindicator/tsrc/IndicatorTestApp/group/IndicatorTestApp.rss	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/IndicatorTestApp/group/IndicatorTestApp.rss	Wed Sep 01 12:31:01 2010 +0100
@@ -92,9 +92,6 @@
         MENU_ITEM {command = EIndicatorTestAppAudiotoryNotification;  txt = "Set play sound";},
         MENU_ITEM {command = EIndicatorTestAppNoAudiotoryNotification;  txt = "Set no sound";},
 
-        MENU_ITEM {command = EIndicatorTestAppPopUpNotification;  txt = "Set pop-up notification";},
-        MENU_ITEM {command = EIndicatorTestAppNoPopUpNotification;  txt = "Set no pop-up notification";},
-
         MENU_ITEM {command = EIndicatorTestAppIconNotification;  txt = "Set icon notification";},
         MENU_ITEM {command = EIndicatorTestAppNoIconNotification;  txt = "Set no icon notification";},
 
--- a/mmsharing/mmshindicator/tsrc/IndicatorTestApp/inc/IndicatorTestApp.hrh	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/IndicatorTestApp/inc/IndicatorTestApp.hrh	Wed Sep 01 12:31:01 2010 +0100
@@ -27,8 +27,6 @@
     EIndicatorTestAppSharingNotAvailable,
     EIndicatorTestAppAudiotoryNotification,
     EIndicatorTestAppNoAudiotoryNotification,
-    EIndicatorTestAppPopUpNotification,
-    EIndicatorTestAppNoPopUpNotification,
     EIndicatorTestAppIconNotification,
     EIndicatorTestAppNoIconNotification
     
--- a/mmsharing/mmshindicator/tsrc/IndicatorTestApp/src/IndicatorTestAppAppui.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/IndicatorTestApp/src/IndicatorTestAppAppui.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -79,13 +79,10 @@
             
         case EIndicatorTestAppSharingAvailable:
             {
-
-            MultimediaSharingSettings::SetPopupNotificationSettingL( EPopupNotificationOn );
             break;
             }
         case EIndicatorTestAppSharingNotAvailable:
             {
-            MultimediaSharingSettings::SetPopupNotificationSettingL( EPopupNotificationOff );
             break;
             }
         default:
@@ -109,15 +106,7 @@
 void CIndicatorTestAppAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
     {
     if( aResourceId == R_INDICATORTESTAPP_MENU ) 
-        {
-        if( MultimediaSharingSettings::PopupNotificationSettingL() == EPopupNotificationOn )
-            {
-            aMenuPane->DeleteMenuItem( EIndicatorTestAppNoPopUpNotification );
-            }
-        else
-            {
-            aMenuPane->DeleteMenuItem( EIndicatorTestAppPopUpNotification );
-            }
+        {        
         if( MultimediaSharingSettings::AuditoryNotificationSettingL() == EAuditoryNotificationOn )
             {
             aMenuPane->DeleteMenuItem( EIndicatorTestAppNoAudiotoryNotification );
--- a/mmsharing/mmshindicator/tsrc/ut_indicator/BWINS/ut_musindicatoru.def	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/ut_indicator/BWINS/ut_musindicatoru.def	Wed Sep 01 12:31:01 2010 +0100
@@ -1,37 +1,2 @@
 EXPORTS
-  ?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * CreateTestSuiteL(void)
-	?NewL@CAknGlobalMsgQuery@@SAPAV1@XZ @ 2 NONAME ; class CAknGlobalMsgQuery * CAknGlobalMsgQuery::NewL(void)
-	?NewL@CAknGlobalConfirmationQuery@@SAPAV1@XZ @ 3 NONAME ; class CAknGlobalConfirmationQuery * CAknGlobalConfirmationQuery::NewL(void)
-	?NewLC@CMusIndicatorApi@@SAPAV1@AAVMMusIndicatorObserver@@@Z @ 4 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewLC(class MMusIndicatorObserver &)
-	?DrawDeferred@CCoeControl@@QBEXXZ @ 5 NONAME ; void CCoeControl::DrawDeferred(void) const
-	?SystemGc@CCoeControl@@QBEAAVCWindowGc@@XZ @ 6 NONAME ; class CWindowGc & CCoeControl::SystemGc(void) const
-	?SetPenColor@CWindowGc@@UAEXABVTRgb@@@Z @ 7 NONAME ; void CWindowGc::SetPenColor(class TRgb const &)
-	?ShowConfirmationQueryL@CAknGlobalConfirmationQuery@@QAEXAAVTRequestStatus@@ABVTDesC16@@HH1HHW4TTone@CAknQueryDialog@@H@Z @ 8 NONAME ; void CAknGlobalConfirmationQuery::ShowConfirmationQueryL(class TRequestStatus &, class TDesC16 const &, int, int, class TDesC16 const &, int, int, enum CAknQueryDialog::TTone, int)
-	?CancelMsgQuery@CAknGlobalMsgQuery@@QAEXXZ @ 9 NONAME ; void CAknGlobalMsgQuery::CancelMsgQuery(void)
-	?NewL@CMusIndicatorApi@@SAPAV1@AAVMMusIndicatorObserver@@@Z @ 10 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewL(class MMusIndicatorObserver &)
-	?DrawRoundRect@CWindowGc@@UAEXABVTRect@@ABVTSize@@@Z @ 11 NONAME ; void CWindowGc::DrawRoundRect(class TRect const &, class TSize const &)
-	?ShowMsgQueryL@CAknGlobalMsgQuery@@QAEXAAVTRequestStatus@@ABVTDesC16@@H11HHW4TTone@CAknQueryDialog@@@Z @ 12 NONAME ; void CAknGlobalMsgQuery::ShowMsgQueryL(class TRequestStatus &, class TDesC16 const &, int, class TDesC16 const &, class TDesC16 const &, int, int, enum CAknQueryDialog::TTone)
-	?SetPenStyle@CWindowGc@@UAEXW4TPenStyle@CGraphicsContext@@@Z @ 13 NONAME ; void CWindowGc::SetPenStyle(enum CGraphicsContext::TPenStyle)
-	??1CAknGlobalMsgQuery@@UAE@XZ @ 14 NONAME ; CAknGlobalMsgQuery::~CAknGlobalMsgQuery(void)
-	?ConfirmationQueryL@CMusIndicatorApi@@SAHW4TVsPopupQuery@1@@Z @ 15 NONAME ; int CMusIndicatorApi::ConfirmationQueryL(enum CMusIndicatorApi::TVsPopupQuery)
-	?NewL@CMusIndicatorApi@@SAPAV1@XZ @ 16 NONAME ; class CMusIndicatorApi * CMusIndicatorApi::NewL(void)
-	??1CAknGlobalConfirmationQuery@@UAE@XZ @ 17 NONAME ; CAknGlobalConfirmationQuery::~CAknGlobalConfirmationQuery(void)
-	?NewLC@CAknGlobalConfirmationQuery@@SAPAV1@XZ @ 18 NONAME ; class CAknGlobalConfirmationQuery * CAknGlobalConfirmationQuery::NewLC(void)
-	?SizeInPixels@CWsScreenDevice@@UBE?AVTSize@@XZ @ 19 NONAME ; class TSize CWsScreenDevice::SizeInPixels(void) const
-	??1CWindowGc@@UAE@XZ @ 20 NONAME ; CWindowGc::~CWindowGc(void)
-	?IndicateAvailabilityL@CMusIndicatorApi@@QAEXXZ @ 21 NONAME ; void CMusIndicatorApi::IndicateAvailabilityL(void)
-	?ActivateL@CCoeControl@@UAEXXZ @ 22 NONAME ; void CCoeControl::ActivateL(void)
-	?Start@CPeriodic@@QAEXVTTimeIntervalMicroSeconds32@@0VTCallBack@@@Z @ 23 NONAME ; void CPeriodic::Start(class TTimeIntervalMicroSeconds32, class TTimeIntervalMicroSeconds32, class TCallBack)
-	?SetPenSize@CWindowGc@@UAEXABVTSize@@@Z @ 24 NONAME ; void CWindowGc::SetPenSize(class TSize const &)
-	?Background@AknsDrawUtils@@SAHPAVMAknsSkinInstance@@PAVMAknsControlContext@@PBVCCoeControl@@AAVCWindowGc@@ABVTRect@@H@Z @ 25 NONAME ; int AknsDrawUtils::Background(class MAknsSkinInstance *, class MAknsControlContext *, class CCoeControl const *, class CWindowGc &, class TRect const &, int)
-	?Clear@CWindowGc@@UAEXABVTRect@@@Z @ 26 NONAME ; void CWindowGc::Clear(class TRect const &)
-	?NewLC@CAknGlobalMsgQuery@@SAPAV1@XZ @ 27 NONAME ; class CAknGlobalMsgQuery * CAknGlobalMsgQuery::NewLC(void)
-	?ControlContext@AknsDrawUtils@@SAPAVMAknsControlContext@@PBVMObjectProvider@@@Z @ 28 NONAME ; class MAknsControlContext * AknsDrawUtils::ControlContext(class MObjectProvider const *)
-	?CancelConfirmationQuery@CAknGlobalConfirmationQuery@@QAEXXZ @ 29 NONAME ; void CAknGlobalConfirmationQuery::CancelConfirmationQuery(void)
-	?UseFont@CWindowGc@@UAEXPBVCFont@@@Z @ 30 NONAME ; void CWindowGc::UseFont(class CFont const *)
-	?SetBrushStyle@CWindowGc@@UAEXW4TBrushStyle@CGraphicsContext@@@Z @ 31 NONAME ; void CWindowGc::SetBrushStyle(enum CGraphicsContext::TBrushStyle)
-	?CreateWindowL@CCoeControl@@IAEXXZ @ 32 NONAME ; void CCoeControl::CreateWindowL(void)
-	?DrawText@CWindowGc@@UAEXABVTDesC16@@ABVTPoint@@@Z @ 33 NONAME ; void CWindowGc::DrawText(class TDesC16 const &, class TPoint const &)
-	?BitBltMasked@CWindowGc@@UAEXABVTPoint@@PBVCFbsBitmap@@ABVTRect@@1H@Z @ 34 NONAME ; void CWindowGc::BitBltMasked(class TPoint const &, class CFbsBitmap const *, class TRect const &, class CFbsBitmap const *, int)
-	??0CWindowGc@@QAE@PAVCWsScreenDevice@@@Z @ 35 NONAME ; CWindowGc::CWindowGc(class CWsScreenDevice *)
-
+	?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * CreateTestSuiteL(void)
--- a/mmsharing/mmshindicator/tsrc/ut_indicator/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/ut_indicator/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -19,5 +19,5 @@
 PRJ_PLATFORMS
 DEFAULT
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
 ut_musindicator.mmp
--- a/mmsharing/mmshindicator/tsrc/ut_indicator/group/ut_musindicator.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/ut_indicator/group/ut_musindicator.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -37,13 +37,11 @@
 SOURCE              dllmain.cpp
 SOURCE              ut_cmusindicatorapi.cpp
 SOURCE              ut_cmussoundplayer.cpp
-SOURCE              ut_cmusindicatordsa.cpp
 
 // tested classes
 SOURCEPATH          ../../../src
 SOURCE              mussoundplayer.cpp
 SOURCE              musindicatorapi.cpp
-SOURCE              musindicatordsa.cpp
 SOURCE              musresourceutil.cpp
 
 USERINCLUDE         ../inc
@@ -56,28 +54,23 @@
 USERINCLUDE         ../../../../../inc
 USERINCLUDE         ../../../../../tsrc/ututils/inc
 USERINCLUDE         ../../../../../tsrc/propertystub/inc
-USERINCLUDE         ../../../../../tsrc/fbsbitmapstub/inc
-USERINCLUDE         ../../../../../tsrc/centralrepositorystub/inc
 
 // STUB SOURCES
 SOURCEPATH          ../../../../../tsrc/propertystub/src
 SOURCE              e32property.cpp
 SOURCEPATH          ../../../../../tsrc/fbsbitmapstub/src
 SOURCE              fbs.cpp
-SOURCEPATH          ../../../../../tsrc/centralrepositorystub/src
-SOURCE              centralrepositorystub.cpp
 
 // STUB INCLUDES
 
 // To replace RProperty with a stub    
 SYSTEMINCLUDE       ../../../../../tsrc/propertystub/inc 
-SYSTEMINCLUDE       ../../../../../tsrc/centralrepositorystub/inc
 
 // INCLUDESs
 
 APP_LAYER_SYSTEMINCLUDE
 
-//LIBRARY             centralrepository.lib
+LIBRARY             centralrepository.lib
 LIBRARY             commonengine.lib // RConeResourceLoader
 LIBRARY             bafl.lib
 LIBRARY             eunit.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshindicator/tsrc/ut_indicator/group/ut_musindicator.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,33 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHInd"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_musindicator.dll"-"c:\sys\bin\ut_musindicator.dll"
+
--- a/mmsharing/mmshindicator/tsrc/ut_indicator/inc/ut_cmusindicatorapi.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/ut_indicator/inc/ut_cmusindicatorapi.h	Wed Sep 01 12:31:01 2010 +0100
@@ -78,16 +78,12 @@
      * Actual unit test methods.
      */
     void UT_CMusIndicatorApi_NewLL();
-    void UT_CMusIndicatorApi_ConfirmationQueryLL();
     void UT_CMusIndicatorApi_IndicateAvailabilityLL();
     void UT_CMusIndicatorApi_RunLL();
     void UT_CMusIndicatorApi_DoCancelL();
     void UT_CMusIndicatorApi_RunErrorL();
     void UT_CMusIndicatorApi_PlaySoundCompleteL();
     void UT_CMusIndicatorApi_PlayToneLL();
-    void UT_CMusIndicatorApi_NoteTextLCL();
-    void UT_CMusIndicatorApi_ShowLiveSharingQueryLL();
-    void UT_CMusIndicatorApi_LiveSharingQueryTimeoutL();
     
     
 private: // data
--- a/mmsharing/mmshindicator/tsrc/ut_indicator/inc/ut_cmusindicatordsa.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Unit tests for CMusIndicatorApi class.
-*
-*/
-
-
-
-#ifndef UT_CMUSINDICATORDSA_H
-#define UT_CMUSINDICATORDSA_H
-
-
-#include <digia/eunit/ceunittestsuiteclass.h>
-#include <e32def.h>
-
-
-#ifndef NONSHARABLE_CLASS
-    #define NONSHARABLE_CLASS(x) class x
-#endif
-
-
-class CMusIndicatorDsa;
-
-
-/**
- *  Unit test class for CMusIndicatorApi class.
- *  Implements unit tests for CMusIndicatorApi class.
- */
-NONSHARABLE_CLASS( UT_CMusIndicatorDsa ) : public CEUnitTestSuiteClass
-    {
-public:
-
-    static UT_CMusIndicatorDsa* NewL();
-    static UT_CMusIndicatorDsa* NewLC();
-
-    /**
-     * Destructor.
-     */
-    ~UT_CMusIndicatorDsa();
-
-private:
-
-    UT_CMusIndicatorDsa();
-
-    void ConstructL();
-
-    /**
-     * Sets up a new test.
-     */
-    void SetupL();
-
-    /**
-     * Tears down a test.
-     */
-    void Teardown();
-
-    /**
-     * Actual unit test methods.
-     */
-    void UT_CMusIndicatorDsa_NewLL();
-    void UT_CMusIndicatorDsa_DrawL();
-    void UT_CMusIndicatorDsa_LoadImageLL();
-    void UT_CMusIndicatorDsa_LoadResourceStringLL();
-    void UT_CMusIndicatorDsa_InitializeL();
-    void UT_CMusIndicatorDsa_TryActivateL();
-    void UT_CMusIndicatorDsa_StartPeriodicTimerL();
-    void UT_CMusIndicatorDsa_StopPeriodicTimerL();
-    void UT_CMusIndicatorDsa_HandleResourceChangeL();
-    void UT_CMusIndicatorDsa_DoHandleResourceChangeL();
-    
-    
-    /**
-    * Helpers
-    */
-    void FakeVisibilityL();
-
-private: // data
-
-    /**
-     * Tested class.
-     * Own.
-     */
-    CMusIndicatorDsa* iIndicatorDsa;
-
-    EUNIT_DECLARE_TEST_TABLE;
-
-    };
-
-#endif // UT_CMUSINDICATORDSA_H
--- a/mmsharing/mmshindicator/tsrc/ut_indicator/src/dllmain.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/ut_indicator/src/dllmain.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -19,7 +19,6 @@
 
 #include "ut_cmusindicatorapi.h"
 #include "ut_cmussoundplayer.h"
-#include "ut_cmusindicatordsa.h"
 #include <digia/eunit/ceunittestsuite.h>
 
 
@@ -39,9 +38,6 @@
     rootSuite->AddL( UT_CMusSoundPlayer::NewLC() );
     CleanupStack::Pop();
 
-    rootSuite->AddL( UT_CMusIndicatorDsa::NewLC() );
-    CleanupStack::Pop();
-
     CleanupStack::Pop( rootSuite );
 
     return rootSuite;
--- a/mmsharing/mmshindicator/tsrc/ut_indicator/src/ut_cmusindicatorapi.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshindicator/tsrc/ut_indicator/src/ut_cmusindicatorapi.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -28,134 +28,8 @@
 
 // Next row is to disable warning emerging from EUnit code.
 #pragma warn_illtokenpasting off
-static TInt stubStatus = KErrNone;
-static TRequestStatus* rstatus = NULL;
 
 
-// ======== CAknGlobalMsgQuery stub ========
-
-
-CAknGlobalMsgQuery* CAknGlobalMsgQuery::NewL()
-    {
-    CAknGlobalMsgQuery* self = CAknGlobalMsgQuery::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-CAknGlobalMsgQuery* CAknGlobalMsgQuery::NewLC()
-    {
-    CAknGlobalMsgQuery* self = new (ELeave) CAknGlobalMsgQuery();
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-CAknGlobalMsgQuery::CAknGlobalMsgQuery()
-    {
-    }
-
-CAknGlobalMsgQuery::~CAknGlobalMsgQuery()
-    {
-    CancelMsgQuery();
-    iNotify.Close();
-    }
-
-void CAknGlobalMsgQuery::ShowMsgQueryL( 
-     TRequestStatus& aStatus,
-     const TDesC& /*aMsgText*/,
-     TInt /*aSoftkeys*/,
-     const TDesC& /*HeaderText*/,
-     const TDesC& /*HeaderImageFile*/,
-     TInt /*aImageId*/,
-     TInt /*aImageMaskId*/,
-     CAknQueryDialog::TTone /*aTone*/)
-    {
-    if ( stubStatus == KErrNone )
-        {
-        aStatus = KRequestPending;
-        rstatus = &aStatus;
-        }
-    else
-        {
-        User::Leave( stubStatus );
-        }
-    }
-
-void CAknGlobalMsgQuery::CancelMsgQuery()
-    {
-    if ( rstatus )
-        {
-        User::RequestComplete( rstatus, KErrCancel );
-        rstatus = NULL;
-        }
-    }
-
-
-// ======== CAknGlobalConfirmationQuery stub ========
-
-CAknGlobalConfirmationQuery* CAknGlobalConfirmationQuery::NewL()
-    {
-    CAknGlobalConfirmationQuery* self = CAknGlobalConfirmationQuery::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-CAknGlobalConfirmationQuery* CAknGlobalConfirmationQuery::NewLC()
-    {
-    CAknGlobalConfirmationQuery* self = new (ELeave) CAknGlobalConfirmationQuery();
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-CAknGlobalConfirmationQuery::CAknGlobalConfirmationQuery()
-    {
-    }
-
-
-CAknGlobalConfirmationQuery::~CAknGlobalConfirmationQuery()
-    {
-    CancelConfirmationQuery();
-    iNotify.Close();
-    }
-    
-
-
-
-void CAknGlobalConfirmationQuery::ShowConfirmationQueryL( 
-    TRequestStatus& aStatus,
-    const TDesC& /*aPrompt*/,
-    TInt /*aSoftkeys*/,
-    TInt /*aAnimation*/,
-    const TDesC& /*aImageFile*/,
-    TInt /*aImageId*/,
-    TInt /*aImageMaskId*/,
-    CAknQueryDialog::TTone /*aTone*/,
-    TBool /*aDismissWithAllKeys*/ )
-
-    {
-    if ( stubStatus == KErrNone )
-        {
-        TRequestStatus* stat = &aStatus;
-        User::RequestComplete( stat, EAknSoftkeyYes );
-       // rstatus = &aStatus;
-        }
-    else
-        {
-        User::Leave( stubStatus );
-        }
-    
-    }
-
-void CAknGlobalConfirmationQuery::CancelConfirmationQuery()
-    {
-    if ( rstatus )
-        {
-        User::RequestComplete( rstatus, KErrCancel );
-        rstatus = NULL;
-        }
-    }
-
 // ======== MEMBER FUNCTIONS ========
 
 
@@ -204,8 +78,6 @@
 void UT_CMusIndicatorApi::SetupL()
     {
     iIndicatorApi = CMusIndicatorApi::NewL( *this );
-    rstatus = NULL;
-    stubStatus = KErrNone;
     iStartLiveSharingLCalled = EFalse;
     }
 
@@ -217,7 +89,6 @@
 void UT_CMusIndicatorApi::Teardown()
     {
     delete iIndicatorApi;
-    iIndicatorApi = NULL;
     PropertyHelper::Close();
     
     }
@@ -248,19 +119,6 @@
 
 
 // ----------------------------------------------------------------------------
-// @TODO: Can this be tested without a dialog?
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorApi::UT_CMusIndicatorApi_ConfirmationQueryLL()
-    {
-    TBool ret = iIndicatorApi->ConfirmationQueryL(
-         CMusIndicatorApi::EVsRoamingActivationQuery );
-    
-    EUNIT_ASSERT( ret );
-    }
-
-
-// ----------------------------------------------------------------------------
 // Dummy test. @TODO: Can this be tested?
 // ----------------------------------------------------------------------------
 //
@@ -276,24 +134,16 @@
 //
 void UT_CMusIndicatorApi::UT_CMusIndicatorApi_RunLL()
     {
-    /* NOTE: EUnit reports leak for this test due AVKON resource reservation,
-     * which is not released by AVKON at end of test. Resource reservation
-     * happend in contruction of indicator(dsa)
-     */
-    TRAPD( error, RProperty::Define(
-                                KPSUidCoreApplicationUIs,
-                                KCoreAppUIsVideoSharingIndicator,
-                                RProperty::EInt,
-                                0 ) );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
+    User::LeaveIfError( RProperty::Define(
+                            KPSUidCoreApplicationUIs,
+                            KCoreAppUIsVideoSharingIndicator,
+                            RProperty::EInt,
+                            0 ) );
         
-    TRAP( error, RProperty::Set(
-            KPSUidCoreApplicationUIs,
-            KCoreAppUIsVideoSharingIndicator,
-            ( TInt ) ECoreAppUIsVideoSharingIndicatorOn ) );
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
+    User::LeaveIfError( RProperty::Set(
+                            KPSUidCoreApplicationUIs,
+                            KCoreAppUIsVideoSharingIndicator,
+                            ( TInt ) ECoreAppUIsVideoSharingIndicatorOn ) );
         
     iIndicatorApi->Cancel();
     iIndicatorApi->iStatus = KErrNotFound;
@@ -303,42 +153,18 @@
     iIndicatorApi->Cancel();
     iIndicatorApi->iStatus = KErrNone;
     iIndicatorApi->RunL();
-    EUNIT_ASSERT( iStartLiveSharingLCalled );
-    EUNIT_ASSERT( !iIndicatorApi->iQuery );
-    
-    delete iIndicatorApi->iLiveSharingQueryTimeout;
-    iIndicatorApi->iLiveSharingQueryTimeout = NULL;
-    iIndicatorApi->iLiveSharingQueryTimeout = 
-                    CPeriodic::NewL( CActive::EPriorityStandard );
-    
-    iIndicatorApi->RunL();
-    EUNIT_ASSERT( !iIndicatorApi->iLiveSharingQueryTimeout );
+    EUNIT_ASSERT( iStartLiveSharingLCalled ); 
     
-    EUNIT_ASSERT( !iIndicatorApi->IsSubscriber() );
-    
-    iIndicatorApi->iObserver = NULL;
-    EUNIT_ASSERT( iIndicatorApi->IsSubscriber() );
-    iIndicatorApi->Indicator( ETrue );
-    
-    iIndicatorApi->Cancel();
-    
-    iIndicatorApi->RunL();
-    
-    TRequestStatus& status = iIndicatorApi->iStatus;
-    rstatus = &status;
-    //User::RequestComplete( rstatus, KErrCancel ); 
     }
 
 
 // ----------------------------------------------------------------------------
-// Asserts that DoCancel removes current activity and deletes used resources.
+// Asserts that DoCancel removes current activity.
 // ----------------------------------------------------------------------------
 //
 void UT_CMusIndicatorApi::UT_CMusIndicatorApi_DoCancelL()
     {
-    iIndicatorApi->ShowLiveSharingQueryL( EFalse );
     iIndicatorApi->Cancel();
-    EUNIT_ASSERT( !iIndicatorApi->iQuery );
     EUNIT_ASSERT( !iIndicatorApi->IsActive() );
     
     }
@@ -381,62 +207,6 @@
     }
 
 
-// ----------------------------------------------------------------------------
-// Asserts that a note text is generated.
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorApi::UT_CMusIndicatorApi_NoteTextLCL()
-    {
-    HBufC* tmp = iIndicatorApi->NoteTextLC(
-        CMusIndicatorApi::EVsRoamingActivationQuery );
-    EUNIT_ASSERT( tmp );
-    EUNIT_ASSERT( tmp->Length() );
-    CleanupStack::PopAndDestroy();
-    }
-
-
-// ----------------------------------------------------------------------------
-// Asserts that method creates a query and calls CActive::SetActive.
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorApi::UT_CMusIndicatorApi_ShowLiveSharingQueryLL()
-    {
-    
-    iIndicatorApi->ShowLiveSharingQueryL( EFalse );
-    EUNIT_ASSERT( iIndicatorApi->iQuery );
-    EUNIT_ASSERT( iIndicatorApi->IsActive() );
-    
-    iIndicatorApi->Cancel();
-    EUNIT_ASSERT( !iIndicatorApi->iQuery );
-    EUNIT_ASSERT( !iIndicatorApi->IsActive() );
-    
-    stubStatus = KErrNotFound;
-    iIndicatorApi->ShowLiveSharingQueryL( EFalse );
-    EUNIT_ASSERT( !iIndicatorApi->iQuery );
-    EUNIT_ASSERT( !iIndicatorApi->IsActive() );
-    
-    
-    }
-
-// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorApi::UT_CMusIndicatorApi_LiveSharingQueryTimeoutL()
-    {
-    iIndicatorApi->ShowLiveSharingQueryL( EFalse );
-    EUNIT_ASSERT( iIndicatorApi->iQuery );
-    EUNIT_ASSERT( iIndicatorApi->IsActive() );
-    
-    EUNIT_ASSERT( CMusIndicatorApi::LiveSharingQueryTimeout( iIndicatorApi ) == KErrNone );
-    
-    EUNIT_ASSERT( !iIndicatorApi->iQuery );
-    EUNIT_ASSERT( !iIndicatorApi->IsActive() );
-    
-    
-    }
-
-
-
 // ======== EUNIT TEST TABLE ========
 
 
@@ -453,13 +223,6 @@
     SetupL, UT_CMusIndicatorApi_NewLL, Teardown )
 
 EUNIT_TEST(
-    "ConfirmationQueryL - test ",
-    "CMusIndicatorApi",
-    "ConfirmationQueryL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorApi_ConfirmationQueryLL, Teardown )
-
-EUNIT_TEST(
     "IndicateAvailabilityL - test ",
     "CMusIndicatorApi",
     "IndicateAvailabilityL",
@@ -501,27 +264,6 @@
     "FUNCTIONALITY",
     SetupL, UT_CMusIndicatorApi_PlayToneLL, Teardown )
 
-EUNIT_TEST(
-    "NoteTextLC - test ",
-    "CMusIndicatorApi",
-    "NoteTextLC",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorApi_NoteTextLCL, Teardown )
-
-EUNIT_TEST(
-    "ShowLiveSharingQueryL - test ",
-    "CMusIndicatorApi",
-    "ShowLiveSharingQueryL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorApi_ShowLiveSharingQueryLL, Teardown )
-
-EUNIT_TEST(
-    "LiveSharingQueryTimeout - test ",
-    "CMusIndicatorApi",
-    "LiveSharingQueryTimeout",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorApi_LiveSharingQueryTimeoutL, Teardown )
-
     
 
 EUNIT_END_TEST_TABLE
--- a/mmsharing/mmshindicator/tsrc/ut_indicator/src/ut_cmusindicatordsa.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,501 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implements unit tests for CMusIndicatorApi class.
-*
-*/
-
-
-
-#include "ut_cmusindicatordsa.h"
-#include "musindicatordsa.h"
-#include "mustesthelp.h"
-#include "e32property.h"
-
-#include <digia/eunit/eunitmacros.h>
-#include <AknGlobalMsgQuery.h>
-#include <AknsDrawUtils.h>
-
-
-// Next row is to disable warning emerging from EUnit code.
-#pragma warn_illtokenpasting off
-
-const TSize KOriginalSize = TSize( 176, 208 );
-const TSize KDifferentSize = TSize( 208, 176 );
-
-static CWindowGc* gc = NULL;
-static TAny* cc = NULL;
-static TTimeIntervalMicroSeconds32 delay = 0;
-static TSize sizeInPixels = KOriginalSize;
-
-
-// ======== stubs ========
-
-
-void CCoeControl::CreateWindowL()
-    {
-    
-    }
-
-void CCoeControl::ActivateL()
-    {
-    
-    }
-
-void CCoeControl::DrawDeferred() const
-    {
-    }
-
-CWindowGc& CCoeControl::SystemGc() const
-    {
-    return *gc;
-    }
-
-MWsClientClass::MWsClientClass()
-    {
-    }
-
-CWindowGc::CWindowGc(CWsScreenDevice* /*aDevice*/ )
-    {
-    
-    }
-
-CWindowGc::~CWindowGc()
-    {
-    
-    }
-
-void CWindowGc::SetBrushStyle( TBrushStyle /*aBrushStyle*/ )
-    {
-    }
-
-void CWindowGc::Clear( const TRect& /*aRect*/ )
-    {
-    }
-    
-void CWindowGc::UseFont( const CFont* /*aFont*/ )
-    {
-    }
-    
-void CWindowGc::SetPenStyle( TPenStyle /*aPenStyle*/ )
-    {
-    }
-
-void CWindowGc::SetPenColor( const TRgb& /*aColor*/ )
-    {
-    }
-
-void CWindowGc::SetPenSize( const TSize& /*aSize*/ )
-    {
-    }
-
-void CWindowGc::DrawRoundRect( const TRect& /*aRect*/,const TSize& /*aEllipse*/ )
-    {
-    }
-
-void CWindowGc::DrawText( const TDesC& /*aBuf*/,const TPoint& /*aPos*/ )
-    {
-    }
-    
-//Cannot stub due it is virtual method. This is not called
-TSize CWsScreenDevice::SizeInPixels() const
-    {
-    return sizeInPixels;
-    }
-
-void CWindowGc::BitBltMasked(const TPoint& /*aPoint*/,const CFbsBitmap* /*aBitmap*/,
-        const TRect& /*aSourceRect*/,const CFbsBitmap* /*aMaskBitmap*/,TBool /*aInvertMask*/)
-    {
-    }
-
-MAknsControlContext* AknsDrawUtils::ControlContext( const MObjectProvider* /*aMop*/ )
-    {
-    return static_cast<MAknsControlContext*>( cc );
-    }
-
-TBool AknsDrawUtils::Background( MAknsSkinInstance* /*aInstance*/,
-            MAknsControlContext* /*aContext*/, const CCoeControl* /*aControl*/,
-            CWindowGc& /*aGc*/, const TRect& /*aRect*/, const TInt /*aDrawParam*/ )
-    {
-    return ETrue;
-    }
-
-
-void CPeriodic::Start(TTimeIntervalMicroSeconds32 aDelay,TTimeIntervalMicroSeconds32 /*anInterval*/,TCallBack /*aCallBack*/)
-    {
-    delay = aDelay;
-    After(aDelay);
-    
-    }
-
-
-
-// ======== MEMBER FUNCTIONS ========
-
-
-UT_CMusIndicatorDsa* UT_CMusIndicatorDsa::NewL()
-    {
-    UT_CMusIndicatorDsa* self = UT_CMusIndicatorDsa::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-UT_CMusIndicatorDsa* UT_CMusIndicatorDsa::NewLC()
-    {
-    UT_CMusIndicatorDsa* self = new( ELeave ) UT_CMusIndicatorDsa();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-
-UT_CMusIndicatorDsa::~UT_CMusIndicatorDsa()
-    {
-    }
-
-
-UT_CMusIndicatorDsa::UT_CMusIndicatorDsa()
-    {
-    delete iIndicatorDsa;
-    iIndicatorDsa = NULL;
-    }
-
-
-// ---------------------------------------------------------------------------
-// The ConstructL from the base class CEUnitTestSuiteClass must be called.
-// It generates the test case table.
-// ---------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::ConstructL()
-    {
-    CEUnitTestSuiteClass::ConstructL();
-    }
-
-
-// ----------------------------------------------------------------------------
-// Prepares a test for execution.
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::SetupL()
-    {
-    /* NOTE: EUnit reports leak for any first test due AVKON resource reservation,
-     * which is not released by AVKON at end of test. Resource reservation
-     * happend in contruction of CMusIndicatorDsa
-     */
-    
-    cc = this;
-    iIndicatorDsa = CMusIndicatorDsa::NewL();
-    if ( !gc )
-        {
-        gc = new (ELeave) CWindowGc( NULL );
-        }
-    delay = 0;
-    sizeInPixels = KOriginalSize;
-    
-    }
-
-
-// ----------------------------------------------------------------------------
-// Finalizes a test by releasing used resources.
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::Teardown()
-    {
-    delete iIndicatorDsa;
-    iIndicatorDsa = NULL;
-    delete gc;
-    gc = NULL;
-    cc = NULL;
-    delay = 0;
-    sizeInPixels = KOriginalSize;
-    PropertyHelper::Close();
-    
-    }
-
-
-// ======== UNIT TEST METHODS ========
-
-
-// ----------------------------------------------------------------------------
-// Asserts successful instantiation.
-// ----------------------------------------------------------------------------
-//
-
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_NewLL()
-    {
-    EUNIT_ASSERT( iIndicatorDsa );
-    }
-
-
-// ----------------------------------------------------------------------------
-// 
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_DrawL()
-    {
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-
-    TRect rect;
-    iIndicatorDsa->Draw( rect );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    
-    cc = NULL;
-    iIndicatorDsa->Draw( rect );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    
-    /*size cannot be changed
-    sizeInPixels = KDifferentSize;
-    iIndicatorDsa->Draw( rect );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic->IsActive() );
-    */
-    
-    }
-
-// ----------------------------------------------------------------------------
-// 
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_InitializeL()
-    {
-    iIndicatorDsa->Initialize();
-        
-    
-    EUNIT_ASSERT( iIndicatorDsa->iTextpos.iX );
-    EUNIT_ASSERT( iIndicatorDsa->iTextpos.iY );
-    
-    }
-
-
-// ----------------------------------------------------------------------------
-// Asserts that load image is not doing anything if icon is already loaded
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_LoadImageLL()
-    {
-    CFbsBitmap* icon = iIndicatorDsa->iIcon;
-    CFbsBitmap* iconMask = iIndicatorDsa->iIconMask;
-    EUNIT_ASSERT( icon != NULL );
-    EUNIT_ASSERT( iconMask != NULL );
-    iIndicatorDsa->LoadImageL();
-    
-    EUNIT_ASSERT( icon == iIndicatorDsa->iIcon );
-    EUNIT_ASSERT( iconMask == iIndicatorDsa->iIconMask );
-    }
-
-
-// ----------------------------------------------------------------------------
-// Asserts successful loading of resource string.
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_LoadResourceStringLL()
-    {
-    iIndicatorDsa->LoadResourceStringL();
-    EUNIT_ASSERT( iIndicatorDsa->iText );
-    EUNIT_ASSERT( iIndicatorDsa->iText->Length() );
-    }
-
-
-
-// ----------------------------------------------------------------------------
-// Asserts that periodic timer is started after method call.
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_StartPeriodicTimerL()
-    {
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    EUNIT_ASSERT( delay.Int() == 0 );
-    
-    iIndicatorDsa->StartPeriodicTimer( iIndicatorDsa->iActivateCallBack );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic->IsActive() );
-    EUNIT_ASSERT( delay.Int() == KMusIndicatorDelay );
-    
-    delay = 0;
-    iIndicatorDsa->StartPeriodicTimer( iIndicatorDsa->iActivateCallBack );
-    EUNIT_ASSERT( delay.Int() == 0 );
-    
-    iIndicatorDsa->iPeriodic->Cancel();
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    EUNIT_ASSERT( delay.Int() == 0 );
-    
-    iIndicatorDsa->StartPeriodicTimer( iIndicatorDsa->iRedrawCallBack );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic->IsActive() );
-    EUNIT_ASSERT( delay.Int() == KMusRedrawDelay );
-    
-    }
-
-
-// ----------------------------------------------------------------------------
-// Asserts that periodic timer is stopped after method call.
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_StopPeriodicTimerL()
-    {
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    iIndicatorDsa->StopPeriodicTimer();
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    
-    iIndicatorDsa->StartPeriodicTimer( iIndicatorDsa->iActivateCallBack );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic->IsActive() );
-    
-    iIndicatorDsa->StopPeriodicTimer();
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    
-    }
-
-// ----------------------------------------------------------------------------
-// Asserts that periodic timer 
-// ----------------------------------------------------------------------------
-//
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_TryActivateL()
-    {
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-
-    EUNIT_ASSERT_EQUALS( iIndicatorDsa->TryActivate( iIndicatorDsa ), KErrNone );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-
-    cc = NULL;
-
-    // Through async callback
-    EUNIT_ASSERT_EQUALS( iIndicatorDsa->TryActivate( iIndicatorDsa ), KErrNone );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic->IsActive() );
-    
-    EUNIT_ASSERT_EQUALS( iIndicatorDsa->TryActivate( NULL ), KErrArgument );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic->IsActive() );
-    
-    }
-
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_DoHandleResourceChangeL()
-    {
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-
-    EUNIT_ASSERT_EQUALS( iIndicatorDsa->DoHandleResourceChange( iIndicatorDsa ), KErrNone );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-
-    EUNIT_ASSERT_EQUALS( iIndicatorDsa->DoHandleResourceChange( NULL ), KErrArgument );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    
-    }
-
-void UT_CMusIndicatorDsa::UT_CMusIndicatorDsa_HandleResourceChangeL()
-    {
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    iIndicatorDsa->StartPeriodicTimer( iIndicatorDsa->iRedrawCallBack );
-    EUNIT_ASSERT( iIndicatorDsa->iPeriodic->IsActive() );
-    
-    iIndicatorDsa->iScreenSize = TSize();
-    iIndicatorDsa->HandleResourceChange( KEikDynamicLayoutVariantSwitch );
-    EUNIT_ASSERT( !iIndicatorDsa->iPeriodic->IsActive() );
-    
-    EUNIT_ASSERT( iIndicatorDsa->iScreenSize != TSize() );
-    
-    iIndicatorDsa->iScreenSize = TSize();
-    iIndicatorDsa->HandleResourceChange( 0 );
-    EUNIT_ASSERT( iIndicatorDsa->iScreenSize == TSize() );
-    
-    }
-
-
-
-// ======== EUNIT TEST TABLE ========
-
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusIndicatorDsa,
-    "UT_CMusIndicatorDsa",
-    "UNIT" )
-
-EUNIT_TEST(
-    "NewL - test",
-    "CMusIndicatorDsa",
-    "NewL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_NewLL, Teardown )
-
-
-EUNIT_TEST(
-    "Draw - test",
-    "CMusIndicatorDsa",
-    "Draw",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_DrawL, Teardown )
-
-
-EUNIT_TEST(
-    "Initialize - test",
-    "CMusIndicatorDsa",
-    "Initialize",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_InitializeL, Teardown )
-
-EUNIT_TEST(
-    "LoadImageL - test",
-    "CMusIndicatorDsa",
-    "LoadImageL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_LoadImageLL, Teardown )
-
-EUNIT_TEST(
-    "LoadResourceStringL - test",
-    "CMusIndicatorDsa",
-    "LoadResourceStringL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_LoadResourceStringLL, Teardown )
-
-
-EUNIT_TEST(
-    "TryActivate - test",
-    "CMusIndicatorDsa",
-    "TryActivate",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_TryActivateL, Teardown )
-
-EUNIT_TEST(
-    "StartPeriodicTimer - test",
-    "CMusIndicatorDsa",
-    "StartPeriodicTimer",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_StartPeriodicTimerL, Teardown )
-
-EUNIT_TEST(
-    "StopPeriodicTimer - test",
-    "CMusIndicatorDsa",
-    "StopPeriodicTimer",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_StopPeriodicTimerL, Teardown )
-
-EUNIT_TEST(
-    "DoHandleResourceChange - test",
-    "CMusIndicatorDsa",
-    "DoHandleResourceChange",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_DoHandleResourceChangeL, Teardown )
-
-EUNIT_TEST(
-    "HandleResourceChange - test",
-    "CMusIndicatorDsa",
-    "HandleResourceChange",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusIndicatorDsa_HandleResourceChangeL, Teardown )
-
-    
-EUNIT_END_TEST_TABLE
--- a/mmsharing/mmshmanagercli/src/musmanagerimpl.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagercli/src/musmanagerimpl.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -402,6 +402,9 @@
     {
     MUS_LOG1( "mus: [MUSCLI]     CMusManagerImplListener::RunError: %d", \
                  aError );
+    // Nothing can be done here.
+    aError = KErrNone;
+    
     return aError;
     }
 
--- a/mmsharing/mmshmanagercli/tsrc/ut_managercli/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagercli/tsrc/ut_managercli/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -16,5 +16,5 @@
 */
 
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
 ut_musmanagerclient.mmp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshmanagercli/tsrc/ut_managercli/group/ut_musmanagerclient.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHMgrCli"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_musmanagerclient.dll"-"c:\sys\bin\ut_musmanagerclient.dll"
--- a/mmsharing/mmshmanagersrv/group/musmanagerserver.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/group/musmanagerserver.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -30,9 +30,6 @@
 VENDORID                VID_DEFAULT
 VERSION                 KMusBinaryVersionNumber
 
-// Stack Size 20K 
-EPOCSTACKSIZE 0x5000
-
 SOURCEPATH              ../src
 SOURCE                  musmanagerserver.cpp
 SOURCE                  musmanagerservercore.cpp
@@ -47,7 +44,6 @@
 USERINCLUDE             ../../mmshshared/inc
 USERINCLUDE             ../../inc
 USERINCLUDE             ../../../inc
-USERINCLUDE             ../../cenrep
 
 
 APP_LAYER_SYSTEMINCLUDE
@@ -60,7 +56,5 @@
 LIBRARY                 flogger.lib
 LIBRARY                 ws32.lib 
 LIBRARY                 musindicator.lib
-LIBRARY                 centralrepository.lib
-LIBRARY					charconv.lib
 
 PAGED
--- a/mmsharing/mmshmanagersrv/inc/musapplicationmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/inc/musapplicationmanager.h	Wed Sep 01 12:31:01 2010 +0100
@@ -27,9 +27,6 @@
 #include <e32base.h>
 #include <w32std.h>
 
-
-const TInt KMusMgrMaxPluginNameLen = 256;
-
 //class TApaTask;
 
 /**
@@ -123,12 +120,6 @@
 		*
 		*/
 	    void SetIndicatorStatusL( TBool aLaunch );
-        
-        /**
-         * Resolves name of the ecom plugin which implements the livecomms engine api
-         * by using the callprovider
-         */
-        void ResolvePluginNameL(TDes8& aPluginName);
 	
 
 	private: // helper functions
@@ -144,15 +135,22 @@
 	    void SetPropertyL( TUint aProperty, TInt aValue );
 	    
 	    /**
-        * Reads the call provider information from PS key.
-        */
-	    void CallProviderL(TDes8& aProvider);
-	    
-	    /**
-	    * Creates command line used when starting application.
-	    * 
+	    *
 	    */
-	    HBufC* CreateCommandLineArgsLC();
+	    TApaTask GetApaTask();
+	
+
+	private: // owned data
+	
+		/**
+		* Window server session handle
+		*/
+	    RWsSession iWsSession;
+	
+		/**
+		*
+		*/
+	    RApaLsSession iApaSession;
     };
 
 
--- a/mmsharing/mmshmanagersrv/inc/musavailabilitypluginmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/inc/musavailabilitypluginmanager.h	Wed Sep 01 12:31:01 2010 +0100
@@ -105,11 +105,6 @@
         void InvestigateAvailabilityL();
 
         /**
-        * 
-        */
-        void PrepareForReceivedInviteL();
-        
-        /**
         *
         */
         void InvitationReceivedL();
@@ -156,14 +151,14 @@
 	virtual void AvailabilityError( 
 		TAvailabilityName aName, TAvailabilityStatus aStatus );
 	
+	virtual void AvailabilitiesAbleToShowIndicator();
+	
 
     public:  //from MMusAvaSettingsObserver
     
         TApplicationState ApplicationState();
         
         TBool OptionAllowed();
-        
-        void StartApplicationL( MultimediaSharing::TMusUseCase aUseCase );
     
     private: // from base class MMusIndicatorObserver.
 
--- a/mmsharing/mmshmanagersrv/inc/musavailabilitypluginmanagerobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/inc/musavailabilitypluginmanagerobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -40,8 +40,7 @@
     virtual void AvailabilityChangedL(
                  MultimediaSharing::TMusAvailabilityStatus aAvailability ) = 0;
 
-    virtual void StartSharingWithUseCaseL( MultimediaSharing::TMusUseCase aUseCase ) = 0;
-    
+    virtual void StartLiveSharingL() = 0;
     };
 
 
--- a/mmsharing/mmshmanagersrv/inc/musmanagerserverclosetimer.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/inc/musmanagerserverclosetimer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -39,6 +39,7 @@
     
 	void StopActiveSchedulerAfter( TUint aMilliSeconds );
 	void RunL();
+	TInt RunError( TInt aError );
 	void DoCancel();
 
 private:
--- a/mmsharing/mmshmanagersrv/inc/musmanagerservercommon.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/inc/musmanagerservercommon.h	Wed Sep 01 12:31:01 2010 +0100
@@ -19,7 +19,7 @@
 #ifndef MUSMANAGERSERVERCOMMON_H
 #define MUSMANAGERSERVERCOMMON_H
 
-const TInt KParameterCount = 8;
+const TInt KParameterCount = 7;
 
 enum EMusManagerServerParameter
     {
@@ -30,7 +30,7 @@
     KVideoCodec,
     KSipProfileId,
     KContactName,
-    KFastMode
+    KPrivacyStatus
     };
 
 #endif // ? MUSMANAGERSERVERCOMMON_H
--- a/mmsharing/mmshmanagersrv/inc/musmanagerservercore.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/inc/musmanagerservercore.h	Wed Sep 01 12:31:01 2010 +0100
@@ -25,7 +25,6 @@
 #include "musmanagerserversessionobserver.h"
 #include "musavailabilitypluginmanagerobserver.h"
 #include "musmanagercommon.h"
-#include "musapplicationmanager.h"
 
 class CMusApplicationManager;
 class CMusAvailabilityPlugin;
@@ -99,34 +98,13 @@
 
     virtual void AvailabilityChangedL( MultimediaSharing::TMusAvailabilityStatus aAvailability );
 
-    virtual void StartSharingWithUseCaseL( MultimediaSharing::TMusUseCase aUseCase );
-    
-private: // private methods
-    
-    TBool IsMusEnginePlugin();
-    
-    MultimediaSharing::TMusAvailabilityStatus Availability();
-    
-    TBool ApplicationAllowed();
-    
-    void PrepareForReceivedInviteL();
-    
-    void WriteSessionPropertiesL(
-            MultimediaSharing::TMusUseCase aUseCase,
-            MultimediaSharing::TMusAvailabilityStatus aStatus,
-            MDesCArray& aSessionParameters );
-    
-    void WriteSessionPropertiesL(
-            MultimediaSharing::TMusAvailabilityStatus aStatus,
-            MDesCArray& aSessionParameters );
+    virtual void StartLiveSharingL();
 
 private: // owned data:
 
     CMusAvailabilityPluginManager* iPluginManager;
 
     CMusApplicationManager* iApplicationManager;
-    
-    TBuf8<KMusMgrMaxPluginNameLen> iPluginName;
 
 private: // not owned data
 
--- a/mmsharing/mmshmanagersrv/src/musapplicationmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/src/musapplicationmanager.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -23,23 +23,15 @@
 #include "musmanagerservercommon.h"
 #include "mussessionproperties.h"
 #include "musuid.hrh"
-#include "mussettings.h"
-/* PS keys related to NMusSessionInformationApi defined here */
-#include "mussesseioninformationapi.h"
-#include "muscleanupresetanddestroy.h"
-#include "lcengine.h"
 
 #include <apacmdln.h>
 #include <apgtask.h>
+//#include <badesca.h>
 #include <e32cmn.h>
 #include <e32property.h>
-#include <utf.h>
-#include <apadef.h>
-
 
 // CONSTANTS
-_LIT8( KDefaultEngineName, "MultimediaSharing" );
-_LIT( KMusUiProcessName, "musui.exe" );
+
 
 // -----------------------------------------------------------------------------
 // CMusApplicationManager::NewL
@@ -87,6 +79,9 @@
     MUS_LOG( "mus: [MUSSRV] -> \
     					CMusApplicationManager::~CMusApplicationManager()" );
 
+    iApaSession.Close();
+    iWsSession.Close();
+
     MUS_LOG( "mus: [MUSSRV] <- \
     					CMusApplicationManager::~CMusApplicationManager()" );
     }
@@ -100,7 +95,8 @@
     {
     MUS_LOG( "mus: [MUSSRV] -> CMusApplicationManager::ConstructL()" );
 
-    SetPropertyL( NMusSessionApi::KFastMode, MusSettingsKeys::EFastModeOff );
+    User::LeaveIfError( iApaSession.Connect() );
+    User::LeaveIfError( iWsSession.Connect() );
 
     MUS_LOG( "mus: [MUSSRV] <- CMusApplicationManager::ConstructL()" );
     }
@@ -122,10 +118,7 @@
 TBool CMusApplicationManager::ApplicationRunning()
     {
     MUS_LOG( "mus: [MUSSRV] <> CMusApplicationManager::ApplicationRunning()" );
-    
-    TFindProcess findProcess( KMusUiProcessName );
-    TFullName name;
-    return ( findProcess.Next( name ) == KErrNone );
+    return GetApaTask().Exists();
     }
 
 
@@ -143,15 +136,13 @@
         }
     else
         {
-        MUS_LOG( "mus: [MUSSRV]     Starting app" );
+        TUid appUid;
+        appUid.iUid = KMusUiUid;
         
-        RProcess process;
-        CleanupClosePushL( process );
-        HBufC* args = CreateCommandLineArgsLC();
-        User::LeaveIfError( process.Create( KMusUiProcessName, *args ) );
-        process.Resume();
-        CleanupStack::PopAndDestroy( args );
-        CleanupStack::PopAndDestroy( &process );
+        TThreadId aThreadId;
+        
+        User::LeaveIfError( 
+                    iApaSession.StartDocument( KNullDesC, appUid, aThreadId) );
         }
 
     MUS_LOG( "mus: [MUSSRV] <- CMusApplicationManager::StartApplicationL()" );
@@ -166,7 +157,8 @@
     {
     MUS_LOG( "mus: [MUSSRV] -> CMusApplicationManager::StopApplicationL()" );
 
-    if( ApplicationRunning() )
+    TApaTask task = GetApaTask();
+    if( task.Exists() )
         {
         SetPropertyL( NMusSessionApi::KStatus, 
                       MultimediaSharing::EMultimediaSharingNotAvailable );
@@ -184,7 +176,12 @@
     {
     MUS_LOG( "mus: [MUSSRV] -> CMusApplicationManager::ShowApplicationL()" );
     
-    // TODO: How to bring a QT application to foreground?
+    // does a task for multimediasharing exist?
+    TApaTask task = GetApaTask();
+    if( task.Exists() )
+        {
+        task.BringToForeground();
+        }
     
     MUS_LOG( "mus: [MUSSRV] <- CMusApplicationManager::ShowApplicationL()" );
     }
@@ -202,21 +199,10 @@
      MUS_LOG2( "mus: [MUSSRV] -> \
                CMusApplicationManager::WriteSessionPropertiesL( %d, %d )",
                ( TInt ) aUseCase, ( TInt ) aStatus );
-	TRAPD( error,  		   
-    if ( aUseCase == MultimediaSharing::EMusLiveVideo &&
-            MultimediaSharingSettings::VideoDirectionL() == 
-                                            MusSettingsKeys::ETwoWayVideo )
-        {
-		MUS_LOG( "mus: [MUSSRV]  UseCase MultimediaSharing::EMusTwoWayVideo" );
-        aUseCase = MultimediaSharing::EMusTwoWayVideo;
-        }
-		)
-	if ( error == KErrNoMemory )
-		{
-		User::Leave( error );
-		}
+
     // set use case property
-    SetPropertyL( NMusSessionApi::KUseCase, ( TInt ) aUseCase );
+    SetPropertyL( NMusSessionApi::KUseCase,
+                  ( TInt ) aUseCase );
 
     WriteSessionPropertiesL( aStatus, aSessionParameters );
 
@@ -271,24 +257,14 @@
     SetPropertyL( NMusSessionApi::KContactName,
                   aSessionParameters.MdcaPoint( KContactName ) );
 
-    // fast mode  
-    TInt fastMode;
-    User::LeaveIfError( RProperty::Get( NMusSessionApi::KCategoryUid, 
-                                        NMusSessionApi::KFastMode, 
-                                        fastMode ) );  
-    if ( fastMode != MusSettingsKeys::EFastModeDisabled )
-        {
-        lex.Assign( aSessionParameters.MdcaPoint( KFastMode ) );
-        lex.Val( val );
-        SetPropertyL( NMusSessionApi::KFastMode, val );
-        }
-    else
-        {        
-        MUS_LOG( "mus: [MUSSRV]  fast mode disabled, do not update it" );
-        }
+    // set status property
+    SetStatusL( aStatus );
     
-   // set status property
-    SetStatusL( aStatus );
+    // set privacy property
+    lex.Assign( aSessionParameters.MdcaPoint( KPrivacyStatus ) );
+    lex.Val( val );
+
+    SetPropertyL( NMusSessionApi::KPrivacyStatus, val );
 
     MUS_LOG( "mus: [MUSSRV] <- \
              CMusApplicationManager::WriteSessionPropertiesL()" );
@@ -392,97 +368,15 @@
     MUS_LOG( "mus: [MUSSRV] <- CMusApplicationManager::SetPropertyL()" );
     }
 
-// -----------------------------------------------------------------------------
-// Reads the callprovider description from the PS key
-// return aProvider will have the proper callprovider name.
+
 // -----------------------------------------------------------------------------
 //
-void CMusApplicationManager::CallProviderL(TDes8& aProvider)
-    {
-    MUS_LOG( "mus: [MUSSRV] -> CMusApplicationManager::CallProviderL");
-    const TInt KMusMgrMaxPluginNameLen = 256; 
-    TBuf<KMusMgrMaxPluginNameLen> pluginName;
-    
-    User::LeaveIfError(RProperty::Get( 
-                                NMusSessionInformationApi::KCategoryUid,
-                                NMusSessionInformationApi::KMUSCallProvider,
-                                pluginName ));
-    User::LeaveIfError( 
-            CnvUtfConverter::ConvertFromUnicodeToUtf8( aProvider, pluginName ));
-    
-    MUS_LOG( "mus: [MUSSRV] <- CMusApplicationManager::CallProviderL");
-    }
-
-// -----------------------------------------------------------------------------
-// Resolves name of the ecom plugin which implements the livecomms engine api
-// by using the callprovider
 // -----------------------------------------------------------------------------
 //
-void CMusApplicationManager::ResolvePluginNameL(TDes8& aPluginName)
+TApaTask CMusApplicationManager::GetApaTask() 
     {
-    MUS_LOG( "mus: [MUSSRV] -> CMusApplicationManager::ResolvePluginNameL");
-    
-    TBuf8<RProperty::KMaxPropertySize> providerName ;
-
-    // Read the call provider name 
-    CallProviderL( providerName );
-
-    RImplInfoPtrArray pluginArray;
-    MusCleanupResetAndDestroy<RImplInfoPtrArray>::PushL( pluginArray );
-
-    TEComResolverParams resolverParams;
-    
-    resolverParams.SetDataType ( providerName );
-    resolverParams.SetWildcardMatch (ETrue);
-    
-    // Use default plugin even if listing fails
-    TRAPD( err, 
-       REComSession::ListImplementationsL(KLcEngineInterfaceUid, resolverParams, pluginArray) );
-    MUS_LOG1( "mus: [MUSSRV]    List implementations compl:%d", err );
-    if ( err == KErrNoMemory )
-        {
-        User::Leave( err );
-        }
-    
-    if( pluginArray.Count() > 0 )
-        {
-        CImplementationInformation* info = pluginArray[ 0 ];
-        __ASSERT_ALWAYS( aPluginName.MaxLength() >= info->DataType().Length(), 
-                         User::Leave( KErrArgument ) );
-        aPluginName.Copy( info->DataType() );
-        }
-    else
-        {
-        __ASSERT_ALWAYS( aPluginName.MaxLength() >= KDefaultEngineName().Length(), 
-                                 User::Leave( KErrArgument ) );
-        aPluginName.Copy( KDefaultEngineName() );
-        }
-    CleanupStack::PopAndDestroy();//pluginArray
-    MUS_LOG( "mus: [MUSSRV] <- CMusApplicationManager::ResolvePluginNameL");
+    MUS_LOG( "mus: [MUSSRV] <> CMusApplicationManager::GetApaTask()" );
+    TUid appUid;
+    appUid.iUid = KMusUiUid;
+    return TApaTaskList( iWsSession ).FindApp( appUid );
     }
-
-// -----------------------------------------------------------------------------
-// Creates command line used when starting application.
-// -----------------------------------------------------------------------------
-//
-HBufC* CMusApplicationManager::CreateCommandLineArgsLC()
-    {
-    MUS_LOG( "mus: [MUSSRV] -> CMusApplicationManager::CreateCommandLineLC");
-    
-    TBuf8<KMusMgrMaxPluginNameLen> pluginNameUtf8;
-    ResolvePluginNameL( pluginNameUtf8 );
-    
-    MUS_LOG_TDESC8( "mus: [MUSSRV]     Plugin name:", pluginNameUtf8 );
-    
-    HBufC* commandLineArgs = HBufC::NewLC( KMusMgrMaxPluginNameLen );
-    TPtr commandLineArgsPtr( commandLineArgs->Des() );
-    User::LeaveIfError( 
-        CnvUtfConverter::ConvertToUnicodeFromUtf8( 
-            commandLineArgsPtr, pluginNameUtf8 ) );
-    
-    MUS_LOG_TDESC( "mus: [MUSSRV] <- command line args:", commandLineArgsPtr );
-    
-    return commandLineArgs;
-    }
-
-// End of File
--- a/mmsharing/mmshmanagersrv/src/musavailabilitypluginmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/src/musavailabilitypluginmanager.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -33,10 +33,6 @@
 
 // CONSTANTS
 
-// Max number of digits in unsigned 32 bit integer (TInt32)
-const TUint KMaxInt32Length = 16;
-
-
 using namespace MultimediaSharing;
 
 // -----------------------------------------------------------------------------
@@ -179,21 +175,6 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CMusAvailabilityPluginManager::PrepareForReceivedInviteL()
-    {
-    MUS_LOG( "mus: [MUSSRV]  -> CMusAvailabilityPluginManager::\
-                 PrepareForReceivedInviteL()" )
-                 
-    iPlugin->PrepareForReceivedInviteL();
-    
-    MUS_LOG( "mus: [MUSSRV]  <- CMusAvailabilityPluginManager::\
-                     PrepareForReceivedInviteL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
 void CMusAvailabilityPluginManager::InvitationReceivedL()
     {
     MUS_LOG( "mus: [MUSSRV]  -> CMusAvailabilityPluginManager::\
@@ -287,34 +268,10 @@
   	MMusAvaSettings& settings = iPlugin->Settings();
   	
     MUS_LOG( "mus: [MUSSRV]    Status available" )
-    if( !iIndicator )
-        {
-        MUS_LOG( "mus: [MUSSRV]    Create indicator" )
-        iIndicator = CMusIndicatorApi::NewL( *this );
-        if( iIndicator->ConfirmationQueryL( CMusIndicatorApi::EVsRoamingActivationQuery ) )
-        	{
-        	settings.SetManualActivation( MMusAvaSettings::EActivationAllowed );
-        	iPlugin->StartL();
-        	}
-        else
-        	{
-        	settings.SetManualActivation( MMusAvaSettings::EActivationNotAllowed );
-        	}
-        delete iIndicator;
-        iIndicator = NULL;
-        }
-     else
-     	{
-     	if( iIndicator->ConfirmationQueryL( CMusIndicatorApi::EVsRoamingActivationQuery ) )
-        	{
-        	settings.SetManualActivation( MMusAvaSettings::EActivationAllowed );
-        	iPlugin->StartL();
-        	}
-        else
-        	{
-        	settings.SetManualActivation( MMusAvaSettings::EActivationNotAllowed );	
-        	}	
-     	}
+    
+    settings.SetManualActivation( MMusAvaSettings::EActivationAllowed );
+    iPlugin->StartL();
+
     MUS_LOG( "mus: [MUSSRV]  <- CMusAvailabilityPluginManager::\
         ManualQueryL()" )  
     }
@@ -349,6 +306,21 @@
         AvailabilityChanged()" )	
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+ void CMusAvailabilityPluginManager::AvailabilitiesAbleToShowIndicator()
+	{
+	    TInt err = 0;
+		TRAP( err, IndicateAvailabilityL() );
+		if ( err )
+			{
+			// Not sure about what to do. Very rare situation.
+			MUS_LOG1( "mus: [MUSSRV] AvailabilitiesAbleToShowIndicator() leave code: %d",err )
+			}
+	}
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -378,7 +350,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// From MMusAvaSettingsObserver
+//
 // -----------------------------------------------------------------------------
 //
 MMusAvaSettingsObserver::TApplicationState CMusAvailabilityPluginManager::
@@ -402,7 +374,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// From MMusAvaSettingsObserver
+//
 // -----------------------------------------------------------------------------
 //
 TBool CMusAvailabilityPluginManager::OptionAllowed()
@@ -417,23 +389,13 @@
     }
 
 // -----------------------------------------------------------------------------
-// From MMusAvaSettingsObserver
-// -----------------------------------------------------------------------------
-//
-void CMusAvailabilityPluginManager::StartApplicationL( 
-        MultimediaSharing::TMusUseCase aUseCase )
-    {
-    iObserver.StartSharingWithUseCaseL( aUseCase );        
-    }
-
-// -----------------------------------------------------------------------------
 // From MMusIndicatorObserver.
 // Starts live video sharing.
 // -----------------------------------------------------------------------------
 //
 void CMusAvailabilityPluginManager::StartLiveSharingL()
     {
-    iObserver.StartSharingWithUseCaseL( MultimediaSharing::EMusLiveVideo );
+    iObserver.StartLiveSharingL();
     }
 
 // -----------------------------------------------------------------------------
@@ -613,17 +575,22 @@
     // append sip address proposal
     iSessionParameters->AppendL( settings.SipAddressProposal() );
 
-    TBuf<KMaxInt32Length> contactIdBuf;
+    // Unsafe Magic number 16 is used but unsigned 32 bit integer (TInt32)
+    // can't go beyond 16 digits .
+    TBuf<16> contactIdBuf;
     contactIdBuf.Num( settings.ContactId() );
 
     // append contact id
     iSessionParameters->AppendL( contactIdBuf );
+    
     // append video codec
     HBufC* videoCodecs = VideoCodecsLC();
     iSessionParameters->AppendL( *videoCodecs );
     CleanupStack::PopAndDestroy( videoCodecs );
 
-    TBuf<KMaxInt32Length> sipProfileIdBuf;
+    // Unsafe Magic number 16 is used but unsigned 32 bit integer (TInt32)
+    // can't go beyond 16 digits .
+    TBuf<16> sipProfileIdBuf;
     sipProfileIdBuf.Num( settings.SipProfileId() );
 
     MUS_LOG1("iSessionParameters -> SIP Profile ID = %d ",
@@ -635,15 +602,15 @@
     HBufC* contactName = ContactNameLC();
     iSessionParameters->AppendL( *contactName );
     CleanupStack::PopAndDestroy( contactName );
+    
+    // append call privacy indication
+    MUS_LOG1("iSessionParameters -> Call Privacy = %d ",
+            settings.CallPrivacy() )
+    TBuf<16> callPrivacy;
+    callPrivacy.Num( settings.CallPrivacy() );
+    iSessionParameters->AppendL( callPrivacy );
 
-    TBuf<KMaxInt32Length> fastModeBuf;
-    fastModeBuf.Num( settings.FastMode() );
-    MUS_LOG1("iSessionParameters -> fast mode = %d ",
-        settings.FastMode() )
 
-    // append fast mode
-    iSessionParameters->AppendL( fastModeBuf );
-    
     MUS_LOG( "mus: [MUSSRV]  <- CMusAvailabilityPluginManager::\
              UpdateSessionParametersL()" )
     }
@@ -795,8 +762,8 @@
             {
             MUS_LOG( "mus: [MUSSRV]    Create indicator" )
             iIndicator = CMusIndicatorApi::NewL( *this );
-            iIndicator->IndicateAvailabilityL();
             }
+        iIndicator->IndicateAvailabilityL();
         iApplicationManager.SetIndicatorStatusL( ETrue );
         }
     else
--- a/mmsharing/mmshmanagersrv/src/musmanagerserverclosetimer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/src/musmanagerserverclosetimer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -101,6 +101,18 @@
 	CActiveScheduler::Stop();
     }
 
+// -------------------------------------------------------------------------
+//  If RunL() leaves,It should be handled here.
+// -------------------------------------------------------------------------
+//
+TInt CMusManagerServerCloseTimer::RunError( TInt aError )
+    {
+    // Nothing can be done here.
+    aError = KErrNone;
+
+    return aError;
+    }
+
 // ----------------------------------------------------------------------------
 // CMusManagerServerCloseTimer::DoCancel
 // ----------------------------------------------------------------------------
--- a/mmsharing/mmshmanagersrv/src/musmanagerservercore.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/src/musmanagerservercore.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -25,13 +25,10 @@
 #include "muslogger.h"
 #include "musmanagerservercoreobserver.h"
 #include "musmanager.h"
-#include "musmanagerservercommon.h"
 
 using namespace MultimediaSharing;
 
 // CONSTANTS
-_LIT8( KMusEngineName, "MultimediaSharing" );
-
 
 // -----------------------------------------------------------------------------
 // CMusManagerServerCore::NewL
@@ -84,8 +81,6 @@
     
     iApplicationManager = CMusApplicationManager::NewL();
     
-    iApplicationManager->ResolvePluginNameL( iPluginName );
-    
     iPluginManager = CMusAvailabilityPluginManager::NewL( *this, *iApplicationManager );
 
     MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::ConstructL" );
@@ -120,7 +115,7 @@
     {
     MUS_LOG( "mus: [MUSSRV]  -> CMusManagerServerCore::AvailabilityQueryL" );
     MultimediaSharing::TMusAvailabilityStatus status
-            = Availability();
+            = iPluginManager->Availability();
    
     MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::AvailabilityQueryL" );
     return status;
@@ -132,8 +127,7 @@
 void CMusManagerServerCore::CommandL( MultimediaSharing::TCommandType aCommandType )
     {
     MUS_LOG( "mus: [MUSSRV]  -> CMusManagerServerCore::CommandL" );
-     if ( aCommandType == MultimediaSharing::ECommandManualActivation &&
-          IsMusEnginePlugin() )
+     if ( aCommandType == MultimediaSharing::ECommandManualActivation )
 		{
 		MUS_LOG( "mus: [MUSSRV]    Manual Activation is started" )
 		iPluginManager->ManualQueryL();
@@ -148,10 +142,7 @@
 void CMusManagerServerCore::InvestigateAvailabilityL()
     {
     MUS_LOG( "mus: [MUSSRV]  -> CMusManagerServerCore::InvestigateAvailabilityL" );
-    if ( IsMusEnginePlugin() )
-        {
-        iPluginManager->InvestigateAvailabilityL();
-        }
+    iPluginManager->InvestigateAvailabilityL();
     MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::InvestigateAvailabilityL" );
     }
 
@@ -166,41 +157,23 @@
     TInt uid = aChannelId.iUid;
 
     if( uid == CMusManager::ESipInviteDesired &&
-        ApplicationAllowed() )
-        {        
-        PrepareForReceivedInviteL();
-        
+        iPluginManager->ApplicationAllowed() )
+        {
         // write session boundary values
-        WriteSessionPropertiesL(
-                MultimediaSharing::EMusReceive,
-                Availability(),
-                iPluginManager->SessionParametersL() );
+        iApplicationManager->WriteSessionPropertiesL(
+                                    MultimediaSharing::EMusReceive,
+                                    iPluginManager->Availability(),
+                                    iPluginManager->SessionParametersL() );
 
         iApplicationManager->StartApplicationL();
         }
-    else if( uid == CMusManager::ESipInviteDesired2WayVideo &&
-            ApplicationAllowed() )
+    else if( uid == CMusManager::ESipInviteNotDesired )
         {
-        PrepareForReceivedInviteL();
-        
-        // write session boundary values
-        WriteSessionPropertiesL(
-                MultimediaSharing::EMusReceiveTwoWayVideo,
-                Availability(),
-                iPluginManager->SessionParametersL() );
-
-        iApplicationManager->StartApplicationL();
+        iPluginManager->InvitationReceivedL();
         }
-    else if ( IsMusEnginePlugin() )
+    else
         {
-        if( uid == CMusManager::ESipInviteNotDesired )
-            {
-            iPluginManager->InvitationReceivedL();
-            }
-        else
-            {
-            User::Leave( KErrNotReady );
-            }
+        User::Leave( KErrNotReady );
         }
 
     MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::InvitationReceivedL" );
@@ -213,10 +186,7 @@
 void CMusManagerServerCore::OptionsReceivedL( TUid /*aChannelId*/ )
     {
     MUS_LOG( "mus: [MUSSRV]  -> CMusManagerServerCore::OptionsReceivedL" );
-    if ( IsMusEnginePlugin() )
-        {
-        iPluginManager->OptionsReceivedL();    
-        }    
+    iPluginManager->OptionsReceivedL();
     MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::OptionsReceivedL" );
     }
 
@@ -228,13 +198,13 @@
     {
     MUS_LOG( "mus: [MUSSRV]  -> CMusManagerServerCore::StartMultimediaSharingL" );
     if( !iApplicationManager->ApplicationRunning() &&
-        ApplicationAllowed() )
+        iPluginManager->ApplicationAllowed() )
         {
         // write session boundary values
-        WriteSessionPropertiesL(
-                aUseCase,
-                Availability(),
-                iPluginManager->SessionParametersL() );
+        iApplicationManager->WriteSessionPropertiesL(
+                                aUseCase,
+                                iPluginManager->Availability(),
+                                iPluginManager->SessionParametersL() );
 
         // start actual application
         iApplicationManager->StartApplicationL();
@@ -264,13 +234,10 @@
 void CMusManagerServerCore::EventNoSessions()
     {
     MUS_LOG( "mus: [MUSSRV]  -> CMusManagerServerCore::EventNoSessions" );
-    if ( IsMusEnginePlugin() ) 
+    TRAPD( error, iPluginManager->StopPluginL() );
+    if( error )
         {
-        TRAPD( error, iPluginManager->StopPluginL() );
-        if( error )
-            {
-            // iObserver.StopServer();
-            }        
+        // iObserver.StopServer();
         }
     iObserver.StopServer();
     MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::EventNoSessions" );
@@ -299,18 +266,11 @@
     {
     MUS_LOG1( "mus: [MUSSRV]  -> CMusManagerServerCore::AvailabilityChangedL( %d )",
               aAvailability );
-    
-    if ( !IsMusEnginePlugin() )
-        {
-        MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::AvailabilityChangedL - \
-                non-MuS plugin");
-        return;
-        }
     // inform ui via application manager (via session api)
 
-    WriteSessionPropertiesL(
-            aAvailability,
-            iPluginManager->SessionParametersL() );
+    iApplicationManager->WriteSessionPropertiesL(
+                            aAvailability,
+                            iPluginManager->SessionParametersL() );
     
     if( iAvailabilityMonitors.Count() )
     	{	
@@ -377,15 +337,9 @@
 // Starts live video sharing.
 // -----------------------------------------------------------------------------
 //
-void CMusManagerServerCore::StartSharingWithUseCaseL( 
-    MultimediaSharing::TMusUseCase aUseCase )
+void CMusManagerServerCore::StartLiveSharingL()
     {
-    MUS_LOG1( "mus: [MUSSRV]  -> CMusManagerServerCore::StartSharingWithUseCaseL:%d", 
-              aUseCase );
-    
-    StartMultimediaSharingL( aUseCase );
-    
-    MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::StartSharingWithUseCaseL" );
+    StartMultimediaSharingL( MultimediaSharing::EMusLiveVideo );
     }
 
 // -----------------------------------------------------------------------------
@@ -403,99 +357,4 @@
         }			
     }
 
-// -----------------------------------------------------------------------------
-// CMusManagerServerCore::IsMusEnginePlugin
-// -----------------------------------------------------------------------------
-//
-TBool CMusManagerServerCore::IsMusEnginePlugin()
-    {
-    TBool isMus( EFalse );    
-    if ( !iPluginName.Compare( KMusEngineName ) )
-        {
-        isMus = ETrue;
-        }
-    return isMus;
-    }
-
-// -----------------------------------------------------------------------------
-// CMusManagerServerCore::Availability
-// -----------------------------------------------------------------------------
-//
-MultimediaSharing::TMusAvailabilityStatus CMusManagerServerCore::Availability()
-    {
-    MUS_LOG( "mus: [MUSSRV]  -> CMusManagerServerCore::Availability" );
-    if ( IsMusEnginePlugin() ) 
-        {
-        MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::Availability - MuS plugin" );
-        return iPluginManager->Availability();
-        }
-    else
-        {
-        MUS_LOG( "mus: [MUSSRV]  <- CMusManagerServerCore::Availability - non-MuS plugin" );
-        return EMultimediaSharingAvailable;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMusManagerServerCore::ApplicationAllowed
-// -----------------------------------------------------------------------------
-//
-TBool CMusManagerServerCore::ApplicationAllowed()
-    {
-    if ( IsMusEnginePlugin() )
-        {
-        return iPluginManager->ApplicationAllowed();
-        }
-    else
-        {
-        return ETrue;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMusManagerServerCore::PrepareForReceivedInviteL
-// -----------------------------------------------------------------------------
-//
-void CMusManagerServerCore::PrepareForReceivedInviteL()
-    {
-    if ( IsMusEnginePlugin() )
-        {
-        iPluginManager->PrepareForReceivedInviteL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMusManagerServerCore::WriteSessionPropertiesL
-// -----------------------------------------------------------------------------
-//
-void CMusManagerServerCore::WriteSessionPropertiesL(
-        MultimediaSharing::TMusUseCase aUseCase,
-        MultimediaSharing::TMusAvailabilityStatus aStatus,
-        MDesCArray& aSessionParameters )
-    {
-    if ( IsMusEnginePlugin() )
-        {
-        iApplicationManager->WriteSessionPropertiesL(
-                                    aUseCase,
-                                    aStatus,
-                                    aSessionParameters );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMusManagerServerCore::WriteSessionPropertiesL
-// -----------------------------------------------------------------------------
-//
-void CMusManagerServerCore::WriteSessionPropertiesL(
-        MultimediaSharing::TMusAvailabilityStatus aStatus,
-        MDesCArray& aSessionParameters )
-    {
-    if ( IsMusEnginePlugin() )
-        {
-        iApplicationManager->WriteSessionPropertiesL(
-                                    aStatus,
-                                    aSessionParameters );
-        }
-    }
-
 //  End of File  
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/BWINS/ut_musmanagerserveru.def	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/BWINS/ut_musmanagerserveru.def	Wed Sep 01 12:31:01 2010 +0100
@@ -1,3 +1,36 @@
 EXPORTS
-	?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * CreateTestSuiteL(void)
+	?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * __cdecl CreateTestSuiteL(void)
+	?KillTask@TApaTask@@QAEXXZ @ 2 NONAME ; void TApaTask::KillTask(void)
+	?Complete@RMessagePtr2@@QBEXH@Z @ 3 NONAME ; void RMessagePtr2::Complete(int) const
+	?FindApp@TApaTaskList@@QAE?AVTApaTask@@VTUid@@@Z @ 4 NONAME ; class TApaTask TApaTaskList::FindApp(class TUid)
+	?ReStart@CServer2@@QAEXXZ @ 5 NONAME ; void CServer2::ReStart(void)
+	?ListImplementationsL@REComSession@@SAXVTUid@@AAV?$RPointerArray@VCImplementationInformation@@@@@Z @ 6 NONAME ; void REComSession::ListImplementationsL(class TUid, class RPointerArray<class CImplementationInformation> &)
+	?Connect@RApaLsSession@@QAEHXZ @ 7 NONAME ; int RApaLsSession::Connect(void)
+	?StartDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 8 NONAME ; int RApaLsSession::StartDocument(class TDesC16 const &, class TUid, class TThreadId &, enum RApaLsSession::TLaunchType)
+	?Client@RMessagePtr2@@QBEHAAVRThread@@W4TOwnerType@@@Z @ 9 NONAME ; int RMessagePtr2::Client(class RThread &, enum TOwnerType) const
+	?Exists@TApaTask@@QAEHXZ @ 10 NONAME ; int TApaTask::Exists(void)
+	?NewLC@CApaCommandLine@@SAPAV1@XZ @ 11 NONAME ; class CApaCommandLine * CApaCommandLine::NewLC(void)
+	??0TApaTask@@QAE@AAVRWsSession@@@Z @ 12 NONAME ; TApaTask::TApaTask(class RWsSession &)
+	?DestroyedImplementation@REComSession@@SAXVTUid@@@Z @ 13 NONAME ; void REComSession::DestroyedImplementation(class TUid)
+	?GetAppInfo@RApaLsSession@@QBEHAAVTApaAppInfo@@VTUid@@@Z @ 14 NONAME ; int RApaLsSession::GetAppInfo(class TApaAppInfo &, class TUid) const
+	?CreateImplementationL@REComSession@@SAPAXVTUid@@J@Z @ 15 NONAME ; void * REComSession::CreateImplementationL(class TUid, long)
+	?Install@CActiveScheduler@@SAXPAV1@@Z @ 16 NONAME ; void CActiveScheduler::Install(class CActiveScheduler *)
+	??0RApaLsSession@@QAE@XZ @ 17 NONAME ; RApaLsSession::RApaLsSession(void)
+	?FindApp@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 18 NONAME ; class TApaTask TApaTaskList::FindApp(class TDesC16 const &)
+	?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@@Z @ 19 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &, class TThreadId &)
+	?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 20 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &, class TThreadId &, class TRequestStatus *)
+	??0TApaTaskList@@QAE@AAVRWsSession@@@Z @ 21 NONAME ; TApaTaskList::TApaTaskList(class RWsSession &)
+	?FindDoc@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 22 NONAME ; class TApaTask TApaTaskList::FindDoc(class TDesC16 const &)
+	?SetExecutableNameL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 23 NONAME ; void CApaCommandLine::SetExecutableNameL(class TDesC16 const &)
+	?RequestComplete@RThread@@QBEXAAPAVTRequestStatus@@H@Z @ 24 NONAME ; void RThread::RequestComplete(class TRequestStatus * &, int) const
+	?Version@RApaLsSession@@QBE?AVTVersion@@XZ @ 25 NONAME ; class TVersion RApaLsSession::Version(void) const
+	?BringToForeground@TApaTask@@QAEXXZ @ 26 NONAME ; void TApaTask::BringToForeground(void)
+	?EndTask@TApaTask@@QAEXXZ @ 27 NONAME ; void TApaTask::EndTask(void)
+	?SendToBackground@TApaTask@@QAEXXZ @ 28 NONAME ; void TApaTask::SendToBackground(void)
+	?WriteL@RMessagePtr2@@QBEXHABVTDesC8@@H@Z @ 29 NONAME ; void RMessagePtr2::WriteL(int, class TDesC8 const &, int) const
+	?ReadL@RMessagePtr2@@QBEXHAAVTDes8@@H@Z @ 30 NONAME ; void RMessagePtr2::ReadL(int, class TDes8 &, int) const
+	?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@@Z @ 31 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &)
+	?GetDesMaxLength@RMessagePtr2@@QBEHH@Z @ 32 NONAME ; int RMessagePtr2::GetDesMaxLength(int) const
+	?FindByPos@TApaTaskList@@QAE?AVTApaTask@@H@Z @ 33 NONAME ; class TApaTask TApaTaskList::FindByPos(int)
+	?Close@RApaLsSession@@QAEXXZ @ 34 NONAME ; void RApaLsSession::Close(void)
 
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/EABI/ut_musmanagerserveru.def	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/EABI/ut_musmanagerserveru.def	Wed Sep 01 12:31:01 2010 +0100
@@ -1,4 +1,19 @@
 EXPORTS
 	_Z16CreateTestSuiteLv @ 1 NONAME
+	_ZTI16CMusAvaSettings2 @ 2 NONAME ; #<TI>#
+	_ZTI17CMusAvaInterface2 @ 3 NONAME ; #<TI>#
+	_ZTI17CMusManagerServer @ 4 NONAME ; #<TI>#
+	_ZTI21CMusManagerServerCore @ 5 NONAME ; #<TI>#
+	_ZTI22CMusApplicationManager @ 6 NONAME ; #<TI>#
+	_ZTI24CMusManagerServerSession @ 7 NONAME ; #<TI>#
+	_ZTI27CMusManagerServerCloseTimer @ 8 NONAME ; #<TI>#
+	_ZTI29CMusAvailabilityPluginManager @ 9 NONAME ; #<TI>#
+	_ZTV16CMusAvaSettings2 @ 10 NONAME ; #<VT>#
+	_ZTV17CMusAvaInterface2 @ 11 NONAME ; #<VT>#
+	_ZTV17CMusManagerServer @ 12 NONAME ; #<VT>#
+	_ZTV21CMusManagerServerCore @ 13 NONAME ; #<VT>#
+	_ZTV22CMusApplicationManager @ 14 NONAME ; #<VT>#
+	_ZTV24CMusManagerServerSession @ 15 NONAME ; #<VT>#
+	_ZTV27CMusManagerServerCloseTimer @ 16 NONAME ; #<VT>#
+	_ZTV29CMusAvailabilityPluginManager @ 17 NONAME ; #<VT>#
 
-
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -15,6 +15,6 @@
 *
 */
 
-PRJ_MMPFILES
-../../../../mmshindicator/group/musindicator.mmp
+
+PRJ_TESTMMPFILES
 ut_musmanagerserver.mmp
\ No newline at end of file
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group/ut_musmanagerserver.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group/ut_musmanagerserver.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -17,7 +17,7 @@
 
 
 #include <platform_paths.hrh>
-#include <eunitcaps.h>
+#include<eunitcaps.h>
 
 TARGET                  ut_musmanagerserver.dll
 TARGETTYPE              dll
@@ -25,7 +25,7 @@
 TARGETPATH              /DigiaEUnit/Tests
 UID                     0x1000af5a 0x01700000
 
-CAPABILITY              EUNIT_CAPS
+CAPABILITY      EUNIT_CAPS
 VENDORID                VID_DEFAULT
 
 MACRO                   UNIT_TESTING
@@ -33,8 +33,10 @@
 SOURCEPATH              ../../../../../tsrc/propertystub/src
 SOURCE                  e32property.cpp
 
-SOURCEPATH              ../../../../../tsrc/multimediasharingsettingsstub/src
-SOURCE                  mussettings.cpp
+SOURCEPATH              ../../../../../tsrc/apastub/src
+SOURCE                  apgtask.cpp
+SOURCE                  apgcli.cpp
+SOURCE                  apacmdln.cpp
 
 SOURCEPATH              ../../../../../tsrc/mmusavasettingsstub/src
 SOURCE                  mmusavasettingsstub.cpp
@@ -50,10 +52,9 @@
 
 
 SOURCEPATH              ../../../../mmshavailability/src
-SOURCE					musavasettingsimp.cpp
+SOURCE 					        musavasettingsimp.cpp
 
 SOURCEPATH              ../src
-SOURCE                  stubs.cpp
 SOURCE                  ut_cmusapplicationmanager.cpp
 SOURCE                  ut_cmusavailabilitypluginmanager.cpp
 SOURCE                  ut_cmusmanagerserverclosetimer.cpp
@@ -72,7 +73,6 @@
 SOURCE                  musmanagerservermain.cpp
 SOURCE                  musmanagerserversession.cpp
 
-USERINCLUDE				../../../../../tsrc/multimediasharingsettingsstub/inc
 USERINCLUDE             ../inc
 USERINCLUDE             ../../../../mmshavailability/inc
 USERINCLUDE             ../../../inc
@@ -101,5 +101,4 @@
 LIBRARY                 ws32.lib
 LIBRARY                 flogger.lib
 LIBRARY                 bafl.lib
-LIBRARY					charconv.lib
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group/ut_musmanagerserver.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHMgrSRV"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_musmanagerserver.dll"-"c:\sys\bin\ut_musmanagerserver.dll"
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusapplicationmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusapplicationmanager.h	Wed Sep 01 12:31:01 2010 +0100
@@ -75,11 +75,9 @@
     void UT_CMusApplicationManager_WriteSessionPropertiesL();
     void UT_CMusApplicationManager_SetPropertyLL();
     void UT_CMusApplicationManager_SetPropertyL2L();
+    void UT_CMusApplicationManager_GetApaTaskL();
     void UT_CMusApplicationManager_MapAvailabilitiesL();
     void UT_CMusApplicationManager_SetStatusLL();
-    void UT_CMusApplicationManager_CallProviderLL();
-    void UT_CMusApplicationManager_ResolvePluginNameLL();
-    void UT_CMusApplicationManager_CreateCommandLineArgsLCL();
 
 private: // data
 
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusavailabilitypluginmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusavailabilitypluginmanager.h	Wed Sep 01 12:31:01 2010 +0100
@@ -77,7 +77,7 @@
      *     
      * @since S60 v3.2
      */
-    virtual void StartSharingWithUseCaseL( MultimediaSharing::TMusUseCase aUseCase );
+    virtual void StartLiveSharingL();
 
 private:
 
@@ -115,7 +115,6 @@
     void UT_CMusAvailabilityPluginManager_TelNumberLCL();
     void UT_CMusAvailabilityPluginManager_ContactNameLCL();
     void UT_CMusAvailabilityPluginManager_IndicateAvailabilityLL();
-    void UT_CMusAvailabilityPluginManager_PrepareForReceivedInviteLL();
 
 private: // data
 
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusmanagerservercore.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/inc/ut_cmusmanagerservercore.h	Wed Sep 01 12:31:01 2010 +0100
@@ -109,7 +109,6 @@
     void UT_CMusManagerServerCore_AvailabilityChangedLL();
     void UT_CMusManagerServerCore_MonitorAvailabilityLL();
     void UT_CMusManagerServerCore_RegisterObserverL();
-    void UT_CMusManagerServerCore_IsMusEnginePluginL();
 
 
 private: // data
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusApplicationManager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusApplicationManager.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -24,8 +24,6 @@
 #include "musmanagerservercommon.h"
 #include "mussessionproperties.h"
 #include "mustesthelp.h"
-#include "mussettings.h"
-#include "mussesseioninformationapi.h"
 #include <apgcli.h>
 #include <apgtask.h>
 #include <e32std.h>
@@ -94,8 +92,7 @@
     {
     delete iManager;
     iManager = NULL;
-    PropertyHelper::Close();
-    Dll::FreeTls(); // Used by the RProcess and TFindProcess stubs
+    PropertyHelper::Close(); 
     }
 
 
@@ -109,11 +106,7 @@
 void UT_CMusApplicationManager::UT_CMusApplicationManager_NewLL()
     {
     EUNIT_ASSERT( iManager );
-    TInt fastMode;
-    User::LeaveIfError( RProperty::Get( NMusSessionApi::KCategoryUid, 
-                                        NMusSessionApi::KFastMode, 
-                                        fastMode ) );
-    EUNIT_ASSERT_EQUALS( TInt( MusSettingsKeys::EFastModeOff ), fastMode );
+    EUNIT_ASSERT( iManager->iApaSession.iConnected );
     }
 
 
@@ -125,6 +118,7 @@
     {
     CMusApplicationManager* manager = CMusApplicationManager::NewLC();
     EUNIT_ASSERT( manager );
+    EUNIT_ASSERT( manager->iApaSession.iConnected );
     CleanupStack::PopAndDestroy( manager );
     }
 
@@ -135,10 +129,12 @@
 //
 void UT_CMusApplicationManager::UT_CMusApplicationManager_ApplicationRunningL()
     {
-    EUNIT_ASSERT( !iManager->ApplicationRunning() )
-   
-    iManager->StartApplicationL();
-    EUNIT_ASSERT( iManager->ApplicationRunning() )
+    TApaTask::iApplicationExist = EFalse;
+    EUNIT_ASSERT( !iManager->ApplicationRunning() );
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EExists )
+    TApaTask::iApplicationExist = ETrue;
+    EUNIT_ASSERT( iManager->ApplicationRunning() );
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EExists )
     }
 
 
@@ -149,13 +145,15 @@
 //
 void UT_CMusApplicationManager::UT_CMusApplicationManager_StartApplicationLL()
     {
-    EUNIT_ASSERT( !iManager->ApplicationRunning() )
+    TApaTask::iApplicationExist = EFalse;
     iManager->StartApplicationL();
-    EUNIT_ASSERT_EQUALS( PropertyHelper::GetCalledFunction(), RProperty::EDefine )
-    EUNIT_ASSERT( iManager->ApplicationRunning() )
-    
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EExists )
+    EUNIT_ASSERT_EQUALS( PropertyHelper::GetCalledFunction(), RProperty::ENone ) 
+
+    TApaTask::iApplicationExist = ETrue;
     iManager->StartApplicationL();
-    EUNIT_ASSERT( iManager->ApplicationRunning() )
+    EUNIT_ASSERT_EQUALS( PropertyHelper::GetCalledFunction(), RProperty::ENone ) 
+
     }
 
 
@@ -166,17 +164,16 @@
 //
 void UT_CMusApplicationManager::UT_CMusApplicationManager_StopApplicationLL()
     {
-    // MuS not running
-    iManager->StopApplicationL(); 
+    TApaTask::iApplicationExist = EFalse;
+    iManager->StopApplicationL();
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EExists )    
     
-    // MuS running
-    User::LeaveIfError( 
-        Dll::SetTls( reinterpret_cast< TAny* >( 1 ) ) );     
-    // TLS is used by TFindProcess stub
+    
+    TApaTask::iApplicationExist = ETrue;
     iManager->StopApplicationL();
     TInt availability = MultimediaSharing::EMultimediaSharingAvailable;
-    TUint key( NMusSessionApi::KStatus );
-    RProperty::Get( key, availability );
+    TUint key(NMusSessionApi::KStatus);
+    RProperty::Get( key,availability);
     EUNIT_ASSERT_EQUALS( PropertyHelper::GetCalledFunction(), RProperty::EDefine ) 
     EUNIT_ASSERT_EQUALS( availability, 
                          MultimediaSharing::EMultimediaSharingNotAvailable )
@@ -184,11 +181,18 @@
 
 
 // ---------------------------------------------------------------------------
-//
+// Asserts that tested method calls TApaTask::Exists and if task exists it
+// calls TApaTask::BringToForeground.
 // ---------------------------------------------------------------------------
 //
 void UT_CMusApplicationManager::UT_CMusApplicationManager_ShowApplicationLL()
     {
+    TApaTask::iApplicationExist = EFalse;
+    iManager->ShowApplicationL();
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EExists )
+    TApaTask::iApplicationExist = ETrue;
+    iManager->ShowApplicationL();
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EBringToForeground )
     }
 
 
@@ -209,7 +213,7 @@
     array->AppendL( _L( "e" ) );
     array->AppendL( _L( "f" ) );
     array->AppendL( _L( "g" ) );
-    array->AppendL( _L( "0" ) ); //EFastModeOn
+    array->AppendL( _L( "h" ) );
 
     iManager->WriteSessionPropertiesL(
         MultimediaSharing::EMusLiveVideo,
@@ -225,40 +229,7 @@
             *array ), KErrGeneral );
 
     PropertyHelper::SetErrorCode(KErrNone);
-    
-    
 
-    MultimediaSharingSettings::iVideoDirection = MusSettingsKeys::ETwoWayVideo;
-    iManager->WriteSessionPropertiesL(
-            MultimediaSharing::EMusLiveVideo,
-            (MultimediaSharing::TMusAvailabilityStatus) KErrNone,
-            *array );
-
-    TInt val;
-    User::LeaveIfError( RProperty::Get( NMusSessionApi::KCategoryUid, 
-                                        NMusSessionApi::KUseCase, 
-                                        val ) );
-    
-    MultimediaSharing::TMusUseCase usecase = 
-                static_cast< MultimediaSharing::TMusUseCase >( val );
-    
-    EUNIT_ASSERT( usecase == MultimediaSharing::EMusTwoWayVideo );
-        
-    
-    //Ensure if fast mode key is "disabled", value from session params
-    //won't be published
-    User::LeaveIfError( RProperty::Set( NMusSessionApi::KCategoryUid, 
-                                        NMusSessionApi::KFastMode, 
-                                        MusSettingsKeys::EFastModeDisabled ) );
-    iManager->WriteSessionPropertiesL(
-            MultimediaSharing::EMusLiveVideo,
-            (MultimediaSharing::TMusAvailabilityStatus) KErrNone,
-            *array );
-    User::LeaveIfError( RProperty::Get( NMusSessionApi::KCategoryUid, 
-                                        NMusSessionApi::KFastMode, 
-                                        val ) );
-    EUNIT_ASSERT_EQUALS( TInt( MusSettingsKeys::EFastModeDisabled ), val );
-    
     CleanupStack::PopAndDestroy( array );
     }
 
@@ -305,6 +276,18 @@
 
 
 // ---------------------------------------------------------------------------
+// Asserts that TApaTaskList::FindApp is called by tested method.
+// ---------------------------------------------------------------------------
+//
+void UT_CMusApplicationManager::UT_CMusApplicationManager_GetApaTaskL()
+    {
+    TApaTask::iApplicationExist = EFalse;
+    iManager->GetApaTask();
+    EUNIT_ASSERT( TApaTaskList::iCalledFunction == TApaTaskList::EFindApp )
+    }
+
+
+// ---------------------------------------------------------------------------
 // Sets a videosharing status. Asserts that RProperty leaves are passed
 // correctly to user and RProperty::Define is called.
 // ---------------------------------------------------------------------------
@@ -323,114 +306,6 @@
     }
 
 
-// ---------------------------------------------------------------------------
-// CallProviderL Test
-// ---------------------------------------------------------------------------
-//
-void UT_CMusApplicationManager::UT_CMusApplicationManager_CallProviderLL()
-    {
-    TInt error = KErrNone;
-    
-    // Use Publish & Subscribe Keys to set CallProvider Name
-    _LIT( KProviderName1, "MultimediaSharing");
-    _LIT8( KProviderNameTest1, "MultimediaSharing");
-    
-    _LIT( KProviderNameEmpty1, "");
-    _LIT8( KProviderNameEmptyTest1, "");
-    
-    
-    // Valid Test:
-    TRAP( error, RProperty::Set(
-           NMusSessionInformationApi::KCategoryUid,
-           NMusSessionInformationApi::KMUSCallProvider,
-           KProviderName1 ));
-
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-    
-    TBuf8<RProperty::KMaxPropertySize> providerName ;
-    iManager->CallProviderL( providerName );
-    
-    EUNIT_ASSERT( providerName == KProviderNameTest1 );
-    
-
-    //Empty Test
-    TRAP( error, RProperty::Set(
-           NMusSessionInformationApi::KCategoryUid,
-           NMusSessionInformationApi::KMUSCallProvider,
-           KProviderNameEmpty1 ));
-
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-
-    iManager->CallProviderL( providerName );
-    
-    EUNIT_ASSERT( providerName == KProviderNameEmptyTest1 );
-    }
-
-
-// ---------------------------------------------------------------------------
-// ResolvePluginName Test
-// ---------------------------------------------------------------------------
-//
-void UT_CMusApplicationManager::UT_CMusApplicationManager_ResolvePluginNameLL()
-    {
-    // Default Engine Name to be returned
-    TInt error = KErrNone;
-    _LIT( KEngineName, "MultimediaSharing");
-    _LIT8( KEngineTestName, "MultimediaSharing");
-
-    // Test String for the Publish/Subscribe Keys.
-    _LIT( KProviderName, "MultimediaSharing");
-    _LIT( KProviderName1, "CS");
-  
-    TBuf8<RProperty::KMaxPropertySize> engineName ;
-
-    // Use Publish & Subscribe Keys to set Engine Name as 
-    // 1. MultimediaSharing  [Exact Name]
-    // 2. CS                 [No Match Found, Default MultiMediaSharing will be picked]
-
-    // 1. MultimediaSharing  [Exact Name]
-
-    TRAP( error, RProperty::Set(
-           NMusSessionInformationApi::KCategoryUid,
-           NMusSessionInformationApi::KMUSCallProvider,
-           KProviderName ));
-
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-    
-    iManager->ResolvePluginNameL( engineName );
-    EUNIT_ASSERT( engineName == KEngineTestName );
-  
-    // 2. CS [No Match Found, Default MultiMediaSharing will be picked]
-    TRAP( error, RProperty::Set(
-           NMusSessionInformationApi::KCategoryUid,
-           NMusSessionInformationApi::KMUSCallProvider,
-           KProviderName1 ));
-    
-    if ( error == KErrNoMemory ) User::Leave( error );
-    EUNIT_ASSERT ( error == KErrNone );
-
-    iManager->ResolvePluginNameL( engineName );
-    EUNIT_ASSERT( engineName == KEngineTestName );
-    }
-
-// ---------------------------------------------------------------------------
-// Command line arg test
-// ---------------------------------------------------------------------------
-//
-void UT_CMusApplicationManager::UT_CMusApplicationManager_CreateCommandLineArgsLCL()
-    {
-    _LIT( KEnginePluginName, "MultimediaSharing" );
-    HBufC* cmdLineArgs = iManager->CreateCommandLineArgsLC();
-    
-    EUNIT_ASSERT( cmdLineArgs != NULL )
-    EUNIT_ASSERT_EQUALS( KEnginePluginName(), *cmdLineArgs )
-    
-    CleanupStack::PopAndDestroy( cmdLineArgs );
-    }
-
 // ======== EUNIT TEST TABLE ========
 
 
@@ -503,31 +378,17 @@
     SetupL, UT_CMusApplicationManager_SetPropertyL2L, Teardown )
 
 EUNIT_TEST(
+    "GetApaTask - test ",
+    "CMusApplicationManager",
+    "GetApaTask",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusApplicationManager_GetApaTaskL, Teardown )
+
+EUNIT_TEST(
     "SetStatusL - test ",
     "CMusApplicationManager",
     "SetStatusL",
     "FUNCTIONALITY",
     SetupL, UT_CMusApplicationManager_SetStatusLL, Teardown )
 
-EUNIT_TEST(
-    "CallProviderL - test ",
-    "CMusApplicationManager",
-    "CallProviderL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusApplicationManager_CallProviderLL, Teardown )    
-    
-EUNIT_TEST(
-    "ResolvePluginNameL - test ",
-    "CMusApplicationManager",
-    "ResolvePluginNameL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusApplicationManager_ResolvePluginNameLL, Teardown ) 
-    
-EUNIT_TEST(
-    "CreateCommandLineLC - test ",
-    "CMusApplicationManager",
-    "CreateCommandLineLC",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusApplicationManager_CreateCommandLineArgsLCL, Teardown )  
-    
 EUNIT_END_TEST_TABLE
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusManagerServerCore.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusManagerServerCore.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -30,8 +30,6 @@
 #include <apgtask.h>
 #include <digia/eunit/eunitmacros.h>
 
-_LIT8( KMusEngineName, "MultimediaSharing" );
-_LIT8( KAnotherEngineName, "AnotherEngine" );
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -120,7 +118,8 @@
     iCore = CMusManagerServerCore::NewL( *this );
     iStopServerCalled = EFalse;
     iAvailabilityChangedLCalled = EFalse;
-    iSessionCount = 0;
+    iSessionCount = 0;    
+    TApaTask::iApaTaskCalledFunction = TApaTask::ENone;
     }
 
 
@@ -131,8 +130,7 @@
 void UT_CMusManagerServerCore::Teardown()
     {
     delete iCore;
-    PropertyHelper::Close();
-    Dll::FreeTls(); // Used by the RProcess and TFindProcess stubs 
+    PropertyHelper::Close(); 
     }
 
 
@@ -192,32 +190,17 @@
 //
 void UT_CMusManagerServerCore::UT_CMusManagerServerCore_InvitationReceivedLL()
     {
-    // 1. The cases with MuS engine
-    iCore->iPluginName = KMusEngineName;
-    
     TUid uid = { 0x10101010 }; // Not a valid UID in musmanager.h
     // since used UID is not in appropriate, this should leave
     EUNIT_ASSERT_SPECIFIC_LEAVE(
         iCore->InvitationReceivedL( uid ), KErrNotReady );
 
     uid.iUid = 0x1028238D; // ESipInviteNotDesired from musmanager.h
-    iCore->InvitationReceivedL( uid );
+    EUNIT_ASSERT_NO_LEAVE( iCore->InvitationReceivedL( uid ) );
 
     uid.iUid = 0x10282391; // ESipInviteDesired from musmanager.h
     EUNIT_ASSERT_SPECIFIC_LEAVE(
         iCore->InvitationReceivedL( uid ), KErrNotReady );
-
-    // 2. The cases with non-MuS engine
-    iCore->iPluginName = KAnotherEngineName;
-    
-    uid.iUid = 0x10101010; // Not a valid UID in musmanager.h
-    iCore->InvitationReceivedL( uid );
-
-    uid.iUid = 0x1028238D; // ESipInviteNotDesired from musmanager.h
-    iCore->InvitationReceivedL( uid );
-
-    uid.iUid = 0x10282391; // ESipInviteDesired from musmanager.h
-    iCore->InvitationReceivedL( uid );    
     }
 
 
@@ -228,22 +211,16 @@
 void UT_CMusManagerServerCore::UT_CMusManagerServerCore_OptionsReceivedLL()
     {
     TUid uid = { 0x10101010 };
-    iCore->iPluginName = KMusEngineName;
-    iCore->iPluginManager->iPluginStarted = EFalse;
     iCore->OptionsReceivedL( uid );
     EUNIT_ASSERT( iCore->iPluginManager->iPluginStarted );
-    
-    iCore->iPluginName = KAnotherEngineName;
-    iCore->iPluginManager->iPluginStarted = EFalse;
-    iCore->OptionsReceivedL( uid );
-    EUNIT_ASSERT ( !(iCore->iPluginManager->iPluginStarted) );
     }
 
 
 // ---------------------------------------------------------------------------
 // Asserts that tested method does not leave. In certain case it could leave
 // with KErrPermissionDenied, but with this this test, used capabilities
-// and used stubs, tested method shouldn't leave.
+// and used stubs, tested method shouldn't leave. Checks also that
+// TApaTask function TaskExists is called.
 // ---------------------------------------------------------------------------
 //
 void UT_CMusManagerServerCore::
@@ -264,6 +241,10 @@
     // Test for "if( !iApplicationManager->ApplicationRunning() &&
     // iPluginManager->ApplicationAllowed() ) branch ->
     // -----------------------------------------------------------------------
+	
+    // CMusApplicationManager::ApplicationRunning = EFalse
+    TApaTask::iApplicationExist = EFalse;
+
     // CMusAvailabilityPluginManager::ApplicationAllowed = ETrue
     abilityStub->iNameStub = MMusAvaObserver::EMusAvaNameRegistration;
     abilityStub->iStatusStub = MMusAvaObserver::EMusAvaStatusAvailable;
@@ -282,6 +263,7 @@
     MUS_EUNIT_ASSERT_NO_LEAVE(
         iCore->StartMultimediaSharingL( MultimediaSharing::EMusLiveVideo ) );
     EUNIT_ASSERT( PropertyHelper::GetCalledFunction() == RProperty::EDefine );
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EExists );
 
     // <- Test for "if( !iApplicationManager->ApplicationRunning() &&
     // iPluginManager->ApplicationAllowed() ) branch
@@ -297,8 +279,12 @@
 
 
     // CMusApplicationManager::ApplicationRunning = EFalse
+    TApaTask::iApplicationExist = EFalse;
     MUS_EUNIT_ASSERT_NO_LEAVE(
         iCore->StartMultimediaSharingL( MultimediaSharing::EMusLiveVideo ) );
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EExists );
+
+    // <- Test for else branch
     }
 
 
@@ -310,17 +296,15 @@
 void UT_CMusManagerServerCore::
     UT_CMusManagerServerCore_StopMultimediaSharingLL()
     {
-    // MuS not running
+    TApaTask::iApplicationExist = EFalse;
     iCore->StopMultimediaSharingL();
+    EUNIT_ASSERT( TApaTask::iApaTaskCalledFunction == TApaTask::EExists )
     
-    // MuS running
-    User::LeaveIfError( 
-        Dll::SetTls( reinterpret_cast< TAny* >( 1 ) ) ); 
-    // TLS is used by TFindProcess stub
+    TApaTask::iApplicationExist = ETrue;
     iCore->StopMultimediaSharingL();
     TInt availability = MultimediaSharing::EMultimediaSharingAvailable;
-    TUint key( NMusSessionApi::KStatus );
-    RProperty::Get( key, availability );
+    TUint key(NMusSessionApi::KStatus);
+    RProperty::Get( key,availability);
     EUNIT_ASSERT_EQUALS( PropertyHelper::GetCalledFunction(), RProperty::EDefine ) 
     EUNIT_ASSERT_EQUALS( availability, 
                          MultimediaSharing::EMultimediaSharingNotAvailable )
@@ -334,16 +318,7 @@
 //
 void UT_CMusManagerServerCore::UT_CMusManagerServerCore_EventNoSessionsL()
     {
-    iCore->iPluginName = KMusEngineName;
-    iCore->iPluginManager->iPluginStarted = ETrue;
     iCore->EventNoSessions();
-    EUNIT_ASSERT ( !(iCore->iPluginManager->iPluginStarted) );
-    EUNIT_ASSERT( iStopServerCalled );
-
-    iCore->iPluginName = KAnotherEngineName;
-    iCore->iPluginManager->iPluginStarted = ETrue;
-    iCore->EventNoSessions();
-    EUNIT_ASSERT ( iCore->iPluginManager->iPluginStarted );
     EUNIT_ASSERT( iStopServerCalled );
     }
 
@@ -374,15 +349,11 @@
 void UT_CMusManagerServerCore::
     UT_CMusManagerServerCore_AvailabilityChangedLL()
     {
-    iCore->iPluginName = KMusEngineName;
     MUS_EUNIT_ASSERT_NO_LEAVE( iCore->AvailabilityChangedL(
         (MultimediaSharing::TMusAvailabilityStatus) KErrNone ) );
+
     EUNIT_ASSERT( iCore->iAvailabilityMonitors.Count() == 0 );
 
-    iCore->iPluginName = KAnotherEngineName;
-    MUS_EUNIT_ASSERT_NO_LEAVE( iCore->AvailabilityChangedL(
-        (MultimediaSharing::TMusAvailabilityStatus) KErrNone ) );
-    EUNIT_ASSERT( iCore->iAvailabilityMonitors.Count() == 0 );
     }
 
 
@@ -399,15 +370,6 @@
     EUNIT_ASSERT( iCore->iAvailabilityMonitors.Count() == monitors );
     }
 
-void UT_CMusManagerServerCore::UT_CMusManagerServerCore_IsMusEnginePluginL()
-    {
-    iCore->iPluginName = KMusEngineName;
-    EUNIT_ASSERT( iCore->IsMusEnginePlugin() );
-    
-    iCore->iPluginName = KAnotherEngineName;
-    EUNIT_ASSERT( !(iCore->IsMusEnginePlugin()) );
-    }
-
 
 // ======== EUNIT TEST TABLE ========
 
@@ -502,11 +464,5 @@
     "FUNCTIONALITY",
     SetupL, UT_CMusManagerServerCore_AvailabilityChangedLL, Teardown)
 
-EUNIT_TEST(
-    "IsMusEnginePlugin - test ",
-    "CMusManagerServerCore",
-    "IsMusEnginePlugin",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusManagerServerCore_IsMusEnginePluginL, Teardown)
 
 EUNIT_END_TEST_TABLE
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusavailabilityPluginManager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/UT_CMusavailabilityPluginManager.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -27,6 +27,7 @@
 #include "cmusavainterfacestub.h"
 #include "musmanagerservercommon.h"
 #include "musapplicationmanager.h"
+#include "mussesseioninformationapi.h"
 #include <digia/eunit/eunitmacros.h>
 #include <E32Math.h>
 #include <E32Property.h>
@@ -47,6 +48,10 @@
  */
 _LIT( KUsedSipAddress, "sip:stadi@hesa.fi" );
 
+/*
+ * Privacy status from MusAvaSettingsStub.
+ */
+_LIT( KUsedPrivacyStatus, "1" );
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -113,8 +118,7 @@
 // From class MMusAvailabilityPluginManagerObserver.
 // ---------------------------------------------------------------------------
 //
-void UT_CMusAvailabilityPluginManager::StartSharingWithUseCaseL( 
-    MultimediaSharing::TMusUseCase /*aUseCase*/ )
+void UT_CMusAvailabilityPluginManager::StartLiveSharingL()
     {
     iCalledAStartLiveSharing = ETrue;
     }
@@ -141,8 +145,7 @@
     delete iManager;
     iManager = NULL;
     delete iAppManager;
-    PropertyHelper::Close();
-    Dll::FreeTls(); // Used by the RProcess and TFindProcess stubs
+    PropertyHelper::Close(); 
     
     }
 
@@ -253,10 +256,15 @@
 //
 void UT_CMusAvailabilityPluginManager::UT_CMusAvailabilityPluginManager_SessionParametersL()
     {
+    CMusAvaInterface* interface = iManager->iPlugin;
+    CMusAvaInterface2* interface2 =  static_cast<CMusAvaInterface2*>( interface );
+    interface2->iSettings->iCallPrivacy = 1;
+    
     MDesCArray* params = &iManager->SessionParametersL();
     EUNIT_ASSERT_EQUALS( KUsedTelNumber(), params->MdcaPoint( KTelNumber ) );
     EUNIT_ASSERT_EQUALS( KUsedSipAddress(), params->MdcaPoint( KSipAddress ) );
     EUNIT_ASSERT_EQUALS( KUsedVideoCodec(), params->MdcaPoint( KVideoCodec ) );
+    EUNIT_ASSERT( !params->MdcaPoint( KPrivacyStatus ).Compare( KUsedPrivacyStatus() ) );
     }
     
 // ---------------------------------------------------------------------------
@@ -394,11 +402,15 @@
 //
 void  UT_CMusAvailabilityPluginManager::
     UT_CMusAvailabilityPluginManager_UpdateSessionParametersLL()
-    {
+    {       
     MDesCArray* params = &iManager->SessionParametersL();
+    CMusAvaInterface* interface = iManager->iPlugin;
+    CMusAvaInterface2* interface2 =  static_cast<CMusAvaInterface2*>( interface );
+    interface2->iSettings->iCallPrivacy = 1;
     EUNIT_ASSERT_EQUALS( KUsedTelNumber(), iManager->SessionParametersL().MdcaPoint( KTelNumber ) );
     EUNIT_ASSERT_EQUALS( KUsedSipAddress(), iManager->SessionParametersL().MdcaPoint( KSipAddress ) );
     EUNIT_ASSERT_EQUALS( KUsedVideoCodec(), iManager->SessionParametersL().MdcaPoint( KVideoCodec ) );
+    EUNIT_ASSERT( !iManager->SessionParametersL().MdcaPoint( KPrivacyStatus ).Compare( KUsedPrivacyStatus() ) );
     }
 
 
@@ -470,19 +482,6 @@
     iManager->IndicateAvailabilityL();
     }
 
-void UT_CMusAvailabilityPluginManager::UT_CMusAvailabilityPluginManager_PrepareForReceivedInviteLL()
-    {
-    CMusAvaInterface* interface = iManager->iPlugin;
-    CMusAvaInterface2* interface2 =  static_cast<CMusAvaInterface2*>( interface );
-   
-    CMusAvaAvailabilityStub* abilityStub =  
-        static_cast<CMusAvaAvailabilityStub*>( interface2->iAvailabilities[0] );    
-    abilityStub->iPrepareForInviteCalled = EFalse;
-    
-    iManager->PrepareForReceivedInviteL();
-    EUNIT_ASSERT( abilityStub->iPrepareForInviteCalled );
-    }
-
 // ======== EUNIT TEST TABLE ========
 
 
@@ -604,12 +603,6 @@
     "IndicateAvailabilityL",
     "FUNCTIONALITY",
     SetupL, UT_CMusAvailabilityPluginManager_IndicateAvailabilityLL, Teardown )
-
-EUNIT_TEST(
-    "PrepareForReceivedInviteL - test ",
-    "CMusAvailabilityPluginManager",
-    "PrepareForReceivedInviteL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAvailabilityPluginManager_PrepareForReceivedInviteLL, Teardown )
+    
 
 EUNIT_END_TEST_TABLE
--- a/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/src/stubs.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-#include <e32std.h>
-
-// TFindProcess stub
-
-// -------------------------------------------------------------------------
-//  TFindProcess::Next
-// -------------------------------------------------------------------------
-//
-TInt TFindProcess::Next( TFullName& aResult )
-    {
-    if ( Dll::Tls() != NULL )
-        {
-        return KErrNone;
-        }
-    return KErrNotFound;
-    }
-
-
-// RProcess stub
-
-// -------------------------------------------------------------------------
-//  RProcess::Create
-// -------------------------------------------------------------------------
-//
-TInt RProcess::Create( 
-     const TDesC& /*aFileName*/,
-     const TDesC& /*aCommand*/,
-     TOwnerType /*aType*/ )
-    {
-    return Dll::SetTls( reinterpret_cast< TAny* >( 1 ) );
-    }
-
-// -------------------------------------------------------------------------
-//  RProcess::Resume
-// -------------------------------------------------------------------------
-//
-void RProcess::Resume()
-    {    
-    }
--- a/mmsharing/mmshshared/inc/muspropertyobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Mus Applications Event Observer Interface
-*
-*/
-
-
-
-#ifndef MUSPROPERTYOBSERVER_H
-#define MUSPROPERTYOBSERVER_H
-
-#include <e32base.h>
-
-class MMusPropertyObserver
-	{
-	
-public:
-
-    virtual void PropertyChanged( const TUint aKey, const TInt aValue ) = 0;	
-	
-    virtual void HandlePropertyError( const TInt aReason ) = 0;
-	
-	};
-
-#endif // MUSPROPERTYOBSERVER_H
-            
-// end of file
--- a/mmsharing/mmshshared/inc/muspropertywatch.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-#ifndef MUSPROPERTYWATCH_H
-#define MUSPROPERTYWATCH_H
-
-#include "musunittesting.h"
-
-#include <e32base.h>
-#include <e32property.h>
-
-class MMusPropertyObserver;
-
-class CMusPropertyWatch : public CActive
-    {
-    
-    MUS_UNITTEST( UT_CMusPropertyWatch )
-        
-public: // constructors and destructor
-
-    /**
-     * Two-phased constructor. Leaves on failure.
-     * @return The constructed CMusPropertyWatch object.
-     */
-    static CMusPropertyWatch* NewL( MMusPropertyObserver& aObserver, 
-                                    TUid aCategory, 
-                                    const TInt aPropertyName );
-
-    /**
-     * Destructor.
-     */
-    ~CMusPropertyWatch();
-
-private:
-
-    /**
-     * C++ constructor.
-     */
-    CMusPropertyWatch( MMusPropertyObserver& aObserver, 
-                       TUid aCategory, 
-                       const TInt aPropertyName );
-
-    /**
-     * Symbian 2nd-phase constructor.
-     * @leave If return value of RProperty::Attach != KErrNone, e.q. KErrNoMemory
-     *        or one of the system wide error codes if RunL() leaves
-     */
-    void ConstructL();
-
-
-public: // new functions
-
-    /**
-    * Reads a P&S integer value from the category KCategoryUid
-    * @pre P&S value has to be defined.
-    * @leave One of the system wide error codes, if RProperty::Get()
-    *        returns an error value.
-    * @param aKey Name of the P&S Key, which value should be read
-	* @returns The integer value of the P&S Key.
-    */
-    static TInt ReadIntPropertyL( TUint aKey );
-    
-    /**
-    * Reads a P&S descriptor value from the category KCategoryUid
-    * @pre P&S value has to be defined.
-    * @leave One of the system wide error codes, if RProperty::Get()
-    *        returns an error value or if descriptor AllocL() leaves.
-    * @param aKey Name of the P&S Key, which value should be read
-	* @returns The descriptor value of the P&S Key.
-    *          Ownership is transferred
-    */
-    static HBufC* ReadDescPropertyL( TUint aKey );
-
-
-private: // functions from base class CActive
-
-    /**
-     *
-     */
-    void DoCancel();
-
-    /**
-    * Reads a P&S integer value from the category KCategoryUid
-    * and starts to monitor changes in the property value.
-    * Calls observer function for read property values.
-    * @pre P&S value has to be defined as an integer.
-    * @leave One of the system wide error codes, if RProperty::Get()
-    *        returns an error value.
-    */
-    void RunL();
-
-    /**
-     *
-     */
-	TInt RunError(TInt aError);
-	
-private:    // Data
-
-	RProperty iProperty;
-	
-	TUid iPropertyCategory;
-	
-    TUint iPropertyKey;
-    
-    MMusPropertyObserver& iObserver;
-
-    };
-
-#endif // MUSPROPERTYWATCH_H
-
-// end of file
--- a/mmsharing/mmshshared/loc/mus.loc	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshshared/loc/mus.loc	Wed Sep 01 12:31:01 2010 +0100
@@ -699,6 +699,13 @@
 #define qtn_msh_set_activation_off               "Off"
 
 // d:Text of a list item in video sharing settings view
+// d:Activation setting: on
+// l:list_set_graphic_pane_t1
+// r:3.2
+//
+#define qtn_msh_set_activation_on               "On"
+
+// d:Text of a list item in video sharing settings view
 // d:Capability auditory note setting title
 // l:list_setting_pane_t1
 // r:3.2
--- a/mmsharing/mmshshared/src/muspropertywatch.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-
-#include "muspropertywatch.h"
-#include "muspropertyobserver.h"
-#include "mussessionproperties.h"
-#include "musresourceproperties.h"
-#include "muslogger.h" // debug logging
-
-using namespace NMusSessionApi;
-
-// -----------------------------------------------------------------------------
-// Symbian two-phase constructor.
-// -----------------------------------------------------------------------------
-//
-CMusPropertyWatch* CMusPropertyWatch::NewL(
-                                      MMusPropertyObserver& aObserver,
-                                      TUid aCategory,
-                                      const TInt aPropertyName )
-    {
-    CMusPropertyWatch* self = new (ELeave) CMusPropertyWatch(
-                                            aObserver,
-                                            aCategory,
-                                            aPropertyName );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// C++ destructor.
-// -----------------------------------------------------------------------------
-//
-CMusPropertyWatch::~CMusPropertyWatch()
-    {
-    MUS_LOG( "mus: [MUSSH ]  -> CMusPropertyWatch::~CMusPropertyWatch" );
-    if ( IsActive() )
-        {
-        Cancel();
-        }
-    iProperty.Close();
-    MUS_LOG( "mus: [MUSSH ]  <- CMusPropertyWatch::~CMusPropertyWatch" );
-    }
-
-
-// -----------------------------------------------------------------------------
-// C++ constructor.
-// -----------------------------------------------------------------------------
-//
-CMusPropertyWatch::CMusPropertyWatch( MMusPropertyObserver& aObserver,
-                                          TUid aCategory,
-                                          const TInt aPropertyName ) :
-    CActive( EPriorityNormal ),
-    iObserver( aObserver )
-    {
-    iPropertyCategory = aCategory;
-    iPropertyKey = aPropertyName;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Symbian second-phase constructor.
-// -----------------------------------------------------------------------------
-//
-void CMusPropertyWatch::ConstructL( )
-    {
-    MUS_LOG( "mus: [MUSSH ]  -> CMusPropertyWatch::ConstructL" );
-    User::LeaveIfError( iProperty.Attach( iPropertyCategory,
-                                          iPropertyKey) );
-    CActiveScheduler::Add( this );
-    
-    iProperty.Subscribe( iStatus );
-    SetActive();
-    
-    MUS_LOG( "mus: [MUSSH ]  <- CMusPropertyWatch::ConstructL" );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt CMusPropertyWatch::ReadIntPropertyL( TUint aKey )
-    {
-    MUS_LOG1( "mus: [MUSSH ]     -> CMusPropertyWatch::ReadIntPropertyL: aKey: [%d]",
-                            aKey );
-    TInt val;
-    User::LeaveIfError( RProperty::Get( KCategoryUid,
-                                        aKey,
-                                        val ) );
-    MUS_LOG1( "mus: [MUSSH ]     <- CMusPropertyWatch::ReadIntPropertyL: val: [%d]",
-                            val );
-    return val;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-HBufC* CMusPropertyWatch::ReadDescPropertyL( TUint aKey )
-    {
-    MUS_LOG1( "mus: [MUSSH ]     -> CMusPropertyWatch::ReadDescPropertyL: aKey: [%d]",
-                            aKey );
-    TBuf<RProperty::KMaxPropertySize> buffer;
-
-    User::LeaveIfError( RProperty::Get( KCategoryUid,
-                                        aKey,
-                                        buffer ) );
-    HBufC* desc = buffer.AllocL();
-    MUS_LOG_TDESC( "mus: [MUSSH ]    <- CMusPropertyWatch::ReadDescPropertyL: val: ",
-                            (*desc) );
-    return desc;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusPropertyWatch::DoCancel()
-    {
-    MUS_LOG( "mus: [MUSSH ]  -> CMusPropertyWatch::DoCancel" );
-    iProperty.Cancel();
-    MUS_LOG( "mus: [MUSSH ]  <- CMusPropertyWatch::DoCancel" );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusPropertyWatch::RunL()
-    {
-    MUS_LOG( "mus: [MUSSH ]  -> CMusPropertyWatch::RunL" );
-    TInt val;
-
-    User::LeaveIfError( RProperty::Get( iPropertyCategory,
-                                        iPropertyKey,
-                                        val ) );
-
-    iObserver.PropertyChanged( iPropertyKey, val );
-    MUS_LOG( "mus: [MUSSH ]  <- CMusPropertyWatch::RunL" );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt CMusPropertyWatch::RunError( TInt aError )
-    {
-    MUS_LOG1( "mus: [MUSSH ]     -> CMusPropertyWatch::RunError [%d]", aError );
-    iObserver.HandlePropertyError( aError );
-    MUS_LOG( "mus: [MUSSH ]  <- CMusPropertyWatch::RunError" );
-    return KErrNone;
-    }
-
-
-// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/data/musui.rss	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,1645 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  application resource file
+*
+*/
+
+
+
+// -----------------------------------------------------------------------------
+// FOUR-LETTER RESOURCE IDENTIFIER
+// -----------------------------------------------------------------------------
+//
+NAME MUSH
+
+
+// -----------------------------------------------------------------------------
+// INCLUDE FILES
+// -----------------------------------------------------------------------------
+//
+#include "musui.hrh"
+#include <mus.loc> // localization
+#include <musoperator.loc> //localization
+
+#include <musuiicons.mbg>
+#include <musuitoolbaricons.mbg>
+#include <appinfo.rh>
+#include <data_caging_paths_strings.hrh>
+#include <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <avkon.rh>
+#include <avkon.hrh>
+#include <avkon.loc>
+#include <drmcommon.loc>
+
+#include <aknsconstants.hrh>
+#include <incallmenuandsoftkeys.loc>
+// -----------------------------------------------------------------------------
+// RESOURCE DEFINITIONS
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf = "MUSUI"; }
+
+RESOURCE EIK_APP_INFO
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CONSTANTS
+// -----------------------------------------------------------------------------
+//
+#define KMyBitmapRomFile "Z:\\resource\\apps\\musuiicons.mif"
+#define KMyBitmapRamFile "C:\\resource\\apps\\musuiicons.mif"
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+    {
+    short_caption = qtn_apps_msh_grid;
+    caption_and_icon = CAPTION_AND_ICON_INFO
+        {
+        caption = qtn_apps_msh_list;
+        number_of_icons = 1;
+        icon_file = APP_BITMAP_DIR"\\musui_aif.mif";
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Hotkeys defined for application
+// -----------------------------------------------------------------------------
+//
+RESOURCE HOTKEYS r_musui_hotkeys
+    {
+    control =
+        {
+        HOTKEY { command = EEikCmdExit; key = 'e'; }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Items for general menu
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_musui_general_menu
+    {
+    items =
+        {
+        MENU_ITEM { command = EMusuiGenCmdExit; txt = qtn_options_exit; }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// View-resource definition for general view
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_musui_generalview
+    {
+    menubar = r_musui_generalview_menubar;
+    toolbar = r_mus_toolbar;
+    cba     = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+
+// -----------------------------------------------------------------------------
+// View-resource definition for null view
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_musui_nullview
+    {
+    menubar = r_musui_generalview_menubar;
+    cba     = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Menubar definition for general view
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_musui_generalview_menubar
+    {
+    titles =
+        {
+        MENU_TITLE { menu_pane = r_musui_general_menu;  txt = "--"; },
+        MENU_TITLE { menu_pane = r_musui_generalview_menu; txt = "--"; }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Items for menupane in general view
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_musui_generalview_menu
+    {
+    items =
+        {
+        MENU_ITEM { command = EMusuiCmdAppTest; txt = "Test"; } // TODO: Fixme
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// View-resource definition for live sharing view
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_musui_view
+    {
+    menubar = r_musui_view_menubar;
+//    toolbar = r_mus_toolbar;
+    cba     = r_musui_view_cba;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE CBA r_musui_view_cba
+    {
+    buttons=
+        {
+        CBA_BUTTON
+            {
+            txt = text_softkey_option;
+            id = EAknSoftkeyOptions;
+            },
+        CBA_BUTTON
+            {
+            txt = qtn_msh_softkey_stop;
+            id = EAknSoftkeyExit;
+            },
+        CBA_BUTTON
+            {
+            //txt = text_softkey_option;  // qgn_prop_msk_select;
+            id = EEikBidBlank;  // EAknSoftkeyOptions;
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Operator Specific Middle softkeys
+// -----------------------------------------------------------------------------
+//
+RESOURCE CBA_BUTTON r_musui_view_ops_msk_ihf_off
+    {
+    id = EMusuiCmdViewHandset;
+    txt = qtn_msh_msk_ihf_off;
+    }
+
+RESOURCE CBA_BUTTON r_musui_view_ops_msk_ihf_on
+    {
+    id = EMusuiCmdViewLoadspeaker;
+    txt = qtn_msh_msk_ihf_on;
+    }
+
+RESOURCE CBA_BUTTON r_musui_view_msk_ok
+    {
+    id = EMusuiCmdViewMiddleSoftkeyOk;
+    txt = qtn_msh_msk_done;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Menubar definition for live sharing view
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_musui_view_menubar
+    {
+    titles =
+        {
+        MENU_TITLE { menu_pane = r_musui_general_menu;  txt = "--"; },
+        MENU_TITLE { menu_pane = r_musui_view_menu; txt = "--"; }
+        };
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Items for menupane in live sharing view
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_musui_view_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewReplay;
+            txt = qtn_msh_shareview_softk_replay;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewShareVideo;
+            txt = qtn_msh_options_gen_shareclip;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewShareImage;
+            txt = qtn_msh_options_gen_shareimage;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewShareLive;
+            txt = qtn_msh_options_gen_sharelive;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewAudioNormal;
+            txt = qtn_msh_options_clip_audio_normal;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewAudioMute;
+            txt = qtn_msh_options_clip_audio_mute;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdToolbarZoom;
+            txt = qtn_msh_tooltip_zoom; // Adjust zoom
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdToolbarBrightness;
+            txt = qtn_msh_tooltip_brightness; // Adjust brightness
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewFullScreen;
+            txt = qtn_msh_options_fullscreen;
+            },   
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewZoom;
+            txt = qtn_msh_options_zoom;
+            },    
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewBrightness;
+            txt = qtn_msh_options_brightness;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdRecord;
+            txt = qtn_msh_options_rec_start;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdStopRecording;
+            txt = qtn_msh_options_rec_stop;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewMicrophoneMute;
+            txt = qtn_incal_mute_option;
+            },
+        MENU_ITEM
+            {
+            command = EMusuiCmdViewMicrophoneUnmute;
+            txt = qtn_incal_unmute_option;
+            },
+        MENU_ITEM 
+            {
+            command = EMusuiCmdViewEndActiveCall;
+            txt =  qtn_incal_drop_option;
+            },
+#ifdef __SERIES60_HELP            
+        MENU_ITEM
+            {
+            command = EAknCmdHelp;
+            txt = qtn_options_help;
+            }
+#endif  // __SERIES60_HELP
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_LAYOUT_RECT r_mus_navi_media_icon_layout_size
+    {
+    l = 0; t = 0; W = 13; H = 16;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_LAYOUT_TEXT r_mus_navi_media_text_left_layout
+    {
+    font = ELatinPlain12;
+    C = 10;
+    l = 43;
+    r = 4;
+    B = 13;
+    W = 73;
+    J = ELayoutAlignLeft;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_LAYOUT_TEXT r_mus_navi_media_text_right_layout
+    {
+    font = ELatinPlain12;
+    C = 0;
+    l = 43;
+    r = 4;
+    B = 13;
+    W = 73;
+    J = ELayoutAlignRight;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE AKN_ICON_ARRAY r_mus_navi_media_icon_array_rom
+    {
+    bmpfile = KMyBitmapRomFile; // HERE
+    icons =
+        {
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_forw;
+                    maskId = EMbmMusuiiconsQgn_indi_video_forw_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_pause;
+                    maskId = EMbmMusuiiconsQgn_indi_video_pause_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_play;
+                    maskId = EMbmMusuiiconsQgn_indi_video_play_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_record;
+                    maskId = EMbmMusuiiconsQgn_indi_video_record_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_record_not;
+                    maskId = EMbmMusuiiconsQgn_indi_video_record_not_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_rew;
+                    maskId = EMbmMusuiiconsQgn_indi_video_rew_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_stop;
+                    maskId = EMbmMusuiiconsQgn_indi_video_stop_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait1;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait1_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait2;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait2_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait3;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait3_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait4;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait4_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait5;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait5_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait6;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait6_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait7;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait7_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait8;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait8_mask; }
+        };
+    }
+
+ // -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE AKN_ICON_ARRAY r_mus_navi_media_icon_array_ram
+    {
+    bmpfile = KMyBitmapRamFile; // HERE
+    icons =
+        {
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_forw;
+                    maskId = EMbmMusuiiconsQgn_indi_video_forw_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_pause;
+                    maskId = EMbmMusuiiconsQgn_indi_video_pause_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_play;
+                    maskId = EMbmMusuiiconsQgn_indi_video_play_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_record;
+                    maskId = EMbmMusuiiconsQgn_indi_video_record_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_record_not;
+                    maskId = EMbmMusuiiconsQgn_indi_video_record_not_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_rew;
+                    maskId = EMbmMusuiiconsQgn_indi_video_rew_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_stop;
+                    maskId = EMbmMusuiiconsQgn_indi_video_stop_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait1;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait1_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait2;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait2_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait3;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait3_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait4;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait4_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait5;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait5_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait6;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait6_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait7;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait7_mask; },
+        AKN_ICON  { iconId = EMbmMusuiiconsQgn_indi_video_wait8;
+                    maskId = EMbmMusuiiconsQgn_indi_video_wait8_mask; }
+        };
+    }
+
+///////////////////////////////////////////////////LG///////////////////////////////////////////
+// -----------------------------------------------------------------------------
+// Toolbar for non-touch mode
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_TOOLBAR r_mus_toolbar_nontouch
+    {
+    //KAknToolbarFlexiblePosition
+    //3.2.3 -> KAknToolbarWithoutCba
+    //5.0   -> KAknToolbarFixed
+    flags = KAknToolbarWithoutCba | KAknToolbarFloatingUnTransparent;
+
+    items =
+        {
+        // ****************************************************************** //
+        TBAR_CTRL   // Sending Live/Clip & Receiving: Activate Volume Mode
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarVolume;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_volume;   // Adjust call volume
+                        helptxt = qtn_msh_tooltip_volume;
+                        // TODO: ROM/RAM:
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_call_volume;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_call_volume_mask;
+                        }
+                    };
+                };
+            },
+          // ****************************************************************** //
+                                                                                                                                                
+          TBAR_CTRL   // Receiving: Change to full screen mode
+              {
+              type = EAknCtButton;
+              id = EMusuiCmdToolbarFullScreen;
+              control = AVKON_BUTTON
+                  {
+                  flags = KAknButtonSizeFitText ;
+                  states =
+                      {
+                      AVKON_BUTTON_STATE
+                          {
+                          //txt = qtn_msh_tooltip_fullscreen; // View in full screen mode
+                          helptxt = qtn_msh_tooltip_fullscreen; 
+                          // TODO: ROM/RAM:
+                          bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                          bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_fullscreen;
+                          bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_fullscreen_mask;
+//                          extension = r_mus_fullscreen_button_state_extension;
+                          }
+                      };
+                  };
+              },
+                                                                                                                                                
+        // ****************************************************************** //
+       
+        TBAR_CTRL   // Sending Live: Pause sharing <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarPauseLive;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_pause_live;   // Pause sharing
+                        helptxt = qtn_msh_tooltip_pause_live;
+                        // TODO: ROM/RAM:
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_pause_send_video;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_pause_send_video_mask;
+//                        extension = r_mus_pause_send_video_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL   // Sending Live/Clip: Un-pause sharing <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarUnPauseLive;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_unpause_live;
+                        helptxt = qtn_msh_tooltip_unpause_live;
+                        // TODO: ROM/RAM
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_video;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_video_mask;
+//                        extension = r_mus_video_button_state_extension;
+                        }
+                    };
+                };
+            },
+        // ****************************************************************** //
+                                            
+        TBAR_CTRL   // Sending Clip: Pause sharing <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarPause;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_pause_live;   // Pause sharing
+                        helptxt = qtn_msh_tooltip_pause_live;
+                        // TODO: ROM/RAM:
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_cams_tb_rec_pause;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_cams_tb_rec_pause_mask;
+ //                       extension = r_mus_rec_pause_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL   // Sending Live/Clip: Un-pause sharing <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarUnPause;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_unpause_live;
+                        helptxt = qtn_msh_tooltip_unpause_live;
+                        // TODO: ROM/RAM
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_play;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_play_mask;
+ //                       extension = r_mus_play_button_state_extension;
+                        }
+                    };
+                };
+            },
+
+        // ****************************************************************** //
+       TBAR_CTRL   // Sending Clip: Activate fast forward / reverse mode
+           {
+           type = EAknCtButton;
+           id = EMusuiCmdToolbarFFRev;
+           control = AVKON_BUTTON
+               {
+               flags = KAknButtonSizeFitText ;
+               states =
+                   {
+                   AVKON_BUTTON_STATE
+                       {
+                       //txt = qtn_msh_tooltip_ffrev; // Fast forward or rewind clip
+                       helptxt = qtn_msh_tooltip_ffrev;
+                       bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                       bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_ffw_frew;
+                       bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_ffw_frew_mask;
+                       },
+                   AVKON_BUTTON_STATE
+                       {
+                       flags = KAknButtonStateHasLatchedFrame;
+                       //txt = qtn_msh_tooltip_ffrev;
+                       helptxt = qtn_msh_tooltip_ffrev;
+                       bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                       bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_ffw_frew;
+                       // bmpmask = 0x8000;  /*32768, tumma*/
+                       bmpmask = 0x7FFF;   /*32767, vaalea*/
+                       }
+                   };
+               };
+           },
+       // ****************************************************************** //
+       TBAR_CTRL   // Sending Live: Activate zoom mode
+           {
+           type = EAknCtButton;
+           id = EMusuiCmdToolbarZoom;
+           control = AVKON_BUTTON
+               {
+               flags = KAknButtonSizeFitText ;
+               states =
+                   {
+                   AVKON_BUTTON_STATE
+                       {
+                       //txt = qtn_msh_tooltip_zoom; // Adjust zoom
+                       helptxt = qtn_msh_tooltip_zoom;
+                       bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                       bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_zoom;
+                       bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_zoom_mask;
+                       },
+                   AVKON_BUTTON_STATE
+                       {
+                       flags = KAknButtonStateHasLatchedFrame;
+                       //txt = qtn_msh_tooltip_zoom; // Adjust zoom
+                       helptxt = qtn_msh_tooltip_zoom;
+                       bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                       bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_zoom;    // TODO: Correct bitmap!!!
+                       // bmpmask = 0x8000;  /*32768, tumma*/     
+                       bmpmask = 0x7FFF;   /*32767, vaalea*/
+                       }
+                    };
+                };
+            },
+       // ****************************************************************** //
+       TBAR_CTRL   // Sending Live: Activate brightness mode
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarBrightness;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_brightness; // Adjust brightness
+                        helptxt = qtn_msh_tooltip_brightness;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_brightness;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_brightness_mask;
+                        },
+                    AVKON_BUTTON_STATE
+                        {
+                        flags = KAknButtonStateHasLatchedFrame;
+                        //txt = qtn_msh_tooltip_brightness; // Adjust brightness
+                        helptxt = qtn_msh_tooltip_brightness;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_brightness;
+                        // bmpmask = 0x8000;  /*32768, tumma*/
+                        bmpmask = 0x7FFF;   /*32767, vaalea*/
+                        }
+                    };
+                };
+            },
+        // ****************************************************************** //
+                
+        TBAR_CTRL   // Sending Live/Clip & Receiving: Mute microphone <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarMute;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_mute;     // Mute Microphone
+                        helptxt = qtn_msh_tooltip_mute;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_microphone_mute;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_microphone_mute_mask;
+//                        extension = r_mus_microphone_mute_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL   // Sending Live/Clip & Receiving: Unmute microphone <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarUnmute;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_unmute;     // Unmute Microphone
+                        helptxt = qtn_msh_tooltip_unmute;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_microphone_unmute;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_microphone_unmute_mask;
+ //                       extension = r_mus_microphone_unmute_button_state_extension;
+                        }
+                    };
+                };
+            },
+           
+        // ****************************************************************** //
+        
+        TBAR_CTRL   // Sending LiveClip & Receiving: Speaker off <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarSpeakerOff;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_ihf_off;     // Loudspeaker off
+                        helptxt = qtn_msh_tooltip_ihf_off;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_ihf_off;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_ihf_off_mask;
+ //                       extension = r_mus_ihf_off_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL   // Sending Live/Clip & Receiving: Speaker on <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarSpeakerOn;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_ihf_on;     // Loudspeaker on
+                        helptxt = qtn_msh_tooltip_ihf_on;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_ihf_on;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_ihf_on_mask;
+ //                       extension = r_mus_ihf_on_button_state_extension;
+                        }
+                    };
+                };
+            }
+        };
+    }
+///////////////////////////////////////////////////LG///////////////////////////////////////////
+         
+ 
+
+// -----------------------------------------------------------------------------
+// Toolbar
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_TOOLBAR r_mus_toolbar
+    {
+    flags = KAknToolbarFixed;
+
+    items =
+        {
+        // ****************************************************************** //
+																																		        
+	      TBAR_CTRL   // Receiving: Change to full screen mode
+	          {
+	          type = EAknCtButton;
+	          id = EMusuiCmdToolbarFullScreen;
+	          control = AVKON_BUTTON
+	              {
+	              flags = KAknButtonSizeFitText ;
+	              states =
+	                  {
+	                  AVKON_BUTTON_STATE
+	                      {
+	                      //txt = qtn_msh_tooltip_fullscreen; // View in full screen mode
+	                      helptxt = qtn_msh_tooltip_fullscreen; 
+	                      // TODO: ROM/RAM:
+	                      bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+	                      bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_fullscreen;
+	                      bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_fullscreen_mask;
+	                      extension = r_mus_fullscreen_button_state_extension;
+	                      }
+	                  };
+	              };
+	          },
+																																		        
+        // ****************************************************************** //
+       
+        TBAR_CTRL   // Sending Live: Pause sharing <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarPauseLive;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_pause_live;   // Pause sharing
+                        helptxt = qtn_msh_tooltip_pause_live;
+                        // TODO: ROM/RAM:
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_pause_send_video;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_pause_send_video_mask;
+                        extension = r_mus_pause_send_video_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL   // Sending Live/Clip: Un-pause sharing <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarUnPauseLive;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_unpause_live;
+                        helptxt = qtn_msh_tooltip_unpause_live;
+                        // TODO: ROM/RAM
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_video;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_video_mask;
+                        extension = r_mus_video_button_state_extension;
+                        }
+                    };
+                };
+            },
+        // ****************************************************************** //
+									        
+        TBAR_CTRL   // Sending Clip: Pause sharing <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarPause;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_pause_live;   // Pause sharing
+                        helptxt = qtn_msh_tooltip_pause_live;
+                        // TODO: ROM/RAM:
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_cams_tb_rec_pause;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_cams_tb_rec_pause_mask;
+                        extension = r_mus_rec_pause_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL   // Sending Live/Clip: Un-pause sharing <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarUnPause;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_unpause_live;
+                        helptxt = qtn_msh_tooltip_unpause_live;
+                        // TODO: ROM/RAM
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_play;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_play_mask;
+                        extension = r_mus_play_button_state_extension;
+                        }
+                    };
+                };
+            },
+
+        // ****************************************************************** //
+        
+        TBAR_CTRL   // Sending Live/Clip & Receiving: Mute microphone <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarMute;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_mute;     // Mute Microphone
+                        helptxt = qtn_msh_tooltip_mute;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_microphone_mute;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_microphone_mute_mask;
+                        extension = r_mus_microphone_mute_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL   // Sending Live/Clip & Receiving: Unmute microphone <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarUnmute;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_unmute;     // Unmute Microphone
+                        helptxt = qtn_msh_tooltip_unmute;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_microphone_unmute;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_microphone_unmute_mask;
+                        extension = r_mus_microphone_unmute_button_state_extension;
+                        }
+                    };
+                };
+            },
+	
+	//****************************************************************** //
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarBlank;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText;
+                };
+            },
+           
+        // ****************************************************************** //
+        
+        TBAR_CTRL   // Sending LiveClip & Receiving: Speaker off <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarSpeakerOff;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText ;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_ihf_off;     // Loudspeaker off
+                        helptxt = qtn_msh_tooltip_ihf_off;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_ihf_off;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_ihf_off_mask;
+                        extension = r_mus_ihf_off_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL   // Sending Live/Clip & Receiving: Speaker on <=> Toggled
+            {
+            type = EAknCtButton;
+            id = EMusuiCmdToolbarSpeakerOn;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonSizeFitText;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        //txt = qtn_msh_tooltip_ihf_on;     // Loudspeaker on
+                        helptxt = qtn_msh_tooltip_ihf_on;
+                        bmpfile = "Z:\\Resource\\apps\\musuitoolbaricons.mif";  // Only ROM . RAM is unofficial
+                        bmpid   = EMbmMusuitoolbariconsQgn_indi_tb_ihf_on;
+                        bmpmask = EMbmMusuitoolbariconsQgn_indi_tb_ihf_on_mask;
+                        extension = r_mus_ihf_on_button_state_extension;
+                        }
+                    };
+                };
+            }
+        };
+    }
+          
+ 
+    
+// BUTTON STATE EXTENSION needed for skinning
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_call_volume_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbCallVolume; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_fullscreen_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbFullscreen; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_pause_send_video_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbPauseSendVideo; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_video_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbVideo; 
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_rec_pause_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiCamsTbRecPause; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_play_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbPlay; 
+    }                
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_ffw_frew_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbFfwFrew; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_zoom_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbZoom; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_brightness_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbBrightness; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_microphone_mute_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbMicrophoneMute; 
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_microphone_unmute_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbMicrophoneUnmute; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_ihf_off_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbIhfOff; 
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_mus_ihf_on_button_state_extension 
+    { 
+    bmbSkinIdMajor= EAknsMajorGeneric; 
+    bmbSkinIdMinor= EAknsMinorGenericQgnIndiTbIhfOn; 
+    }    
+        
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_mus_text_query_dialog
+    {
+    flags = EAknGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_DATA_QUERY
+                {
+                layout = EDataLayout;
+                control = EDWIN
+                    {
+                    flags = EEikEdwinOnlyASCIIChars;
+                    avkon_flags = EAknEditorFlagLatinInputModesOnly;
+                    default_input_mode = EAknEditorTextInputMode;
+                    allowed_input_modes = EAknEditorTextInputMode |
+                                          EAknEditorNumericInputMode;
+                    };
+                };
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Resource for the address selection query.
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_mus_confirmation_query_dialog
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EMusConfirmationQuery;
+            control = AVKON_CONFIRMATION_QUERY
+                {
+                layout = EConfirmationQueryLayout;
+                };
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Resource for the address selection query.
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_LIST_QUERY r_mus_livesharingview_address_query
+    {
+    flags    = EGeneralQueryFlags;
+    softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        AVKON_LIST_QUERY_DLG_LINE
+            {
+            control = AVKON_LIST_QUERY_CONTROL
+                {
+                listtype = EAknCtSinglePopupMenuListBox;
+                listbox  = AVKON_LIST_QUERY_LIST
+                    {
+                    array_id = r_mus_livesharingview_address_array;
+                    };
+                heading  = qtn_msh_inviteview_select_query_hdr_txt;
+                };
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Resource for the address selection query array
+// -----------------------------------------------------------------------------
+//
+RESOURCE ARRAY r_mus_livesharingview_address_array
+    {
+    items =
+        {
+        LBUF { txt = ""; }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Resource for the inviting wait note
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_mus_view_inviting_wait_note
+    {
+    flags   = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items   =
+        {
+        DLG_LINE
+            {
+            type    = EAknCtNote;
+            id      = EMusInvitingWaitNoteId;
+            control = AVKON_NOTE
+                {
+                layout    = EWaitLayout;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+// Resource for the camera activation wait note
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_mus_live_sharing_view_activate_camera_wait_note
+    {
+    flags   = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items   =
+        {
+        DLG_LINE
+            {
+            type    = EAknCtNote;
+            id      = EMusActivateCameraWaitNoteId;
+            control = AVKON_NOTE
+                {
+                layout    = EWaitLayout;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_mus_view_transcoding_wait_note
+    {
+    flags   = EAknProgressNoteFlags;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items   =
+        {
+        DLG_LINE
+            {
+            type    = EAknCtNote;
+            id      = EMusTranscodingProgressNoteId;
+            control = AVKON_NOTE
+                {
+                layout = EWaitLayout;
+                };
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_text_enter_address_dialog_prompt
+    {
+    buf = qtn_msh_inviteview_enter_sip;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_live_sharing_view_title
+    {
+    buf = qtn_msh_shareview_title;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_live_sharing_view_inviting_wait_note_txt
+    {
+    buf = qtn_msh_note_inviting;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_live_sharing_view_open_camera_lens_cover_wait_note_txt
+    {
+    buf = qtn_msh_note_change_camera_mode;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_registration_pending_wait_note_txt
+    {
+    //"Registering to SIP server"
+    buf = qtn_msh_note_registration_pending;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_change_keypad_mode_txt
+    {
+	buf = qtn_msh_note_change_keypad_mode;
+    }
+
+
+// --------------------------------------------------------
+// Resources related to video receive
+// --------------------------------------------------------
+
+RESOURCE TBUF r_mus_receive_view_note_incoming_video_request
+    {
+    buf = qtn_msh_note_incoming_video_request;   // "Accept sharing request from %U[35]?"
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_receive_view_waiting_for_stream
+    {
+    buf = qtn_msh_note_waiting_for_stream;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_view_save_address_query_txt
+    {
+    buf = qtn_msh_query_save_contact;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_view_saved_filename
+    {
+    buf = qtn_msh_set_saving_filename;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_view_save_shared_video_query
+    {
+    buf = qtn_msh_query_save_clip;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_view_note_video_saved
+    {
+    buf = qtn_msh_note_video_saved;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_video_save_folder_name
+    {
+    buf = qtn_apps_mg_gs;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_progress_note_converting_clip
+    {
+    // "Converting clip for sharing"
+    buf = qtn_msh_note_transcoding_video;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_view_note_transcoding_complete
+    {
+    // "Clip conversion complete"
+    buf = qtn_msh_note_transcoding_complete;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_view_note_memorycard_problem
+    {
+    // "Memory card is not accessible. Phone memory will be used instead."
+    buf = qtn_msh_note_memorycard_problem;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Error Note Strings
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_mus_live_sharing_view_note_recipient_not_found
+    {
+    //  "Unable to find recipient"
+    buf =  qtn_msh_note_recipient_not_found;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_app_n_a
+    {
+    //  "Recipient does not have 'Video sharing' application"
+    buf =  qtn_msh_note_app_n_a;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_connection_rejected
+    {
+    //  "Invitation rejected by recipient"
+    buf =  qtn_msh_note_connection_rejected;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_no_response
+    {
+    //  "No response received to invitation"
+    buf =  qtn_msh_note_no_response;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_invitation_cancelled
+    {
+    //  "Invitation cancelled"
+    buf =  qtn_msh_note_invitation_cancelled;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_resource_n_a
+    {
+    //  "Application not available"
+    buf =  qtn_msh_note_resource_n_a;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_error_mediainit
+    {
+    //  "Media initialisation failed"
+    buf =  qtn_msh_note_error_mediainit;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_error_filelock
+    {
+    //  "Unable to read file"
+    buf =  qtn_msh_note_error_filelock;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_error_genericfile
+    {
+    //  "File error"
+    buf =  qtn_msh_note_error_genericfile;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_error_app_general
+    {
+    //  "Application error"
+    buf =  qtn_msh_note_error_app_general;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_startup_failed
+    {
+    //  "Start-up failed. Reinstall 'Video sharing' application."
+    buf =  qtn_msh_note_startup_failed;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_bad_startup_settings
+    {
+    //  "Start-up failed. Check settings."
+    buf =  qtn_msh_note_bad_startup_settings;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_connection_lost
+    {
+    //  "Disconnected"
+    buf =  qtn_msh_note_connection_lost;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_recipient_busy
+    {
+    //  "Recipient already sharing video. Unable to establish connection."
+    buf =  qtn_msh_note_recipient_busy;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_network_n_a
+    {
+    //  "No network coverage"
+    buf =  qtn_msh_note_network_n_a;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_recipient_n_a
+    {
+    //  "Recipient busy. Try again later."
+    buf =  qtn_msh_note_recipient_n_a;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_wrong_address
+    {
+    //  "Recipient not found. Check the address."
+    buf =  qtn_msh_note_wrong_address;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_timeout_expired
+    {
+    //  "Connection time-out"
+    buf =  qtn_msh_note_timeout_expired;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_service_n_a
+    {
+    //  "Service temporarily unavailable"
+    buf =  qtn_msh_note_service_n_a;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_only_3g
+    {
+    //  "Video Sharing is supported only in 3G network."
+    buf = qtn_mshstarter_note_network_incompatible;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_invite_error
+    {
+    //  "Unable to send invitation"
+    buf =  qtn_msh_note_invite_error;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_no_reg
+   {
+   //  "Unable to register to network"
+   buf =  qtn_msh_note_no_reg;
+   }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_transcoding_not_supported
+    {
+    // "Clip is not in correct format. Unable to share."
+    buf = qtn_msh_note_transcoding_not_supported;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_sharing_ended
+    {
+    // "Video sharing ended"
+    buf = qtn_msh_note_sharing_ended;
+    }
+
+RESOURCE TBUF r_mus_live_sharing_view_note_sharing_ended_record
+    {
+    // "Video sharing ended. Continue recording?"
+    buf = qtn_msh_note_sharing_ended_record;
+    }
+
+RESOURCE TBUF r_mus_view_drm_info_send_forbid
+    {
+    // "Unable to send protected object"
+    buf = qtn_drm_info_send_forbid_one;
+    }
+
+RESOURCE TBUF r_mus_view_note_memory_low
+    {
+    // "Memory low. Recording stopped."
+    buf = qtn_msh_note_memory_low;
+    }
+
+RESOURCE TBUF r_mus_view_note_unable_to_convert
+    {
+    // "Unable to convert clip"
+    buf = qtn_msh_note_transcoding_failed;
+    }
+
+RESOURCE TBUF r_mus_note_hf_activated
+    {
+    // "Handsfree activated"
+    buf = qtn_hf_conf_activate;
+    }
+
+RESOURCE TBUF r_mus_note_hf_deactivated
+    {
+    // "Handsfree deactivated"
+    buf = qtn_hf_conf_earpiece;
+    }
+
+RESOURCE SLIDER r_mus_slider_vertical
+    {        
+    layout=EAknSliderLayoutVertical;    
+    minvalue=0;
+    maxvalue=100;
+    step=1;
+    valuetype=EAknSliderValueNone;    
+    minlabel="-";
+    maxlabel="+";
+    }
+
+RESOURCE SLIDER r_mus_slider_horizontal
+    {      
+    layout=EAknSliderLayoutHorizontal;
+    minvalue=0;
+    maxvalue=100;
+    step=1;
+    valuetype=EAknSliderValueNone;
+    }    
+        
+// end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/data/musui_reg.rss	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  S60 v3.0-compatible application resource file
+*
+*/
+
+
+
+#include <appinfo.rh>
+#include <data_caging_paths_strings.hrh>
+
+#include <musui.rsg>
+
+#include "musuid.hrh"
+
+UID2 KUidAppRegistrationResourceFile
+UID3 KMusUiUid	// 0x10282391
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file                  = "musui";
+    localisable_resource_file = APP_RESOURCE_DIR"\\musui";
+    localisable_resource_id   = R_LOCALISABLE_APP_INFO;
+    hidden                    = KAppIsHidden;
+    embeddability             = KAppNotEmbeddable;
+    //group_name                = "musui";
+    }
+
+
+// end of file
Binary file mmsharing/mmshui/graphics/Thumbs.db has changed
Binary file mmsharing/mmshui/graphics/qgn_graf_rop_black.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_indi_mus_end_rec.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_indi_mus_end_rec_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_indi_mus_paused.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_indi_mus_paused_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_indi_mus_speaker_muted.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_indi_mus_speaker_muted_mask.bmp has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_tb_gallery.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 36 44">
+<g>
+<g>
+<rect fill="none" width="36" height="44"/>
+<g>
+<g>
+<linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="-14.4209" y1="4.2197" x2="18.0901" y2="43.6343">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_3_)" d="M4.926,32.898V21.056c-0.156-0.018-1.505-0.163-2.099-0.745v14.748h14.597v-2.16H4.926z"/>
+<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="3.5293" y1="-10.4531" x2="35.8526" y2="28.7339">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_4_)" d="M32.229,11.113H12.192c0,0.814,0,1.568-0.003,2.16h17.938v4.547h2.102V11.113z"/>
+</g>
+<path fill="#496DA2" d="M28.954,20.28v2.103h-5.772V20.28h-3.3v14.812h3.3v-2.096h5.772v2.096h3.328V20.28H28.954z      M22.154,34.199h-1.36v-2.08h1.36V34.199z M22.154,30.408h-1.36v-2.08h1.36V30.408z M22.154,26.908h-1.36v-2.08h1.36V26.908z      M22.154,23.118h-1.36v-2.08h1.36V23.118z M28.982,30.894h-5.801v-6.409h5.801V30.894z M31.343,34.199h-1.36v-2.08h1.36V34.199z      M31.343,30.408h-1.36v-2.08h1.36V30.408z M31.343,26.908h-1.36v-2.08h1.36V26.908z M31.343,23.118h-1.36v-2.08h1.36V23.118z"/>
+<path fill="#496DA2" d="M18.353,18.278V16.27H15.99v2.368l-7.078,7.101H6.327l4.8,4.751v-0.02h6.297V18.278H18.353z      M15.99,25.739h-4.729l4.729-4.735V25.739z"/>
+<path fill="#496DA2" d="M8.597,3.858v8.868c-1.074-0.134-2.391,0.17-3.513,0.904c-1.92,1.259-2.533,3.282-1.652,4.625     c0.877,1.34,3.191,1.242,5.111-0.019c1.119-0.8,1.91-1.999,1.752-3.6l-0.004-8.142l3.837,1.919l0.667-1.451L8.597,3.858z"/>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_tb_microphone_mute.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 36 44">
+<g>
+<g>
+<rect fill="none" width="36" height="44"/>
+<g>
+<linearGradient id="XMLID_5_" gradientUnits="userSpaceOnUse" x1="5.2217" y1="-4.0654" x2="31.0705" y2="23.0325">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_5_)" d="M29.774,20.07c0,0,0-4.112,0-4.416c-0.275,0-2.351,0-2.626,0     c0,0.303,0,4.416,0,4.416c0,1.436-0.293,2.795-0.806,4.026l1.956,1.959C29.233,24.27,29.774,22.229,29.774,20.07z"/>
+<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="-6.9287" y1="7.5518" x2="18.9129" y2="34.642">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_6_)" d="M18.01,29.928c-9.555-0.886-9.158-10.265-9.158-10.83l-2.626-2.629     c0,1.284,0,3.602,0,3.602c0.362,10.392,8.883,12.18,10.462,12.349c0,0,0,5.183,0,5.489c0.274,0,2.35,0,2.625,0     c0-0.307,0-5.515,0-5.515s1.557-0.17,2.314-0.505l-2.104-2.107C19.028,29.87,18.523,29.976,18.01,29.928z"/>
+<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="-4.6963" y1="5.4282" x2="21.1414" y2="32.5144">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_7_)" d="M16.795,27.052L11.33,21.58C11.938,24.373,14.088,26.543,16.795,27.052z"/>
+<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="5.1543" y1="-3.9741" x2="30.9914" y2="23.1115">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_8_)" d="M18.003,8.373c2.434,0,4.412,2.132,4.412,4.752v6.86     c0,0.056-0.013,0.107-0.016,0.163l2.082,2.083c0.224-0.711,0.375-1.457,0.375-2.246v-6.86c0-3.966-3.074-7.196-6.854-7.196     c-2.606,0-4.848,1.552-6.008,3.803l1.853,1.854C14.445,9.723,16.073,8.373,18.003,8.373z"/>
+<polygon fill="#496DA2" points="1.699,8.48 4.496,5.679 34.301,35.521 31.504,38.321    "/>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_tb_microphone_unmute.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 36 44">
+<g>
+<g>
+<rect fill="none" width="36" height="44"/>
+<g>
+<linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="-0.7407" y1="1.6509" x2="25.1012" y2="28.7416">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_3_)" d="M27.148,15.654c0,0.303,0,4.416,0,4.416c0,5.435-4.1,9.858-9.139,9.858     c-5.05,0-9.158-4.423-9.158-9.858c0,0,0-4.112,0-4.416c-0.275,0-2.352,0-2.626,0c0,0.303,0,4.416,0,4.416     c0.282,11.337,10.462,12.348,10.462,12.348s0,5.184,0,5.49c0.274,0,2.35,0,2.625,0c0-0.307,0-5.516,0-5.516     s9.914-0.454,10.462-12.323c0,0,0-4.112,0-4.416C29.499,15.654,27.424,15.654,27.148,15.654z"/>
+<g>
+<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="1.6265" y1="-0.6118" x2="27.4665" y2="26.4769">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_4_)" d="M18.003,5.929c-3.782,0-6.854,3.23-6.854,7.196v6.86      c0,3.968,3.072,7.194,6.854,7.194c3.779,0,6.854-3.227,6.854-7.194v-6.86C24.856,9.159,21.782,5.929,18.003,5.929z       M22.415,19.985c0,2.619-1.979,4.75-4.412,4.75s-4.414-2.131-4.414-4.75v-6.86c0-2.621,1.98-4.752,4.414-4.752      s4.412,2.131,4.412,4.752V19.985z"/>
+</g>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_tb_zoom.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 36 44">
+<g>
+<g>
+<rect y="0" fill="none" width="36" height="44"/>
+<g>
+<linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="20.6406" y1="24.5981" x2="30.4117" y2="34.3692">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_3_)" d="M32.647,33.026l-6.661-6.912c-0.97,1.473-2.214,2.747-3.668,3.742l6.565,6.815     L32.647,33.026z"/>
+<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="4.5537" y1="8.5444" x2="22.3187" y2="26.3087">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.1142" style="stop-color:#E0EAF3"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.4825" style="stop-color:#8CA9CF"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="0.7458" style="stop-color:#637DB5"/>
+<stop offset="0.8189" style="stop-color:#4C6EA4"/>
+<stop offset="0.9097" style="stop-color:#265689"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_4_)" d="M14.716,7.329c-6.274,0-11.364,5.093-11.364,11.377     c0,6.282,5.09,11.377,11.364,11.377c6.275,0,11.361-5.095,11.361-11.377C26.077,12.422,20.991,7.329,14.716,7.329z      M14.716,27.637c-4.92,0-8.923-4.006-8.923-8.932c0-4.925,4.003-8.933,8.923-8.933c4.918,0,8.92,4.007,8.92,8.933     C23.636,23.631,19.634,27.637,14.716,27.637z"/>
+</g>
+<g>
+<rect x="10.564" y="22.668" fill="#496DA2" width="8.298" height="2.422"/>
+<polygon fill="#496DA2" points="18.976,15.529 15.771,15.529 15.771,12.321 13.659,12.321 13.659,15.529      10.455,15.529 10.455,17.646 13.659,17.646 13.659,20.853 15.771,20.853 15.771,17.646 18.976,17.646    "/>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_forw.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="16" height="16" viewBox="0 0 16 16"
+	 overflow="visible" enable-background="new 0 0 16 16" xml:space="preserve">
+<g>
+	<rect fill="none" width="16" height="16"/>
+	<g>
+		<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="8.6704" y1="-1.3042" x2="7.0489" y2="13.5588">
+			<stop  offset="0.0225" style="stop-color:#DAF49A"/>
+			<stop  offset="0.1591" style="stop-color:#B1DA6F"/>
+			<stop  offset="0.3642" style="stop-color:#7AB733"/>
+			<stop  offset="0.5156" style="stop-color:#57A10E"/>
+			<stop  offset="0.5955" style="stop-color:#4A9900"/>
+			<stop  offset="0.6556" style="stop-color:#398419"/>
+			<stop  offset="0.7512" style="stop-color:#22663B"/>
+			<stop  offset="0.8301" style="stop-color:#135550"/>
+			<stop  offset="0.882" style="stop-color:#0E4E58"/>
+		</linearGradient>
+		<polygon fill="url(#XMLID_4_)" stroke="#115B7E" stroke-width="0.4706" stroke-linejoin="round" points="15.232,7.972 
+			7.917,1.695 7.917,7.83 0.77,1.695 0.769,14.304 7.917,8.118 7.916,14.304 		"/>
+		<linearGradient id="XMLID_5_" gradientUnits="userSpaceOnUse" x1="4.2236" y1="-5.0122" x2="3.7113" y2="10.8517">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<polygon opacity="0.3" fill="url(#XMLID_5_)" enable-background="new    " points="1.392,8.885 1.393,3.083 6.387,7.544 		"/>
+		<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="11.3467" y1="-5.0122" x2="10.8343" y2="10.8517">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<polygon opacity="0.3" fill="url(#XMLID_6_)" enable-background="new    " points="8.515,8.885 8.516,3.083 13.51,7.544 		"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_pause.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="16" height="16" viewBox="0 0 16 16"
+	 overflow="visible" enable-background="new 0 0 16 16" xml:space="preserve">
+<g>
+	<rect fill="none" width="16" height="16"/>
+	<g>
+		<linearGradient id="XMLID_5_" gradientUnits="userSpaceOnUse" x1="5.1387" y1="-0.7241" x2="5.1387" y2="17.4704">
+			<stop  offset="0" style="stop-color:#E6EEF4"/>
+			<stop  offset="0.1737" style="stop-color:#9EC8D1"/>
+			<stop  offset="0.3357" style="stop-color:#62A9B3"/>
+			<stop  offset="0.4543" style="stop-color:#3D95A1"/>
+			<stop  offset="0.5169" style="stop-color:#2F8E9A"/>
+			<stop  offset="0.5662" style="stop-color:#247C90"/>
+			<stop  offset="0.6734" style="stop-color:#115A7D"/>
+			<stop  offset="0.762" style="stop-color:#044571"/>
+			<stop  offset="0.8202" style="stop-color:#003D6D"/>
+		</linearGradient>
+		
+			<rect x="3.586" y="2.254" fill="url(#XMLID_5_)" stroke="#115B7E" stroke-width="0.524" stroke-linejoin="round" width="3.105" height="11.492"/>
+		<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.6035" y1="-0.7241" x2="10.6035" y2="17.4704">
+			<stop  offset="0" style="stop-color:#E6EEF4"/>
+			<stop  offset="0.1737" style="stop-color:#9EC8D1"/>
+			<stop  offset="0.3357" style="stop-color:#62A9B3"/>
+			<stop  offset="0.4543" style="stop-color:#3D95A1"/>
+			<stop  offset="0.5169" style="stop-color:#2F8E9A"/>
+			<stop  offset="0.5662" style="stop-color:#247C90"/>
+			<stop  offset="0.6734" style="stop-color:#115A7D"/>
+			<stop  offset="0.762" style="stop-color:#044571"/>
+			<stop  offset="0.8202" style="stop-color:#003D6D"/>
+		</linearGradient>
+		
+			<rect x="9.051" y="2.254" fill="url(#XMLID_6_)" stroke="#115B7E" stroke-width="0.524" stroke-linejoin="round" width="3.106" height="11.492"/>
+		<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="5.5078" y1="-4.7964" x2="5.0184" y2="10.3557">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<rect x="4.274" y="3.041" opacity="0.3" fill="url(#XMLID_7_)" enable-background="new    " width="1.783" height="5.485"/>
+		<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="10.959" y1="-4.7964" x2="10.4696" y2="10.3557">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<rect x="9.726" y="3.041" opacity="0.3" fill="url(#XMLID_8_)" enable-background="new    " width="1.784" height="5.485"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_play.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="16" height="16" viewBox="0 0 16 16"
+	 overflow="visible" enable-background="new 0 0 16 16" xml:space="preserve">
+<g>
+	<rect fill="none" width="16" height="16"/>
+	<g>
+		<linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="8.0005" y1="-1.4077" x2="8.0005" y2="15.1577">
+			<stop  offset="0.0225" style="stop-color:#DAF49A"/>
+			<stop  offset="0.1591" style="stop-color:#B1DA6F"/>
+			<stop  offset="0.3642" style="stop-color:#7AB733"/>
+			<stop  offset="0.5156" style="stop-color:#57A10E"/>
+			<stop  offset="0.5955" style="stop-color:#4A9900"/>
+			<stop  offset="0.6556" style="stop-color:#398419"/>
+			<stop  offset="0.7512" style="stop-color:#22663B"/>
+			<stop  offset="0.8301" style="stop-color:#135550"/>
+			<stop  offset="0.882" style="stop-color:#0E4E58"/>
+		</linearGradient>
+		<polygon fill="url(#XMLID_3_)" stroke="#115B7E" stroke-width="0.4706" stroke-linejoin="round" points="2.54,14.304 2.54,1.695 
+			13.461,8 		"/>
+		<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="7.8047" y1="-5.2505" x2="7.2691" y2="11.3333">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<polygon opacity="0.3" fill="url(#XMLID_4_)" enable-background="new    " points="3.417,9.232 3.418,3.166 11.498,7.83 		"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_record.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="16" height="16" viewBox="0 0 16 16"
+	 overflow="visible" enable-background="new 0 0 16 16" xml:space="preserve">
+<g>
+	<rect fill="none" width="16" height="16"/>
+	<g>
+		<g>
+			<g>
+				<g>
+					
+						<radialGradient id="XMLID_3_" cx="4.8145" cy="5.0918" r="11.5364" gradientTransform="matrix(0.9554 0 0 0.9553 0.7654 0.324)" gradientUnits="userSpaceOnUse">
+						<stop  offset="0" style="stop-color:#F4BB9A"/>
+						<stop  offset="0.0694" style="stop-color:#EDA98C"/>
+						<stop  offset="0.3115" style="stop-color:#D56D60"/>
+						<stop  offset="0.49" style="stop-color:#C64844"/>
+						<stop  offset="0.5843" style="stop-color:#C03A3A"/>
+						<stop  offset="0.7264" style="stop-color:#AD2323"/>
+						<stop  offset="0.8912" style="stop-color:#9C0E0E"/>
+						<stop  offset="1" style="stop-color:#960606"/>
+					</radialGradient>
+					<path fill="url(#XMLID_3_)" d="M1.205,8.001c0,3.747,3.048,6.795,6.794,6.795c3.748,0,6.797-3.048,6.797-6.795
+						c0-3.748-3.049-6.796-6.797-6.796C4.252,1.205,1.205,4.253,1.205,8.001z"/>
+					<path fill="#7B341F" d="M7.999,1C4.133,1,1,4.136,1,8.001C1,11.867,4.133,15,7.999,15C11.866,15,15,11.867,15,8.001
+						C15,4.136,11.866,1,7.999,1L7.999,1z M7.999,14.591c-3.634,0-6.59-2.956-6.59-6.59c0-3.635,2.956-6.592,6.59-6.592
+						c3.635,0,6.592,2.957,6.592,6.592C14.591,11.635,11.634,14.591,7.999,14.591L7.999,14.591z"/>
+				</g>
+			</g>
+		</g>
+		
+			<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="-63.9365" y1="-810.6626" x2="-63.9365" y2="-817.5543" gradientTransform="matrix(0.7258 -0.2808 -0.2871 -0.7419 -181.4041 -617.9587)">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<path opacity="0.3" fill="url(#XMLID_4_)" enable-background="new    " d="M5.339,2.476c2.033-0.786,4.132-0.262,4.687,1.172
+			c0.556,1.433-0.645,3.234-2.677,4.021C5.314,8.454,3.215,7.93,2.661,6.497C2.106,5.063,3.305,3.263,5.339,2.476z"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_record_not.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="15" height="15" viewBox="0 0 15 15"
+	 overflow="visible" enable-background="new 0 0 15 15" xml:space="preserve">
+<g>
+	<rect fill="none" width="15" height="15"/>
+	<g>
+		<g>
+			<g>
+				<g>
+					
+						<radialGradient id="XMLID_3_" cx="5.2412" cy="4.4292" r="11.5378" gradientTransform="matrix(0.8955 0 0 0.8957 0.3363 0.8964)" gradientUnits="userSpaceOnUse">
+						<stop  offset="0" style="stop-color:#F4BB9A"/>
+						<stop  offset="0.0694" style="stop-color:#EDA98C"/>
+						<stop  offset="0.3115" style="stop-color:#D56D60"/>
+						<stop  offset="0.49" style="stop-color:#C64844"/>
+						<stop  offset="0.5843" style="stop-color:#C03A3A"/>
+						<stop  offset="0.7264" style="stop-color:#AD2323"/>
+						<stop  offset="0.8912" style="stop-color:#9C0E0E"/>
+						<stop  offset="1" style="stop-color:#960606"/>
+					</radialGradient>
+					<path fill="url(#XMLID_3_)" d="M2.996,2.995C1.792,4.198,1.129,5.797,1.129,7.499c0,3.514,2.858,6.372,6.371,6.372
+						c3.514,0,6.372-2.858,6.372-6.372c0-1.702-0.663-3.302-1.866-4.504C10.803,1.792,9.202,1.129,7.5,1.129
+						C5.798,1.129,4.199,1.792,2.996,2.995z"/>
+					<path fill="#7B341F" d="M7.5,0.938c-3.624,0-6.563,2.937-6.563,6.562s2.939,6.563,6.563,6.563c3.625,0,6.563-2.938,6.563-6.563
+						S11.125,0.938,7.5,0.938L7.5,0.938z M7.5,13.68c-3.408,0-6.18-2.771-6.18-6.18c0-3.407,2.772-6.179,6.18-6.179
+						s6.18,2.772,6.18,6.179C13.68,10.908,10.908,13.68,7.5,13.68L7.5,13.68z"/>
+				</g>
+			</g>
+		</g>
+		
+			<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="-64.2925" y1="-811.7285" x2="-64.2925" y2="-818.1852" gradientTransform="matrix(0.7258 -0.2808 -0.2871 -0.7419 -181.6848 -618.9701)">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<path opacity="0.3" fill="url(#XMLID_4_)" enable-background="new    " d="M5.079,2.289C6.984,1.55,8.951,2.042,9.473,3.386
+			C9.991,4.73,8.866,6.417,6.961,7.155C5.056,7.893,3.089,7.402,2.569,6.059C2.048,4.713,3.173,3.026,5.079,2.289z"/>
+	</g>
+	<g>
+		
+			<rect x="-0.907" y="6.626" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -3.1064 7.4997)" fill="#540000" width="16.814" height="1.748"/>
+		
+			<rect x="-0.908" y="6.627" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 7.4996 18.1066)" fill="#540000" width="16.815" height="1.746"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_rew.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="16" height="16" viewBox="0 0 16 16"
+	 overflow="visible" enable-background="new 0 0 16 16" xml:space="preserve">
+<g>
+	<rect fill="none" width="16" height="16"/>
+	<g>
+		
+			<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="8.6704" y1="-1.3042" x2="7.0489" y2="13.5588" gradientTransform="matrix(-1 0 0 1 16 0)">
+			<stop  offset="0.0225" style="stop-color:#DAF49A"/>
+			<stop  offset="0.1591" style="stop-color:#B1DA6F"/>
+			<stop  offset="0.3642" style="stop-color:#7AB733"/>
+			<stop  offset="0.5156" style="stop-color:#57A10E"/>
+			<stop  offset="0.5955" style="stop-color:#4A9900"/>
+			<stop  offset="0.6556" style="stop-color:#398419"/>
+			<stop  offset="0.7512" style="stop-color:#22663B"/>
+			<stop  offset="0.8301" style="stop-color:#135550"/>
+			<stop  offset="0.882" style="stop-color:#0E4E58"/>
+		</linearGradient>
+		<polygon fill="url(#XMLID_4_)" stroke="#115B7E" stroke-width="0.4706" stroke-linejoin="round" points="0.768,7.972 8.083,1.695 
+			8.083,7.83 15.23,1.695 15.231,14.304 8.083,8.118 8.084,14.304 		"/>
+		
+			<linearGradient id="XMLID_5_" gradientUnits="userSpaceOnUse" x1="4.2236" y1="-5.0122" x2="3.7113" y2="10.8517" gradientTransform="matrix(-1 0 0 1 16 0)">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<polygon opacity="0.3" fill="url(#XMLID_5_)" enable-background="new    " points="14.608,8.885 14.607,3.083 9.613,7.544 		"/>
+		
+			<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="11.3467" y1="-5.0122" x2="10.8343" y2="10.8517" gradientTransform="matrix(-1 0 0 1 16 0)">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<polygon opacity="0.3" fill="url(#XMLID_6_)" enable-background="new    " points="7.485,8.885 7.484,3.083 2.49,7.544 		"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_stop.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="16" height="16" viewBox="0 0 16 16"
+	 overflow="visible" enable-background="new 0 0 16 16" xml:space="preserve">
+<g>
+	<rect fill="none" width="16" height="16"/>
+	<g>
+		<linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="8.9023" y1="-0.2603" x2="7.516" y2="12.4474">
+			<stop  offset="0" style="stop-color:#D6D6D6"/>
+			<stop  offset="0.192" style="stop-color:#A4A4A4"/>
+			<stop  offset="0.3568" style="stop-color:#7F7F7F"/>
+			<stop  offset="0.4438" style="stop-color:#707070"/>
+			<stop  offset="0.61" style="stop-color:#474747"/>
+			<stop  offset="0.7752" style="stop-color:#242424"/>
+			<stop  offset="0.9108" style="stop-color:#0F0F0F"/>
+			<stop  offset="1" style="stop-color:#080808"/>
+		</linearGradient>
+		
+			<rect x="2.84" y="2.839" fill="url(#XMLID_3_)" stroke="#000000" stroke-width="0.4706" stroke-linejoin="round" width="10.322" height="10.321"/>
+		<linearGradient id="XMLID_4_" gradientUnits="userSpaceOnUse" x1="8.3242" y1="-4.1167" x2="7.8641" y2="10.1299">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<rect x="3.569" y="3.368" opacity="0.3" fill="url(#XMLID_4_)" enable-background="new    " width="8.866" height="4.925"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_wait1.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="14" height="14" viewBox="0 0 14 14"
+	 overflow="visible" enable-background="new 0 0 14 14" xml:space="preserve">
+<g>
+	<rect y="0" fill="none" width="14" height="14"/>
+	<g>
+		<g>
+			
+				<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.5508" y1="-3.3726" x2="10.5508" y2="15.2263" gradientTransform="matrix(0.7071 0.7071 -0.7071 0.7071 7.002 -3.0148)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_6_)" d="M7.046,6.917c-1.671,1.671-3.329,3.329-4.979,4.98c0.007,0.008,0.014,0.017,0.021,0.023
+				c2.718,2.718,7.126,2.718,9.843,0c0.021-0.021,0.038-0.042,0.058-0.063C10.4,10.272,8.724,8.596,7.046,6.917z"/>
+			
+				<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="10.5488" y1="2.7715" x2="10.5488" y2="14.2187" gradientTransform="matrix(0.7071 0.7071 -0.7071 0.7071 7.002 -3.0148)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_7_)" d="M11.931,2.077c-0.007-0.007-0.015-0.014-0.022-0.021C10.268,3.696,8.65,5.313,7.046,6.917
+				c1.678,1.678,3.354,3.355,4.941,4.941C14.646,9.137,14.63,4.775,11.931,2.077z"/>
+			
+				<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="3.5923" y1="-3.373" x2="3.5923" y2="15.2274" gradientTransform="matrix(0.7071 0.7071 -0.7071 0.7071 7.002 -3.0148)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_8_)" d="M11.908,2.056C9.21-0.62,4.865-0.631,2.15,2.021c1.56,1.56,3.222,3.224,4.896,4.896
+				C8.65,5.313,10.268,3.696,11.908,2.056z"/>
+			
+				<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="3.5894" y1="2.771" x2="3.5894" y2="14.2168" gradientTransform="matrix(0.7071 0.7071 -0.7071 0.7071 7.002 -3.0148)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_9_)" d="M2.15,2.021C2.129,2.04,2.106,2.057,2.086,2.077c-2.709,2.71-2.718,7.102-0.02,9.82
+				c1.651-1.651,3.309-3.309,4.979-4.98C5.372,5.245,3.709,3.581,2.15,2.021z"/>
+			<g>
+				<path fill="#17594C" d="M6.999,0C3.133,0,0,3.134,0,7.001C0,10.866,3.133,14,6.999,14C10.866,14,14,10.866,14,7.001
+					C14,3.134,10.866,0,6.999,0L6.999,0z M6.999,13.591c-3.634,0-6.59-2.956-6.59-6.59c0-3.635,2.956-6.592,6.59-6.592
+					c3.635,0,6.592,2.957,6.592,6.592C13.591,10.635,10.634,13.591,6.999,13.591L6.999,13.591z"/>
+			</g>
+		</g>
+		<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="6.9282" y1="-0.4961" x2="6.9282" y2="6.2416">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<ellipse opacity="0.2" fill="url(#XMLID_10_)" enable-background="new    " cx="6.928" cy="4.309" rx="4.983" ry="3.422"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_wait2.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="14" height="14" viewBox="0 0 14 14"
+	 overflow="visible" enable-background="new 0 0 14 14" xml:space="preserve">
+<g>
+	<rect y="0" fill="none" width="14" height="14"/>
+	<g>
+		<g>
+			
+				<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.4727" y1="-3.4482" x2="10.4727" y2="15.148" gradientTransform="matrix(0 1 -1 0 14.0059 -0.0098)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_6_)" d="M7.092,6.968c-2.363,0-4.708,0-7.042,0c-0.001,0.01-0.002,0.021-0.002,0.031
+				c0,3.844,3.116,6.961,6.96,6.96c0.029,0.001,0.057-0.003,0.084-0.004C7.092,11.713,7.092,9.341,7.092,6.968z"/>
+			
+				<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="10.4707" y1="2.6938" x2="10.4707" y2="14.1403" gradientTransform="matrix(0 1 -1 0 14.0059 -0.0098)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_7_)" d="M13.969,6.999c0-0.01,0-0.021-0.001-0.031c-2.32,0-4.606,0-6.875,0c0,2.373,0,4.745,0,6.987
+				C10.897,13.911,13.969,10.815,13.969,6.999z"/>
+			
+				<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="3.5142" y1="-3.4497" x2="3.5142" y2="15.1495" gradientTransform="matrix(0 1 -1 0 14.0059 -0.0098)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_8_)" d="M13.968,6.968c-0.016-3.801-3.081-6.88-6.875-6.925c0,2.206,0,4.558,0,6.925
+				C9.361,6.968,11.647,6.968,13.968,6.968z"/>
+			
+				<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="3.5112" y1="2.6943" x2="3.5112" y2="14.1386" gradientTransform="matrix(0 1 -1 0 14.0059 -0.0098)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_9_)" d="M7.092,0.043C7.064,0.042,7.036,0.038,7.007,0.038c-3.832,0-6.943,3.1-6.958,6.93
+				c2.335,0,4.679,0,7.042,0C7.092,4.601,7.092,2.249,7.092,0.043z"/>
+			<g>
+				<path fill="#17594C" d="M6.999,0C3.133,0,0,3.134,0,7.001C0,10.866,3.133,14,6.999,14C10.866,14,14,10.866,14,7.001
+					C14,3.134,10.866,0,6.999,0L6.999,0z M6.999,13.591c-3.634,0-6.59-2.956-6.59-6.59c0-3.635,2.956-6.592,6.59-6.592
+					c3.635,0,6.592,2.957,6.592,6.592C13.591,10.635,10.634,13.591,6.999,13.591L6.999,13.591z"/>
+			</g>
+		</g>
+		<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="6.9282" y1="-0.4961" x2="6.9282" y2="6.2416">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<ellipse opacity="0.2" fill="url(#XMLID_10_)" enable-background="new    " cx="6.928" cy="4.309" rx="4.983" ry="3.422"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_wait3.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="14" height="14" viewBox="0 0 14 14"
+	 overflow="visible" enable-background="new 0 0 14 14" xml:space="preserve">
+<g>
+	<rect y="0" fill="none" width="14" height="14"/>
+	<g>
+		<g>
+			
+				<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.5527" y1="-3.3711" x2="10.5527" y2="15.2264" gradientTransform="matrix(-0.7071 0.7071 -0.7071 -0.7071 17.0236 6.9917)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_6_)" d="M7.089,7.038C5.418,5.367,3.761,3.709,2.11,2.058C2.102,2.064,2.093,2.071,2.086,2.078
+				c-2.718,2.718-2.718,7.126,0,9.843c0.021,0.021,0.042,0.038,0.063,0.058C3.734,10.393,5.412,8.715,7.089,7.038z"/>
+			
+				<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="10.5508" y1="2.771" x2="10.5508" y2="14.2174" gradientTransform="matrix(-0.7071 0.7071 -0.7071 -0.7071 17.0236 6.9917)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_7_)" d="M11.931,11.922c0.007-0.007,0.014-0.016,0.021-0.023c-1.641-1.641-3.258-3.257-4.862-4.861
+				c-1.678,1.677-3.355,3.355-4.941,4.941C4.871,14.638,9.232,14.62,11.931,11.922z"/>
+			
+				<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="3.5942" y1="-3.3716" x2="3.5942" y2="15.2263" gradientTransform="matrix(-0.7071 0.7071 -0.7071 -0.7071 17.0236 6.9917)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_8_)" d="M11.951,11.898c2.676-2.698,2.687-7.042,0.035-9.757C10.427,3.7,8.763,5.364,7.089,7.038
+				C8.693,8.642,10.311,10.258,11.951,11.898z"/>
+			
+				<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="3.5918" y1="2.7715" x2="3.5918" y2="14.2165" gradientTransform="matrix(-0.7071 0.7071 -0.7071 -0.7071 17.0236 6.9917)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_9_)" d="M11.986,2.141c-0.02-0.021-0.036-0.044-0.057-0.064C9.22-0.632,4.828-0.641,2.11,2.058
+				c1.651,1.651,3.309,3.309,4.979,4.98C8.763,5.364,10.427,3.7,11.986,2.141z"/>
+			<g>
+				<path fill="#17594C" d="M6.999,0C3.133,0,0,3.134,0,7.001C0,10.866,3.133,14,6.999,14C10.866,14,14,10.866,14,7.001
+					C14,3.134,10.866,0,6.999,0L6.999,0z M6.999,13.591c-3.634,0-6.59-2.956-6.59-6.59c0-3.635,2.956-6.592,6.59-6.592
+					c3.635,0,6.592,2.957,6.592,6.592C13.591,10.635,10.634,13.591,6.999,13.591L6.999,13.591z"/>
+			</g>
+		</g>
+		<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="6.9282" y1="-0.4961" x2="6.9282" y2="6.2416">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<ellipse opacity="0.2" fill="url(#XMLID_10_)" enable-background="new    " cx="6.928" cy="4.309" rx="4.983" ry="3.422"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_wait4.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="14" height="14" viewBox="0 0 14 14"
+	 overflow="visible" enable-background="new 0 0 14 14" xml:space="preserve">
+<g>
+	<rect y="0" fill="none" width="14" height="14"/>
+	<g>
+		<g>
+			
+				<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.4746" y1="-3.4502" x2="10.4746" y2="15.1461" gradientTransform="matrix(-1 0 0 -1 14.0176 13.9961)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_6_)" d="M7.039,7.084c0-2.363,0-4.708,0-7.042C7.029,0.04,7.019,0.039,7.008,0.039
+				c-3.844,0-6.961,3.117-6.96,6.96c0,0.029,0.003,0.057,0.004,0.085C2.295,7.083,4.667,7.083,7.039,7.084z"/>
+			
+				<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="10.4727" y1="2.6919" x2="10.4727" y2="14.1391" gradientTransform="matrix(-1 0 0 -1 14.0176 13.9961)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_7_)" d="M7.009,13.961c0.01,0,0.021-0.002,0.03-0.002c0-2.32,0-4.606,0-6.875c-2.372,0-4.744,0-6.987,0
+				C0.097,10.889,3.192,13.961,7.009,13.961z"/>
+			
+				<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="3.5161" y1="-3.4512" x2="3.5161" y2="15.1467" gradientTransform="matrix(-1 0 0 -1 14.0176 13.9961)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_8_)" d="M7.039,13.959c3.801-0.017,6.88-3.08,6.925-6.875c-2.205,0-4.558,0-6.925,0
+				C7.039,9.353,7.039,11.639,7.039,13.959z"/>
+			
+				<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="3.5137" y1="2.6924" x2="3.5137" y2="14.1366" gradientTransform="matrix(-1 0 0 -1 14.0176 13.9961)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_9_)" d="M13.964,7.084c0.001-0.028,0.005-0.057,0.005-0.086c0-3.831-3.099-6.942-6.93-6.957
+				c0,2.335,0,4.679,0,7.042C9.406,7.084,11.759,7.084,13.964,7.084z"/>
+			<g>
+				<path fill="#17594C" d="M6.999,0C3.133,0,0,3.134,0,7.001C0,10.866,3.133,14,6.999,14C10.866,14,14,10.866,14,7.001
+					C14,3.134,10.866,0,6.999,0L6.999,0z M6.999,13.591c-3.634,0-6.59-2.956-6.59-6.59c0-3.635,2.956-6.592,6.59-6.592
+					c3.635,0,6.592,2.957,6.592,6.592C13.591,10.635,10.634,13.591,6.999,13.591L6.999,13.591z"/>
+			</g>
+		</g>
+		<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="6.9282" y1="-0.4961" x2="6.9282" y2="6.2416">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<ellipse opacity="0.2" fill="url(#XMLID_10_)" enable-background="new    " cx="6.928" cy="4.309" rx="4.983" ry="3.422"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_wait5.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="14" height="14" viewBox="0 0 14 14"
+	 overflow="visible" enable-background="new 0 0 14 14" xml:space="preserve">
+<g>
+	<rect y="0" fill="none" width="14" height="14"/>
+	<g>
+		<g>
+			
+				<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.5527" y1="-3.3721" x2="10.5527" y2="15.2242" gradientTransform="matrix(-0.7071 -0.7071 0.7071 -0.7071 7.0161 17.0138)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_6_)" d="M6.97,7.081c1.671-1.671,3.329-3.328,4.979-4.979c-0.006-0.008-0.013-0.017-0.021-0.023
+				c-2.718-2.718-7.125-2.718-9.843,0C2.065,2.098,2.048,2.12,2.029,2.14C3.615,3.726,5.292,5.403,6.97,7.081z"/>
+			
+				<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="10.5508" y1="2.7695" x2="10.5508" y2="14.2159" gradientTransform="matrix(-0.7071 -0.7071 0.7071 -0.7071 7.0161 17.0138)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_7_)" d="M2.085,11.922c0.007,0.007,0.015,0.014,0.022,0.021c1.641-1.641,3.257-3.257,4.862-4.862
+				C5.292,5.403,3.615,3.726,2.029,2.14C-0.63,4.862-0.613,9.224,2.085,11.922z"/>
+			
+				<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="3.5942" y1="-3.3735" x2="3.5942" y2="15.2256" gradientTransform="matrix(-0.7071 -0.7071 0.7071 -0.7071 7.0161 17.0138)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_8_)" d="M2.108,11.942c2.7,2.677,7.042,2.687,9.758,0.035c-1.56-1.56-3.223-3.224-4.896-4.897
+				C5.365,8.686,3.749,10.302,2.108,11.942z"/>
+			
+				<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="3.5918" y1="2.7705" x2="3.5918" y2="14.2147" gradientTransform="matrix(-0.7071 -0.7071 0.7071 -0.7071 7.0161 17.0138)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_9_)" d="M11.866,11.978c0.021-0.019,0.044-0.036,0.064-0.057c2.709-2.71,2.717-7.101,0.019-9.82
+				C10.299,3.752,8.641,5.41,6.97,7.081C8.644,8.754,10.307,10.418,11.866,11.978z"/>
+			<g>
+				<path fill="#17594C" d="M6.999,0C3.133,0,0,3.134,0,7.001C0,10.866,3.133,14,6.999,14C10.866,14,14,10.866,14,7.001
+					C14,3.134,10.866,0,6.999,0L6.999,0z M6.999,13.591c-3.634,0-6.59-2.956-6.59-6.59c0-3.635,2.956-6.592,6.59-6.592
+					c3.635,0,6.592,2.957,6.592,6.592C13.591,10.635,10.634,13.591,6.999,13.591L6.999,13.591z"/>
+			</g>
+		</g>
+		<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="6.9282" y1="-0.4961" x2="6.9282" y2="6.2416">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<ellipse opacity="0.2" fill="url(#XMLID_10_)" enable-background="new    " cx="6.928" cy="4.309" rx="4.983" ry="3.422"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_wait6.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="14" height="14" viewBox="0 0 14 14"
+	 overflow="visible" enable-background="new 0 0 14 14" xml:space="preserve">
+<g>
+	<rect y="0" fill="none" width="14" height="14"/>
+	<g>
+		<g>
+			
+				<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.4727" y1="-3.4492" x2="10.4727" y2="15.147" gradientTransform="matrix(0 -1 1 0 0.0107 14.0078)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_6_)" d="M6.923,7.03c2.364,0,4.708,0,7.042,0c0.001-0.01,0.003-0.021,0.002-0.031
+				c0-3.844-3.116-6.96-6.96-6.96c-0.029,0-0.057,0.003-0.084,0.004C6.923,2.286,6.923,4.658,6.923,7.03z"/>
+			
+				<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="10.4707" y1="2.6924" x2="10.4707" y2="14.1388" gradientTransform="matrix(0 -1 1 0 0.0107 14.0078)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_7_)" d="M0.046,7c0,0.01,0.001,0.021,0.001,0.031c2.32,0,4.606,0,6.875,0c0-2.373,0-4.745,0-6.987
+				C3.119,0.088,0.046,3.184,0.046,7z"/>
+			
+				<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="3.5146" y1="-3.4507" x2="3.5146" y2="15.1485" gradientTransform="matrix(0 -1 1 0 0.0107 14.0078)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_8_)" d="M0.048,7.03c0.016,3.802,3.081,6.88,6.875,6.925c0-2.205,0-4.559,0-6.925
+				C4.654,7.03,2.368,7.03,0.048,7.03z"/>
+			
+				<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="3.5117" y1="2.6924" x2="3.5117" y2="14.1374" gradientTransform="matrix(0 -1 1 0 0.0107 14.0078)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_9_)" d="M6.923,13.955c0.028,0.001,0.056,0.006,0.085,0.006c3.833,0,6.943-3.101,6.958-6.931
+				c-2.335,0-4.679,0-7.042,0C6.923,9.396,6.923,11.75,6.923,13.955z"/>
+			<g>
+				<path fill="#17594C" d="M6.999,0C3.133,0,0,3.134,0,7.001C0,10.866,3.133,14,6.999,14C10.866,14,14,10.866,14,7.001
+					C14,3.134,10.866,0,6.999,0L6.999,0z M6.999,13.591c-3.634,0-6.59-2.956-6.59-6.59c0-3.635,2.956-6.592,6.59-6.592
+					c3.635,0,6.592,2.957,6.592,6.592C13.591,10.635,10.634,13.591,6.999,13.591L6.999,13.591z"/>
+			</g>
+		</g>
+		<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="6.9282" y1="-0.4961" x2="6.9282" y2="6.2416">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<ellipse opacity="0.2" fill="url(#XMLID_10_)" enable-background="new    " cx="6.928" cy="4.309" rx="4.983" ry="3.422"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_wait7.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="14" height="14" viewBox="0 0 14 14"
+	 overflow="visible" enable-background="new 0 0 14 14" xml:space="preserve">
+<g>
+	<rect x="0.001" y="0" fill="none" width="14" height="14"/>
+	<g>
+		<g>
+			
+				<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.5522" y1="-3.3711" x2="10.5522" y2="15.2264" gradientTransform="matrix(0.7071 -0.7071 0.7071 0.7071 -3.0068 7.0062)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_6_)" d="M6.927,6.961c1.671,1.671,3.329,3.328,4.98,4.979c0.008-0.007,0.017-0.013,0.023-0.021
+				c2.718-2.718,2.718-7.126,0-9.843c-0.021-0.021-0.042-0.038-0.063-0.057C10.282,3.606,8.604,5.283,6.927,6.961z"/>
+			
+				<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="10.5503" y1="2.771" x2="10.5503" y2="14.2174" gradientTransform="matrix(0.7071 -0.7071 0.7071 0.7071 -3.0068 7.0062)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_7_)" d="M2.086,2.076C2.079,2.083,2.073,2.092,2.065,2.099C3.706,3.74,5.323,5.356,6.927,6.961
+				c1.677-1.678,3.355-3.355,4.941-4.941C9.145-0.639,4.785-0.622,2.086,2.076z"/>
+			
+				<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="3.5938" y1="-3.3726" x2="3.5937" y2="15.2279" gradientTransform="matrix(0.7071 -0.7071 0.7071 0.7071 -3.0068 7.0062)">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_8_)" d="M2.065,2.099c-2.676,2.7-2.687,7.043-0.036,9.758c1.56-1.559,3.224-3.223,4.897-4.896
+				C5.323,5.356,3.706,3.74,2.065,2.099z"/>
+			
+				<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="3.5913" y1="2.7715" x2="3.5913" y2="14.2157" gradientTransform="matrix(0.7071 -0.7071 0.7071 0.7071 -3.0068 7.0062)">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_9_)" d="M2.03,11.857c0.02,0.021,0.036,0.043,0.057,0.063c2.71,2.711,7.102,2.718,9.82,0.02
+				c-1.651-1.651-3.309-3.309-4.98-4.979C5.253,8.635,3.589,10.299,2.03,11.857z"/>
+			<g>
+				<path fill="#17594C" d="M6.999,0C3.133,0,0,3.134,0,7.001C0,10.865,3.133,14,6.999,14C10.866,14,14,10.865,14,7.001
+					C14,3.134,10.866,0,6.999,0L6.999,0z M6.999,13.592c-3.634,0-6.59-2.957-6.59-6.59c0-3.635,2.956-6.593,6.59-6.593
+					c3.635,0,6.592,2.958,6.592,6.593C13.59,10.635,10.633,13.592,6.999,13.592L6.999,13.592z"/>
+			</g>
+		</g>
+		<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="6.9282" y1="-0.4961" x2="6.9282" y2="6.2416">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<ellipse opacity="0.2" fill="url(#XMLID_10_)" enable-background="new    " cx="6.928" cy="4.309" rx="4.982" ry="3.422"/>
+	</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/graphics/qgn_indi_video_wait8.svg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+	<!ENTITY ns_svg "http://www.w3.org/2000/svg">
+	<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg  version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="14" height="14" viewBox="0 0 14 14"
+	 overflow="visible" enable-background="new 0 0 14 14" xml:space="preserve">
+<g>
+	<rect x="0.001" y="0" fill="none" width="14" height="14"/>
+	<g>
+		<g>
+			<linearGradient id="XMLID_6_" gradientUnits="userSpaceOnUse" x1="10.4731" y1="-3.4497" x2="10.4731" y2="15.1491">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_6_)" d="M6.978,6.914c0,2.364,0,4.707,0,7.043c0.01,0,0.021,0.002,0.031,0.002
+				c3.844,0,6.96-3.117,6.96-6.96c0-0.029-0.003-0.056-0.004-0.084C11.721,6.914,9.349,6.914,6.978,6.914z"/>
+			<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="10.4712" y1="2.6934" x2="10.4712" y2="14.1398">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_7_)" d="M7.008,0.037c-0.01,0-0.021,0.002-0.031,0.002c0,2.32,0,4.606,0,6.875c2.372,0,4.744,0,6.987,0
+				C13.918,3.109,10.824,0.037,7.008,0.037z"/>
+			<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="3.5146" y1="-3.4492" x2="3.5146" y2="15.1486">
+				<stop  offset="0" style="stop-color:#E6EEF4"/>
+				<stop  offset="0.0772" style="stop-color:#C6DCC1"/>
+				<stop  offset="0.211" style="stop-color:#91C06F"/>
+				<stop  offset="0.321" style="stop-color:#6BAB33"/>
+				<stop  offset="0.4014" style="stop-color:#539E0E"/>
+				<stop  offset="0.4438" style="stop-color:#4A9900"/>
+				<stop  offset="0.5475" style="stop-color:#398419"/>
+				<stop  offset="0.7125" style="stop-color:#22663B"/>
+				<stop  offset="0.8486" style="stop-color:#135550"/>
+				<stop  offset="0.9382" style="stop-color:#0E4E58"/>
+			</linearGradient>
+			<path fill="url(#XMLID_8_)" d="M6.978,0.039c-3.802,0.016-6.88,3.08-6.926,6.875c2.206,0,4.559,0,6.926,0
+				C6.978,4.646,6.978,2.359,6.978,0.039z"/>
+			<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="3.5127" y1="2.6938" x2="3.5127" y2="14.1397">
+				<stop  offset="0" style="stop-color:#DCE8E4"/>
+				<stop  offset="1" style="stop-color:#43910A"/>
+			</linearGradient>
+			<path fill="url(#XMLID_9_)" d="M0.052,6.914c0,0.028-0.004,0.056-0.004,0.084c0,3.833,3.1,6.943,6.93,6.958
+				c0-2.336,0-4.679,0-7.043C4.61,6.914,2.257,6.914,0.052,6.914z"/>
+			<g>
+				<path fill="#17594C" d="M6.999,0C3.133,0,0,3.134,0,7.001C0,10.865,3.133,14,6.999,14C10.866,14,14,10.865,14,7.001
+					C14,3.134,10.866,0,6.999,0L6.999,0z M6.999,13.592c-3.634,0-6.59-2.957-6.59-6.59c0-3.635,2.956-6.593,6.59-6.593
+					c3.635,0,6.592,2.958,6.592,6.593C13.59,10.635,10.633,13.592,6.999,13.592L6.999,13.592z"/>
+			</g>
+		</g>
+		<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="6.9282" y1="-0.4961" x2="6.9282" y2="6.2416">
+			<stop  offset="0.0056" style="stop-color:#FFFFFF"/>
+			<stop  offset="1" style="stop-color:#FFFFFF"/>
+		</linearGradient>
+		<ellipse opacity="0.2" fill="url(#XMLID_10_)" enable-background="new    " cx="6.928" cy="4.309" rx="4.982" ry="3.422"/>
+	</g>
+</g>
+</svg>
Binary file mmsharing/mmshui/graphics/qgn_menu_mus_app_cxt.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_menu_mus_app_cxt_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_menu_mus_app_cxt_mask_soft.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_menu_mus_app_lst.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_menu_mus_app_lst_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_menu_mus_app_lst_mask_soft.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_clip_rec_sub.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_clip_rec_sub_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_file_video.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_file_video_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_folder_sub_large.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_folder_sub_large_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_memc_mmc_tab.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_memc_mmc_tab2.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_memc_mmc_tab2_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_memc_mmc_tab_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_memc_phone_tab.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_memc_phone_tab2.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_memc_phone_tab2_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_memc_phone_tab_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_sip_url.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_sip_url_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_view_clip_sub.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_view_clip_sub_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_view_live_sub.bmp has changed
Binary file mmsharing/mmshui/graphics/qgn_prop_mus_view_live_sub_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/Thumbs.db has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_ff.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_ff_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_norec.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_norec_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_pause.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_pause_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_play.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_play_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_rec.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_rec_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_rew.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_rew_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_stop.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_stop_mask.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_wait.bmp has changed
Binary file mmsharing/mmshui/graphics/temp_icons/qgn_msh_temp_wait_mask.bmp has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  project specification
+*
+*/
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+ARMV5 THUMB WINSCW
+
+PRJ_MMPFILES
+musui.mmp
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE musuitoolbaricons.mif
+OPTION HEADERFILE musuitoolbaricons.mbg
+OPTION SOURCEFILE toolbariconslist.txt
+END
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE musuiicons.mif
+OPTION HEADERFILE musuiicons.mbg
+OPTION SOURCEFILE musuiiconlist.txt
+END
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE musui_aif.mif
+OPTION HEADERFILE musui_aif.mbg
+OPTION SOURCEDIR ../graphics
+OPTION SOURCES -c8,8 qgn_menu_mus_app_lst -c8,8 qgn_menu_mus_app_cxt
+END
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/group/musui.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Specifies the project for building musui.exe, the
+*                application executable.
+*
+*/
+
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+
+#include "../../../inc/musuid.hrh"
+
+
+TARGET                  musui.exe
+TARGETTYPE              EXE
+UID                     0x100039CE KMusUiUid //0x10282391
+EPOCSTACKSIZE           0x8000 // 32 kB
+EPOCHEAPSIZE            0x4000 0x500000 // Max heapsize ~= 5MB
+VENDORID                VID_DEFAULT
+CAPABILITY              CAP_APPLICATION NetworkControl SwEvent Location MultimediaDD
+
+START RESOURCE          ../data/musui.rss
+HEADER
+LANGUAGE_IDS
+TARGETPATH              APP_RESOURCE_DIR 
+END // RESOURCE
+
+START RESOURCE          ../data/musui_reg.rss
+DEPENDS musui.rsg
+TARGETPATH              /private/10003a3f/apps // Do not change the UID in this path.
+END
+
+START BITMAP            musui.mbm
+HEADER
+TARGETPATH              APP_BITMAP_DIR
+SOURCEPATH              ../graphics
+SOURCE                  c16 qgn_menu_mus_app_cxt.bmp
+SOURCE                   8  qgn_menu_mus_app_cxt_mask.bmp
+SOURCE                  c8  qgn_graf_rop_black.bmp
+END // BITMAP
+
+SOURCEPATH              ../src
+SOURCE                  musuiapp.cpp
+SOURCE                  musuidocument.cpp
+SOURCE                  musuiappui.cpp
+SOURCE                  musuigeneralview.cpp
+SOURCE                  musuisendview.cpp
+SOURCE                  musuilivesharingview.cpp
+SOURCE                  musuireceiveview.cpp
+SOURCE                  musuiclipsharingview.cpp
+SOURCE                  musuiviewcontainer.cpp
+SOURCE                  musuisendviewcontainer.cpp
+SOURCE                  musuilivesharingviewcontainer.cpp
+SOURCE                  musuiclipsharingviewcontainer.cpp
+SOURCE                  musuireceivecontainer.cpp
+SOURCE                  musuistatuspanehandler.cpp
+SOURCE                  musuinavimediadecorator.cpp
+SOURCE                  musuinavimediaanimator.cpp
+SOURCE                  musuiinvitationquery.cpp
+SOURCE                  musuiactivequerydialog.cpp
+SOURCE                  musuilevelindicator.cpp
+SOURCE                  musuiactivetimer.cpp
+SOURCE                  musuistartcontroller.cpp
+SOURCE                  musuipropertywatch.cpp
+SOURCE                  musuiresourcehandler.cpp
+SOURCE                  musuieventcontroller.cpp
+SOURCE                  musuisendcontroller.cpp
+SOURCE                  musuilivesharingcontroller.cpp
+SOURCE                  musuireceivecontroller.cpp
+SOURCE                  musuiclipsharingcontroller.cpp
+SOURCE                  musuibitmapdecoder.cpp
+SOURCE                  musuiactivitymanger.cpp
+SOURCE                  musuimmcmonitor.cpp
+SOURCE                  musuicallbackservice.cpp
+SOURCE                  musuidialogutil.cpp
+SOURCE                  musuifileutil.cpp
+SOURCE                  musuicontactutil.cpp
+SOURCE                  musuibackgroundviewcontainer.cpp
+
+
+USERINCLUDE             .
+USERINCLUDE             ../inc
+
+USERINCLUDE             ../data
+USERINCLUDE				      ../../mmshshared/inc
+USERINCLUDE				      ../../mmshengine/inc
+USERINCLUDE             ../../inc
+USERINCLUDE             ../../../inc
+
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE           .
+
+// MUS libraries:
+
+// Symbian libraries:
+LIBRARY                 apgrfx.lib              // AppArc server client APIs
+LIBRARY                 apparc.lib              // Application framework API
+LIBRARY                 bafl.lib                // Resource readers
+LIBRARY                 centralrepository.lib   // Central repository
+LIBRARY                 cntmodel.lib            // Contact Model
+LIBRARY                 cone.lib                // Cone framework API
+LIBRARY                 efsrv.lib               // File Server API
+LIBRARY                 eikcoctl.lib            // Control framework API
+LIBRARY                 eikcore.lib             // Eikon core controls API
+LIBRARY                 eikctl.lib              // Eikon controls
+LIBRARY                 eikdlg.lib              // Eikon Dialog API
+LIBRARY                 euser.lib               // Base library
+LIBRARY                 ws32.lib                // Window server client API
+LIBRARY                 fbscli.lib              // CFbsBitmap
+LIBRARY                 remconcoreapi.lib
+LIBRARY                 remconinterfacebase.lib
+LIBRARY             	hlplch.lib              // HlpLauncher
+
+// S60 libraries:
+LIBRARY                 aknnotify.lib           // CAknGlobalNote
+LIBRARY                 aknskins.lib            // Avkon Skins Utils
+LIBRARY                 avkon.lib               // Avkon Utils
+LIBRARY                 commonengine.lib        // StringLoader
+LIBRARY                 featmgr.lib             // S60 Feature manager API
+LIBRARY                 mgfetch.lib             // Media Gallery Fetch Dialog
+LIBRARY                 pbkeng.lib              // PhoneBook Engine API
+LIBRARY                 pbkview.lib             // PhoneBook view API
+LIBRARY                 platformenv.lib         // PathInfo
+LIBRARY                 aknicon.lib             // AknIconUtils
+LIBRARY                 aknlayout.lib           // CdlEngine
+LIBRARY                 gdi.lib                 // CFont
+LIBRARY                 flogger.lib             // RFileLogger
+LIBRARY                 imageconversion.lib     // CIImageDecoder
+LIBRARY                 egul.lib                // CGulIcon
+LIBRARY                 pbk2commonui.lib        // CPbk2ViewState
+LIBRARY                 directorylocalizer.lib  // CDirectoryLocalizer
+
+// MUS libarires:
+LIBRARY                 musengine.lib           // Engine
+
+PAGED
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/group/musuiiconlist.txt	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,22 @@
+-c8,8 qgn_indi_video_forw
+-c8,8 qgn_indi_video_pause
+-c8,8 qgn_indi_video_play
+-c8,8 qgn_indi_video_record
+-c8,8 qgn_indi_video_record_not
+-c8,8 qgn_indi_video_rew
+-c8,8 qgn_indi_video_stop
+-c8,8 qgn_indi_video_wait1
+-c8,8 qgn_indi_video_wait2
+-c8,8 qgn_indi_video_wait3
+-c8,8 qgn_indi_video_wait4
+-c8,8 qgn_indi_video_wait5
+-c8,8 qgn_indi_video_wait6
+-c8,8 qgn_indi_video_wait7
+-c8,8 qgn_indi_video_wait8
+-c8,8 qgn_indi_cams_zoom_bg
+-c8,8 qgn_indi_cams_zoom_bg_max
+-c8,8 qgn_indi_cams_zoom_bg_min
+-c8,8 qgn_indi_cams_zoom_elevator
+-c8,8 qgn_indi_browser_tb_zoom_out
+-c8,8 qgn_indi_browser_tb_zoom_in
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/group/toolbariconslist.txt	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,13 @@
+-c8,8 qgn_indi_tb_call_volume
+-c8,8 qgn_indi_tb_fullscreen
+-c8,8 qgn_indi_cams_tb_rec_pause
+-c8,8 qgn_indi_tb_pause_send_video
+-c8,8 qgn_indi_tb_play
+-c8,8 qgn_indi_tb_video
+-c8,8 qgn_indi_tb_ffw_frew
+-c8,8 qgn_indi_tb_zoom
+-c8,8 qgn_indi_tb_brightness
+-c8,8 qgn_indi_tb_microphone_mute
+-c8,8 qgn_indi_tb_microphone_unmute
+-c8,8 qgn_indi_tb_ihf_off
+-c8,8 qgn_indi_tb_ihf_on
Binary file mmsharing/mmshui/help/data/xhtml.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/help/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - Initial contribution
+* 
+* Contributors:
+* 
+* 
+* Description:
+* Export help related files.
+*
+*/
+
+#include <platform_paths.hrh>				
+PRJ_EXPORTS
+:zip ../data/xhtml.zip   /epoc32/data/z/resource/ overwrite
+:zip ../data/xhtml.zip   /epoc32/winscw/c/resource/ overwrite
+
+../inc/msh.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/msh.hlp.hrh)
+../rom/mmshuihelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(mmshuihelps_variant.iby)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/help/inc/msh.hlp.hrh	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description:
+*
+*/
+	
+//
+// msh.hlp.hrh generated by CSXHelp Utilities.
+//           
+
+#ifndef __MSH_HLP_HRH__
+#define __MSH_HLP_HRH__
+
+_LIT(KMSH_HLP_LIVE, "MSH_HLP_LIVE"); // 
+_LIT(KMSH_HLP_CLIP, "MSH_HLP_CLIP"); // 
+_LIT(KMSH_HLP_SETTINGS, "MSH_HLP_SETTINGS"); // 
+_LIT(KMSH_HLP_RECEIVE, "MSH_HLP_RECEIVE"); // 
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/help/rom/mmshuihelps_variant.iby	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __MMSHUIHELPS_VARIANT_IBY__
+#define __MMSHUIHELPS_VARIANT_IBY__
+
+#if defined(FF_S60_HELPS_IN_USE) && defined(__MULTIMEDIA_SHARING)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10282391\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10282391\contents.zip)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10282391\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10282391\index.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10282391\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10282391\keywords.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10282391\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10282391\meta.xml)
+#endif
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musui.hrh	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's resource header file.
+*
+*/
+
+
+#ifndef MUS_HRH
+#define MUS_HRH
+
+//
+// Application menu commands
+//
+enum TMusUiMenuCommands
+    {
+    // General commands start
+    EMusuiCmdAppTest = 1,
+    EMusuiCmdViewPause,
+    EMusuiCmdViewContinue,
+    EMusuiCmdViewReplay,
+    EMusuiCmdViewShareVideo,
+    EMusuiCmdViewShareImage,
+    EMusuiCmdViewShareLive,
+    EMusuiCmdViewClipAudio,
+    EMusuiCmdViewAudioNormal,
+    EMusuiCmdViewAudioMute,
+    EMusuiCmdViewFullScreen,
+    EMusuiCmdViewZoom,
+    EMusuiCmdViewBrightness,
+    EMusuiCmdViewMicrophoneMute,
+    EMusuiCmdViewMicrophoneUnmute,
+    EMusuiCmdViewIncreaseBrightness,
+    EMusuiCmdViewDecreaseBrightness,
+    EMusuiCmdViewZoomIn,
+    EMusuiCmdViewZoomOut,
+    EMusuiCmdViewVolumeUp,          // Not in menu
+    EMusuiCmdViewVolumeDown,        // Not in menu
+    EMusuiCmdViewVolumeChanged,     // Not in menu
+    EMusuiCmdViewFastForward,       // Not in menu
+    EMusuiCmdViewFastReverse,       // Not in menu
+    EMusuiCmdViewFastForwardEnd,    // Not in menu
+    EMusuiCmdViewFastReverseEnd,    // Not in menu
+    EMusuiCmdViewLoadspeaker,
+    EMusuiCmdViewHandset,
+    EMusuiCmdViewEndActiveCall,
+    EMusuiCmdViewMiddleSoftkeyOk,
+    EMusuiCmdRecord,
+    EMusuiCmdStopRecording,    
+    EMusuiGenCmdExit,
+    EMusuiGenCmdBack,
+    // Toolbar commands:
+    EMusuiCmdToolbarVolume,
+    EMusuiCmdToolbarFullScreen,
+    EMusuiCmdToolbarPauseLive,
+    EMusuiCmdToolbarUnPauseLive,
+    EMusuiCmdToolbarPause,
+    EMusuiCmdToolbarUnPause,
+    EMusuiCmdToolbarZoom,
+    EMusuiCmdToolbarFFRev,
+    EMusuiCmdToolbarBrightness,
+    EMusuiCmdToolbarMute,
+    EMusuiCmdToolbarUnmute,
+    EMusuiCmdToolbarBlank,
+    EMusuiCmdToolbarSpeakerOff,
+    EMusuiCmdToolbarSpeakerOn,
+    EMusuiCmdToolbarGallery,
+    EMusUiCmdToolbarLastIndex   // For loops
+    };
+
+enum TMusUiDlgIds
+	{
+	EMusDialogTextQuery = 0x200,
+	EMusConfirmationQuery
+	};
+
+enum TMusUiControlIds
+    {
+    EMusDummyControlId = 1000,
+    EMusInvitingWaitNoteId,
+    EMusTranscodingProgressNoteId,
+    EMusActivateCameraWaitNoteId
+    };
+//
+// MUS clip list view icons
+//
+enum TMusUiIconID
+    {
+    EMusuiMarkingIconId = 0,           // Icon for marking
+    EMusuiFolderIconId,                // Folder icon for user created folder
+    EMusuiFolderSubfolderIconId,       // - " - with subfolders
+    EMusuiVideoIconId,                 // Icon for video file
+    EMusuiOtherIconId,                 // Icon for other file type
+    // Icon # of this enumeration (MUST be the last entry in this enumeration):
+    EMusuiIconCount                    
+    };
+
+
+#endif
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiactivequerydialog.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIACTIVEQUERYDIALOG_H
+#define MUSUIACTIVEQUERYDIALOG_H
+
+//#include "musuiactivetimerobserver.h"
+
+#include <e32base.h>
+
+class CAknGlobalConfirmationQuery;
+class MMusUiQueryObserver;
+
+/**
+ *
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiActiveQueryDialog : public CActive
+    {
+    
+public: // constructor
+
+    static CMusUiActiveQueryDialog* NewL( MMusUiQueryObserver& aObserver );
+    
+    ~CMusUiActiveQueryDialog();
+
+private:
+
+    CMusUiActiveQueryDialog( MMusUiQueryObserver& aObserver );
+
+    void ConstructL();
+
+
+public: // new functions
+
+    void ShowL( const TDesC& aPrompt );
+
+
+protected: // from CActive
+
+    void RunL();
+    
+    void DoCancel();
+    
+    TInt RunError( TInt aError );
+
+
+private: // data
+
+    /** A global confirmation query. Own. */
+    CAknGlobalConfirmationQuery* iGlobalQuery;
+    
+    /** Observer. */
+    MMusUiQueryObserver& iObserver;
+    };
+
+
+#endif // MUSUIACTIVEQUERYDIALOG_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiactivetimer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#ifndef MUSUIACTIVETIMER_H
+#define MUSUIACTIVETIMER_H
+
+#include <e32base.h>
+
+class MMusUiActiveTimerObserver;
+
+class CMusUiActiveTimer : public CActive
+    {
+
+public: // constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiActiveTimer();
+
+    /**
+     * Two-phased constructor. Leaves on failure.
+     * @return The constructed CMusUiActiveTimer object.
+     */
+    static CMusUiActiveTimer* NewL( MMusUiActiveTimerObserver* aObserver );
+
+private:
+
+    /**
+     * C++ constructor.
+     */
+    CMusUiActiveTimer( MMusUiActiveTimerObserver* aObserver );
+
+    /**
+     * Symbian 2nd-phase constructor.
+     */
+    void ConstructL();
+
+public: // new funtions:
+
+    void After( TTimeIntervalMicroSeconds32 anInterval );
+    
+private: // functions from base class CActive
+
+    void DoCancel();
+
+    void RunL();
+    
+    TInt RunError( TInt aError );
+
+private:    // Data
+
+	RTimer iTimer;
+    MMusUiActiveTimerObserver* iObserver;
+
+    };
+
+#endif // MUSUIACTIVETIMER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiactivetimerobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUIACTIVETIMEROBSERVER_H
+#define MUSUIACTIVETIMEROBSERVER_H
+
+class CMusUiActiveTimer;
+
+class MMusUiActiveTimerObserver
+	{
+	
+public:
+
+	virtual void TimerComplete( CMusUiActiveTimer* aTimer ) = 0;
+	
+	};
+
+#endif // MUSUIACTIVETIMEROBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiactivitymanger.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#ifndef MUSUIACTIVITYMANGER_H
+#define MUSUIACTIVITYMANGER_H
+
+#include <e32base.h>
+
+
+class CMusUiActivityManager : public CActive
+    {
+
+public:
+
+    static CMusUiActivityManager* NewL( TInt aTimeout = 60 );
+
+    ~CMusUiActivityManager();
+
+
+protected:
+
+    CMusUiActivityManager( TInt aTimeout );
+
+    void ConstructL();
+
+
+public:     // new functions:
+
+    void SetTimeout(TInt aTimeout);
+
+    void Start();
+
+    void Reset();
+
+ 
+protected: // from CActive
+
+    void DoCancel();
+
+    void RunL();
+    
+    TInt RunError( TInt aError );
+
+
+protected:
+
+    RTimer iTimer;
+
+    TInt iTimeout;
+
+};
+
+#endif // MUSUIACTIVITYMANGER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiapp.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The application's application class.
+*
+*/
+
+
+#ifndef MUSUIAPP_H
+#define MUSUIAPP_H
+
+
+#include <eikapp.h>
+
+
+/**
+ * Application class of the MUS application.
+ *
+ * @lib musui.exe
+ */
+class CMusUiApp : public CEikApplication
+    {
+
+private:
+
+    /**
+    * From CApaApplication, creates CMusUiDocument document object.
+    * @return A pointer to the created document object.
+    */
+    CApaDocument* CreateDocumentL();
+
+    /**
+    * From CApaApplication, returns application's UID.
+    * @return The value of KUidMusUi
+    */
+    TUid AppDllUid() const;
+
+    };
+
+#endif // MUSUIAPP_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiappui.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,206 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#ifndef MUSUIAPPUI_H
+#define MUSUIAPPUI_H
+
+#include "musuieventobserver.h"
+#include "musuiqueryobserver.h"
+
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknViewAppUi.h>
+#include <remconcoreapitargetobserver.h>
+#include <coecobs.h>
+
+class CMusUiStatusPaneHandler;
+class CMusUiActiveQueryDialog;
+class CRemConInterfaceSelector;
+class CRemConCoreApiTarget;
+
+/**
+ *  The MUS application's UI class.
+ *
+ *  @lib musui.exe
+ */
+class CMusUiAppUi : public CAknViewAppUi, 
+                    public MMusUiEventObserver,
+                    public MMusUiQueryObserver,
+                    public MRemConCoreApiTargetObserver,
+                    public MCoeControlObserver
+    {
+
+public:  // constructors and destructor
+
+    /**
+    * EPOC default constructor.
+    */      
+    void ConstructL( );
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiAppUi();
+
+public: // New functions
+
+	CMusUiStatusPaneHandler* MusStatusPane();
+    
+    TBool ExitValue();
+    
+
+public: // from base class CEikAppUi
+
+    void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
+
+    void HandleForegroundEventL( TBool aForeground );
+    
+public: // from MRemConCoreApiTargetObserver
+
+    void MrccatoCommand( TRemConCoreApiOperationId aOperationId, 
+                         TRemConCoreApiButtonAction aButtonAct );
+                         
+
+public:	// from MMusUiQueryObserver
+
+    virtual void QueryAcceptedL( TBool aAccepted );
+
+    /**
+     * Error handler for QueryAcceptedL.
+     *
+     * @param aError is error to be handled.
+     * @return KErrNone means handled value. All other values will lead to
+     *         a panic.
+     */
+    virtual TInt HandleQueryError( TInt aError );
+
+
+public:	// from MMusUiEventObserver
+
+    virtual void ActivateLocalMusViewL( TUid aViewId );
+	
+	virtual void ActivateLocalMusViewL( TUid aViewId,
+	                            TUid aCustomMessageId, 
+	                            const TDesC8& aCustomMessage );
+
+    virtual void ShowAsyncConfirmationQueryDialogL( const TDesC& aPrompt );
+
+    virtual void SetToolbarVisibility( TBool aVisible );
+
+    virtual void ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon );
+
+    virtual CEikonEnv* EikonEnv( ) const;
+    
+    virtual void TerminateCall();
+    
+    virtual CAknAppUiBase::TAppUiOrientation AppOrientation() const;
+
+    /**
+     * Switch the active view's orientation, if it's in the foreground,
+     * from landscape to portrait, or vice versa.
+     */
+    virtual void SwitchOrientationL( TAppUiOrientation aAppOrientation );
+    
+    virtual void HandleError( const TInt aReason );
+
+    virtual void HandleExit();
+    
+    virtual TBool OrientationCanBeChanged() const;
+    
+    virtual TInt GetUiVolumeValue();
+    
+    virtual CMusUiResourceHandler* ResourceHandler();
+
+private: // from base class CEikAppUi
+
+    /**
+     * Takes care of command handling.
+     *
+     * @param aCommand The command to be handled.
+     */
+    void HandleCommandL( TInt aCommand );
+
+    /**
+     * Handles a change to the application's resources which are shared
+     * across the environment.
+     *
+     * @param aType The type of resources that have changed.
+     */
+    void HandleResourceChangeL( TInt aType );
+    
+    TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+    
+    // Help context from CCoeAppUi
+    CArrayFix<TCoeHelpContext>* HelpContextL() const;
+    
+private:
+    
+    //from MCoeControlObserver
+    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
+
+private:
+    
+    void DoHandleForegroundEventL( TInt aEventType );
+    
+    void FindWindowGroupIdentifiersL();
+
+    
+private: // data
+
+    /**  Owns. Handle to status pane handler */
+    CMusUiStatusPaneHandler* iStatusPaneHandler;
+	
+	CMusUiActiveQueryDialog* iConfirmationQuery;
+    
+    CRemConInterfaceSelector* iInterfaceSelector;
+
+    CRemConCoreApiTarget* iCoreTarget;
+
+	TBool iExit;
+	
+	TInt iLastKeyCode;
+	
+	/**
+    * ETrue if operator specific functionality is needed 
+    */
+    TBool iOperatorSpecificFunctionality;
+    
+    // Window group id of this application.
+    TInt iThisApplicationWgId;
+    
+    // Window group id of eikon server.
+    TInt iEikonServerWgId;
+    
+    // Window group id for AknCapServer
+    TInt iAknCapServerWgId;
+    
+    // Window group id for Akn Notifier Server
+    TInt iAknNfyServerWgId;
+    
+    TBool iForeground;
+    
+    CMusUiResourceHandler* iResourceHandler;
+
+	
+    };
+
+#endif // MUSUIAPPUI_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuibackgroundviewcontainer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,154 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIBACKGROUNDVIEWCONTAINER_H
+#define MUSUIBACKGROUNDVIEWCONTAINER_H
+
+#include <coecntrl.h>                // Control base class
+
+class MAknsControlContext;
+
+/**
+ * This class handles ordinal position two plain window.
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiBackgroundViewContainer : public CCoeControl,
+                                      public MCoeControlObserver
+    {
+public:  // Constructors and destructor
+
+    static CMusUiBackgroundViewContainer* NewL( 
+        const TRect& aRect, 
+        TInt aOrdinalPosition );
+    
+    ~CMusUiBackgroundViewContainer();
+
+
+public:
+
+    /**
+     * Refreshes the view.  Called after the mode has been changed
+     * from portrait to landscape or vice versa.
+     */
+    void RefreshView();
+
+    /**
+     * Sets the windows group ordinal position which is supplied
+     * at construction phase
+     */ 
+    void SetOrdinalPosition();
+    
+    /**
+     * Sets the windows group ordinal position for this container
+     * @aOrdianlPosition : Ordinal Position
+     */    
+    void SetOrdinalPosition( TInt aOrdianlPosition);
+    
+    /**
+     * Increase/decrease the windows group ordinal position which is supplied
+     * at construction phase based on aUp.
+     * @aUp : ETrue to increment else EFalse.
+     */ 
+    void UpdateOrdinalPositionValue( TBool aUp );
+    
+private: // Construction
+    
+    CMusUiBackgroundViewContainer( TInt aOrdinalPosition );
+    
+    void ConstructL( const TRect& aRect );
+    
+private: // from base class CCoeControl
+
+   /**
+    * From CoeControl,SizeChanged.
+    */
+    void SizeChanged();
+
+    /**
+     * Returns the number of control contained by this class.
+     *
+     * @return           Number of controls contained
+     */
+    TInt CountComponentControls() const;
+
+    /**
+     * Returns handle to control pointed by aIndex.
+     *
+     * @param aIndex     Wanted control's index [0..n]
+     * @return           Handle to wanted control
+     */
+    CCoeControl* ComponentControl( TInt aIndex ) const;
+
+    /**
+     * Gets called by the application framework when drawing is
+     * needed.
+     *
+     * @param aRect The rectangle that needs to be drawn.
+     */
+    void Draw( const TRect& aRect ) const;
+
+    /**
+    * From MCoeControlObserver
+    * Acts upon changes in the hosted control's state.
+    *
+    * @param    aControl    The control changing its state
+    * @param    aEventType  The type of control event
+    */
+    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
+
+    /**
+     * Handles key events.
+     *
+     * @param aEvent  The event that occured.
+     * @param aType   Type of key event: EEventKey, EEventKeyUp, or
+     *                EEventKeyDown.
+     * @return  The container's response to event: either
+     *          EKeyWasNotConsumed or EKeyWasConsumed.
+     */
+    TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, TEventCode aType );
+
+    /**
+     *
+     */
+    TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
+
+
+private: // data
+
+    /**  Background skin control context */
+    MAknsControlContext* iBackGround;
+
+    /**
+    * Created window group identifier
+    */
+    TInt iGroupIdentifier;
+
+    /**
+    * Ordinal Postion for windows group
+    */
+    TInt iOrdinalPosition;
+
+    };
+
+
+#endif // MUSUILIVESHARINGVIEWCONTAINER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuibitmapdecoder.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#ifndef MUSUIBITMAPDECODER_H
+#define MUSUIBITMAPDECODER_H
+
+#include <e32base.h>
+#include <f32file.h>
+
+class MMusUiBitmapDecoderObserver;
+class CImageDecoder;
+class CFbsBitmap;
+
+class CMusUiBitmapDecoder : public CActive
+    {
+
+public: // constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiBitmapDecoder();
+
+    /**
+     * Two-phased constructor. Leaves on failure.
+     * @return The constructed CMusUiBitmapDecoder instance.
+     */
+    static CMusUiBitmapDecoder* NewL( MMusUiBitmapDecoderObserver& aObserver );
+
+private:
+
+    /**
+     * C++ constructor.
+     */
+    CMusUiBitmapDecoder( MMusUiBitmapDecoderObserver& aObserver );
+
+    /**
+     * Symbian 2nd-phase constructor.
+     */
+    void ConstructL();
+
+
+public: // new funtions:
+
+    void ConvertL( HBufC8* aData, CFbsBitmap* aBitmap );
+    
+
+private: // functions from base class CActive
+
+    void DoCancel();
+
+    void RunL();
+    
+    TInt RunError( TInt aError );
+
+private:    // Data
+
+    MMusUiBitmapDecoderObserver& iObserver;
+    
+    CImageDecoder* iDecoder;
+    
+    CFbsBitmap* iBitmap;
+    
+    RFs iFs;
+    
+    HBufC8* iData;
+    };
+
+#endif // MUSUIBITMAPDECODER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuibitmapdecoderobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUIBITMAPDECODEROBSERVER_H
+#define MUSUIBITMAPDECODEROBSERVER_H
+
+class CFbsBitmap;
+
+class MMusUiBitmapDecoderObserver
+    {
+
+public:
+
+    virtual void UpdateBitmap( CFbsBitmap* aBitmap ) = 0;
+
+    };
+
+#endif // MUSUIBITMAPDECODEROBSERVER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuicallbackobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#ifndef MUSUICALLBACKOBSERVER_H
+#define MUSUICALLBACKOBSERVER_H
+
+
+#include "musuidefinitions.h"
+
+
+/**
+ * MUS application's note request interface.
+ */
+class MMusUiCallbackObserver
+    {
+
+public: // new functions
+    
+    /**
+     * Process asynchronous event.
+     *
+     * @param aEventId Id of the triggered event
+     */
+    virtual void HandleAsyncEventL( TMusUiAsyncEvent aEventId ) = 0;
+
+    /**
+     * Error handler for HandleAsyncEventL.
+     *
+     * @param aError is error to be handled.
+     * @return KErrNone means handled value. All other values will lead to
+     *         a panic.
+     */
+    virtual TInt HandleAsyncError( TInt aError ) = 0;
+    
+    };
+
+
+#endif // MUSUICALLBACKOBSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuicallbackservice.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#ifndef MUSUICALLBACKSERVICE_H
+#define MUSUICALLBACKSERVICE_H
+
+#include "musuidefinitions.h"
+#include <e32base.h>
+
+class MMusUiCallbackObserver;
+
+
+/**
+ * Callback Service used to pass asynchronous events
+ */
+class CMusUiCallbackService : public CActive
+    {
+
+public: // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    * @param aCallbackObserver the observer that will receive the callbacks.
+    * @return new instance of CMusUiCallbackService.
+    */
+    static CMusUiCallbackService* NewL( 
+                            MMusUiCallbackObserver& aCallbackObserver );
+    
+    /**
+    * Destructor.
+    */
+    ~CMusUiCallbackService();
+
+private: // Constructors
+
+    /**
+    * C++ default constructor.
+    * @param aCallbackObserver the observer that will receive the callbacks.
+    */
+    CMusUiCallbackService( MMusUiCallbackObserver& aCallbackObserver );
+    
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL();
+
+
+public: // New functions
+
+    /**
+    * Buffer a request to trigger an event.
+    * @param aEventId    Id of the event
+    */
+    void AsyncEventL( TMusUiAsyncEvent aEventId );
+
+    /**
+    * Called when the notifier has been deactivated so resources can be 
+    * freed and outstanding messages completed.
+    */
+    void Cancel();
+    
+    /**
+    * Check what event is currently pending
+    * @return EMusUiAsyncUninitialized is no events are pending
+    */
+    TMusUiAsyncEvent CurrentEvent() const;
+
+
+public: // Functions from CActive base class
+    
+    /**
+    * From CActive.  Called when a request completes.
+    */
+    void RunL();
+
+    /**
+    * From CActive.  Called when a leave occurres in RunL.
+    * @param aError Symbian OS errorcode.
+    * @return Error Code.
+    */
+    TInt RunError(TInt aError);
+    
+    /**
+    * From CActive.  Called when a request is cancelled.
+    */
+    void DoCancel();  
+
+
+private: // New functions
+
+    /**
+    * Activate the object.
+    */
+    void Activate();
+
+
+private:    // Data
+
+    /**  Handle to callback observer. */
+    MMusUiCallbackObserver& iCallbackObserver;
+
+    /**  Event ID to pass through. */
+    TMusUiAsyncEvent iEventId;
+
+    };
+
+#endif // MUSUICALLBACKSERVICE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiclipsharingcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,224 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSUICLIPSHARINGCONTROLLER_H
+#define MUSUICLIPSHARINGCONTROLLER_H
+
+#include "musuisendcontroller.h"
+#include "musengclipsessionobserver.h"
+#include "musunittesting.h"
+#include "musuiactivetimerobserver.h"
+
+#include <e32base.h>
+#include <badesca.h>
+
+class MMusUiClipSharingObserver;
+class CMusEngClipSession;
+class CMusUiActiveTimer;
+
+/**
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiClipSharingController : public CMusUiSendController,
+                                    public MMusEngClipSessionObserver,
+                                    public MMusUiActiveTimerObserver
+    {
+
+    MUS_UNITTEST( UT_CMusUiClipSharingController )
+
+public:
+
+    static CMusUiClipSharingController* NewL(
+                            MMusUiEventObserver& aEventObserver,
+                            MMusUiSharingObserver& aSharingObserver,
+	                        MMusUiSendObserver& aSendObserver,
+                            MMusUiClipSharingObserver& aClipObserver,
+                            const TRect& aRect );
+
+    virtual ~CMusUiClipSharingController();
+
+
+private:
+
+    CMusUiClipSharingController( MMusUiEventObserver& aEventObserver,
+                                 MMusUiSharingObserver& aSharingObserver,
+	                             MMusUiSendObserver& aSendObserver,
+	                             MMusUiClipSharingObserver& aClipObserver );
+
+    void ConstructL( const TRect& aRect );
+
+
+public: // From CMusUiEventController:
+
+    virtual void OfferToolbarEventL( TInt aCommand );
+
+    virtual void HandleCommandL( TInt aCommand );
+
+    virtual void HandleAsyncEventL( TMusUiAsyncEvent aEventId );
+
+    virtual void DeleteEngineSession();
+    
+
+public: // from CMusUiSendController
+
+    virtual CMusEngMceOutSession* EngineOutSession();
+    
+    /**
+    * Handles status changes specific to sending side sharing types.
+    * To be overridden in sibling classes for sharing type specific 
+    * status changes. Calls base class version if status change is not
+    * sending side specific.
+    */
+    virtual void HandleChangedStatusL( TMusAvailabilityStatus aStatus );
+
+    virtual void InviteL( const TDesC& aRecipient );
+    
+    virtual void HandleSliderValueChangeL( TInt aNewLevel );
+    
+ 
+public: // new functions:    
+  
+    void SetFileNameL( const TDesC& aFileName );
+
+    TBool ClipEnded();
+    
+    TBool ClipMutedL();
+    
+    TBool ClipContainsAudioL();
+    
+    void CancelTranscodingL();
+
+    void StopWindingL();
+
+    TBool ToolbarFFRevSelected();
+
+
+private:    // new functions:
+
+    void TranscodingProgressedL( TInt aPercentage );
+
+    void TranscodingCompletedInitL();
+    
+    void TranscodingCompletedFinalizeL();
+    
+    const TDesC& FormattedDurationString( 
+                            const TTimeIntervalSeconds& aDurationSeconds,
+                            const TTimeIntervalSeconds& aPositionSeconds );
+    
+
+public: // From MMusEngClipSessionObserver
+
+    virtual void EndOfClip();
+
+    virtual void TranscodingNeeded(TBool aDueUnknownRemoteCapabilities);
+        
+    virtual void TranscodingProgressed( TInt aPercentage );
+    
+    virtual void TranscodingCompletedInit();
+    
+    virtual void TranscodingCompletedFinalize();
+    
+    virtual void TranscodingFailed();
+    
+    virtual void RewindFromEndL();
+    
+
+public: // from MMusEngOutSessionObserver
+
+    virtual void SessionRecipientNotFound();            // 404
+
+
+public: // from MMusEngSessionObserver
+
+    virtual void SessionEstablished();
+
+    virtual void SessionTerminated();
+
+    virtual void SessionConnectionLost();
+
+    virtual void SessionFailed();
+
+    virtual void StreamIdle();
+
+    virtual void StreamStreaming();
+
+    virtual void SessionTimeChanged( const TTimeIntervalSeconds& aSeconds );
+
+    virtual void InactivityTimeout();
+   
+    
+public: // from MMusUiActiveTimerObserver
+
+    void TimerComplete( CMusUiActiveTimer* aTimer );
+
+
+private:    // new functions:
+
+    void StreamStreamingL();
+    
+    void StreamIdleL();
+
+    void SessionTimeChangedL( const TTimeIntervalSeconds& aSeconds );
+    
+    TBool DoFastForwardingL( TBool aUseWinding );
+    
+    TBool DoFastRewindingL( TBool aUseWinding );
+    
+    TBool DoInviteL();
+
+
+private:
+
+    MMusUiClipSharingObserver& iClipObserver;
+
+    CMusEngClipSession* iSession;
+
+    HBufC* iFileName;
+
+    TRect iRect;
+
+    TBool iClipEnded;
+
+    TBool iTranscode;
+    
+    TBool iTranscodeDueUnknownRemoteCapas;
+    
+    TBool iTranscodingGoing;
+    
+    TBool iToolbarFFRevSelected;
+
+    TBuf<11> iDurationStringBuffer;
+
+    TBool iFastForward;
+
+    TBool iFastRewind;
+    
+    TBool iFileFetchingOngoing;
+    
+    // timer initiating session close on expiring
+    CMusUiActiveTimer* iCloseTimer;
+    
+    TBool iWasPlayingBeforeWinding;
+    
+    };
+
+#endif // MUSUICLIPSHARINGCONTROLLER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiclipsharingobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUICLIPSHARINGOBSERVER_H
+#define MUSUICLIPSHARINGOBSERVER_H
+
+#include "musuidefinitions.h"
+
+#include <aknappui.h>
+#include <badesca.h>
+
+class MMusUiClipSharingObserver
+    {
+
+public:
+
+    virtual void RunFetchDialogL() = 0;
+
+    virtual void ShowTranscodingProgressDialogL() = 0;
+
+    virtual void UpdateClipTranscodingPercentageL( TInt aPercetage ) = 0;
+    
+    virtual void CancelTranscodingDialogL() = 0;
+
+	virtual void UpdateClipPositionL( TInt aPositionInSeconds,
+	                                  const TDesC& aFormattedPosition ) = 0;
+    
+    virtual void SetDurationValue( TInt aDurationValue ) = 0;
+
+    virtual void SetPositionValueL( TInt aPositionValue ) = 0;
+
+    virtual void SetDurationVisible() = 0;
+        
+    virtual void InvalidVideoFrame( TBool aInvalid = EFalse ) = 0;
+
+    };
+
+#endif // MUSUICLIPSHARINGOBSERVER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiclipsharingview.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUICLIPSHARINGVIEW_H
+#define MUSUICLIPSHARINGVIEW_H
+
+
+#include "musuisendview.h"     // Base view class
+#include "musuiclipsharingobserver.h"
+
+#include <aknview.h>
+
+class CMusUiClipSharingViewContainer;
+class CMusUiClipSharingController;
+class CMusUiActivityManager;
+class CMusUiBackgroundViewContainer;
+class CAknToolbar;
+
+
+/**
+ *  The MUS application's clip sharing view.
+ *
+ *  @lib musui.exe
+ */
+class CMusUiClipSharingView : public CMusUiSendView,
+                              public MMusUiClipSharingObserver
+    {
+
+public: // constructors and destructor
+
+    /**
+    * EPOC 2nd phase constructor.
+    */
+    void ConstructL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~CMusUiClipSharingView();
+
+
+public: // from base class CAknView
+
+    /**
+    * From CAknView returns Uid of View
+    * @return TUid uid of the view
+    */
+    virtual TUid Id() const;
+
+    // From MEikMenuObserver, Called by framework before constructing menupane
+    virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+
+public: // from CMusUiGeneralView
+
+    virtual void HandleToolbarCommandL( TInt aCommand );
+
+    virtual void HandleKeyUpEvent( TInt aKeyCode );
+
+    virtual void SetInitialFocusedItemL();
+
+public: // from base class MAknToolbarObserver
+
+    virtual void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
+
+
+public: // from MMusUiClipSharingObserver
+
+    virtual void RunFetchDialogL();
+
+    virtual void ShowTranscodingProgressDialogL();
+
+    virtual void UpdateClipTranscodingPercentageL( TInt aPercetage );
+
+    virtual void CancelTranscodingDialogL();
+
+    virtual void UpdateClipPositionL( TInt aPositionInSeconds,
+                                      const TDesC& aFormattedPosition );
+
+    virtual void SetDurationValue( TInt aDurationValue );
+
+    virtual void SetPositionValueL( TInt aPositionValue );
+
+    virtual void SetDurationVisible();
+
+    virtual void ReplaceToolbarCommand( TInt aOldCommand, 
+                                        TInt aNewCommand,
+                                        TBool aSetNewCommandFocused );
+    
+    virtual void InvalidVideoFrame( TBool aInvalid = EFalse );
+    
+public: // new functions
+
+    void RefreshView();
+    
+    void CancelTranscodingL();
+
+
+protected: // from CMusUiSendView
+
+    virtual CMusUiSendController* SendController() const;
+
+    virtual CMusUiSendViewContainer* SendContainer() const;
+    
+
+private:
+
+    /**
+     * Gets called by the framework when it's activating this view.
+     *
+     * @param aPrevViewId Previous view id
+     * @param aCustomMessageId Custom message's id
+     * @param aCustomMessage Custom message
+     */
+    void DoActivateL( const TVwsViewId& aPrevViewId,
+                      TUid aCustomMessageId,
+                      const TDesC8& aCustomMessage );
+
+    /**
+     * Gets called by the framework when it's deactivating this view.
+     */
+    void DoDeactivate();
+    
+
+private: // data
+
+    /**  Container for all controls in this view.  Owns. */
+    CMusUiClipSharingViewContainer* iContainer;
+
+    CMusUiClipSharingController* iController;
+
+    };
+
+#endif // MUSUICLIPSHARINGVIEW_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiclipsharingviewcontainer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUICLIPSHARINGVIEWCONTAINER_H
+#define MUSUICLIPSHARINGVIEWCONTAINER_H
+
+#include "musuisendviewcontainer.h"
+
+#include <MMGFetchVerifier.h>        // Media Gallery fetcher verifier 
+#include <AknProgressDialog.h>
+
+class CAknProgressDialog;
+class CEikProgressInfo;
+
+/**
+ *
+ *
+ *
+ */
+class CMusUiClipSharingViewContainer :	public CMusUiSendViewContainer,
+										public MMGFetchVerifier,
+										public MProgressDialogCallback
+
+    {
+
+public:  // constructors and destructor
+
+    /**
+     * Symbian second-phase constructor.
+     *
+     * @param aView         Parent view of container.
+     * @param aRect         Frame rectangle for container.
+     * @param aInputParams  Packaged data.
+     */
+    void ConstructL( CMusUiGeneralView* aView, const TRect& aRect );
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiClipSharingViewContainer();
+
+
+public:	// new functions
+	
+	void ShowTranscodingProgressDialogL();
+	
+    void UpdateClipTranscodingPercentageL( TInt aPercentage );
+    
+    void CancelTranscodingL();
+
+    void RunFetchDialogL();
+    
+    const TDesC& FetchedFileName();
+    
+    TBool FileSelected();
+	
+    void SetDurationValue( TInt aDurationValue );
+
+    void SetPositionValueL( TInt aPositionValue );
+
+    void SetDurationIndicatorVisible( TBool aVisible );
+   
+public: // from base class MMGFetchVerifier
+
+    /**
+     * Verifies the current user selection.
+     *
+     * @param aSelectedFiles Descriptor array of selected files.
+     * @return EFalse if selection can't be used. If ok, returns ETrue.
+     */
+    TBool VerifySelectionL( const MDesCArray* aSelectedFiles );
+
+public: // from MProgressDialogCallback
+
+    /**
+    * Callback method
+    *   Get's called when a dialog is dismissed.
+    */
+    void DialogDismissedL( TInt aButtonId );
+    
+
+private: // from base class CCoeControl    
+    
+    /**
+     * Returns the number of control contained by this class.
+     *
+     * @return           Number of controls contained
+     */
+    TInt CountComponentControls() const;
+
+    /**
+     * Returns handle to control pointed by aIndex.
+     *
+     * @param aIndex     Wanted control's index [0..n]
+     * @return           Handle to wanted control
+     */
+    CCoeControl* ComponentControl( TInt aIndex ) const;
+    
+    /**
+    * Gets called by the application framework when drawing is
+    * needed.
+    *
+    * @param aRect The rectangle that needs to be drawn.
+    */
+    void Draw( const TRect& aRect ) const;
+
+    /**
+     * Handles key events.
+     *
+     * @param aEvent  The event that occured.
+     * @param aType   Type of key event: EEventKey, EEventKeyUp, or
+     *                EEventKeyDown.
+     * @return  The container's response to event: either
+     *          EKeyWasNotConsumed or EKeyWasConsumed.
+     */
+    TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, TEventCode aType );
+
+protected: // data
+
+    /**
+    * ETrue if operator specific functionality is needed 
+    */
+    TBool iOperatorSpecificFunctionality;
+private: // data
+    
+    /**
+     * A progress dialog to show the transcoding progress.  Own.
+     */
+    CAknProgressDialog* iTranscodingDialog;
+
+    /**
+     * A progress dialog to show the transcoding progress.  Own.
+     */
+    CEikProgressInfo* iTranscodingProgress;
+    
+    HBufC* iFileName;
+	
+    TBool iFileSelected;
+    
+    TBool iTranscodingOngoing;
+    
+    };
+
+
+#endif // MUSUICLIPSHARINGVIEWCONTAINER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuicontactutil.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSUICONTACTUTIL_H
+#define MUSUICONTACTUTIL_H
+
+#include <e32base.h>
+#include <coemain.h>
+#include <CPbkContactEngine.h>
+#include <CPbkContactItem.h>
+
+class MusUiContactUtil
+    {
+
+    public:
+
+        /**
+         */
+        static TBool ShareViewFieldExistsL( CCoeEnv& aEnv, TInt aContactId );
+    
+    	/**
+         */
+   		static TBool CheckPbContactForVSAddressesL(	CCoeEnv& aEnv,
+													const TDesC& aOriginator,
+													TInt aContactId);
+        /**
+         */
+        static TBool MatchTextWithPbFieldsL(	CCoeEnv& aEnv,
+        									TPbkFieldId aFieldId,
+											const TDesC& aText,
+											TInt aContactId);
+        /**
+         */
+        static void ActivateContactViewL( CCoeEnv& aEnv, 
+                                          TContactItemId aId, 
+                                          const TDesC& aTypedAddress, 
+                                          const TDesC& aMusTelNumberValue );
+        
+    private:
+    
+        /**
+         */
+        static void EditContactL( CPbkContactItem& aContact,
+                                  TBool aNewOne,
+                                  CPbkContactEngine* aPbkContactEngine, 
+                                  const TDesC& aTypedAddress,
+                                  const TDesC& aMusTelNumberValue,
+                                  TContactItemId aId );
+
+        /**
+         */
+        static CContactTextField* EditableContactFieldL(
+                                        CPbkContactItem& aContact,
+                                        TInt aFieldId,
+                                        CPbkContactEngine* aPbkContactEngine );
+    };
+
+
+
+#endif // MUSUICONTACTUTIL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuidefinitions.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIDEFINITIONS_H
+#define MUSUIDEFINITIONS_H
+
+#include <e32base.h>
+
+
+// View UIDs
+const TUid KMusUidNullView        = { 0 };
+const TUid KMusUidReceivingView   = { 1 };
+const TUid KMusUidLiveSharingView = { 2 };
+const TUid KMusUidClipSharingView = { 3 };
+const TUid KMusUidGeneralView     = { 4 };
+const TUid KMusUidSendView        = { 5 };
+
+// Volume settings
+const TInt KMusVolumeMuted 		=  0;
+const TInt KMusVolumeMaximum 	= 10;
+const TInt KMusVolumeDefault 	=  5;
+
+// protocol prefixes and address components
+const TInt KMusSipAddressesMaxAmount  =   8;
+const TInt KMusPrefixMaxLength     =   4;
+const TInt KMusSipAddressMaxLength = 256;
+_LIT( KMusPrefixSipUri,            "sip:" );
+_LIT( KMusPrefixTelUri,            "tel:" );
+_LIT( KMusAtSymbol,                "@" );
+_LIT( KMusSpaceSymbol,             " " );
+_LIT( KMusEmptyStringSymbol,       "" );
+_LIT( KMusCommaSymbol,             "," );
+_LIT( KMusVideoFileNameExtension,  ".3gp" );
+_LIT( KMusVideoFileNameBegining,   "VS" );
+_LIT( KMusVideoFileNameVersion,    "V" );
+
+const TInt KMusDriveAndColonStringLength = 2;
+const TInt KMusPercentUStringLength = 2;
+const TInt KMusVideoFileNameNumberStringStartPos = 7;
+const TInt KMusVideoFileNameNumberStringLength = 3;
+
+const TInt KMusDefaultArrayGranularity = 5;
+const TInt KMusStringSubstArrayGranularity = 2;
+
+const TInt KMusOneHundredPercent = 100;
+
+const TInt KMusErrorMessageMaxLength = 512;
+const TInt KMusNameFieldMaxLength    = 512;
+const TInt KMusFileNameMaxLength    = 256;
+
+// time constants
+const TInt KMusOneSecond           =  1000000; // one second in microseconds
+const TInt KMusInviteExpireTimeout 	= 60; // seconds
+const TInt KMusReceiveTimeout 	    = 10 * KMusOneSecond;   // ten seconds
+const TInt KMusOneMinuteInSeconds   = 60;
+const TInt KMusNumberValueTen          = 10;
+const TInt KMusLocaleHoursAndMinutesSeparator = 1;
+const TInt KMusLocaleMinutesAndSecondsSeparator = 2;
+const TInt KMusBacklightTimeOut = 4;    // seconds
+
+const TInt KMusNumberValueTwo          = 2;
+
+/** asynchronous UI events */
+enum TMusUiAsyncEvent
+    {
+    EMusUiAsyncUninitialized = 0,
+    EMusUiAsyncInviteCancel,
+    EMusUiAsyncManualAddressEntry,
+    EMusUiAsyncInviteAccepted,
+    EMusUiAsyncStartInvitation,
+    EMusUiAsyncStartMediaGallery,
+    EMusUiAsyncStartTranscoding,
+    EMusUiAsyncHandleExit
+    };
+
+enum TMusUiNaviMediaDecorator
+	{
+	EMusUiNaviIconNone = -1,
+	EMusUiNaviIconForward,
+	EMusUiNaviIconPause,
+	EMusUiNaviIconPlay,
+	EMusUiNaviIconRecord,
+	EMusUiNaviIconRecordNot,
+	EMusUiNaviIconRew,
+	EMusUiNaviIconStop,
+	EMusUiNaviIconWaitAnim
+	};
+
+enum TMusUiLoudspeakerStatus
+	{
+	ELoudspeakerDisabled = 0,
+	ELoudspeakerEnabled = 1
+	};
+
+enum TMusUiLoudspeakerDialogStatus
+	{
+	ELoudspeakerDialogDisabled = 0,
+	ELoudspeakerDialogEnabled = 1
+	};
+
+enum TMusUiVolumeStatus
+	{
+	EVolumeDown = 0,
+	EVolumeUp = 1
+	};
+	
+enum TMusUiIndicatorType
+    {
+    EMusUiIndicatorTypeZoom = 0,
+    EMusUiIndicatorTypeBrightness,
+    EMusUiIndicatorTypeDuration
+    };
+
+
+
+#endif // MUSUIDEFINITIONS_H
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuidialogutil.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSDIALOGUTIL_H
+#define MUSDIALOGUTIL_H
+
+#include <e32base.h>
+#include <badesca.h>
+
+class MusUiDialogUtil
+    {
+
+    public:
+        /**
+         */
+        static TBool ShowGlobalConfirmationQueryDialogL( const TDesC& aPrompt );
+
+        static void ShowInformationDialogL( const TDesC& aPrompt );
+
+        static void ShowInformationDialogL( TInt aResourceId );
+
+        static void ShowGlobalInformationDialogL( TInt aResourceId );
+
+        static void ShowGlobalInformationDialogL( const TDesC& aMessage );
+        
+        static void ShowGlobalErrorDialogL( const TDesC& aMessage );
+
+        static void ShowGlobalErrorDialogL( TInt aResourceId );
+        
+        static void ShowGlobalErrorModalDialogL( const TDesC& aMessage );
+        
+        static void ShowGlobalErrorModalDialogL( TInt aResourceId );
+
+        static TBool SelectAddressDialogL( CDesCArray* aAddressArray,
+                                           TDes& aSelectedAddress );
+
+        static TBool ShowTextQueryDialogL( const TDesC& aPrompt, TDes& aValue );
+
+        static TBool ShowTextQueryDialogL( TInt aPromptResourceId,
+                                           TDes& aValue );
+
+    };
+
+
+
+#endif // MUSDIALOGUTIL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuidocument.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Document class of the application.
+*
+*/
+
+
+#ifndef MUSUIDOCUMENT_H
+#define MUSUIDOCUMENT_H
+
+#include <AknDoc.h> // Avkon document base class
+
+class CEikAppUi;
+
+/**
+ * Document class of MUS application.
+ *
+ * @lib musui.exe
+ */
+class CMusUiDocument : public CAknDocument
+    {
+
+public:  // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    * @param aApp Handle to Eikon's application class
+    * @return a new instance of CMusUiDocument
+    */
+    static CMusUiDocument* NewL( CEikApplication& aApp );
+
+    /**
+    * Destructor.
+    */
+    virtual ~CMusUiDocument();
+
+private:
+
+    /**
+    * Default constructor
+    * @param aApp Handle to Eikon's application class
+    */
+    CMusUiDocument( CEikApplication& aApp );
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL();
+
+private: // Functions from base classes
+
+    /**
+    * From CEikDocument, create CMusUiAppUi "App UI" object.
+    * @return a new instance of Mus Applications AppUi class
+    */
+    CEikAppUi* CreateAppUiL();
+
+private: // data
+
+
+    };
+
+#endif // CMUSUIDOCUMENT_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuieventcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,482 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#ifndef MUSUIEVENTCONTROLLER_H
+#define MUSUIEVENTCONTROLLER_H
+
+#include "musuipropertyobserver.h"
+#include "musuicallbackobserver.h"
+#include "musuibitmapdecoderobserver.h"
+#include "musresourceproperties.h"
+#include "musuidefinitions.h"
+#include "musmanagercommon.h"
+#include "musuimmcobserver.h"
+#include "musunittesting.h"
+
+#include "musengsessionobserver.h"
+#include "musengaudioroutingobserver.h"
+#include "musengvolumechangeobserver.h"
+
+#include <aknappui.h>        // CAknAppUiBase::TAppUiOrientation
+
+class CMusUiCallbackService;
+class MMusUiEventObserver;
+class CMusUiMmcMonitor;
+class CMusUiPropertyWatch;
+class CMusUiBitmapDecoder;
+class CFbsBitmap;
+class CMusEngMceSession;
+class MMusUiSharingObserver;
+class CMusUiActivityManager;
+class CMusUiResourceHandler;
+
+using namespace MultimediaSharing;
+
+
+/**
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiEventController : public CBase, 
+                              public MMusUiPropertyObserver, 
+                              public MMusUiCallbackObserver,
+                              public MMusUiMmcObserver,
+                              public MMusEngSessionObserver,
+                              public MMusEngAudioRoutingObserver,
+                              public MMusEngVolumeChangeObserver
+    {
+
+public: // enumerations
+
+    enum TMusUiShutdownState
+            {
+            EMusUiShutdownNotDefined,
+            EMusUiShutdownStarted,
+            EMusUiShutdownVideoSaved,
+            EMusUiShutdownContactSavingQueried,
+            EMusUiShutdownOver
+            };    
+
+
+public:
+
+    /**
+    * 
+    */
+	virtual ~CMusUiEventController();
+
+	
+protected:
+
+    /**
+    * 
+    */
+	void ConstructL();
+	
+    /**
+    * 
+    */
+	CMusUiEventController( MMusUiEventObserver& aEventObserver,
+	                       MMusUiSharingObserver& aSharingObserver );
+
+
+public:	// From MMusUiPropertyObserver
+
+    /**
+    * Sets the property key value common to all sharing types.
+    * To be overridden for specific key values.
+    * CMusUiPropertyWatch calls MMusUiPropertyObserver::PropertyChanged,
+    * when P&S key values change
+    *
+    * @param TUint aKey - The Property key
+    * @param TInt aValue - The value of the Property key
+    */
+    virtual	void PropertyChanged( const TUint aKey, const TInt aValue );
+	
+    /**
+    * 
+    */
+	virtual void HandlePropertyError( const TInt aReason );
+
+
+public:	// From MMusUiCallbackObserver
+
+    /**
+    * Handles async events common to all session types.
+    * Should be called if child classes are not able to handle the call.
+    */
+    virtual void HandleAsyncEventL( TMusUiAsyncEvent aEventId );
+
+    /**
+    * Error handler for HandleAsyncEventL.
+    */
+    virtual TInt HandleAsyncError( TInt aError );
+
+
+public:	// From MMusUiMmcObserver
+
+    /**
+    * 
+    */
+    virtual void MmcRemoved();
+
+
+public: // From 
+
+    /**
+    * Handles session establishment procedures common to all session types.
+    */
+    virtual void SessionEstablished();
+    
+
+public: // From MMusEngAudioRoutingObserver
+    
+    /**
+    * Indicates that some other application has changed audio routing.
+    *
+    */
+    virtual void AudioRoutingChanged( TBool aShowNote );
+    
+    /**
+    * Before doing audio routing, permission is asked
+    *
+    */
+    virtual TBool AudioRouteChangeAllowed() const;
+    
+public: // From MMusEngVolumeChangeObserver
+    
+    /**
+    * Indicates that some other application has changed volume level.
+    *
+    */
+    virtual void VolumeChanged( TInt aVolume, TBool aAudioRouteChanged );
+    
+
+public:	// New functions
+	
+	/**
+    * 
+    */
+	void SetRect( const TRect& aRect );
+
+    /**
+    * 
+    */
+    const TDesC& MusContactName();
+    
+    /**
+    * 
+    */
+	const TDesC& MusVideoCodecValue();
+
+    /**
+    * 
+    */
+	const TDesC& MusTelNumberValue();
+    
+    /**
+    * 
+    */
+    const TDesC& SessionTimeFormatted( const TTimeIntervalSeconds& aSeconds );
+    
+    /**
+    * 
+    */
+    void SaveContactQueryL();
+    
+    /**
+    * 
+    */
+    void HandleError( const TInt aError );
+
+    /**
+    * Starts shutdown process
+    */
+    void HandleExitL( TBool aTerminateCall = EFalse );
+
+    /**
+    * 
+    */
+    void AsyncQueryDialogAcceptedL( TBool aAccepted );
+    
+    /**
+    * 
+    */
+    TBool ExitOccured();
+    
+    /**
+    *
+    */
+    TBool AudioRoutingCanBeChanged();
+    
+    /**
+    * 
+    */
+    TBool IsLoudSpeakerEnabled();
+    
+    /**
+    * 
+    */
+    TBool DeviceHasDedicatedVolumeKeys();
+    
+    /**
+    * Queries flag for session state
+    */
+    TBool ConnectionEstablished() const;
+    
+    /**
+    * Set session initialization state
+    */
+    void SetConnectionInitialized( TBool aConnectionInitialized );
+    
+    /**
+    * Queries flag for session state
+    */
+    TBool ConnectionInitialized() const;
+    
+    /**
+    * 
+    */
+    void EnableDisplayL( TBool aEnable );
+    
+    /**
+    * 
+    */
+    void ChangeOrientationL( CAknAppUiBase::TAppUiOrientation aOrientation );
+    
+    /**
+    * 
+    */
+    TBool ToolbarVolumeSelected();
+    
+    /**
+    *
+    */ 
+    TBool IsMicMutedL();
+    
+    /**
+    * Function to be overridden in sibling classes
+    * @return EFalse by default
+    */
+    virtual TBool ManualAddressTyped() const;
+    
+    /**
+    * 
+    */
+    virtual void HandleForegroundEventL( TBool aForeground );
+    
+    /**
+    * 
+    */
+    virtual TBool IsForeground() const;
+    
+    /**
+    * 
+    */
+    virtual void OfferToolbarEventL( TInt aCommand );
+    
+    /**
+    * 
+    */
+    virtual void HandleCommandL( TInt aCommand );
+
+    /**
+    * Returns a pointer to engine side session.
+    */
+    virtual CMusEngMceSession* EngineSession() = 0;
+    
+    /**
+    * 
+    */
+    virtual const TDesC& TypedAddress() const = 0;
+    
+    /**
+    * 
+    */
+    virtual void DeleteEngineSession() = 0;
+      
+    /**
+    * 
+    */
+    TBool IsDisplayEnabledL();
+    
+    /**
+     * 
+     */
+    TBool IsAudioRoutingLoudSpeaker();
+
+protected:    // New functions
+
+    /**
+    * General functionality of exit procedure
+    */
+    virtual void ExitProcedureL( TBool aUserAcceptance );
+    
+    /**
+    * Handles status changes common to all sharing types.
+    * To be overridden in sibling classes for sharing type specific 
+    * status changes.
+    */
+    virtual void HandleChangedStatusL( TMusAvailabilityStatus aStatus );    
+    
+    
+protected:
+        
+    /**
+    * 
+    */
+	MMusUiEventObserver& iEventObserver;
+	
+    /**
+    *
+    */
+    MMusUiSharingObserver& iSharingObserver;
+    
+    /**
+    * 
+    */
+	CMusUiCallbackService* iCallbackService;
+
+    /**
+    * Flag of the connection state
+    */
+	TBool iConnectionEstablished;
+	
+	/**
+    * Flag of the connection state
+    */
+	TBool iConnectionInitialized;
+
+    /**
+    * 
+    */
+	TFileName iVideoFilePath;
+	
+    /**
+    * 
+    */
+	TFileName iLocalizedVideoFilePath;
+	
+    /**
+    * 
+    */
+	TFileName iVideoFileNamePlain;
+	
+	/**
+    * 
+    */
+	TInt iSipProfileId;
+	
+	/**
+    * 
+    */
+	TInt iContactId;
+	
+	/**
+    * 
+    */
+	HBufC* iContactName;
+
+    /**
+    * 
+    */
+	HBufC* iTelNumber;
+	
+    /**
+    * 
+    */
+	HBufC* iDialogPrompt;
+    
+    /**
+    * 
+    */
+	HBufC* iVideoCodec;
+	
+    /**
+    * 
+    */
+    TBool iForeground;
+
+    /**
+    * ETrue if operator specific functionality is needed 
+    */
+    TBool iOperatorSpecificFunctionality;
+    
+    /**
+    *
+    */
+    CMusUiResourceHandler* iResourceHandler;
+    
+	/**
+    * 
+    */
+    TMusUiShutdownState iShutdownState;
+    
+    /**
+	* Flag indicating whether show "loudspeaker deactived"
+	*/
+    TBool iShowDialog;
+    
+   
+private:
+	
+    /**
+    * 
+    */
+	CMusUiMmcMonitor* iMmcMonitor;
+	
+	/**
+    * 
+    */
+    CMusUiActivityManager* iActivityManager;
+
+    /**
+    * 
+    */
+    CMusUiPropertyWatch* iStatusPropertyWatch; 
+    
+    /**
+    * 
+    */  
+    CMusUiPropertyWatch* iMicMuteStatusPropertyWatch;
+
+    /**
+    * 
+    */
+    TBuf<7> iTimeBuffer;
+    
+    /**
+     * Flag of the Volume item in the Toolbar
+     */
+    TBool iToolbarVolumeSelected;
+    
+    /**
+    * Flag indicating whether call has ended
+    */
+    TBool iActiveCall;
+    
+    MUS_UNITTEST( UT_CMusUiEventController )
+    MUS_UNITTEST( UT_CMusUiLiveSharingController )
+    MUS_UNITTEST( UT_CMusUiClipSharingController )
+    MUS_UNITTEST( UT_CMusUiReceiveController )
+    };
+
+#endif // MUSUIEVENTCONTROLLER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuieventobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUIEVENTOBSERVER_H
+#define MUSUIEVENTOBSERVER_H
+
+#include "musuidefinitions.h"
+
+#include <e32base.h>
+#include <eikenv.h>
+#include <aknappui.h>
+#include <cntdef.h>
+
+class CMusUiResourceHandler;
+
+class MMusUiEventObserver
+	{
+	
+public:
+
+	virtual void ActivateLocalMusViewL( TUid aViewId ) = 0;
+	
+	virtual void ActivateLocalMusViewL( TUid aViewId, 
+	                                    TUid aCustomMessageId,
+	                              const TDesC8& aCustomMessage ) = 0;
+
+    virtual void ShowAsyncConfirmationQueryDialogL( const TDesC& aPrompt ) = 0;
+    
+    virtual void SetToolbarVisibility( TBool aVisible ) = 0;
+    
+    /**
+    * 
+    */
+    virtual void ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon ) = 0;
+
+    virtual CEikonEnv* EikonEnv() const = 0;
+    
+    virtual void TerminateCall() = 0;
+
+    /**
+     * Return current app orientation.
+     */
+    virtual CAknAppUiBase::TAppUiOrientation AppOrientation() const = 0;
+    
+    virtual void SwitchOrientationL( 
+                        CAknAppUiBase::TAppUiOrientation aOrientation ) = 0;
+        
+    virtual void HandleError( const TInt aReason ) = 0;
+    
+    virtual void HandleExit() = 0;
+    
+    virtual TBool OrientationCanBeChanged() const = 0;
+    
+    virtual TInt GetUiVolumeValue() = 0;
+    
+    virtual CMusUiResourceHandler* ResourceHandler() = 0;
+	};
+
+#endif // MUSUIEVENTOBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuifileutil.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef MUSFILEUTIL_H
+#define MUSFILEUTIL_H
+
+#include <e32cmn.h>
+
+class MusUiFileUtil
+    {
+
+    public:
+        
+        /**
+         * return Existence of specified file
+         */
+        static TBool FileExists( const TDesC& aFullFileName );
+        
+        /**
+         */
+        static void VideoFilePathExistsL( const TDesC& aVideoFilePath );
+        
+        /**
+         */
+        static void CreateVideoFileNameL( const TDesC& aVideoFilePath, 
+                                          TFileName& aFileName );
+        
+        /**
+         */
+        static void DeleteFileL( const TDesC& aFileName );
+
+    };
+
+
+
+#endif // MUSFILEUTIL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuigeneralview.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,279 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUIGENERALVIEW_H
+#define MUSUIGENERALVIEW_H
+
+#include "musuisharingobserver.h"
+#include "musuiactivetimerobserver.h"
+
+#include <avkon.rsg>              // Avkon resource file
+#include <aknview.h>              // Avkon base view class
+#include <akntoolbarobserver.h>
+
+class CMusUiAppUi;
+class CMusUiEventController;
+class CMusUiActivityManager;
+class CMusUiViewContainer;
+class CAknIncallBubble;
+class CMusUiActiveTimer;
+class CMusUiBackgroundViewContainer;
+
+/**
+ * The base class for the MUS application's view classes.
+ * Encapsulates common methods for views.
+ *
+ * @lib musui.exe
+ */
+class CMusUiGeneralView : public CAknView,
+                          public MAknToolbarObserver,
+                          public MMusUiSharingObserver,
+                          public MMusUiActiveTimerObserver
+    {
+    
+public: // constructors and destructor
+
+    enum TMusFgBgEventType
+        {
+        EMusFgBgEventNone,
+        EMusFgEvent,
+        EMusBgEvent
+        };
+
+    /**
+    * EPOC default constructor.
+    */
+	void ConstructL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~CMusUiGeneralView();
+
+public: // new functions
+
+    /**
+     * @return the pointer to the application's AppUi (CMusUiAppUi).
+     */
+    CMusUiAppUi* MusAppUi() const;
+    
+    /**
+     * Refreshes the view.  Called after the mode has been changed from portrait
+     * to landscape or vice versa.  This is a virtual function that must be 
+     * implemented by all concrete MUS UI views.
+     */
+    virtual void RefreshView() = 0;
+    
+    virtual void HandleToolbarCommandL( TInt aCommand ) = 0;
+    
+    virtual void HandleKeyUpEvent( TInt aKeyCode );
+    
+    virtual void SetToolbarVisibility( TBool aVisible );
+
+    void AsyncQueryDialogAcceptedL( TBool aAccepted );
+
+    TInt FocusedToolbarItem() const;
+    
+    virtual void LevelIndicatorDismissed() {};
+    virtual void SetInitialFocusedItemL() = 0;
+    
+    TBool OperatorSpecificFunctionality() const;
+    /**
+    * Called when UI comes to foregound / goes to background.
+    * CAknView version of HandleForegroundEventL is not used
+    * at it generates lots of events. Instead, appui implements
+    * foreground event callback funtion and forwards events to views
+    * via this method.
+    */
+    virtual void DoHandleForegroundEventL( TBool aForeground ) = 0;  
+
+
+public: // from base class MAknToolbarObserver
+    
+    virtual void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
+    
+    virtual void OfferToolbarEventL( TInt aCommand );
+    
+
+public: // from MMusUiSharingObserver
+
+    /*
+    * Shows sychronous wait dialog with softkey R_AVKON_SOFTKEYS_CANCEL.
+    * @param aPrompt Prompt text shown in dialog
+    * @param aTimerInSeconds Timer in seconds when dialog is dismissed
+    *        automatically. Timer value 0 means that no timer is used.
+    * @param aExpirationMessageResourceId is ID of resource indicating
+    *        the message to be shown if timer expires. Value 0 means that
+    *        no message is shown.
+    * @return EFalse if dialog is dismissed by user pressing cancel
+    *         or by expiration of timer. ETrue if DismissWaitDialogL
+    *         is called with parameter ETrue;
+    */
+    virtual TBool ShowWaitDialogL( const TDesC& aPrompt, 
+                                   TInt aTimerInSeconds = 0,
+                                   TInt aExpirationMessageResourceId = 0 );
+    
+    /*
+    * Dismisses sychronous wait dialog shown by calling ShowWaitDialogL.
+    * @param aReturnValue determines return value of function 
+    *        ShowWaitDialogL.
+    */
+    virtual void DismissWaitDialogL( TBool aReturnValue = ETrue );
+    
+    /*
+    * Set call back service of wait dialog
+    * @param aCallback A pointer of class MProgressDialogCallback
+    *        which implemented DialogDismissedL 
+    */
+    virtual void SetWaitDialogCallbackL( MProgressDialogCallback* aCallback );
+    
+    virtual void ShowStatusPaneTitleL();
+
+    virtual void EnableMiddleSoftkeyL( TInt aResourceId );
+
+    virtual void ActivateVolumeControlL( TInt aValue, TBool aOnlyIfVisible = EFalse );  
+    
+    virtual void HighlightSelectedToolbarItem( TInt aCommand );
+    
+    /**
+    * General functionality for replacing a toolbar command
+    * Function should be overridden for specific functionality
+    */
+    virtual void ReplaceToolbarCommand( TInt aOldCommand, 
+                                        TInt aNewCommand,
+                                        TBool aSetNewCommandFocused );
+    
+    /**
+    * If toolbar is shown, audio routing button will be refreshed according to
+    * current state of audio routing. 
+    * In case there is no toolbar, middle softkey will be updated
+    */
+    virtual void RefreshAudioRoutingToolbarButton();
+    
+    virtual void UpdateSessionTime( const TDesC& aSessionTime );  
+        
+    virtual void DismissMenuBar();
+                                        
+                                        
+public: // from base class CAknView
+
+    /**
+     * Takes care of command handling.
+     *
+     * @param aCommand  The command that was received.
+     */
+    virtual void HandleCommandL( TInt aCommand );
+
+    /**
+     * From MEikMenuObserver, called by framework before constructing menupane.
+     * Initializes menu items common to all sharing types.
+     */
+    virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+    
+public: // from MMusUiActiveTimerObserver    
+    
+    /**
+     * Indicates that a certain amount of time elapsed
+     */    
+    virtual void TimerComplete( CMusUiActiveTimer* aTimer );
+
+
+protected: // New functions
+
+    virtual CMusUiEventController* EventController() const = 0;
+    
+    virtual CMusUiViewContainer& SharingContainer() const = 0;
+    
+    /**
+    * Leaves with KErrNotFound if eventcontroller is not available
+    */
+    CMusUiEventController& EventControllerL() const;
+    
+    /**
+     * Called when event occurs of type EEventFocusLost or
+     * EEventFocusGained.
+     *
+     * @param aForeground ETrue if the application is in the foreground,
+     *                    otherwise EFalse.
+     * @param aExit indicates if the application should exit 
+     */
+    void HandleForegroundEventL( TBool aForeground, TBool aExit );    
+    
+
+protected:
+
+    /**
+     * Gets called by the framework when it's activating this view.
+     *
+     * @param aPrevViewId Previous view id
+     * @param aCustomMessageId Custom message's id
+     * @param aCustomMessage Custom message
+     */
+    void DoActivateL( const TVwsViewId& aPrevViewId,
+                      TUid aCustomMessageId,
+                      const TDesC8& aCustomMessage );
+
+    /**
+     * Gets called by the framework when it's deactivating this view.
+     */
+    void DoDeactivate();
+
+protected:
+
+   
+    void CompleteForegroundEventL();
+    void DoForegroundEventL();
+    void DoBackgroundEventL( TBool aExit );
+    void SetCurrentFgBgEvent( TMusFgBgEventType aEventType );
+    TInt ToolbarPlaceHolderHeight() const;
+    TInt ToolbarPlaceHolderWidth() const;
+    void UpdateBackgroundOrdinalPosition( TBool aUp );  
+    void RefreshBackgroundContainer();
+
+protected: // data
+
+    /**
+    * ETrue if operator specific functionality is needed 
+    */
+    TBool iOperatorSpecificFunctionality;
+        
+    TBool iToolbarItemSelected;
+    
+    CMusUiBackgroundViewContainer* iBackgroundContainer; // skin background drawer
+    
+private: // data
+    
+    CAknIncallBubble* iIncallBubble;
+    
+    CMusUiActiveTimer* iSessionEndTimer;
+    
+    CMusUiActiveTimer* iFgBgTimer;
+    
+    TMusFgBgEventType iCurrentFgBgEvent;
+    
+    TBool iCurrentExitSetting;
+    
+    };
+
+// macro for NO_TOOLBAR case
+#define MUS_NO_TOOLBAR ( iOperatorSpecificFunctionality && !(AknLayoutUtils::PenEnabled()))
+
+#endif // MUSUIGENERALVIEW_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiinvitationquery.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIINVITATIONQUERY_H
+#define MUSUIINVITATIONQUERY_H
+
+#include "musuiactivetimerobserver.h"
+
+#include <e32base.h>
+
+class CAknGlobalConfirmationQuery;
+class CMusUiActiveTimer;
+class MMusUiInvitationQueryObserver;
+
+/**
+ *
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiInvitationQuery : public CActive, 
+                              public MMusUiActiveTimerObserver
+    {
+    
+public: // constructor
+
+    static CMusUiInvitationQuery* NewL( MMusUiInvitationQueryObserver& aView );
+    
+    ~CMusUiInvitationQuery();
+
+private:
+
+    CMusUiInvitationQuery( MMusUiInvitationQueryObserver& aView );
+
+    void ConstructL();
+
+
+public: // new functions
+
+    void ShowL( const TDesC& aContact );
+
+
+public: // from: MMusUiActiveTimerObserver
+
+	void TimerComplete( CMusUiActiveTimer* aTimer );
+
+
+protected: // from CActive
+
+    void RunL();
+    
+    void DoCancel();
+    
+    TInt RunError( TInt aError );
+
+
+private: // data
+
+    /** A global confirmation query. Own. */
+    CAknGlobalConfirmationQuery* iGlobalQuery;
+
+    /** A descriptor buffer for prompting. Own. */
+    HBufC* iPrompt;
+    
+    CMusUiActiveTimer* iActiveTimer;
+
+    /** Observer. */
+    MMusUiInvitationQueryObserver& iObserver;
+    };
+
+
+#endif // MUSUIINVITATIONQUERY_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiinvitationqueryobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIINVITATIONQUERYOBSERVER_H
+#define MUSUIINVITATIONQUERYOBSERVER_H
+
+
+class MMusUiInvitationQueryObserver
+    {
+public:    
+    
+    /**
+     *
+     */
+    virtual void InvitationAcceptedL() = 0;
+    
+    /**
+     *
+     */
+    virtual void InvitationRejectedL() = 0;
+    };
+
+
+#endif // MUSUIINVITATIONQUERYOBSERVER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuilevelindicator.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,205 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class for displaying icons in viewfinder view
+*
+*/
+
+
+#ifndef MUSUILEVELINDICATOR_H
+#define MUSUILEVELINDICATOR_H
+
+#include "musuidefinitions.h"
+#include "musuiactivetimerobserver.h"
+
+// SYSTEM
+#include <AknsControlContext.h>
+#include <AknUtils.h>
+#include <coecntrl.h>
+
+class MAknsSkinInstance;
+class CGulIcon;
+class MMusUiLevelIndicatorObserver;
+class CAknSlider;
+
+/** 
+* Class for displaying icons in viewfinder view
+*/
+class CMusUiLevelIndicator : public CCoeControl,
+                             public MCoeControlObserver,
+                             public MMusUiActiveTimerObserver
+    {
+
+
+    public: // Constructors and destructor
+        
+        /**
+        * Symbian OS two-phased constructor.
+        * @param aController reference to CCcorController
+        */
+        static CMusUiLevelIndicator* NewL(
+                                TAknOrientation aLayout, 
+        						TInt aMinLevel, 
+        						TInt aMaxLevel, 
+                                CCoeControl* aParent,
+                                const TRect& aRect,
+        						MMusUiLevelIndicatorObserver* aObserver );
+        						
+        /**
+        * Symbian OS two-phased constructor.
+        * @param aController reference to CCcorController
+        */
+        static CMusUiLevelIndicator* NewLC(
+                                TAknOrientation aLayout,
+        						TInt aMinLevel, 
+        						TInt aMaxLevel, 
+                                CCoeControl* aParent,
+                                const TRect& aRect,
+        						MMusUiLevelIndicatorObserver* aObserver );
+
+        /**
+        * Destructor.
+        */
+        ~CMusUiLevelIndicator();
+        
+
+    public: // New functions
+
+		/**
+		*
+		*/
+		void SetLevelL( TMusUiIndicatorType aType, 
+		                TInt aLevel, 
+		                TBool aUseTimer );
+
+		/**
+		*
+		*/
+		TInt GetLevel(TMusUiIndicatorType aType);
+
+		/**
+		*
+		*/
+		void SetRange( TInt aMinLevel, TInt aMaxLevel, TBool aUseTimer);
+		
+		/**
+		*
+		*/
+		void SetIndicatorType( TMusUiIndicatorType aType );
+		
+		/**
+		*
+		*/
+		TMusUiIndicatorType GetIndicatorType();
+			
+		
+	private: // From CCoeControl
+
+	    /**
+	     * Handles the size change events.
+	     *
+	     */
+	    virtual void SizeChanged();
+	    
+		virtual void Draw(const TRect& aRect) const;
+
+        virtual TInt CountComponentControls() const;
+        
+        virtual CCoeControl* ComponentControl( TInt aIndex ) const;
+
+        virtual void HandleResourceChange( TInt aType );
+
+
+    private: // From CCoeControlObserver
+    
+        virtual void HandleControlEventL( CCoeControl* aControl,
+                                          TCoeEvent aEventType );
+        
+        
+    private: // From MMusUiActiveTimerObserver    
+    
+        virtual void TimerComplete( CMusUiActiveTimer* aTimer );
+
+
+    private: // Constructors and destructor
+
+        /**
+        * C++ constructor
+        */
+        CMusUiLevelIndicator( TInt aMinLevel, 
+        					  TInt aMaxLevel, 
+        					  MMusUiLevelIndicatorObserver* aObserver );
+
+        /**
+        * Symbian 2nd phase constructor.
+        */
+        void ConstructL( TAknOrientation aLayout, 
+                         CCoeControl* aParent,
+                         const TRect& aRect );
+
+
+    private: // HELPERS
+
+        void  ConstructImageL( CEikImage* aImage,
+                               MAknsSkinInstance* aSkin,
+                               const TAknsItemID& aId,
+                               TInt aBitmapId,
+                               TInt aMaskId,
+                               TParse aParse );
+
+        /**
+        * Callback for disable level indicator.
+        * @since 2.8
+        * @return KErrNone
+        */
+        //static TInt DisableLevelIndicator( TAny* aThis );
+		//void DisableTimer();        
+		//void EnableTimer();
+
+
+    private: //data
+
+      
+        TRect iParentRect;
+
+        TRect iViewfinderRect;
+
+		TInt iMinLevel;
+
+		TInt iMaxLevel;
+		
+		TInt iZoomLevel;
+		
+		TInt iBrightnessLevel;
+		
+		TInt iDurationLevel;
+
+        CMusUiActiveTimer* iDisableLevelTimer;       
+      
+        TMusUiIndicatorType iIndicatorType;
+		
+        CAknSlider* iSlider;
+
+        CMusUiActiveTimer* iSliderEventTimer;
+
+        /**
+        * NOT OWN!!!
+        */
+		MMusUiLevelIndicatorObserver* iObserver;
+
+    };
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuilevelindicatorobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus level indicator Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUILEVELINDICATOROBSERVER_H
+#define MUSUILEVELINDICATOROBSERVER_H
+
+
+class MMusUiLevelIndicatorObserver 
+	{
+	public:
+
+    	virtual void SetLevelIndicatorVisibility(TBool aVisible) = 0;
+    	
+    	virtual void IndicatorLevelChanged( TInt aNewLevel ) = 0;
+    	
+	};
+
+#endif // MUSUILEVELINDICATOROBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuilivesharingcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,192 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#ifndef MUSUILIVESHARINGCONTROLLER_H
+#define MUSUILIVESHARINGCONTROLLER_H
+
+#include "musuisendcontroller.h"
+#include "musenglivesessionobserver.h"
+#include "musunittesting.h"
+
+#include <e32base.h>
+#include <badesca.h>
+
+class MMusUiLiveSharingObserver;
+class CMusEngLiveSession;
+class CMusUiActiveTimer;
+
+/**
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiLiveSharingController : public CMusUiSendController,
+                                    public MMusEngLiveSessionObserver
+    {
+
+    MUS_UNITTEST( UT_CMusUiLiveSharingController; )
+    MUS_UNITTEST( UT_CMusUiEventController; )
+    
+public:
+
+	static CMusUiLiveSharingController* NewL(
+                        	MMusUiEventObserver& aEventObserver,
+	                        MMusUiSharingObserver& aSharingObserver,
+	                        MMusUiSendObserver& aSendObserver,
+	                        MMusUiLiveSharingObserver& aLiveObserver,
+	                        const TRect& aRect );
+
+	virtual ~CMusUiLiveSharingController();
+
+
+private:
+
+	CMusUiLiveSharingController(
+                        	MMusUiEventObserver& aEventObserver, 
+                        	MMusUiSharingObserver& aSharingObserver,
+	                        MMusUiSendObserver& aSendObserver,
+	                        MMusUiLiveSharingObserver& aLiveObserver );
+	
+	void ConstructL( const TRect& aRect );
+	
+	
+public:	// From CMusUiEventController:
+    
+    virtual void PlayL();
+    
+    virtual void PauseL();
+
+    virtual void OfferToolbarEventL( TInt aCommand );
+
+    virtual void HandleCommandL( TInt aCommand );
+
+    virtual void DeleteEngineSession();
+    
+
+public: // from CMusUiSendController
+
+    virtual CMusEngMceOutSession* EngineOutSession();
+    
+    virtual void InviteL( const TDesC& aRecipient );
+    
+    virtual void HandleSliderValueChangeL( TInt aNewLevel );
+    
+public:	// new functions
+    
+    TMusUiNaviMediaDecorator RecordIcon();
+    
+    TBool IsBrightnessSupported();
+
+    TBool IsDiskFull();
+        
+    /**
+     * Determines whether zoom adjustment is selected either from toolbar 
+     * or menu 
+     */
+    TBool ZoomSelected();
+
+    /**
+     * Determines whether brightness adjustment is selected either from toolbar 
+     * or menu 
+     */
+    TBool BrightnessSelected();
+
+    void LevelIndicatorDismissed();
+    TBool ToolbarZoomSelected();
+
+    TBool ToolbarBrightnessSelected();
+    
+    /**
+    * 
+    */
+    void RefreshCameraOrientationL();
+    
+    /**
+     * Determines whether Session established or not
+     */
+    TBool IsSessionEstablished();
+
+
+private:	// new functions:
+    
+	void ZoomInL();
+	
+	void ZoomOutL();
+	
+    void IncreaseBrightnessL();
+    
+    void DecreaseBrightnessL();
+
+    void ZoomL();
+    
+    void BrightnessL();
+    
+    void HandleMiddleSoftkeyOkL();
+public: // From MMusEngLiveSessionObserver
+
+	void DiskFull();
+	
+    void OrientationRefreshEnded();
+	    
+public:	// from MMusEngSessionObserver
+
+    void SessionEstablished();
+
+	void SessionTerminated();
+
+    void SessionConnectionLost();
+    
+    void SessionFailed();
+    
+	void StreamIdle();
+	
+	void StreamStreaming();	
+
+	void SessionTimeChanged( const TTimeIntervalSeconds& aSeconds );
+	
+    void InactivityTimeout();
+    
+    void HandlePauseResumeInToolbar();
+    
+    void UserInitiatedCameraStateChangeL(TBool aEnable);
+
+private:
+
+	MMusUiLiveSharingObserver& iLiveObserver;
+	
+	CMusEngLiveSession* iSession;
+    
+    TBool iToolbarZoomSelected;
+    
+    TBool iToolbarBrightnessSelected;
+
+    TBool iZoomSelected;
+    
+    TBool iBrightnessSelected;
+    
+    TBool iDiskFull;
+    
+    TBool iSessionEstablished;
+    
+    CMusUiActiveTimer* iPauseResumeGuardTimer;
+	
+    };
+
+#endif // MUSUILIVESHARINGCONTROLLER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuilivesharingobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUILIVESHARINGOBSERVER_H
+#define MUSUILIVESHARINGOBSERVER_H
+
+#include "musuidefinitions.h"
+
+#include <aknappui.h>
+#include <badesca.h>
+
+class MMusUiLiveSharingObserver
+	{
+	
+public:
+    
+    virtual void SetZoomValues( TInt aMinZoom, TInt aMaxZoom ) = 0;
+
+    virtual void SetBrightnessValues( TInt aMinBrightness, TInt aMaxBrightness ) = 0;
+
+    virtual void SetZoomL( TInt aZoomLevel ) = 0;
+    
+    virtual void SetBrightnessL( TInt aBrightnessLevel ) = 0;
+    
+    virtual void SetZoomVisible( TBool aVisible ) = 0;
+    
+    virtual void SetBrightnessVisible( TBool aVisible ) = 0;
+
+    virtual void DoRefreshView() = 0;
+
+    };
+
+#endif // MUSUILIVESHARINGOBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuilivesharingview.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,172 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUILIVESHARINGVIEW_H
+#define MUSUILIVESHARINGVIEW_H
+
+
+#include "musuisendview.h"     // Base view class
+#include "musuilivesharingobserver.h"
+
+#include <aknview.h>
+
+class CMusUiLiveSharingViewContainer;
+class CMusUiLiveSharingController;
+class CMusUiActivityManager;
+class CMusUiBackgroundViewContainer;
+class CAknToolbar;
+
+
+/**
+ *  The MUS application's live sharing view.
+ *
+ *  @lib musui.exe
+ */
+class CMusUiLiveSharingView : public CMusUiSendView,
+                              public MMusUiLiveSharingObserver
+    {
+
+public: // constructors and destructor
+
+    /**
+    * EPOC 2nd phase constructor.
+    */
+    void ConstructL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~CMusUiLiveSharingView();
+
+
+public: // from base class CAknView
+
+    /**
+    * From CAknView returns Uid of View
+    * @return TUid uid of the view
+    */
+    TUid Id() const;
+
+    // From MEikMenuObserver, Called by framework before constructing menupane
+    void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+
+public: // from CMusUiGeneralView
+
+    void HandleToolbarCommandL( TInt aCommand );
+    
+    virtual void SetInitialFocusedItemL();
+
+    void RefreshAudioRoutingButton();
+public: // from base class MAknToolbarObserver
+
+    void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
+
+
+public: // from MMusUiLiveSharingObserver
+
+    void SetZoomValues( TInt aMinZoom, TInt aMaxZoom );
+
+    void SetBrightnessValues( TInt aMinBrightness, TInt aMaxBrightness );
+
+    void SetZoomL( TInt aZoomLevel );
+
+    void SetBrightnessL( TInt aBrightnessLevel );
+
+    void SetZoomVisible( TBool aVisible );
+
+    void SetBrightnessVisible( TBool aVisible );
+
+    void ReplaceToolbarCommand( TInt aOldCommand, 
+                                TInt aNewCommand,
+                                TBool aSetNewCommandFocused );
+    void DoRefreshView();
+    
+public: // new functions
+
+    void RefreshView();
+
+    void LevelIndicatorDismissed();
+    
+	void HandleKeyUpArrowL();
+    
+	void HandleKeyDownArrowL();
+
+    /* In order to receive right oriented frames from camera when
+     * orientation changed, it has to be recreated.Only way to do
+     * from UI is to pause and play.
+     *
+     * aNewRect : New rectangle co-ordinates.
+     *            This will be compared to old rectangle co-ordinates
+     *            to find out whether orientation changed.
+     */
+    void RefreshCameraOrientationL(TRect& aNewRect);
+
+    /* -----------------------------------------------------------------------------
+     * When Live sharing paused , camera source will be unavilable, hence 
+     * it is inappropriate to show the zoom and brightness
+     * so hide those item. And unhide it again when unpaused.
+     * 
+     * @aIsPaused : ETrue if paused else EFalse
+     */    
+    void HideToolbarCommandForPause( TBool aIsPaused );
+    
+    void ResetToolBarSelected();
+
+protected: // from CMusUiSendView
+
+    virtual CMusUiSendController* SendController() const;
+
+    virtual CMusUiSendViewContainer* SendContainer() const;
+
+
+private:
+
+    /**
+     * Gets called by the framework when it's activating this view.
+     *
+     * @param aPrevViewId Previous view id
+     * @param aCustomMessageId Custom message's id
+     * @param aCustomMessage Custom message
+     */
+    void DoActivateL( const TVwsViewId& aPrevViewId,
+                      TUid aCustomMessageId,
+                      const TDesC8& aCustomMessage );
+
+    /**
+     * Gets called by the framework when it's deactivating this view.
+     */
+    void DoDeactivate();
+
+
+private: // data
+
+    /**  Container for all controls in this view.  Owns. */
+    CMusUiLiveSharingViewContainer* iContainer;
+
+    CMusUiLiveSharingController* iController;
+
+    TBool iPauseSelected;
+    
+    };
+
+
+#endif // MUSUILIVESHARINGVIEW_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuilivesharingviewcontainer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUILIVESHARINGVIEWCONTAINER_H
+#define MUSUILIVESHARINGVIEWCONTAINER_H
+
+#include "musuisendviewcontainer.h"
+#include "musuilevelindicatorobserver.h"
+
+
+/**
+ *
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiLiveSharingViewContainer :	public CMusUiSendViewContainer
+    {
+
+public:  // constructors and destructor
+
+    /**
+     * Symbian second-phase constructor.
+     *
+     * @param aView         Parent view of container.
+     * @param aRect         Frame rectangle for container.
+     * @param aInputParams  Packaged data.
+     */
+    void ConstructL( CMusUiGeneralView* aView, 
+                     const TRect& aRect );
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiLiveSharingViewContainer();
+
+
+public:	// new functions
+
+    void SetZoomValues( TInt aMinZoom, TInt aMaxZoom );
+    
+    void SetBrightnessValues( TInt aMinBrightness, TInt aMaxBrightness );
+    
+    void SetZoomL( TInt aZoomLevel );
+    
+    void SetBrightnessL( TInt aBrightnessLevel );
+    
+    void SetZoomVisible( TBool aVisible );
+
+    void SetBrightnessVisible( TBool aVisible );
+    
+    TMusUiIndicatorType GetIndicatorType();
+
+
+private: // from base class CCoeControl
+    
+    /**
+     * Returns the number of control contained by this class.
+     *
+     * @return           Number of controls contained
+     */
+    TInt CountComponentControls() const;
+
+    /**
+     * Returns handle to control pointed by aIndex.
+     *
+     * @param aIndex     Wanted control's index [0..n]
+     * @return           Handle to wanted control
+     */
+    CCoeControl* ComponentControl( TInt aIndex ) const;
+
+    /**
+     * Handles key events.
+     *
+     * @param aEvent  The event that occured.
+     * @param aType   Type of key event: EEventKey, EEventKeyUp, or
+     *                EEventKeyDown.
+     * @return  The container's response to event: either
+     *          EKeyWasNotConsumed or EKeyWasConsumed.
+     */
+    TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, TEventCode aType );
+
+    /**
+     * Handles pointer events. 
+     *
+     * @param aEvent  The event that occured.
+     */
+    virtual void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+    
+protected: // data
+
+    /**
+    * ETrue if operator specific functionality is needed 
+    */
+    TBool iOperatorSpecificFunctionality;
+    
+private: // data
+	
+    };
+
+
+#endif // MUSUILIVESHARINGVIEWCONTAINER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuimmcmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#ifndef MUSUIMMCMONITOR_H
+#define MUSUIMMCMONITOR_H
+
+// INCLUDES
+#include "musuimmcobserver.h"
+
+#include <e32base.h>
+#include <f32file.h>
+
+
+// CLASS DECLARATION
+
+/**
+* Listen changes on the filesystem and notifies observers if 
+* MMC card has been removed.
+* Notifies clients only once about MMC removal and only 
+* in that case that user wanted to listen MMC drive
+*/
+class CMusUiMmcMonitor : public CActive
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        * @param aObserver MMC observer pointer.
+        */
+        static CMusUiMmcMonitor* NewL( MMusUiMmcObserver& aObserver );
+
+        /**
+        * Destructor.
+        */
+        ~CMusUiMmcMonitor();
+       
+    private: // from CActive
+
+        void RunL();
+        TInt RunError( TInt aError );
+        void DoCancel();
+    
+    private:    // New functions.
+    
+        void ConstructL();
+        CMusUiMmcMonitor( MMusUiMmcObserver& aObserver );
+
+        void MonitorMmc();
+        TBool DriveRemoved();
+        TBool IsRemovableDrive( TDriveNumber aDriveNumber );
+
+    private: // Data
+
+        RFs iFs;
+        TDriveNumber iDriveNumber;
+        TBool iRemovableDrive;
+        TBool iDriveRemoved;
+        MMusUiMmcObserver& iObserver;
+    };
+
+#endif  // MUSUIMMCMONITOR_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuimmcobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#ifndef MUSUIMMCOBSERVER_H
+#define MUSUIMMCOBSERVER_H
+
+
+/**
+*  Interface for listening MMC removal indication. 
+*/
+class MMusUiMmcObserver
+    {
+    public:
+
+        /**
+        * Called when MMC was removed.
+        */
+        virtual void MmcRemoved() = 0;
+    };
+
+#endif // MUSUIMMCOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuinavimediaanimator.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#ifndef MUSUINAVIMEDIAANIMATOR_H
+#define MUSUINAVIMEDIAANIMATOR_H
+
+#include "musuidefinitions.h"
+#include "musuinavimediaanimatorobserver.h"
+
+#include <coecntrl.h>
+#include <AknUtils.h>
+
+class CAknIconArray;
+class MAknsSkinInstance;
+class CPeriodic;
+
+/**
+ * CMusUiNaviMediaDecorator
+ *
+ * @lib musui.exe
+ */
+class CMusUiNaviMediaAnimator : public CBase
+    {
+
+    public:  // constructors and destructor
+
+        /**
+         * Two-phased constructor.
+         *
+         */
+        static CMusUiNaviMediaAnimator* NewL(
+                 MMusUiNaviMediaAnimatorObserver& aObserver, TSize aImageSize );
+
+        /**
+         *
+         *
+         */
+        virtual ~CMusUiNaviMediaAnimator();
+
+
+    private: // constructors
+
+        /**
+         * C++ default constructor.
+         *
+         */
+        CMusUiNaviMediaAnimator( 
+                MMusUiNaviMediaAnimatorObserver& aObserver, TSize aImageSize );
+
+        /**
+         * By default Symbian second-phase constructor is private.
+         *
+         */
+        void ConstructL();
+
+
+    public: // API
+
+        /**
+         * Sets animation timer interval eq. speed of animation
+         *
+         * @param aAnimationInterval Milliseconds between image transitions
+         */
+        void SetInterval( const TInt aAnimationInterval );
+
+
+    private: // Perioidic timer CallBack
+
+        static TInt AnimationInterval( TAny* aThis );
+	    
+
+    private: // HELPERS
+
+        /**
+         * Layouts all images.  And also set size.
+         *
+         */
+        void LoadImagesL();
+
+
+        /**
+         * Construct image from resourse file
+         *
+         */
+        void ConstructImageL( MAknsSkinInstance* aSkin,
+                              const TAknsItemID& aId,
+                              TInt aBitmapId,
+                              TInt aMaskId,
+                              TParse parse );
+
+
+
+    private: // DATA
+
+        /**
+        *
+        */
+        CAknIconArray* iBitmapArray;
+
+        /**
+        *
+        */
+        //CAknIconArray* iMaskArray;
+
+        /**
+        * resource file location ( eq. Z or C )
+        */
+        TBool iResourceRam;
+
+        /**
+        * Animation image index
+        */
+        TInt iIndex;
+
+        /**
+        *
+        */
+        MMusUiNaviMediaAnimatorObserver& iObserver;
+
+        /**
+        *
+        */
+        TInt iInterval;
+        
+        /**
+        * Image size
+        */
+        TSize iSize;
+        
+        /**
+        *
+        */
+        CPeriodic* iAnimationTimer;   // owned
+
+
+    };
+
+#endif // MUSUINAVIMEDIADECORATOR_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuinavimediaanimatorobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUINAVIMEDIAANIMATOROBSERVER_H
+#define MUSUINAVIMEDIAANIMATOROBSERVER_H
+
+#include <e32base.h>
+#include <eikenv.h>
+#include <cntdef.h>
+
+class MMusUiNaviMediaAnimatorObserver
+    {
+
+    public:
+
+        /**
+        * Sets new image for drawing. Ownership is not transferred.
+        *
+        */
+        virtual void SetIcon( CGulIcon* aIcon ) = 0;
+
+    };
+
+#endif // MUSUIEVENTOBSERVER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuinavimediadecorator.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,216 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#ifndef MUSUINAVIMEDIADECORATOR_H
+#define MUSUINAVIMEDIADECORATOR_H
+
+#include "musuidefinitions.h"
+#include "musuinavimediaanimatorobserver.h"
+
+#include <coecntrl.h>
+#include <AknUtils.h>
+
+class CAknIconArray;
+class CMusUiNaviMediaAnimator;
+class MAknsSkinInstance;
+
+/**
+ * CMusUiNaviMediaDecorator
+ *
+ * @lib musui.exe
+ */
+class CMusUiNaviMediaDecorator : public CCoeControl, 
+                                 public MMusUiNaviMediaAnimatorObserver
+    {
+
+	public:  // constructors and destructor
+
+	    /**
+	     * Two-phased constructor.
+	     *
+	     */
+	    static CMusUiNaviMediaDecorator* NewL();
+
+	    /**
+	     * 
+	     *
+	     */
+	    virtual ~CMusUiNaviMediaDecorator();
+
+
+	private: // constructors
+
+	    /**
+	     * C++ default constructor.
+	     *
+	     */
+	    CMusUiNaviMediaDecorator();
+
+	    /**
+	     * By default Symbian second-phase constructor is private.
+	     *
+	     */
+	    void ConstructL();
+
+
+	public: // API
+
+	    /**
+	     * Updates left label (usually time string) in navi pane.
+		 *
+	     * @param aLabel New label
+	     */
+	    void SetLeftLabelL( const TDesC& aLabel );
+
+	    /**
+	     * Updates right label (usually time string) in navi pane.
+		 *
+	     * @param aLabel New label
+	     */
+	    void SetRightLabelL( const TDesC& aLabel );
+	    
+		/**
+		* Selects icon show
+		*
+		*/
+		void ShowIcon( TMusUiNaviMediaDecorator aIcon );
+
+
+	protected: // from MMusUiNaviMediaAnimatorObserver
+	
+        void SetIcon( CGulIcon* aIcon );
+
+
+	protected: // from CCoeControl
+
+	    /**
+	     * Handles the size change events.
+	     *
+	     */
+	    void SizeChanged();
+
+	    /**
+	     * Draws the control.
+	     *
+	     * @param aRect The region of the control to be redrawn.
+	     */
+	    void Draw( const TRect& aRect ) const;
+
+
+	private: // HELPERS 
+	
+	    /**
+	     * Layouts the text depending on current situation.
+	     *
+	     */
+		void DoLayoutText();
+
+
+        void LoadImagesL();
+
+        void  ConstructImageL( MAknsSkinInstance* aSkin,
+                                                const TAknsItemID& aId,
+                                                TInt aBitmapId,
+                                                TInt aMaskId,
+                                                TParse parse,
+                                                TBool aIconHasOwnColor = ETrue);
+
+
+	private: // DATA
+
+	    /**
+	    *
+	    *
+	    */
+	    HBufC* iLeftLabel;
+
+	    /**
+	    *
+	    *
+	    */
+	    HBufC* iRightLabel;
+
+
+        CAknLayoutFont *iFont;
+
+	    /**
+	    *
+	    *
+	    */
+	    TAknLayoutText iLeftTextLayout;
+
+	    /**
+	    *
+	    *
+	    */
+	    TAknLayoutText iRightTextLayout;
+
+	    /**
+	    *
+	    *
+	    */
+	    TAknLayoutRect iIconLayout;    
+	    
+	    /**
+	    *
+	    *
+	    */
+	    CAknIconArray* iIconArray;
+	    
+	    /**
+	    *
+	    *
+	    */
+	    TInt iMiddle;
+	    
+	    TInt iIconLeft;
+	    
+	    /**
+	    *
+	    *
+	    */
+	    TSize iLeftTextSize;
+
+	    /**
+	    *
+	    *
+	    */
+	    TSize iRightTextSize;
+	    
+	    /**
+	    *
+	    *
+	    */
+	    CGulIcon* iIcon;
+	    
+	    /**
+	    * resource file location ( eq. Z or C )
+	    */
+        TBool iResourceRam;
+	    
+    
+        CMusUiNaviMediaAnimator* iAnimation;
+        
+        TSize iImageSize;
+    
+    };
+
+#endif // MUSUINAVIMEDIADECORATOR_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuipropertyobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUIPROPERTYOBSERVER_H
+#define MUSUIPROPERTYOBSERVER_H
+
+#include <e32base.h>
+
+class MMusUiPropertyObserver
+	{
+	
+public:
+
+	//virtual void ResourcePropertyChanged( const TUint aKey, const TInt aValue ) = 0;
+	
+	//virtual void SessionPropertyChanged( const TUint aKey, const TInt aValue ) = 0;
+
+    virtual void PropertyChanged( const TUint aKey, const TInt aValue ) = 0;	
+	
+	virtual void HandlePropertyError( const TInt aReason ) = 0;
+	
+	};
+
+#endif // MUSUIPROPERTYOBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuipropertywatch.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#ifndef MUSUIPROPERTYWATCH_H
+#define MUSUIPROPERTYWATCH_H
+
+#include "musunittesting.h"
+
+#include <e32base.h>
+#include <e32property.h>
+
+class MMusUiPropertyObserver;
+
+class CMusUiPropertyWatch : public CActive
+    {
+    
+    MUS_UNITTEST( UT_CMusUiPropertyWatch; )
+        
+public: // constructors and destructor
+
+    /**
+     * Two-phased constructor. Leaves on failure.
+     * @return The constructed CMusUiPropertyWatch object.
+     */
+    static CMusUiPropertyWatch* NewL( MMusUiPropertyObserver& aObserver, 
+                                      TUid aCategory, 
+                                      const TInt aPropertyName );
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiPropertyWatch();
+
+private:
+
+    /**
+     * C++ constructor.
+     */
+    CMusUiPropertyWatch( MMusUiPropertyObserver& aObserver, 
+                         TUid aCategory, 
+                         const TInt aPropertyName );
+
+    /**
+     * Symbian 2nd-phase constructor.
+     * @leave If return value of RProperty::Attach != KErrNone, e.q. KErrNoMemory
+     *        or one of the system wide error codes if RunL() leaves
+     */
+    void ConstructL();
+
+
+public: // new functions
+
+    /**
+    * Reads a P&S integer value from the category KCategoryUid
+    * @pre P&S value has to be defined.
+    * @leave One of the system wide error codes, if RProperty::Get()
+    *        returns an error value.
+    * @param aKey Name of the P&S Key, which value should be read
+	* @returns The integer value of the P&S Key.
+    */
+    static TInt ReadIntPropertyL( TUint aKey );
+    
+    /**
+    * Reads a P&S descriptor value from the category KCategoryUid
+    * @pre P&S value has to be defined.
+    * @leave One of the system wide error codes, if RProperty::Get()
+    *        returns an error value or if descriptor AllocL() leaves.
+    * @param aKey Name of the P&S Key, which value should be read
+	* @returns The descriptor value of the P&S Key.
+    *          Ownership is transferred
+    */
+    static HBufC* ReadDescPropertyL( TUint aKey );
+
+
+private: // functions from base class CActive
+
+    /**
+     *
+     */
+    void DoCancel();
+
+    /**
+    * Reads a P&S integer value from the category KCategoryUid
+    * and starts to monitor changes in the property value.
+    * Calls observer function for read property values.
+    * @pre P&S value has to be defined as an integer.
+    * @leave One of the system wide error codes, if RProperty::Get()
+    *        returns an error value.
+    */
+    void RunL();
+
+    /**
+     *
+     */
+	TInt RunError(TInt aError);
+	
+private:    // Data
+
+	RProperty iProperty;
+	
+	TUid iPropertyCategory;
+	
+    TUint iPropertyKey;
+    
+    MMusUiPropertyObserver& iObserver;
+
+    };
+
+#endif // MUSUIPROPERTYWATCH_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiqueryobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIQUERYOBSERVER_H
+#define MUSUIQUERYOBSERVER_H
+
+
+class MMusUiQueryObserver
+    {
+public:    
+    
+    /**
+     *
+     */
+    virtual void QueryAcceptedL( TBool aAccepted ) = 0;
+    
+    /**
+     * Error handler for QueryAcceptedL.
+     *
+     * @param aError is error to be handled.
+     * @return KErrNone means handled value. All other values will lead to
+     *         a panic.
+     */
+    virtual TInt HandleQueryError( TInt aError ) = 0;
+    
+    };
+
+
+#endif // MUSUIQUERYOBSERVER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuireceivecontainer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,171 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIRECEIVECONTAINER_H
+#define MUSUIRECEIVECONTAINER_H
+
+#include "musuiviewcontainer.h"
+
+class MAknsControlContext;
+class CMusUiGeneralView;
+class CMusUiInvitationQuery;
+class MMusUiInvitationQueryObserver;
+class CMusUiReceiveView;
+
+/**
+ *
+ *
+ */
+class CMusUiReceiveContainer :	public CMusUiViewContainer
+    {
+
+public:  // constructors and destructor
+
+    /**
+     * Public constructor.
+     */
+    static CMusUiReceiveContainer* NewL( CMusUiReceiveView& aView,
+                                  TRect aRect );
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiReceiveContainer();
+
+
+private: // hidden constructors
+
+    /**
+     * C++ Constructor
+     */
+    CMusUiReceiveContainer( CMusUiReceiveView& aView );
+
+    /**
+     * Symbian second-phase constructor.
+     *
+     * @param aView         Parent view of container.
+     * @param aRect         Frame rectangle for container.
+     * @param aInputParams  Packaged data.
+     */
+    void ConstructL( const TRect& aRect );
+
+protected: // data
+
+    /**
+    * ETrue if operator specific functionality is needed 
+    */
+    TBool iOperatorSpecificFunctionality;    
+
+public:	// new functions
+
+    /**
+     * Shows an invitation query.
+     */
+    void ShowInvitationQueryL( const TDesC& aContact,
+                               MMusUiInvitationQueryObserver& aObserver );
+
+    /**
+     * 
+     */
+    void DismissInvitationQuery( TBool aDelete );
+    
+    /**
+     * Return pointer to view class. User needs to type cast to
+     * appropriate concrete view class.
+     *
+     * @return handle to view
+     */
+    CMusUiGeneralView* MusUiView() const;
+ 
+
+    void SetFullScreen( TBool aFullScreen, TRect aRect );
+    
+    void UpdatePointerCapture();
+
+
+private: // from base class CCoeControl
+
+   /**
+    * 
+    */
+    virtual void SizeChanged();
+    
+    /**
+     * Returns the number of control contained by this class.
+     *
+     * @return           Number of controls contained
+     */
+    virtual TInt CountComponentControls() const;
+
+    /**
+     * Returns handle to control pointed by aIndex.
+     *
+     * @param aIndex     Wanted control's index [0..n]
+     * @return           Handle to wanted control
+     */
+    virtual CCoeControl* ComponentControl( TInt aIndex ) const;
+
+    /**
+     * Gets called by the application framework when drawing is
+     * needed.
+     *
+     * @param aRect The rectangle that needs to be drawn.
+     */
+    virtual void Draw( const TRect& aRect ) const;
+
+    /**
+     * Handles key events.
+     *
+     * @param aEvent  The event that occured.
+     * @param aType   Type of key event: EEventKey, EEventKeyUp, or
+     *                EEventKeyDown.
+     * @return  The container's response to event: either
+     *          EKeyWasNotConsumed or EKeyWasConsumed.
+     */
+    virtual TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, 
+                                         TEventCode aType );
+
+    /**
+     * Handles pointer events. Will return from full screen mode as a response
+     * to whatever pointer event.
+     *
+     * @param aEvent  The event that occured.
+     */
+    virtual void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+
+
+private: // data
+
+    /**  A dialog for invitation query (accept/reject). Own.*/
+    CMusUiInvitationQuery* iInvitationQuery;
+
+    /**  Background skin control context. */
+    MAknsControlContext* iBackGround;
+    
+    /**  Handle to the view that owns of this container.  Not own. */
+    CMusUiGeneralView& iView;
+    
+    TBool iFullScreen;
+    
+    };
+
+
+#endif // MUSUIRECEIVECONTAINER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuireceivecontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,322 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#ifndef MUSUIRECEIVECONTROLLER_H
+#define MUSUIRECEIVECONTROLLER_H
+
+#include "musuieventcontroller.h"
+#include "musengreceivesessionobserver.h"
+#include "musengmcesession.h"
+#include "musuiinvitationqueryobserver.h"
+#include "musunittesting.h"
+#include "musuiactivetimerobserver.h"
+
+#include <e32base.h>
+
+class MMusUiReceiveObserver;
+class CMusEngReceiveSession;
+class MMusUiReceiveObserver;
+class CMusUiActiveTimer;
+
+/**
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiReceiveController : public CMusUiEventController,
+                                public MMusEngReceiveSessionObserver,
+                                public MMusUiInvitationQueryObserver,
+                                public MMusUiActiveTimerObserver
+    {
+
+public:
+
+    /**
+     * Two-phased constructor. Leaves on failure.
+     * @return The constructed CMusUiReceiveController object.
+     */
+	static CMusUiReceiveController* NewL(
+	                        MMusUiEventObserver& aEventObserver,
+                            MMusUiSharingObserver& aSharingObserver,
+	                        MMusUiReceiveObserver& aReceiveObserver,
+	                        const TRect& aRect );
+
+    /**
+     * Destructor.
+     */
+	virtual ~CMusUiReceiveController();
+
+private:
+
+    /**
+     * C++ constructor.
+     */
+	CMusUiReceiveController( MMusUiEventObserver& aEventObserver,
+	                         MMusUiSharingObserver& aSharingObserver,
+	                         MMusUiReceiveObserver& aReceiveObserver );
+	
+    /**
+     * Symbian 2nd-phase constructor.
+     * @leave One of the system wide error codes
+     * @param aRect Original view's rectangle, which is centered and passed
+     *        for the Engine.
+     */
+	void ConstructL( const TRect& aRect );
+	
+
+public:	// new functions:
+    
+    /**
+     * Gets called by MMusEngReceiveSessionObserver's Incoming Session.
+     * Function cancels the timer and displays the invitation query dialog.
+     * MO Address is saved into memeber variable iOriginator.
+     * @leave One of the system wide error codes
+     * @param aOriginator The Address of MO.
+     * @param aOriginatorIdentity The identity of MO.     
+     */
+    void HandleIncomingSessionL( const TDesC& aOriginator,
+                                 const TDesC& iOriginatorIdentity );
+                                  
+    TBool ClipMutedL();
+    
+    TBool ClipContainsAudioL();
+    
+    /** 
+     * Determines whether video is being played in full screen mode. 
+     */
+    TBool FullScreenSelected();
+    
+    
+public: // from CMusUiEventController
+    
+    /**
+    * Returns a pointer to engine side session.
+    */
+    virtual CMusEngMceSession* EngineSession();
+
+    /**
+     * Implementation of the pure virtual function in MMusUiCallbackObserver.
+     * Handled async. event in the MT is EMusUiAsyncInviteAccepted.
+     * @param aEventId Async. event
+     */
+    virtual void HandleAsyncEventL( TMusUiAsyncEvent aEventId );
+    
+    /**
+     * Implementation of the pure virtual function from CMusUiEventController
+     * @return iOriginator, the address of MO
+     */
+    virtual const TDesC& TypedAddress() const;
+
+    /**
+    * Updates softkeys specific to receiving. Delegates other requests to
+    * a base class.
+    */
+    // virtual void UpdateSoftkeyL( TInt aToolbarItem );
+    
+    /**
+     * Handles commands generated by UI's Toolbar in the Receive View.
+     * @pre iSession != NULL
+     * @leave One of the system wide error codes
+     * @param aCommand Identiefier of the event's command.
+     */
+    virtual void OfferToolbarEventL( TInt aCommand );
+    
+    virtual void HandleCommandL( TInt aCommand );
+
+    /**
+     * Implementation of the pure virtual function from CMusUiEventController
+     * Deletes the Engine instance.
+     */
+    virtual void DeleteEngineSession();
+
+
+public: // from MMusEngReceiveSessionObserver
+
+    /**
+     * Called by engine when timer can be cancelled.
+     */
+    virtual void IncomingSessionPreNotification();
+
+    /**
+     * Called by the engine, when session is incoming.
+     * @param aOriginator The address of MO.
+     * @param aOriginatorIdentity The identity of MO.
+     */
+    virtual void IncomingSession( const TDesC& aOriginator, 
+                                  const TDesC& iOriginatorIdentity );
+
+    /**
+     * Called by the engine, when current receiving session is buffering
+     * received RTP.
+     */
+    virtual void StreamBuffering();
+    
+
+public:	// from MMusEngSessionObserver
+
+    /**
+     * Called by the engine, when incoming session is established.
+     * Dismisses the wait dialog and sets up the status pane
+     */
+    void SessionEstablished();
+
+    /**
+     * Called by the engine, when session has been terminated.
+     * If connection is not established, dismisses the invitation query dialog,
+     * shows an error dialog and exits.
+     * Otherwise dismisses wait dialog and exits.
+     */
+	void SessionTerminated();
+
+    /**
+     * Called by the engine, when current session has lost network connection.
+     * Displays an error dialog.
+     */
+    void SessionConnectionLost();
+    
+    /**
+     * Called by the engine, when an undefined exception has occurred.
+     * Dismisses the wait dialog.
+     */
+    void SessionFailed();
+    
+    /**
+     * Called by the engine, when we are not sending or receiving RTP.
+     * Updates the icon to be Pause icon.
+     */
+	void StreamIdle();
+	
+    /**
+     * Called by the engine, when current session state is changed to streaming
+     * Dismisses the wait dialog, and updates the icon to Play icon.
+     */
+	void StreamStreaming();	
+
+    /**
+     * Called by the engine, when time information of the session 
+     * should be updated.
+     * Calls Observer's UpdateSessionTime() function.
+     * @param aSeconds Session time in secods to be formatted.
+     */
+	void SessionTimeChanged( const TTimeIntervalSeconds& aSeconds );
+	
+    /**
+     * Called by the engine, when RTCP inactivity timeout has occurred.
+     * Exits the application.
+     */
+    void InactivityTimeout();
+    
+	
+public: // from MMusUiInvitationQueryObserver
+
+    /**
+     * Called if the user accepts the incoming invitation.
+     * Calls Engine's AcceptInvitationL() function with ETrue and starts
+     * to show the wait dialog async.
+     * @pre iSession != NULL
+     * @leave One of the system wide error codes
+     */
+    void InvitationAcceptedL();
+    
+    /*
+     * Called if the user rejects the incoming invitation.
+     * Calls Engine's AcceptInvitationL() with EFalse and exits the application.
+     * @pre iSession != NULL
+     * @leave One of the system wide error codes
+     */
+    void InvitationRejectedL();
+
+public: // from MMusUiActiveTimerObserver
+	
+    /*
+     * Called if the timer completes.
+     * Calls ShutdownL() function.
+     */
+	void TimerComplete( CMusUiActiveTimer* aTimer );
+
+
+protected: // from CMusUiEventController
+
+    /**
+    * Receive specific functionality of exit procedure
+    */
+    virtual void ExitProcedureL( TBool aUserAcceptance );
+    
+
+private:	// new functions:
+    /**
+     * Changes video playing mode to the opposite. 
+     * Value of iFullScreenSelected will be changed to opposite as well.
+     */
+    void ChangeFullScreenModeL(); 
+
+    
+    /**
+     * Displays the wait dialog calling Observer's ShowWaitDialogL with a string
+     * loaded from resources.
+     * @leave One of the system wide error codes
+     */
+    void ShowWaitDialogL();
+    
+    /**
+    * 
+    */
+    void SessionEstablishedL();
+    
+    
+private:
+
+    /**
+     * Observer interface for receiving specific callbacks
+     */
+	MMusUiReceiveObserver& iReceiveObserver;
+	
+    /**
+     * The engine object for MT
+     */
+	CMusEngReceiveSession* iSession;
+	
+    /**
+     * Address of the MO
+     */
+	HBufC* iOriginator;
+
+    /**
+     * Flag indicating that video is being played in Full Screen mode
+     */
+    TBool iFullScreenSelected;
+    /**
+     * Active object timer instance
+     */
+	CMusUiActiveTimer* iTimer;
+	
+	CMusEngMceSession::TDisplayOrientation iOriginalMceOrientation;
+	
+	/**
+	 * Flag indicating that the stream is paused
+	 */
+	TBool iStreamPaused;
+	
+	
+    MUS_UNITTEST( UT_CMusUiReceiveController; )
+
+    };
+
+#endif // MUSUIRECEIVECONTROLLER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuireceiveobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUIRECEIVEOBSERVER_H
+#define MUSUIRECEIVEOBSERVER_H
+
+#include "musuidefinitions.h"
+
+#include <aknappui.h>
+
+class MMusUiReceiveObserver
+	{
+
+public:
+
+    virtual void ShowInvitationQueryL( const TDesC& aQuery ) = 0;
+    
+    virtual void DismissInvitationQuery( TBool aDelete ) = 0;
+	
+    virtual void SetFullScreenL( TBool aFullScreen ) = 0;
+	
+	};
+
+#endif // MUSUILIVESHARINGOBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuireceiveview.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIRECEIVEVIEW_H
+#define MUSUIRECEIVEVIEW_H
+
+
+#include "musuigeneralview.h"     // Base view class
+#include "musuinavimediadecorator.h"
+#include "musuireceiveobserver.h"
+#include "musuidefinitions.h"
+
+#include <aknview.h>
+
+
+class CMusUiReceiveContainer;
+class CMusUiReceiveController;
+class CMusUiActivityManager;
+class CMusUiBackgroundViewContainer;
+
+
+/**
+ *  The MUS application's live sharing view.
+ *
+ */
+class CMusUiReceiveView : public CMusUiGeneralView,
+                          public MMusUiReceiveObserver
+    {
+    
+public: // constructors and destructor
+
+    /**
+    * EPOC 2nd phase constructor.
+    */
+	void ConstructL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~CMusUiReceiveView();
+
+
+public: // from base class CAknView
+
+    /**
+    * From CAknView returns Uid of View
+    * @return TUid uid of the view
+    */
+    virtual TUid Id() const;
+
+    // From MEikMenuObserver, Called by framework before constructing menupane
+    virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+public: // from CMusUiGeneralView
+
+    virtual void HandleToolbarCommandL( TInt aCommand );
+    
+    virtual void SetInitialFocusedItemL();
+    
+    virtual void SetToolbarVisibility( TBool aVisible );
+    
+    virtual void DoHandleForegroundEventL( TBool aForeground );    
+
+public: // from base class MAknToolbarObserver
+
+    virtual void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
+    
+
+public: // from MMusUiReceiveObserver
+
+    virtual void ShowInvitationQueryL( const TDesC& aQuery );
+
+    virtual void DismissInvitationQuery( TBool aDelete );
+    
+    virtual void SetFullScreenL( TBool aFullScreen );
+
+
+public: // new functions
+
+    void RefreshView();
+    
+
+protected: // from MusUiGeneralView
+
+    virtual CMusUiEventController* EventController() const;
+    
+    virtual CMusUiViewContainer& SharingContainer() const;
+     
+
+private:
+
+    /**
+     * Gets called by the framework when it's activating this view.
+     *
+     * @param aPrevViewId Previous view id
+     * @param aCustomMessageId Custom message's id
+     * @param aCustomMessage Custom message
+     */
+    void DoActivateL( const TVwsViewId& aPrevViewId,
+                      TUid aCustomMessageId,
+                      const TDesC8& aCustomMessage );
+
+    /**
+     * Gets called by the framework when it's deactivating this view.
+     */
+    void DoDeactivate();
+
+
+private: // data
+
+    /**  Container for all controls in this view.  Owns. */
+    CMusUiReceiveContainer* iContainer;
+    
+    CMusUiReceiveController* iController;
+    
+    HBufC* iAddress;
+    
+    TRect iOriginalRect;
+
+    };
+
+#endif // MUSUIRECEIVEVIEW_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiresourcehandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,162 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Handler for camera, keypad and video player resources
+*
+*/
+
+
+
+#include "musuipropertyobserver.h"
+#include "musresourceproperties.h"
+#include "mussettingskeys.h"
+#include "musmanagercommon.h"
+
+#include <e32base.h>
+
+class CMusUiPropertyWatch;
+class MMusUiEventObserver;
+class CAknWaitDialog;
+
+/**
+ * Encapsulates handling and observing of camera, keypad and video player
+ * hardware and software resources.
+ */
+class CMusUiResourceHandler : public CBase,
+                              public MMusUiPropertyObserver
+    {
+    
+    public:
+    
+        virtual ~CMusUiResourceHandler();
+        
+        static CMusUiResourceHandler* NewL( MMusUiEventObserver& aObserver );
+    
+    public: // API
+        
+        TBool RequestKeypadL( TBool aMandatory = EFalse );
+        
+        TBool RequestCameraL( TBool aMandatory = EFalse );
+        
+        TBool RequestVideoPlayerL( TBool aMandatory = EFalse );
+        
+        void CheckInitialOrientationL( MultimediaSharing::TMusUseCase aUsecase );
+        
+        
+    public:	// From MMusUiPropertyObserver
+
+        /**
+        * @param TUint aKey - The Property key
+        * @param TInt aValue - The value of the Property key
+        */
+        virtual	void PropertyChanged( const TUint aKey, const TInt aValue );
+
+        virtual void HandlePropertyError( const TInt aReason );
+        
+        
+    private:
+    
+        CMusUiResourceHandler( MMusUiEventObserver& aObserver );
+        
+        void ConstructL();
+    
+    
+    private: // Helpers
+    
+        TBool ShowChangeProductModeDialogL( const TDesC& aPrompt );
+        
+        TBool IsCurrentlyAvailable( NMusResourceApi::TAvailability aResourceAvailability,
+        							MusSettingsKeys::TUsability aResourceUsability );
+        
+        
+    private: // data
+        
+        /**
+        * 
+        */
+        MMusUiEventObserver& iObserver;
+    
+        /**
+        * 
+        */
+    	CMusUiPropertyWatch* iCameraResourceWatch;
+
+        /**
+        * 
+        */
+    	CMusUiPropertyWatch* iKeypadResourceWatch;
+        
+        /**
+        * It holds the value for CameraAvailability.
+        * If it is static available ( Bit set to 0 in Cenrep)
+        * then it will be available always , if the bit set
+        * to 1 ( dynamic ) then it should be monitored by property
+        * listner and set the value accordingly.
+        */
+        NMusResourceApi::TAvailability iCameraAvailability;
+
+        /**
+        * It holds the value for KeypadAvailability.
+        * If it is static available ( Bit set to 0 in Cenrep)
+        * then it will be available always , if the bit set
+        * to 1 ( dynamic ) then it should be monitored by property
+        * listner and set the value accordingly.
+        */
+        NMusResourceApi::TAvailability iKeypadAvailability;
+
+		/**
+        * It holds the value for CameraUsability.
+        * Intially read from cenrep and assigned
+        * Refer mussettingskeys.h to know the bit value.
+        */
+        MusSettingsKeys::TUsability iCameraUsability;
+        
+        /**
+        * It holds the value for KeypadUsability.
+        * Intially read from cenrep and assigned
+        * Refer mussettingskeys.h to know the bit value.
+        */
+        MusSettingsKeys::TUsability iKeypadUsability;
+        
+        /**
+        * It holds the value for VideoplayerUsability.
+        * Intially read from cenrep and assigned
+        * Refer mussettingskeys.h to know the bit value.
+        */
+        MusSettingsKeys::TUsability iVideoplayerUsability;
+
+        /**
+        * 
+        */
+        TBool iCameraAvailibilityInProgress;
+        
+        /**
+        * 
+        */
+        TBool iKeypadAvailibilityInProgress;
+        
+        /**
+        * 
+        */
+        CAknWaitDialog* iChangeProductModeDialog;
+        
+        /**
+        * 
+        */
+        HBufC* iDialogPrompt;
+        
+    };
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuisendcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,258 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#ifndef MUSUISENDCONTROLLER_H
+#define MUSUISENDCONTROLLER_H
+
+#include "musuieventcontroller.h"
+#include "musengoutsessionobserver.h"
+#include "musunittesting.h"
+
+#include "musengoutsessionobserver.h"
+#include <AknProgressDialog.h>
+
+class MMusUiSendObserver;
+class CMusEngMceOutSession;
+class CDirectoryLocalizer;
+
+/**
+ *
+ *
+ * @lib musui.exe
+ */
+class CMusUiSendController : public CMusUiEventController,
+                             public MMusEngOutSessionObserver
+    {
+
+public:
+
+	virtual ~CMusUiSendController();
+	
+	
+public:	// From CMusUiEventController:
+    
+    /**
+    * Returns a pointer to engine side session.
+    */
+    virtual CMusEngMceSession* EngineSession();
+    
+    /**
+    *
+    */
+    virtual const TDesC& TypedAddress() const;
+    
+    /**
+    *
+    */
+    virtual TBool ManualAddressTyped() const;
+    
+    /**
+    * Makes out session specific preparations for engine session deletion.
+    */
+    virtual void DeleteEngineSession();
+       
+
+public:	// From MMusUiPropertyObserver
+
+    virtual void HandlePropertyError( const TInt aReason );
+
+
+public: // From MMusUiCallbackObserver
+
+    /**
+    * Handles async events common to outgoing session types.
+    * Should be called if child classes are not able to handle the call.
+    */
+    virtual void HandleAsyncEventL( TMusUiAsyncEvent aEventId );
+
+    
+public:	// new functions:
+
+    /**
+    * Returns a pointer to engine side session.
+    */
+    virtual CMusEngMceOutSession* EngineOutSession() = 0;
+
+    virtual void InviteL( const TDesC& aRecipient ) = 0;
+    
+    virtual void HandleSliderValueChangeL( TInt aNewLevel ) = 0;
+
+    void StartInvitationL();
+
+    void InviteL();
+    
+	void CancelInvitationL();
+    
+    virtual void HandleForegroundEventL( TBool aForeground );
+   
+    virtual void PlayL();
+    
+    virtual void PauseL();
+    
+    TBool IsPlayingL();
+    
+
+public: // from MMusEngSessionObserver
+	
+    virtual void SessionEstablished();
+
+
+public: // from MMusEngOutSessionObserver
+	
+    virtual	void SessionRejected();                     // e.g. 603 DECLINE
+	
+	virtual void SessionBadRequest();                   // 400 
+	
+	virtual void SessionUnauthorized();                 // 401 
+	
+	virtual void SessionPaymentRequired();              // 402
+	
+	virtual void SessionRecipientNotFound();            // 404
+	
+	virtual void SessionProxyAuthenticationRequired();  // 407
+	
+	virtual void SessionRequestTimeOut();               // 408
+	
+	virtual void SessionUnsupportedMediaType();         // 415
+	
+    virtual void SessionBusyHere();                     // 486
+
+	virtual void SessionRequestCancelled();             // 487
+	
+	virtual void SessionTemporarilyNotAvailable();      // 480    
+ 
+  
+protected: // Contructors
+
+    void ConstructL();
+    
+	CMusUiSendController( MMusUiEventObserver& aEventObserver,
+	                      MMusUiSharingObserver& aSharingObserver, 
+	                      MMusUiSendObserver& aSendObserver );
+
+
+protected: // from MusUiEventController    
+    
+    /**
+    * Send specific functionality of exit procedure
+    */
+    virtual void ExitProcedureL( TBool aUserAcceptance );
+
+    /**
+    * Handles status changes specific to sending side sharing types.
+    * To be overridden in sibling classes for sharing type specific 
+    * status changes. Calls base class version if status change is not
+    * sending side specific.
+    */
+    virtual void HandleChangedStatusL( TMusAvailabilityStatus aStatus ); 
+    
+
+protected:
+
+    /**
+    * 
+    */
+    const TDesC& VideoFileNameL();
+    
+    void ShowInvitingWaitDialogL();
+
+    void DismissWaitDialog();
+    
+
+private: // Helpers
+
+    void SplitL( const TDesC& aDes, const TDesC& aChar, CDesCArray* aArray );	
+
+    void SetVideoPathValueL();
+
+    void ShowVideoSavedDialogL();
+
+    void DeleteVideoL();
+    
+	void DeleteFileL();
+    
+protected:  // Data
+
+    /*
+    * Interface for outgoing session specific callbacks
+    */
+    MMusUiSendObserver& iSendObserver;
+    
+	HBufC* iAddress;
+	
+	TBool iVideoToBeSaved;
+	
+	TBool iManualAddressTyped;
+	
+    TInt iTriedInvitations;
+	
+    /**
+    * 
+    */
+    TBool iSipRegistrationPending;
+	
+	/**
+    * 
+    */
+	HBufC* iRemoteSipAddress;
+
+    /**
+    * 
+    */
+	HBufC* iRemoteSipAddressProposal;
+
+	
+private: // Data
+
+    /**
+    * If this variable is ETrue, playback should be continued
+    * when gaining focus. ETrue by default.
+    */
+    TBool iContinuePlayingWhenForeground;
+    
+   /**
+    * 
+    */
+	HBufC* iVideoFileName;
+	
+    CDirectoryLocalizer* iLocalizer;
+    
+protected:   
+    /**
+    * The class is used as a call back service of the wait dialog  
+    */
+    class TWaitDialogCallback : public MProgressDialogCallback
+    	{
+    public:
+    	TWaitDialogCallback( CMusUiSendController& aController );	
+    	void DialogDismissedL( TInt /*aButtonId*/ );
+    	        	    
+    private:
+    	CMusUiSendController& iController;
+    	
+    	}iWaitDialogCallback;
+
+	/**
+    * If this variable is ETrue, playback should be continued
+    * when gaining focus. ETrue by default.
+    */
+    };
+
+#endif // MUSUISENDCONTROLLER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuisendobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Application's Send Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUISENDOBSERVER_H
+#define MUSUISENDOBSERVER_H
+
+class MMusUiSendObserver
+    {
+	
+    public:
+
+        virtual void ManualAddressEntryL( const TDesC& aAddress ) = 0;	
+        
+
+    };
+
+#endif // MUSUISENDOBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuisendview.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUISENDVIEW_H
+#define MUSUISENDVIEW_H
+
+
+#include "musuigeneralview.h"     // Base view class
+#include "musuisendobserver.h"
+#include <aknappui.h>
+
+class CMusUiSendViewContainer;
+class CMusUiSendController;
+
+/**
+ *  The MUS application's share view.
+ *
+ *  @lib musui.exe
+ */
+class CMusUiSendView : public CMusUiGeneralView,
+                       public MMusUiSendObserver
+    {
+    
+public: // constructors and destructor
+
+    /**
+    * EPOC default constructor.
+    */
+	void ConstructL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~CMusUiSendView();
+    
+
+public: // from MMusUiSendObserver
+
+    virtual void ManualAddressEntryL( const TDesC& aAddress );
+
+public: // from CMusUiGeneralView
+
+    virtual void DoHandleForegroundEventL( TBool aForeground );     
+
+protected: // New functions
+
+    virtual CMusUiSendController* SendController() const = 0;
+
+    virtual CMusUiSendViewContainer* SendContainer() const = 0;
+
+
+protected: // from CMusUiGeneralView
+
+    virtual CMusUiEventController* EventController() const;
+
+    virtual CMusUiViewContainer& SharingContainer() const;
+    
+    
+protected: // from base class CAknView
+
+    /**
+     * Gets called by the framework when it's activating this view.
+     *
+     * @param aPrevViewId Previous view id
+     * @param aCustomMessageId Custom message's id
+     * @param aCustomMessage Custom message
+     */
+    void DoActivateL( const TVwsViewId& aPrevViewId,
+                      TUid aCustomMessageId,
+                      const TDesC8& aCustomMessage );
+
+    /**
+     * Gets called by the framework when it's deactivating this view.
+     */
+    void DoDeactivate();
+
+    
+    
+
+protected: // data
+    
+    TBool iPauseSelected;
+    
+    };
+
+#endif // MUSUISENDVIEW_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuisendviewcontainer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUISENDVIEWCONTAINER_H
+#define MUSUISENDVIEWCONTAINER_H
+
+
+#include "musuiviewcontainer.h"
+#include "musuilevelindicatorobserver.h"
+
+#include <avkon.hrh>
+
+class MAknsControlContext;
+class CMusUiGeneralView;
+class CAknWaitDialog;
+class CMusUiLevelIndicator;
+class CMusUiSendController;
+
+/**
+ *
+ *
+ */
+class CMusUiSendViewContainer :	public CMusUiViewContainer,
+                                public MMusUiLevelIndicatorObserver
+    {
+
+public:  // constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiSendViewContainer();
+
+public: // new functions
+
+    /**
+     * Return pointer to view class. User needs to type cast to
+     * appropriate concrete view class.
+     *
+     * @return handle to view
+     */
+    CMusUiGeneralView* MusUiView() const;
+    
+    /**
+     * @param Pointer to instance of controller who is notified about changes in 
+     *        indicator. NULL if notifications are to be suppressed.
+     */
+    void SetController( CMusUiSendController* aController );
+    
+
+protected: // constructors
+    
+    /**
+     * Meant to be a base class, no instantiation
+     */
+    CMusUiSendViewContainer();
+
+    /**
+     * Symbian second-phase constructor.
+     *
+     * @param aView         Parent view of container.
+     * @param aRect         Frame rectangle for container.
+     * @param aInputParams  Packaged data.
+     * @param aContainerVisible
+     * @param aIndicatorVisible
+     */
+    void ConstructL( CMusUiGeneralView* aView, 
+                     const TRect& aRect,
+                     TAknOrientation aIndicatorLayout,
+                     TBool aContainerVisible = EFalse,
+                     TBool aIndicatorVisible = EFalse );
+
+
+private: // from base class CCoeControl
+
+    /**
+     * Gets called by the application framework when drawing is
+     * needed.
+     *
+     * @param aRect The rectangle that needs to be drawn.
+     */
+    virtual void Draw( const TRect& aRect ) const;
+
+    virtual void SizeChanged();
+
+    virtual TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
+
+
+private: // MMusUiLevelIndicatorObserver
+	
+	virtual void SetLevelIndicatorVisibility( TBool aVisible );
+    
+    virtual void IndicatorLevelChanged( TInt aNewLevel );
+    	
+
+protected: // data
+
+    CMusUiLevelIndicator* iIndicator;
+
+
+private: // data
+
+    /**  Background skin control context. */
+    MAknsControlContext* iBackGround;
+    
+    /**  Handle to the view that owns of this container.  Not own. */
+    CMusUiGeneralView* iView;
+    
+    /**
+    * Engine DSA area 
+    */
+    TRect iVideoRect;
+    
+    // Can be NULL
+    CMusUiSendController* iSendController;
+    
+    };
+
+
+#endif // MUSUISENDVIEWCONTAINER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuisharingobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Application's Sharing Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUISHARINGOBSERVER_H
+#define MUSUISHARINGOBSERVER_H
+
+
+#include <e32cmn.h>
+#include <AknProgressDialog.h>
+
+class MMusUiSharingObserver
+    {
+	
+    public:
+
+        /*
+        * Shows sychronous wait dialog with softkey R_AVKON_SOFTKEYS_CANCEL.
+        * @param aPrompt Prompt text shown in dialog
+        * @param aTimerInSeconds Timer in seconds when dialog is dismissed
+        *        automatically. Timer value 0 means that no timer is used.
+        * @param aExpirationMessageResourceId is ID of resource indicating
+        *        the message to be shown if timer expires. Value 0 means that
+        *        no message is shown.
+        * @return EFalse if dialog is dismissed by user pressing cancel
+        *         or by expiration of timer. ETrue if DismissWaitDialogL
+        *         is called with parameter ETrue;
+        */
+        virtual TBool ShowWaitDialogL( 
+                                    const TDesC& aPrompt, 
+                                    TInt aTimerInSeconds = 0,
+                                    TInt aExpirationMessageResourceId = 0 ) = 0;
+        
+        /*
+        * Dismisses sychronous wait dialog shown by calling ShowWaitDialogL.
+        * @param aReturnValue determines return value of function 
+        *        ShowWaitDialogL.
+        */
+        virtual void DismissWaitDialogL( TBool aReturnValue = ETrue ) = 0;
+        
+        /**
+        * Set call back service of wait dialog
+        * @param aCallback A pointer of class MProgressDialogCallback
+        *        which implemented DialogDismissedL 
+        */
+        virtual void SetWaitDialogCallbackL( MProgressDialogCallback* aCallback ) = 0;
+        
+        virtual void ShowStatusPaneTitleL() = 0;
+        
+        /**
+        *
+        */
+        virtual void EnableMiddleSoftkeyL( TInt aResourceId ) = 0;   
+	    
+        virtual void ActivateVolumeControlL( TInt aValue, TBool aOnlyIfVisible = EFalse ) = 0;  
+        
+        virtual void HighlightSelectedToolbarItem( TInt aCommand ) = 0;
+        
+        virtual void ReplaceToolbarCommand( TInt aOldCommand, 
+                                            TInt aNewCommand,
+                                            TBool aSetNewCommandFocused ) = 0;
+        
+        virtual void RefreshAudioRoutingToolbarButton() = 0;
+        
+        virtual void UpdateSessionTime( const TDesC& aSessionTime ) = 0;
+        
+        virtual void DismissMenuBar() = 0;
+                                                    
+    };
+
+#endif // MUSUISHARINGOBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuistartcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#ifndef MUSUISTARTCONTROLLER_H
+#define MUSUISTARTCONTROLLER_H
+
+#include "musmanagercommon.h"
+#include "musunittesting.h"
+
+
+/**
+ * Class to read startup parameter from publish & subscribe
+ */
+class MusUiStartController
+    {
+
+private: // second phase constructors
+
+    /**
+     * Disable instantiation by declaring C++ constructor private.
+     */
+	MusUiStartController();
+
+
+public: // static new functions
+	
+    /**
+     * Reads a P&S integer value from the category KCategoryUid
+     * @pre P&S property KUseCase has to be defined.
+     * @leave One of the system wide error codes, if RProperty::Get()
+     *        returns an error value.
+     * @return Defined use case (TMusUseCase) for launching MUS.
+     */
+	static MultimediaSharing::TMusUseCase ReadUseCaseL();
+
+
+    MUS_UNITTEST( UT_CMusUiStartController; )
+    
+    };
+
+#endif // MUSUISTARTCONTROLLER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuistatuspanehandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,170 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#ifndef MUSUISTATUSPANEHANDLER_H
+#define MUSUISTATUSPANEHANDLER_H
+
+
+#include "musuinavimediadecorator.h"
+
+#include <akntabgrp.h>              // Tab group
+#include <akntitle.h>               // Title pane
+#include <akncontext.h>             // Context pane
+#include <AknIndicatorContainer.h>  // Indicator container
+#include <aknEditStateIndicator.h>
+#include <aknnavide.h>              // CAknNavigationDecorator
+
+
+class CAknNavigationControlContainer;
+class CAknVolumePopup;
+
+/**
+ * Handles status, title and contextpane operations.
+ *
+ * @lib musui.exe
+ */
+class CMusUiStatusPaneHandler : public CBase
+    {
+
+public:  // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    */
+    static CMusUiStatusPaneHandler* NewL( CEikonEnv& aEikonEnv );
+
+    /**
+    * Destructor.
+    */
+    virtual ~CMusUiStatusPaneHandler();
+
+private:
+
+    /**
+    * C++ default constructor.
+    */
+    CMusUiStatusPaneHandler( CEikonEnv& aEikonEnv );
+
+    /**
+    * Symbian 2nd-phase constructor.
+    */
+    void ConstructL();
+
+
+public: // New functions
+
+    /**
+    * Sets statuspane icons.
+    *
+    * @param aIconId ID of icon from .mbg file.
+    * @param aIconMaskId ID of icon mask from .mbg file.
+    */
+    void SetStatusPaneIconsL( TInt32 aIconId, TInt32 aIconMaskId );
+
+    /**
+    * Sets statuspane icons.
+    *
+    */
+    void SetStatusPaneIconsL( CFbsBitmap* aBitmap );
+
+    /**
+    * Hides navi-pane decorators and clears text
+    */
+    void ClearNaviPaneL();
+
+    /**
+    * Sets title-pane text
+    *
+    * @param aTitle Title text
+    */
+    void SetTitleL( const TDesC& aTitle );
+
+    /**
+    * Sets title-pane text
+    *
+    */
+    void SetTitleFromResourceL( TInt aResourceId );
+
+    /**
+     * Get the current volume setting.
+     *
+     * @return Current volume.
+     */
+    TInt GetVolumeControlValue() const;
+
+    /**
+     * Activates volume control.
+     *
+     * @return Volume controller.
+     */
+    void ActivateVolumeControlL( TInt aVolume, TBool aOnlyIfVisible );
+
+    /**
+     * Activate media navi pane.
+     */
+    void ActivateNaviPaneMediaL();
+    
+    /**
+     *
+     */
+    void ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon );
+
+    /**
+     * Set text in media navi pane.
+     *
+     * @param aLabel New label of media navi pane control
+     */
+    void SetLeftLabelL( const TDesC& aLabel );
+
+    /**
+     * Set text in media navi pane.
+     *
+     * @param aLabel New label of media navi pane control
+     */
+    void SetRightLabelL( const TDesC& aLabel );
+
+    /**
+     * Create media navi pane.
+     */
+    CAknNavigationDecorator* CreateMediaNaviL();
+    
+    /**
+     * Get Volume popup control pointer
+     * @return pointer of VolumePopup control
+     */
+    CAknVolumePopup* GetVolumePopup() const;
+
+
+private: // data
+
+    CEikonEnv& iEikonEnvironment;
+
+    // UI controls
+    CAknNavigationControlContainer*     iNaviPane;
+    CAknTitlePane*                      iTitlePane;
+    CAknContextPane*                    iContextPane;
+    CAknNavigationDecorator*            iNaviPaneText;
+    CAknVolumePopup*                    iVolumePopup;
+    // Navi pane media control
+    CAknNavigationDecorator*            iMediaControl;
+    };
+
+#endif // MUSUISTATUSPANEHANDLER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuiviewcontainer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#ifndef MUSUIVIEWCONTAINER_H
+#define MUSUIVIEWCONTAINER_H
+
+
+#include <coecntrl.h>                // Control base class
+#include <AknProgressDialog.h>
+
+class CAknWaitDialog;
+class CMusUiGeneralView;
+
+/**
+ *
+ *
+ */
+class CMusUiViewContainer :	public CCoeControl
+    {
+
+public:  // constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CMusUiViewContainer();
+
+public: // new functions
+	
+	void CancelWaitTimer();
+
+    /**
+     * Dismisses the current active wait note, if any.
+     */
+    void DismissWaitDialogL( TBool aReturnValue = ETrue );
+
+    /**
+     * Shows sychronous wait dialog with softkey R_AVKON_SOFTKEYS_CANCEL.
+     * @param aPrompt Prompt text shown in dialog
+     * @param aTimerInSeconds Timer in seconds when dialog is dismissed
+     *        automatically. Timer value 0 means that no timer is used.
+     * @param aExpirationMessageResourceId Message to be loaded and shown if 
+     *        timer expires. Value 0 means that no message is shown.
+     * @return ETrue if wait note is dismissed by calling DismissWaitDialogL
+     *         with param ETrue. EFalse if user pressed cancel, timer expires
+     *         or if DismissWaitDialogL is called with param EFalse.
+     */
+    TBool RunWaitDialogL( const TDesC& aPrompt, 
+                          TInt aTimerInSeconds = 0,
+                          TInt aExpirationMessageResourceId = 0 );
+    
+    /**
+     * Set call back service of wait dialog
+     * @param aCallback A pointer of class MProgressDialogCallback
+     *        which implemented DialogDismissedL 
+     */
+    void SetWaitDialogCallbackL( MProgressDialogCallback* aCallback );
+    
+    /**
+    * Checks whether wait dialog is shown currently.
+    * @return ETrue if wait dialog is show.
+    */
+    TBool WaitDialogShown() const;
+    
+    /**
+    * Request that toolbar visibility is set once currently shown dialog 
+    * is dismissed.
+    * @param aToolbarHandler if NULL is passed, previous request is canceled.
+    *        Ownership not transferred.
+    */
+    void RequestToolbarVisibilityOnceDialogDismissed( 
+                                CMusUiGeneralView* aToolbarHandler );
+    
+protected: // constructors
+    
+    /**
+     * Meant to be a base class, no instantiation
+     */
+    CMusUiViewContainer();
+
+private: // new static functions
+
+    /**
+     * Tick handler, callback function directly called by periodic timer
+     *
+     * @param aObject Pointer passed to TCallback.
+     * @return Value to indicate if callback function should be called again.
+     */
+    static TInt DoWaitNoteTimeout( TAny* aObject );
+
+
+private: // data
+    
+    /**  Wait dialog to show the invite is sent. Not own. */
+    CAknWaitDialog* iWaitDialog;
+    
+    /**  Periodic timer active object.  Owns. */
+    CPeriodic* iWaitDialogTimer;
+    
+    /**
+    * Indicates if wait note is dismissed using DismissWaitDialogL
+    */
+    TBool iInvitationWaitDialogDismissed;
+    
+    /**
+    * If iInvitationWaitDialogDismissed is ETrue, this value should be returned
+    * from RunWaitDialogL
+    */
+    TBool iWaitDialogReturnValueWhenDismissed;
+    
+    /**
+    * Resource ID of message to be shown if timer expires
+    */
+    TInt iExpirationMessageResourceId;
+    
+    /**
+    * Flag indicating whether wait dialog is currently shown.
+    */
+    TBool iShowingWaitDialog;
+    
+    /**
+    * Not owned.
+    */
+    CMusUiGeneralView* iToolbarHandler;
+    
+    };
+
+
+#endif // MUSUISENDVIEWCONTAINER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuizoomindicator.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,274 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class for displaying icons in viewfinder view
+*
+*/
+
+
+#ifndef CMUSUIZOOMINDICATORS_H
+#define CMUSUIZOOMINDICATORS_H
+
+// SYSTEM
+#include <AknsControlContext.h>
+#include <aknutils.h>
+#include <coecntrl.h>
+
+class MAknsSkinInstance;
+class CGulIcon;
+class MMusUiZoomIndicatorObserver;
+
+/** 
+* Class for displaying icons in viewfinder view
+* @since 2.8
+*/
+class CMusUiZoomIndicator : public CCoeControl
+    {
+
+
+    public: // Constructors and destructor
+        
+        /**
+        * Symbian OS two-phased constructor.
+        * @since 2.8
+        * @param aController reference to CCcorController
+        */
+        static CMusUiZoomIndicator* NewLC( 
+        						TInt aZoomMin, 
+        						TInt aZoomMax, 
+        						MMusUiZoomIndicatorObserver* aObserver );
+
+        /**
+        * Symbian OS two-phased constructor.
+        * @since 2.8
+        * @param aController reference to CCcorController
+        */
+        static CMusUiZoomIndicator* NewL( 
+        						TInt aZoomMin, 
+        						TInt aZoomMax, 
+        						MMusUiZoomIndicatorObserver* aObserver );
+
+        /**
+        * Destructor.
+        */
+        ~CMusUiZoomIndicator();
+
+    public: // New functions
+
+		/**
+		*
+		* @since 3.2
+		*/
+		void SetZoomLevel( TInt aZoomLevel );
+
+		/**
+		*
+		* @since 3.2
+		*/
+		TInt GetZoomLevel();
+
+		/**
+		*
+		* @since 3.2
+		*/
+		void SetZoomMin( TInt aZoomMin );
+		
+		/**
+		*
+		* @since 3.2
+		*/
+		void SetZoomMax( TInt aZoomMax );
+		
+		/**
+		*
+		* @since 3.2
+		*/
+		void SetFullRect( const TRect aRect  );
+		
+		
+
+	private: // From CCoeConrol
+
+	    /**
+	     * Handles the size change events.
+	     *
+	     */
+	    void SizeChanged();
+
+	    /**
+	     * Draws the control.
+	     *
+	     * @param aRect The region of the control to be redrawn.
+	     */
+		void Draw(const TRect& aRect) const;
+
+        TInt CountComponentControls() const;
+        
+        CCoeControl* ComponentControl( TInt aIndex ) const;
+        
+
+
+    private: // Constructors and destructor
+
+        /**
+        * C++ constructor
+        * @since 2.8
+        * @param aController reference to CCcorController
+        */
+        CMusUiZoomIndicator( TInt aZoomMin, 
+        					 TInt aZoomMax, 
+        					 MMusUiZoomIndicatorObserver* aObserver );
+
+        /**
+        * Symbian 2nd phase constructor.
+        * @since 2.8
+        */
+        void ConstructL();
+
+
+    private: // HELPERS
+
+        /**
+        * 
+        */
+		void DrawIcons( const TRect& aRect );
+       
+        /**
+        * 
+        */
+		void UpdateZoomLayout();
+
+        void  ConstructImageL( CEikImage* aImage,
+                               MAknsSkinInstance* aSkin,
+                               const TAknsItemID& aId,
+                               TInt aBitmapId,
+                               TInt aMaskId );
+
+        /**
+        * Callback for disable zoom indicator.
+        * @since 2.8
+        * @return KErrNone
+        */
+        static TInt DisableZoomIndicator( TAny* aThis );
+
+        /**
+        * 
+        */
+		void DisableTimer();
+
+        /**
+        * 
+        */
+		void EnableTimer();
+
+
+    private: //data
+
+        /**
+        * 
+        */
+        TRect iParentRect;
+
+        /**
+        * 
+        */
+        TRect iViewfinderRect;
+
+        /**
+        * 
+        */
+		TInt iZoomMin;
+
+        /**
+        * 
+        */
+		TInt iZoomMax;
+		
+        /**
+        * 
+        */
+		TInt iZoomLevel;
+
+        /**
+        * 
+        */
+        CPeriodic* iDisableZoomTimer;   // owned
+
+        /**
+        * 
+        */
+        TRgb iIconColor;
+
+        /**
+        * 
+        */
+		CEikImage* iIconElevator;
+
+        /**
+        * 
+        */
+		CEikImage* iIconMin;
+
+        /**
+        * 
+        */
+		CEikImage* iIconMax;
+
+        /**
+        * 
+        */
+		CEikImage* iIconBg;
+
+        /**
+        * 
+        */
+		TInt iTopMargin;
+
+        /**
+        * 
+        */
+		TInt iBottomMargin;
+		
+        /**
+        * 
+        */
+		TInt iScaleStep;
+
+        /**
+        * 
+        */
+		TInt iScaleY;
+		
+        /**
+        * 
+        */
+		TInt iMiddle;
+		
+        /**
+        * NOT OWN!!!
+        */
+		MMusUiZoomIndicatorObserver* iObserver; 
+
+        TInt iElevatorWidth;
+        
+        TInt iElevatorHeight;
+    
+        TRect iFullRect;
+    
+
+    };
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/inc/musuizoomindicatorobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus zoom indicator Event Observer Interface
+*
+*/
+
+
+
+#ifndef MUSUIZOOMINDICATOROBSERVER_H
+#define MUSUIZOOMINDICATOROBSERVER_H
+
+
+class MMusUiZoomIndicatorObserver 
+	{
+	public:
+
+    	virtual void DisableZoomIndicator() = 0;
+	};
+
+#endif // MUSUIZOOMINDICATOROBSERVER_H
+            
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiactivequerydialog.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#include "musuiactivequerydialog.h"
+#include "musuiqueryobserver.h"
+#include "muslogger.h"
+#include "musunittesting.h"
+
+#include <AknGlobalConfirmationQuery.h>
+#include <avkon.rsg>
+#include <musui.rsg>
+#include <StringLoader.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiActiveQueryDialog* CMusUiActiveQueryDialog::NewL(
+                                MMusUiQueryObserver& aObserver )
+    {
+    CMusUiActiveQueryDialog* self
+            = new( ELeave ) CMusUiActiveQueryDialog( aObserver );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+CMusUiActiveQueryDialog::~CMusUiActiveQueryDialog()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActiveQueryDialog::~CMusUiActiveQueryDialog" );
+    
+    Cancel();
+    delete iGlobalQuery;
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveQueryDialog::~CMusUiActiveQueryDialog" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiActiveQueryDialog::CMusUiActiveQueryDialog( MMusUiQueryObserver& aObserver )
+    : CActive( EPriorityNormal ), iObserver( aObserver )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActiveQueryDialog::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActiveQueryDialog::ConstructL" );
+
+    iGlobalQuery = CAknGlobalConfirmationQuery::NewL();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveQueryDialog::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActiveQueryDialog::ShowL( const TDesC& aPrompt )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActiveQueryDialog::ShowL" );
+
+    iGlobalQuery->ShowConfirmationQueryL( 
+                            iStatus,
+                            aPrompt,
+                            R_AVKON_SOFTKEYS_YES_NO );
+    SetActive();    
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveQueryDialog::ShowL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActiveQueryDialog::RunL()
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiActiveQueryDialog::RunL [%d]", iStatus.Int() );
+    if ( iStatus == EAknSoftkeyYes )
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiActiveQueryDialog::RunL: if" );
+        iObserver.QueryAcceptedL( ETrue );
+        }
+    else    // EAknSoftkeyNo
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiActiveQueryDialog::RunL: else" );
+        iObserver.QueryAcceptedL( EFalse );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveQueryDialog::RunL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActiveQueryDialog::DoCancel()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActiveQueryDialog::DoCancel" );
+    iGlobalQuery->CancelConfirmationQuery();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveQueryDialog::DoCancel" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiActiveQueryDialog::RunError( TInt aError )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiActiveQueryDialog::RunError [%d]", 
+              aError );
+    
+    iObserver.HandleQueryError( aError );
+              
+    return KErrNone;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiactivetimer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#include "musuiactivetimer.h" 
+#include "musuiactivetimerobserver.h"
+
+#include "muslogger.h" // debug logging
+
+
+// -----------------------------------------------------------------------------
+// Symbian two-phase constructor.
+// -----------------------------------------------------------------------------
+// 
+CMusUiActiveTimer* CMusUiActiveTimer::NewL(  MMusUiActiveTimerObserver* aObserver )
+    {
+    CMusUiActiveTimer* self = new (ELeave) CMusUiActiveTimer( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Symbian second-phase constructor.
+// -----------------------------------------------------------------------------
+// 
+void CMusUiActiveTimer::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActiveTimer::ConstructL" );
+    
+    User::LeaveIfError( iTimer.CreateLocal() );
+    CActiveScheduler::Add( this );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveTimer::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// .
+// -----------------------------------------------------------------------------
+// 
+void CMusUiActiveTimer::After( TTimeIntervalMicroSeconds32 anInterval )
+    {
+    // No logging due to huge amount of calls in some use cases
+    
+    Cancel();
+    iTimer.After( iStatus, anInterval );
+    SetActive();
+    
+    // No logging due to huge amount of calls in some use cases
+    }
+
+
+// -----------------------------------------------------------------------------
+// C++ constructor.
+// -----------------------------------------------------------------------------
+// 
+CMusUiActiveTimer::CMusUiActiveTimer( MMusUiActiveTimerObserver* aObserver ) : 
+    CActive( EPriorityNormal ),
+    iObserver( aObserver )
+    {
+    // nothing
+    }
+
+
+// -----------------------------------------------------------------------------
+// C++ destructor.
+// -----------------------------------------------------------------------------
+// 
+CMusUiActiveTimer::~CMusUiActiveTimer()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActiveTimer::~CMusUiActiveTimer" );
+    
+    Cancel();
+    iTimer.Close();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveTimer::~CMusUiActiveTimer" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+// 
+void CMusUiActiveTimer::DoCancel()
+    {
+    // No logging due to huge amount of calls in some use cases
+    
+    iTimer.Cancel();
+    
+    // No logging due to huge amount of calls in some use cases
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+// 
+void CMusUiActiveTimer::RunL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActiveTimer::RunL" );
+    if (iObserver && iStatus == KErrNone)
+        {
+        iObserver->TimerComplete( this );
+        }
+    else
+        {
+        User::LeaveIfError(iStatus.Int());
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveTimer::RunL" );
+    }
+
+// -------------------------------------------------------------------------
+//  If RunL() leaves,It should be handled here.
+// -------------------------------------------------------------------------
+//
+TInt CMusUiActiveTimer::RunError( TInt aError )
+    {
+	MUS_LOG( "mus: [MUSUI ]  -> CMusUiActiveTimer::RunError" );
+    // Nothing can be done here.
+    aError = KErrNone;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActiveTimer::RunError" );
+    return aError;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiactivitymanger.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,181 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#include "musuiactivitymanger.h"
+#include "muslogger.h" // debug logging
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiActivityManager* CMusUiActivityManager::NewL( TInt aTimeout )
+
+    {
+    CMusUiActivityManager* self = 
+                                 new (ELeave) CMusUiActivityManager( aTimeout );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiActivityManager::~CMusUiActivityManager()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActivityManager::~CMusUiActivityManager" );
+    Cancel();
+    iTimer.Close();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActivityManager::~CMusUiActivityManager" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiActivityManager::CMusUiActivityManager( TInt aTimeout )
+                : CActive( CActive::EPriorityHigh ),
+                  iTimeout( aTimeout )
+
+    {
+    CActiveScheduler::Add(this);
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActivityManager::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActivityManager::ConstructL" );
+    iTimer.CreateLocal();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActivityManager::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActivityManager::SetTimeout( TInt aTimeout )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiActivityManager::SetTimeout [%d]", aTimeout );
+    iTimeout = aTimeout;
+    Reset();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActivityManager::SetTimeout" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActivityManager::Start()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActivityManager::Start" );
+    if (!IsActive())
+        {
+        iTimer.Inactivity( iStatus, iTimeout );
+        SetActive();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActivityManager::Start" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActivityManager::Reset()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActivityManager::Reset" );
+    Cancel();
+    Start();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActivityManager::Reset" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActivityManager::DoCancel()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActivityManager::DoCancel" );
+    iTimer.Cancel();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActivityManager::DoCancel" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiActivityManager::RunL()
+    {
+
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiActivityManager::RunL" );
+    
+    if ( iStatus == KErrNone )
+        {
+        
+        TInt inactivity = User::InactivityTime().Int();
+
+        if ( inactivity >= iTimeout )
+            {
+            User::ResetInactivityTime();
+            Reset();  
+            }
+        else
+            {
+            iTimer.Inactivity( iStatus, iTimeout );
+            }
+               
+        if ( !IsActive() )
+            {
+            SetActive();
+            }
+
+        }   
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActivityManager::RunL" );
+    }
+
+// -------------------------------------------------------------------------
+//  If RunL() leaves,It should be handled here.
+// -------------------------------------------------------------------------
+//
+TInt CMusUiActivityManager::RunError( TInt aError )
+    {
+	MUS_LOG( "mus: [MUSUI ]  -> CMusUiActivityManager::RunError" );
+    // Nothing can be done here.
+    aError = KErrNone;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiActivityManager::RunError" );
+    return aError;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiapp.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Application class for MUS App.
+*
+*/
+
+
+
+#include "musuiapp.h"           // Header file for this class
+#include "musuidocument.h"      // Mus UI Document
+#include "musuid.hrh"
+#include "muslogger.h"          // debug logging
+
+#include <eikstart.h>
+
+
+// ============================ MEMBER FUNCTIONS ===========================
+
+// Returns application UID
+TUid CMusUiApp::AppDllUid() const
+    {
+    const TUid KUidRetVal = { KMusUiUid };
+    return KUidRetVal;
+    }
+
+// Creates CMusUiDocument object
+CApaDocument* CMusUiApp::CreateDocumentL()
+    {
+    return CMusUiDocument::NewL( *this );
+    }
+
+
+// ==================== OTHER EXPORTED FUNCTIONS ===========================
+
+// Constructs and returns an application object
+EXPORT_C CApaApplication* NewApplication()
+    {
+    MUS_LOG( "mus: [MUSUI ]      -------------------------------------------------" );
+    return new CMusUiApp;
+    }
+
+// Main function of the application executable
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication( NewApplication );
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiappui.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,777 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Application's UI class.
+*
+*/
+
+
+
+#include "musuiappui.h"
+#include "musuilivesharingview.h"
+#include "musuiclipsharingview.h"
+#include "musuireceiveview.h"
+#include "musuistatuspanehandler.h"
+#include "musuistartcontroller.h"
+#include "musuiactivequerydialog.h"
+#include "musuidefinitions.h"
+#include "mussettings.h"
+#include "mussettingskeys.h"
+#include "musmanagercommon.h"
+#include "musuiresourcehandler.h"
+#include "musui.hrh"
+#include "musuid.hrh"
+#include "muslogger.h" // debug logging
+#include <musui.rsg>
+#include <musui.mbg>
+
+#include <csxhelp/msh.hlp.hrh>
+#include <avkon.hrh>
+#include <AknsUtils.h>
+#include <remconcoreapitarget.h>
+#include <remconinterfaceselector.h>
+#include <akntoolbar.h>
+#include <AknVolumePopup.h>
+
+using namespace MusSettingsKeys;
+
+// -----------------------------------------------------------------------------
+// Symbian second-phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::ConstructL" );
+    BaseConstructL( EAknEnableSkin | EAppOrientationAutomatic | EAknEnableMSK 
+    		      | EAknSingleClickCompatible );
+    
+    iResourceHandler = CMusUiResourceHandler::NewL( *this );
+    MultimediaSharing::TMusUseCase usecase = MusUiStartController::ReadUseCaseL();
+    iResourceHandler->CheckInitialOrientationL(usecase);
+    
+    iForeground = ETrue;
+    
+    // View for Live Sharing:
+    CMusUiLiveSharingView* liveSharingView =
+                            new ( ELeave ) CMusUiLiveSharingView;
+    CleanupStack::PushL( liveSharingView );
+    liveSharingView->ConstructL();
+    AddViewL( liveSharingView );      // transfer ownership to CAknViewAppUi
+    CleanupStack::Pop( liveSharingView );
+
+    // View for Clip Sharing:
+    CMusUiClipSharingView* clipSharingView =
+                            new ( ELeave ) CMusUiClipSharingView;
+    CleanupStack::PushL( clipSharingView );
+    clipSharingView->ConstructL();
+    AddViewL( clipSharingView );      // transfer ownership to CAknViewAppUi
+    CleanupStack::Pop( clipSharingView );
+
+    // View for Receiving:
+    CMusUiReceiveView* receiveView =  new ( ELeave ) CMusUiReceiveView;
+    CleanupStack::PushL( receiveView );
+    receiveView->ConstructL();
+    AddViewL( receiveView );      // transfer ownership to CAknViewAppUi
+    CleanupStack::Pop( receiveView );
+
+    FindWindowGroupIdentifiersL();
+    
+    iStatusPaneHandler = CMusUiStatusPaneHandler::NewL( *iEikonEnv );
+    // The application icon:
+    iStatusPaneHandler->SetStatusPaneIconsL(
+                            EMbmMusuiQgn_menu_mus_app_cxt,
+                            EMbmMusuiQgn_menu_mus_app_cxt_mask );
+
+    iStatusPaneHandler->GetVolumePopup()->SetObserver(this);
+    
+    AknsUtils::InitSkinSupportL();
+    AknsUtils::SetAvkonSkinEnabledL( ETrue );
+
+    // Check use case and set default view
+    switch ( usecase )
+        {
+        case MultimediaSharing::EMusLiveVideo:
+            ActivateLocalViewL( liveSharingView->Id() );
+            break;
+        case MultimediaSharing::EMusClipVideo:
+            ActivateLocalViewL( clipSharingView->Id() );
+            break;
+        case MultimediaSharing::EMusReceive:
+            ActivateLocalViewL( receiveView->Id() );
+            break;
+        default:
+            User::Leave( KErrNotSupported );
+            break;
+        }
+
+    iInterfaceSelector = CRemConInterfaceSelector::NewL();
+    iCoreTarget = CRemConCoreApiTarget::NewL(*iInterfaceSelector, *this);
+    iInterfaceSelector->OpenTargetL();
+    
+    // check if operator specific functionality is needed  
+    iOperatorSpecificFunctionality = 
+        ( MultimediaSharingSettings::OperatorVariantSettingL() == 
+                                                    EOperatorSpecific );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CMusUiAppUi::~CMusUiAppUi()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::~CMusUiAppUi" );
+    delete iResourceHandler;
+    delete iConfirmationQuery;
+    delete iStatusPaneHandler;
+    delete iInterfaceSelector;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::~CMusUiAppUi" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Fetches a handle to status pane handler
+// -----------------------------------------------------------------------------
+//
+CMusUiStatusPaneHandler* CMusUiAppUi::MusStatusPane()
+    {
+    return iStatusPaneHandler;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiAppUi::ExitValue()
+    {
+    return iExit;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::HandleWsEventL" );
+
+    const TInt type = aEvent.Type();
+
+    // Avoiding unknown failures
+    if( !iView )
+        {
+        MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleWsEventL, view is NULL" );
+        return;
+        }
+
+    if( type == EEventKeyUp )
+        {
+        static_cast<CMusUiGeneralView*>
+                ( iView )->HandleKeyUpEvent( iLastKeyCode );
+        }
+
+    if ( ( type == EEventKey ) && iView->Toolbar()->IsShown() && !MUS_NO_TOOLBAR )
+        {
+        const TKeyEvent* keyEvent = aEvent.Key();
+        
+        iLastKeyCode = keyEvent->iCode;        
+        
+        MUS_LOG1( "mus: [MUSUI ]     CMusUiAppUi::HandleWsEventL iCode: %d", 
+                                keyEvent->iCode );
+        CMusUiGeneralView* activatedView = 
+                                    static_cast<CMusUiGeneralView*>( iView );
+        activatedView->HandleToolbarCommandL( keyEvent->iCode );
+        }
+    
+    if ( type == KAknFullOrPartialForegroundLost ||
+         type == EEventFocusLost ||
+         type == KAknFullOrPartialForegroundGained ||
+         type == EEventFocusGained )
+        {
+        DoHandleForegroundEventL( type );
+        }
+         
+    // All events are sent to base class.
+    CAknAppUi::HandleWsEventL( aEvent, aDestination );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleWsEventL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::HandleForegroundEventL( TBool aForeground )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::HandleForegroundEventL" );
+    
+    CAknViewAppUi::HandleForegroundEventL( aForeground );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleForegroundEventL" );
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::MrccatoCommand( TRemConCoreApiOperationId aOperationId, 
+                                  TRemConCoreApiButtonAction aButtonAct )
+    {
+    MUS_LOG2( "mus: [MUSUI ]  -> CMusUiAppUi::MrccatoCommand: %d, %d", 
+              aOperationId,
+              aButtonAct );
+              
+    switch ( aOperationId )
+        {
+        case ERemConCoreApiVolumeUp:  //  Volume Up
+            {
+            switch ( aButtonAct )
+                {
+                case ERemConCoreApiButtonClick:
+                    {
+                    // volume up clicked
+                    CMusUiGeneralView* activatedView = 
+                                    static_cast<CMusUiGeneralView*>( iView );
+                                    if( MUS_NO_TOOLBAR )
+                                        {
+                                        TRAP_IGNORE( activatedView->HandleCommandL( 
+                                                EMusuiCmdViewVolumeUp ) )                                        
+                                        }
+                                    else
+                                        {
+                                        TRAP_IGNORE( activatedView->HandleToolbarCommandL( 
+                                                EMusuiCmdViewVolumeUp ) )
+                                        }
+                    break;
+                    }
+                default:
+                    // Never hits this
+                    break;
+                }
+                break;
+            }
+        case ERemConCoreApiVolumeDown:  //  Volume Down
+            {
+            switch ( aButtonAct )
+                {
+                case ERemConCoreApiButtonClick:
+                    {
+                    // volume down clicked
+                    CMusUiGeneralView* activatedView = 
+                                    static_cast<CMusUiGeneralView*>( iView );
+                                    if( MUS_NO_TOOLBAR )
+                                        {
+                                        TRAP_IGNORE( activatedView->HandleCommandL( 
+                                                    EMusuiCmdViewVolumeDown ) )
+                                        }
+                                    else
+                                        {
+                                        TRAP_IGNORE( activatedView->HandleToolbarCommandL( 
+                                                    EMusuiCmdViewVolumeDown ) )                                        
+                                        }
+                    break;
+                    }
+                default:
+                    // Never hits this
+                    break;
+                }
+                break;
+            }
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::MrccatoCommand" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::QueryAcceptedL( TBool aAccepted )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::QueryAccepted" );
+    CMusUiGeneralView* activatedView = static_cast<CMusUiGeneralView*>( iView );
+    // TODO: If next call leaves, it causes error handling to be done with
+    // previously deleted query object. This leads to crash.
+    activatedView->AsyncQueryDialogAcceptedL( aAccepted );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::QueryAccepted" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiAppUi::HandleQueryError( TInt aError )
+    {
+    HandleError( aError ); // Forward to general error handler
+    return KErrNone;
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::ActivateLocalMusViewL( TUid aViewId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::ActivateLocalMusViewL" );
+    ActivateLocalViewL( aViewId );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::ActivateLocalMusViewL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::ActivateLocalMusViewL( TUid aViewId,
+                                         TUid aCustomMessageId,
+                                         const TDesC8& aCustomMessage )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::ActivateLocalMusViewL" );
+    ActivateLocalViewL( aViewId, aCustomMessageId, aCustomMessage );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::ActivateLocalMusViewL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::ShowAsyncConfirmationQueryDialogL( const TDesC& aPrompt )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::ShowAsyncConfirmationQueryDialogL" );
+    if ( !iConfirmationQuery )
+        {
+        iConfirmationQuery = CMusUiActiveQueryDialog::NewL( *this );
+        }
+    iConfirmationQuery->ShowL( aPrompt );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::ShowAsyncConfirmationQueryDialogL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::SetToolbarVisibility( TBool aVisible )
+    {
+    CMusUiGeneralView* activatedView = static_cast<CMusUiGeneralView*>( iView );
+    if ( activatedView )
+        {
+        activatedView->SetToolbarVisibility( aVisible );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon )
+    {
+    MusStatusPane()->ShowNaviPaneIconL( aIcon );
+    }
+   
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CEikonEnv* CMusUiAppUi::EikonEnv( ) const
+    {
+    return iEikonEnv;
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::TerminateCall()
+    {
+    // TODO: Remove hard-coded values!
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::TerminateCall" );
+    RWsSession sess = iEikonEnv->WsSession();
+    
+    TApaTaskList taskList(sess);
+    
+    TApaTask phoneTask = taskList.FindApp(TUid::Uid(0x100058B3));
+    MUS_LOG( "mus: [MUSUI ]     phoneTask" );
+    TInt id = 0;
+    if (phoneTask.Exists())
+        id = phoneTask.WgId();
+    MUS_LOG1( "PhoneTask ID: %d",id );    
+    TWsEvent event;
+
+    MUS_LOG( "mus: [MUSUI ]     CMusUiAppUi::TerminateCall: 1" );
+    MUS_LOG( "mus: [MUSUI ]     CMusUiAppUi::EEventKeyDown" );
+    event.SetType( EEventKeyDown );
+    event.SetTimeNow();
+    event.Key()->iCode = 0;
+    event.Key()->iModifiers = EModifierNumLock;
+    event.Key()->iRepeats = 0;
+    event.Key()->iScanCode = EStdKeyNo;
+    sess.SendEventToWindowGroup( id, event ); 
+
+    MUS_LOG( "mus: [MUSUI ]     CMusUiAppUi::TerminateCall: 2" );
+    MUS_LOG( "mus: [MUSUI ]     CMusUiAppUi::EEventKey" );
+    event.SetType( EEventKey );
+    event.SetTimeNow();
+    event.Key()->iCode = EKeyNo;
+    event.Key()->iModifiers = 32769;
+    event.Key()->iRepeats = 0;
+    event.Key()->iScanCode = EStdKeyNo;
+    sess.SendEventToWindowGroup( id, event ); 
+
+   	MUS_LOG( "mus: [MUSUI ]     CMusUiAppUi::TerminateCall: 3" );
+    MUS_LOG( "mus: [MUSUI ]     CMusUiAppUi::EEventKeyUp" );
+    event.SetType( EEventKeyUp );
+    event.SetTimeNow();
+    event.Key()->iCode = 0;
+    event.Key()->iModifiers = 32769;
+    event.Key()->iRepeats = 0;
+    event.Key()->iScanCode = EStdKeyNo;
+    sess.SendEventToWindowGroup( id, event );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::TerminateCall" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Return current app orientation.
+// -----------------------------------------------------------------------------
+//
+CAknAppUiBase::TAppUiOrientation CMusUiAppUi::AppOrientation() const
+    {
+    return ( ApplicationRect().Width() > ApplicationRect().Height() ) ?
+            CAknAppUiBase::EAppUiOrientationLandscape :
+            CAknAppUiBase::EAppUiOrientationPortrait;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Switch the active view's orientation, if it's in the foreground.
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::SwitchOrientationL( TAppUiOrientation aAppOrientation )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::SwitchOrientationL" );
+    SetOrientationL( aAppOrientation );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::SwitchOrientationL" );
+    }
+        
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::HandleError( const TInt aReason )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::HandleError" );
+    if ( aReason != KErrNone )
+        {
+        HandleExit();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleError" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::HandleExit()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::HandleExit" );
+    if ( !iExit )
+        {
+        iExit = ETrue;
+        PrepareToExit();
+
+        RemoveView( KMusUidLiveSharingView );
+        RemoveView( KMusUidClipSharingView );
+        RemoveView( KMusUidReceivingView );
+
+        User::Exit( KErrNone );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleExit" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiAppUi::OrientationCanBeChanged() const
+    {
+    return CAknAppUiBase::OrientationCanBeChanged();
+    }
+
+
+// -----------------------------------------------------------------------------
+// From base class CEikAppUi.  Handles a change to the application's
+// resources which are shared across the environment.
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::HandleResourceChangeL( TInt aResourceChangeType )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::HandleResourceChangeL" );
+    CAknAppUi::HandleResourceChangeL( aResourceChangeType );
+
+    if ( aResourceChangeType == KEikDynamicLayoutVariantSwitch && iView )
+        {
+        MUS_LOG( "mus: [MUSUI ]  CMusUiAppUi::HandleResourceChangeL:\
+                 aResourceChangeType == KEikDynamicLayoutVariantSwitch" );
+        
+        iView->Toolbar()->HandleResourceChange( aResourceChangeType );
+
+        CMusUiGeneralView* activatedView =
+                                static_cast<CMusUiGeneralView*>( iView );
+        if ( !IsForeground() )
+            {
+            MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleResourceChangeL" );
+            return;
+            }
+        
+        if ( activatedView )
+            {
+            activatedView->RefreshView();
+            }
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleResourceChangeL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// takes care of key event handling
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CMusUiAppUi::HandleKeyEventL( const TKeyEvent& aKeyEvent,
+                                           TEventCode /*aType*/ )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiAppUi::HandleKeyEventL: %d", 
+                            aKeyEvent.iScanCode );
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiAppUi::HandleKeyEventL: %d", 
+                            aKeyEvent.iCode );
+
+    if ( aKeyEvent.iScanCode == EStdKeyDevice1 /*165*/ )   // Cancel in Options
+        {
+        SetToolbarVisibility( ETrue );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleKeyEventL" );
+    return EKeyWasNotConsumed;
+    }
+
+
+// -----------------------------------------------------------------------------
+// takes care of command handling
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::HandleCommandL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiAppUi::HandleCommandL [%d]", 
+                            aCommand );
+    switch ( aCommand )
+        {
+        case EMusuiGenCmdExit:
+        case EAknSoftkeyExit:
+        case EEikCmdExit:
+            {
+            CMusUiGeneralView* activatedView =
+                                    static_cast<CMusUiGeneralView*>( iView );
+            activatedView->HandleCommandL( EAknSoftkeyExit );
+
+            break;
+            }
+        default:
+            break;
+        }
+    MUS_LOG( "mus: [MUSUI ]  <-> CMusUiAppUi::HandleCommandL" );
+    }
+
+// -----------------------------------------------------------------------------
+// CMusUiAppUi::GetVolumeFromUi()
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiAppUi::GetUiVolumeValue()
+    {
+    return iStatusPaneHandler->GetVolumeControlValue();
+    }
+
+// -----------------------------------------------------------------------------
+// CMusUiAppUi::ResourceHandler()
+// -----------------------------------------------------------------------------
+//
+CMusUiResourceHandler* CMusUiAppUi::ResourceHandler()
+    {
+    return iResourceHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CMusUiAppUi::AppHelpContextL()
+// -----------------------------------------------------------------------------
+//
+CArrayFix<TCoeHelpContext>* CMusUiAppUi::HelpContextL() const
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::HelpContextL" );
+    CArrayFix<TCoeHelpContext>* contexts = 
+            new (ELeave) CArrayFixFlat<TCoeHelpContext>(1);    
+    CleanupStack::PushL(contexts);
+    
+    TCoeHelpContext help; 
+    help.iMajor.iUid = KMusUiUid;
+    
+    if ( iView->Id() == KMusUidLiveSharingView )
+        {
+        help.iContext = KMSH_HLP_LIVE;
+        }
+    else if ( iView->Id() == KMusUidClipSharingView )
+        {
+        help.iContext = KMSH_HLP_CLIP;
+        }
+    else if ( iView->Id() == KMusUidReceivingView )
+        {
+        help.iContext = KMSH_HLP_RECEIVE;
+        }
+
+    contexts->AppendL(help);    
+    CleanupStack::Pop(); // contexts
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HelpContextL" );
+    return contexts;
+    }
+
+
+// -----------------------------------------------------------------------------
+// We might get PartialFocusLost also for some notes and
+// overally items that are somehow overlapping screen instead of
+// FocusLost. In those cases we should not put app to background.
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::DoHandleForegroundEventL( TInt aEventType )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiAppUi::DoHandleForegroundEventL, event:%d", 
+              aEventType );
+    
+    __ASSERT_ALWAYS( aEventType == KAknFullOrPartialForegroundGained ||
+                     aEventType == KAknFullOrPartialForegroundLost ||
+                     aEventType == EEventFocusLost ||
+                     aEventType == EEventFocusGained, User::Leave( KErrArgument ) );
+    
+    TBool handleEvent( EFalse );
+    TBool foreground( 
+            aEventType == KAknFullOrPartialForegroundGained ||
+            aEventType == EEventFocusGained );
+
+    const TInt windowGroupId =
+        iCoeEnv->WsSession().GetFocusWindowGroup();
+
+    MUS_LOG1( "mus: [MUSUI ]    focus wgid:%d", windowGroupId );
+    
+    if ( foreground )
+        {
+        iCoeEnv->RootWin().EnableFocusChangeEvents();
+        handleEvent = ETrue;
+        }
+    else if ( ( windowGroupId != iThisApplicationWgId ) && 
+              ( windowGroupId != iEikonServerWgId ) &&
+              ( windowGroupId != iAknNfyServerWgId ) )
+        {
+        iCoeEnv->RootWin().DisableFocusChangeEvents();
+        handleEvent = ETrue;
+        }
+    else
+        {
+        // NOP
+        }
+          
+    if ( handleEvent && iView && foreground != iForeground )
+        {
+        iForeground = foreground;
+        
+        CMusUiGeneralView* activatedView = 
+            static_cast<CMusUiGeneralView*>( iView );
+            
+        activatedView->DoHandleForegroundEventL( foreground );
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::DoHandlerForegroundEventL" );
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::FindWindowGroupIdentifiersL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiAppUi::FindWindowGroupIdentifiersL" );
+    
+    // Name of the EIKON server window group.
+    _LIT( KMusUiEikonServer, "EikonServer" );
+
+    // Name of the AknCapServer window group.
+    _LIT( KMusUiAknCapServer, "*akncapserver*" );
+
+    // Name of the AknNotifierServer window group.
+    _LIT( KMusUiAknNotifierServer, "*aknnfysrv*" );
+    
+    CEikonEnv& eikEnv = *( iEikonEnv );
+    eikEnv.SetSystem( ETrue );
+    eikEnv.WsSession().ComputeMode( RWsSession::EPriorityControlDisabled );
+
+    iThisApplicationWgId = eikEnv.RootWin().Identifier();
+    MUS_LOG1( "mus: [MUSUI ]    own wgid:%d", iThisApplicationWgId );
+    iEikonServerWgId =
+        eikEnv.WsSession().FindWindowGroupIdentifier( 0, KMusUiEikonServer );
+    MUS_LOG1( "mus: [MUSUI ]    eikonserv wgid:%d", iEikonServerWgId );
+    iAknCapServerWgId =
+        eikEnv.WsSession().FindWindowGroupIdentifier( 0, KMusUiAknCapServer );
+    MUS_LOG1( "mus: [MUSUI ]    akncapserv wgid:%d", iAknCapServerWgId );
+    iAknNfyServerWgId =
+        eikEnv.WsSession().FindWindowGroupIdentifier( 0,
+            KMusUiAknNotifierServer );
+    MUS_LOG1( "mus: [MUSUI ]    aknnotifserv wgid:%d", iAknNfyServerWgId );
+    
+    eikEnv.RootWin().EnableFocusChangeEvents();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::FindWindowGroupIdentifiersL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType)
+    {
+    CAknVolumePopup* popup = iStatusPaneHandler->GetVolumePopup();
+    if ( popup && popup->IsVisible() && (popup == aControl) && 
+         (aEventType == MCoeControlObserver::EEventStateChanged) )
+        {
+        MUS_LOG1( "mus: [MUSUI ]  CMusUiAppUi::HandleControlEventL(): volume[%d]",
+                popup->Value() );
+        CMusUiGeneralView* activatedView = 
+                               static_cast<CMusUiGeneralView*>( iView );
+        activatedView->HandleCommandL( EMusuiCmdViewVolumeChanged );
+        }
+
+    }
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuibackgroundviewcontainer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,274 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+#include "musuibackgroundviewcontainer.h"
+#include "musuiappui.h"
+#include "muslogger.h" // debug logging
+
+#include <AknsControlContext.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include <AknsDrawUtils.h>
+#include <StringLoader.h>                // StringLoader
+#include <aknnotewrappers.h>
+#include <AknWaitDialog.h>
+#include <AknGlobalNote.h>
+#include <AknDef.h>
+
+
+// Hidden window group. magic number 32 hiddens window
+_LIT( KMusUiBackgroundWindowGroupName,"32MusUiBackground" );
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiBackgroundViewContainer* CMusUiBackgroundViewContainer::NewL( 
+    const TRect& aRect, 
+    TInt aOrdinalPosition )
+    {
+    CMusUiBackgroundViewContainer* self =
+        new( ELeave )CMusUiBackgroundViewContainer( aOrdinalPosition );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiBackgroundViewContainer::CMusUiBackgroundViewContainer( 
+    TInt aOrdinalPosition ) : iOrdinalPosition( aOrdinalPosition )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiBackgroundViewContainer::ConstructL( const TRect& aRect )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBackgroundViewContainer::ConstructL()" );
+    
+    RWindowGroup iMyWindowGroup = RWindowGroup( iCoeEnv->WsSession() );
+    User::LeaveIfError( iMyWindowGroup.Construct( ( TUint32 )&iMyWindowGroup) );
+
+    iMyWindowGroup.SetName( KMusUiBackgroundWindowGroupName );
+    iMyWindowGroup.SetOrdinalPosition( iOrdinalPosition, ECoeWinPriorityNormal );
+    iMyWindowGroup.EnableReceiptOfFocus( EFalse );
+	iMyWindowGroup.AutoForeground( EFalse );
+    iMyWindowGroup.SetNonFading( ETrue );
+
+    CreateWindowL(&iMyWindowGroup);
+
+    iGroupIdentifier = iMyWindowGroup.Identifier();
+
+    iBackGround = CAknsBasicBackgroundControlContext::NewL(
+        KAknsIIDQsnBgAreaMain,
+        aRect,
+        EFalse );
+
+    SetRect( aRect );
+
+    ActivateL();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBackgroundViewContainer::ConstructL()" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiBackgroundViewContainer::~CMusUiBackgroundViewContainer()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBackgroundViewContainer::~CMusUiBackgroundViewContainer()" );
+    delete iBackGround;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBackgroundViewContainer::~CMusUiBackgroundViewContainer()" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiBackgroundViewContainer::RefreshView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBackgroundViewContainer::RefreshView()" );
+
+    DrawNow();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBackgroundViewContainer::RefreshView()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Set's this group right ordinal position
+// -----------------------------------------------------------------------------
+//
+void CMusUiBackgroundViewContainer::SetOrdinalPosition()
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiBackgroundViewContainer::SetOrdinalPosition(): %d",
+                iOrdinalPosition );
+    MakeVisible( ETrue );
+
+    iCoeEnv->WsSession().SetWindowGroupOrdinalPosition( iGroupIdentifier,
+                                                        iOrdinalPosition );
+
+    DrawNow();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBackgroundViewContainer::SetOrdinalPosition()" );
+    }
+
+// -----------------------------------------------------------------------------
+// Set's this group right ordinal position
+// -----------------------------------------------------------------------------
+//
+void CMusUiBackgroundViewContainer::SetOrdinalPosition( TInt aOrdianlPosition)
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiBackgroundViewContainer::SetOrdinalPosition(): %d",
+            aOrdianlPosition );
+    MakeVisible( ETrue );
+
+    iCoeEnv->WsSession().SetWindowGroupOrdinalPosition( iGroupIdentifier,
+                                                        aOrdianlPosition );
+
+    DrawNow();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBackgroundViewContainer::SetOrdinalPosition()" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiBackgroundViewContainer::UpdateOrdinalPositionValue( TBool aUp )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiBackgroundViewContainer::UpdateOrdinalPositionValue(): %d",
+                aUp );
+    if ( aUp )
+        {
+        ++iOrdinalPosition;
+        }
+    else
+        {
+        --iOrdinalPosition;
+        }
+    SetOrdinalPosition();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBackgroundViewContainer::UpdateOrdinalPositionValue()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework when the view size is changed
+// -----------------------------------------------------------------------------
+//
+void CMusUiBackgroundViewContainer::SizeChanged()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBackgroundViewContainer::SizeChanged()" );
+    TRect parentRect(Rect());
+    if (iBackGround)
+        {
+        (static_cast<CAknsBasicBackgroundControlContext*>(iBackGround))->SetRect(parentRect);
+        }
+
+    SetOrdinalPosition();
+    //MakeVisible( EFalse );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBackgroundViewContainer::SizeChanged()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework when to retrieve the no. of controls.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiBackgroundViewContainer::CountComponentControls() const
+    {
+    return 0; // return nbr of controls inside this container
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to retrieve the control specified by index.
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CMusUiBackgroundViewContainer::ComponentControl( TInt /*aIndex*/ ) const
+    {
+    return NULL;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to redraw the screen area.
+// -----------------------------------------------------------------------------
+//
+void CMusUiBackgroundViewContainer::Draw( const TRect& aRect ) const
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBackgroundViewContainer::Draw()" );
+
+    CWindowGc& gc = SystemGc();
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+    if(!AknsDrawUtils::Background( skin, cc,this,gc,aRect,KAknsDrawParamDefault ))
+        {
+        MUS_LOG( "mus: [MUSUI ]     Skin not valid or not found" );
+        gc.SetBrushColor( iEikonEnv->ControlColor( EColorWindowBackground, *this ) );
+        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+        gc.Clear( aRect );
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBackgroundViewContainer::Draw()" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiBackgroundViewContainer::HandleControlEventL(
+    CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
+    {
+    // TODO: Add your control event handler code here
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to act on key events if required.
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CMusUiBackgroundViewContainer::OfferKeyEventL(
+                        const TKeyEvent& /*aKeyEvent*/,
+                        TEventCode /*aType*/ )
+    {
+    return EKeyWasNotConsumed;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Supply the Mob Object for background skin drawing
+// -----------------------------------------------------------------------------
+//
+TTypeUid::Ptr CMusUiBackgroundViewContainer::MopSupplyObject( TTypeUid aId )
+    {
+    if (aId.iUid == MAknsControlContext::ETypeId && iBackGround )
+        {
+        return MAknsControlContext::SupplyMopObject( aId, iBackGround );
+        }
+    return CCoeControl::MopSupplyObject( aId );
+    }
+
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuibitmapdecoder.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,166 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#include "musuibitmapdecoder.h"
+#include "musuibitmapdecoderobserver.h"
+#include "muslogger.h" // debug logging
+
+#include <imageconversion.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiBitmapDecoder::~CMusUiBitmapDecoder()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBitmapDecoder::~CMusUiBitmapDecoder" );
+    Cancel();
+    iFs.Close();
+    delete iData;
+    delete iDecoder;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBitmapDecoder::~CMusUiBitmapDecoder" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Symbian two-phase constructor.
+// -----------------------------------------------------------------------------
+//
+CMusUiBitmapDecoder* CMusUiBitmapDecoder::NewL(
+                        MMusUiBitmapDecoderObserver& aObserver )
+    {
+    CMusUiBitmapDecoder* self = new (ELeave) CMusUiBitmapDecoder( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiBitmapDecoder::CMusUiBitmapDecoder(
+                        MMusUiBitmapDecoderObserver& aObserver ) :
+    CActive( EPriorityNormal ),
+    iObserver( aObserver )
+    {
+    // nothing
+    }
+
+
+// -----------------------------------------------------------------------------
+// Symbian second-phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CMusUiBitmapDecoder::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBitmapDecoder::ConstructL" );
+    User::LeaveIfError( iFs.Connect() );
+    //delete iData;
+    iData = NULL;
+    //delete iDecoder;
+    iDecoder = NULL;
+    CActiveScheduler::Add( this );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBitmapDecoder::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiBitmapDecoder::ConvertL( HBufC8* aData, CFbsBitmap* aBitmap )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBitmapDecoder::ConvertL" );
+
+    if ( IsActive() )
+        {
+        Cancel();
+        }
+
+    iData = aData->AllocL();
+    iBitmap = aBitmap;
+
+    delete iDecoder;
+    iDecoder = NULL;
+    iDecoder = CImageDecoder::DataNewL( iFs, *iData );
+
+    iBitmap->Create( iDecoder->FrameInfo().iFrameCoordsInPixels.Size(),
+                     iDecoder->FrameInfo().iFrameDisplayMode );
+
+    iDecoder->Convert( &iStatus, *iBitmap, 0 );
+    SetActive();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBitmapDecoder::ConvertL" );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiBitmapDecoder::DoCancel()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBitmapDecoder::DoCancel" );
+    iDecoder->Cancel();
+    Cancel();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBitmapDecoder::DoCancel" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiBitmapDecoder::RunL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiBitmapDecoder::RunL" );
+    if (iStatus == KErrNone)
+        {
+        iObserver.UpdateBitmap( iBitmap );
+        }
+    else
+        {
+        MUS_LOG1( "mus: [MUSUI ]        CMusUiBitmapDecoder::RunL: iStatus: [%d]",
+                                iStatus.Int() );
+        User::Leave( iStatus.Int() );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBitmapDecoder::RunL" );
+    }
+
+// -------------------------------------------------------------------------
+//  If RunL() leaves,It should be handled here.
+// -------------------------------------------------------------------------
+//
+TInt CMusUiBitmapDecoder::RunError( TInt aError )
+    {
+	MUS_LOG( "mus: [MUSUI ]  -> CMusUiBitmapDecoder::RunError" );
+    // Nothing can be done here.
+    aError = KErrNone;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiBitmapDecoder::RunError" );
+    return aError;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuicallbackservice.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Asynchronous callback service provider.
+*
+*/
+
+
+
+#include "musuicallbackservice.h"
+#include "musuicallbackobserver.h" // callback observer interface
+#include "muslogger.h"
+
+
+// -----------------------------------------------------------------------------
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CMusUiCallbackService* CMusUiCallbackService::NewL(
+                        MMusUiCallbackObserver& aCallbackObserver )
+    {
+    CMusUiCallbackService* self =
+                            new ( ELeave ) CMusUiCallbackService(
+                                                    aCallbackObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CMusUiCallbackService::~CMusUiCallbackService()
+    {
+    // Cancel active object
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiCallbackService::~CMusUiCallbackService" );
+    Cancel();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiCallbackService::~CMusUiCallbackService" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// C++ default constructor.
+// -----------------------------------------------------------------------------
+//
+CMusUiCallbackService::CMusUiCallbackService(
+                        MMusUiCallbackObserver& aCallbackObserver )
+    : CActive( EPriorityStandard ),
+    iCallbackObserver( aCallbackObserver ),
+    iEventId( EMusUiAsyncUninitialized )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiCallbackService::ConstructL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// Buffer a request to trigger an event.
+// -----------------------------------------------------------------------------
+//
+void CMusUiCallbackService::AsyncEventL( TMusUiAsyncEvent aEventId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiCallbackService::AsyncEventL" );
+    iEventId = aEventId;
+    Activate();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiCallbackService::AsyncEventL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Cancels the active request.
+// -----------------------------------------------------------------------------
+//
+void CMusUiCallbackService::Cancel()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiCallbackService::Cancel" );
+    CActive::Cancel();
+    iStatus = NULL;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiCallbackService::Cancel" );
+    }
+
+// -----------------------------------------------------------------------------
+// Check what event is currently pending.
+// -----------------------------------------------------------------------------
+//
+TMusUiAsyncEvent CMusUiCallbackService::CurrentEvent() const
+    {
+    if ( IsActive() )
+        {
+        return iEventId;
+        }
+    return EMusUiAsyncUninitialized;
+    }
+    
+// -----------------------------------------------------------------------------
+// From CActive.  Called when a request completes.
+// -----------------------------------------------------------------------------
+//
+void CMusUiCallbackService::RunL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiCallbackService::RunL" );
+    if ( iEventId )
+        {
+        // Copy the id from member to local so the member can be cleared.
+        TMusUiAsyncEvent eventId = iEventId;
+        iEventId = EMusUiAsyncUninitialized;
+        // Issue the call to the observer interface.
+        iCallbackObserver.HandleAsyncEventL( eventId );
+        MUS_LOG( "mus: [MUSUI ]  <- CMusUiCallbackService::RunL returns" );
+        return;
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiCallbackService::RunL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From CActive.  Called when a leave occurres in RunL.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiCallbackService::RunError( TInt aError )
+    {
+    MUS_LOG1( "mus: [MUSUI ]        CMusUiCallbackService::RunError [%d]",
+                            aError );
+    iCallbackObserver.HandleAsyncError( aError );
+                            
+    return KErrNone;
+    }
+
+
+// -----------------------------------------------------------------------------
+// From CActive.  Called when a request is cancelled.
+// -----------------------------------------------------------------------------
+//
+void CMusUiCallbackService::DoCancel()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiCallbackService::DoCancel" );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiCallbackService::DoCancel" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Activate the object.
+// -----------------------------------------------------------------------------
+//
+void CMusUiCallbackService::Activate()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiCallbackService::Activate" );
+    // Call SetActive() so RunL() will be called by the active scheduler
+    if ( IsActive() )
+        {
+        Cancel();
+        }
+    SetPriority( EPriorityHigh );
+    SetActive();
+    iStatus = KRequestPending;
+    TRequestStatus* stat = &iStatus;
+    User::RequestComplete( stat, KErrNone );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiCallbackService::Activate" );
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiclipsharingcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,1230 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Application's UI class.
+*
+*/
+
+
+
+#include "musuiclipsharingcontroller.h"
+#include "musuicallbackservice.h"
+#include "musuieventobserver.h"
+#include "musuisharingobserver.h"
+#include "musuisendobserver.h"
+#include "musuiclipsharingobserver.h"
+#include "musuidialogutil.h"
+#include "musengclipsession.h"
+#include "mussettings.h"
+#include "mussettingskeys.h"
+#include "musuiresourcehandler.h"
+#include "musui.hrh"
+#include "muslogger.h" // debug logging
+#include "musuiactivetimer.h"
+#include "musuigeneralview.h"
+
+#include <musui.rsg>
+#include <StringLoader.h>
+#include <AknUtils.h>
+
+#include <badesca.h>
+#include <avkon.hrh>
+
+// CONSTANTS
+const TInt KMusTimeToCloseAfterClipEndedStandard  = 60 * 1000000; // 60 seconds
+const TInt KMusTimeToCloseAfterClipEndedOpVariant =  1 * 1000000; //  1 second
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiClipSharingController* CMusUiClipSharingController::NewL(
+                                MMusUiEventObserver& aEventObserver,
+                                MMusUiSharingObserver& aSharingObserver,
+        	                    MMusUiSendObserver& aSendObserver,
+                                MMusUiClipSharingObserver& aClipObserver,
+                                const TRect& aRect )
+    {
+    CMusUiClipSharingController* self =
+            new( ELeave ) CMusUiClipSharingController( aEventObserver,
+                                                       aSharingObserver,
+                                                       aSendObserver,
+                                                       aClipObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiClipSharingController::~CMusUiClipSharingController()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::~CMusUiClipSharingController" );
+    delete iCloseTimer;
+    DeleteEngineSession();
+    delete iFileName;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::~CMusUiClipSharingController" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiClipSharingController::CMusUiClipSharingController(
+                                MMusUiEventObserver& aEventObserver,
+                                MMusUiSharingObserver& aSharingObserver,
+                                MMusUiSendObserver& aSendObserver,
+                                MMusUiClipSharingObserver& aClipObserver )
+    :CMusUiSendController( aEventObserver, aSharingObserver, aSendObserver ),
+    iClipObserver( aClipObserver )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::ConstructL( const TRect& aRect )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::ConstructL" );
+    
+    CMusUiSendController::ConstructL(); // Base class construction
+                            
+    iRect = aRect;  
+    iSession = CMusEngClipSession::NewL( iRect,
+                                         *this,
+                                         *this,
+                                         *this,
+                                         iSipProfileId );
+    iSession->SetAudioRoutingObserver( this );
+    iSession->SetVolumeChangeObserver( this );
+    
+    if ( iSession->AudioRoutingCanBeChanged() && !iSession->IsAudioRoutingHeadset() )
+        {
+        iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
+        }
+    
+    if ( iVideoCodec && iVideoCodec->Length() > 0 )
+        {
+        iSession->SetSupportedVideoCodecListL( *iVideoCodec );
+        }
+    
+   	iCallbackService->AsyncEventL( EMusUiAsyncStartMediaGallery );
+   	
+   	iCloseTimer = CMusUiActiveTimer::NewL( this );
+   	
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::HandleAsyncEventL( TMusUiAsyncEvent aEventId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::HandleAsyncEventL" );
+    switch ( aEventId )
+        {
+        case EMusUiAsyncStartMediaGallery:
+            {
+            iTranscode = EFalse;
+            iTranscodingGoing = EFalse;
+            
+            if ( !iSession )
+                {
+                iSession = CMusEngClipSession::NewL( iRect, 
+                                                     *this, 
+                                                     *this, 
+                                                     *this, 
+                                                     iSipProfileId );
+                iSession->SetAudioRoutingObserver( this );
+                }
+                        
+            // Do fetching guarded. If registration completes during fetching,
+            // there is no need to do anything.
+            iFileFetchingOngoing = ETrue;
+            iClipObserver.RunFetchDialogL();
+            iFileFetchingOngoing = EFalse;
+            
+            TRAPD( error,
+                   iSession->SetClipL( *iFileName ) )
+            MUS_LOG_TDESC( "mus: [MUSUI ]     File name: ",
+                           iFileName->Des() )
+            if ( error == KErrNone)
+                {
+				if ( iSession->AudioRoutingCanBeChanged() )
+                    {
+                    iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
+                    }
+                iClipEnded = EFalse;                   
+                StartInvitationL();	
+                }
+            else if ( error == KErrPermissionDenied )
+                {
+                MusUiDialogUtil::ShowInformationDialogL( 
+                                        R_MUS_VIEW_DRM_INFO_SEND_FORBID );
+                DeleteEngineSession();
+                delete iFileName;
+                iFileName = NULL;
+ 				iSession = CMusEngClipSession::NewL( iRect,
+                                                     *this,
+                                                     *this,
+                                                     *this,
+                                                     iSipProfileId );
+                iSession->SetAudioRoutingObserver( this );
+                if ( iSession->AudioRoutingCanBeChanged() )
+                    {
+                    iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
+                    }
+                iCallbackService->AsyncEventL( EMusUiAsyncStartMediaGallery );
+                }
+            else
+                {
+                HandleExitL();
+                }
+                
+            break;
+            }
+        case EMusUiAsyncStartTranscoding:
+            {
+            // Parse Target Filename for the transcoding result
+            // and start transcoding:
+            //iSession->TranscodeL( VideoFileNameL() );
+            // Show progress dialog:
+            //iObserver->ShowTranscodingProgressDialogL();
+            iTranscodingGoing = ETrue;
+            break;
+            }  
+        
+        default:
+            {
+            // Not clip specific, let the base class handle
+            CMusUiSendController::HandleAsyncEventL( aEventId );
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::HandleAsyncEventL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::DeleteEngineSession()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::DeleteEngineSession" );
+    
+    CMusUiSendController::DeleteEngineSession();
+    // Cancel transcoding
+    if ( iSession && iTranscodingGoing )
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::DeleteEngineSession:\
+                            Canceling transcoding..." );
+        DismissWaitDialog();
+        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                                R_MUS_VIEW_NOTE_UNABLE_TO_CONVERT );
+                     iSession->CancelTranscodeL() );
+        }
+    if ( iSession && iSession->IsAudioRoutingLoudSpeaker() )
+	    {
+	    iShowDialog = ETrue; 
+	    }
+    delete iSession;
+    iSession = NULL;    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::DeleteEngineSession" );
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngMceOutSession* CMusUiClipSharingController::EngineOutSession()
+    {
+    return iSession; // Clip session is CMusEngMceOutSession
+    }
+
+
+// -----------------------------------------------------------------------------
+// Handles status changes specific to sending sharing types.
+// Calls base class version for status changes that are not sending specific. 
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::HandleChangedStatusL(
+                        TMusAvailabilityStatus aStatus )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::HandleChangedStatusL" )
+   
+    switch( aStatus )
+        {
+        case EMultimediaSharingAvailable:
+            {
+            MUS_LOG( "mus: [MUSUI ]     EMultimediaSharingAvailable" )
+            
+            if ( iSipRegistrationPending )
+                {
+                iSipRegistrationPending = EFalse;
+            
+                // If fecth dialog is still open, there is no need to do anything
+                if ( !iFileFetchingOngoing )
+                	{
+                	iSipRegistrationPending = EFalse;
+                    // Set callback service, Call StartInvitationL when wait dialog dismissed
+                	TRAPD( err, iSharingObserver.SetWaitDialogCallbackL( 
+                	            &iWaitDialogCallback ) );
+                    // Dismiss pending wait note
+            	    iSharingObserver.DismissWaitDialogL();
+            	    if ( err == KErrNotReady )
+            	        {
+            	        StartInvitationL();	
+            	        }
+                	}
+                }
+            break;
+            }   
+        default:
+            {
+            // Not clip specific, let the base class handle
+            CMusUiSendController::HandleChangedStatusL( aStatus );
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::HandleChangedStatusL" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::InviteL( const TDesC& aRecipient )
+    {
+    MUS_LOG_TDESC( "mus: [MUSUI ]    -> CMusUiClipSharingController::InviteL:",
+                            aRecipient );
+
+    // Registration must not be pending in this phase
+    __ASSERT_ALWAYS( !iSipRegistrationPending, 
+                     iEventObserver.HandleError( KErrNotReady ) );
+                     
+    delete iAddress;
+    iAddress = NULL;
+    iAddress = aRecipient.AllocL();
+    
+    
+    TBool inviteProceeding = DoInviteL();
+    if ( !inviteProceeding )
+        {
+        MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::InviteL, invite failed" );
+        return;
+        }      
+    if( iTranscode )
+        {
+        MUS_LOG( "mus: [MUSUI ]     Starting transcode..." );
+        iTranscode = EFalse;
+      
+        // Start transcoding
+        iTranscodingGoing = ETrue;
+        
+        SetFileNameL( VideoFileNameL() );
+        TRAPD( err, iSession->TranscodeL( *iFileName ) );
+        
+        if ( err != KErrNone )
+            {
+            MUS_LOG1( "mus: [MUSUI ]     Transcoding failed: %d", err );
+            iTranscodingGoing = EFalse;
+            if ( iTranscodeDueUnknownRemoteCapas )
+                {
+                MUS_LOG( "mus: [MUSUI ]     Retry invite without transcoding" );
+                // Still retry the clip without transcoding as other end might support current codec.
+                iVideoToBeSaved = EFalse;
+                inviteProceeding = DoInviteL();
+                }
+            else if ( err == KErrNotFound )  // No Video Editor Engine
+                {
+                MusUiDialogUtil::ShowGlobalErrorDialogL(
+                    R_MUS_LIVE_SHARING_VIEW_NOTE_TRANSCODING_NOT_SUPPORTED );
+                DeleteEngineSession();
+                iVideoToBeSaved = EFalse;
+                HandleExitL();
+                inviteProceeding = EFalse;
+                }
+            else
+                {
+                // Unable to convert clip, if transc. leaves.
+                // After note return back to the media gallery.
+                TranscodingFailed();
+                inviteProceeding = EFalse;
+                }
+            }
+        else
+            {
+            // Show progress dialog:
+            iClipObserver.ShowTranscodingProgressDialogL();
+            inviteProceeding = EFalse;
+            }
+        }
+    
+    if ( inviteProceeding )
+        {
+        SetConnectionInitialized( ETrue );
+        ShowInvitingWaitDialogL();
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::InviteL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingController::DoInviteL()
+    {
+    __ASSERT_ALWAYS( iAddress, User::Leave( KErrNotReady ) );
+    TRAPD( err, iSession->InviteL( *iAddress ) );
+    MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::DoInviteL: After TRAPD" );
+    
+    // If address is in wrong format, Manual Address Entry Dialog
+    // is displayed
+    if ( err != KErrNone )
+        {
+        DismissWaitDialog();
+        MusUiDialogUtil::ShowGlobalErrorDialogL(
+                          R_MUS_LIVE_SHARING_VIEW_NOTE_INVITE_ERROR );
+        if ( ( ++iTriedInvitations < 2 )  && ( err == KErrArgument ) )
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingController::DoInviteL: iTriedInvitations < 2" );
+            iManualAddressTyped = ETrue;
+            iResourceHandler->RequestKeypadL( ETrue );
+            
+            // If the address has to be queried again...:
+            iTranscode = EFalse;
+            
+            MUS_LOG_TDESC( "mus: [MUSUI ]     CMusUiClipSharingController::DoInviteL: ",
+                     iFileName->Des() )
+                                               
+            iSendObserver.ManualAddressEntryL( *iRemoteSipAddressProposal );
+            }
+        else
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingController::DoInviteL: ++iTriedInvitations > 1" );
+            DeleteEngineSession();
+            HandleExitL();
+            }
+        }
+    return ( err == KErrNone );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::HandleSliderValueChangeL( TInt aNewLevel )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::HandleSliderValueChangeL(%d)",
+              aNewLevel )
+
+    __ASSERT_ALWAYS( !ExitOccured(), User::Leave( KErrDied ) );
+    __ASSERT_ALWAYS( iConnectionEstablished, User::Leave( KErrNotReady ) );
+        
+    iSession->SetPositionL( TTimeIntervalSeconds( aNewLevel ) );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::HandleSliderValueChangeL" )
+    }
+
+
+
+void CMusUiClipSharingController::OfferToolbarEventL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::OfferToolbarEventL [%d]",
+                            aCommand );
+                                                    
+    switch ( aCommand )
+        {
+        case EMusuiCmdToolbarPause:
+            {
+            HandleCommandL( EMusuiCmdViewPause );
+            iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPause,
+                                                    EMusuiCmdToolbarUnPause,
+                                                    ETrue );
+            break;
+            }
+        case EMusuiCmdToolbarUnPause:
+            {
+            HandleCommandL( EMusuiCmdViewContinue );
+            iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnPause,
+                                                    EMusuiCmdToolbarPause,
+                                                    ETrue );
+            break;
+            }
+        case EMusuiCmdToolbarFFRev:
+            {
+            iToolbarFFRevSelected = !iToolbarFFRevSelected; 
+            iClipObserver.SetDurationValue( iSession->DurationL().Int() );
+            if ( iToolbarFFRevSelected )
+                {
+                iWasPlayingBeforeWinding = iSession->IsPlayingL();
+                PauseL();
+                }
+            else
+                {
+                StopWindingL();
+                if ( iWasPlayingBeforeWinding )
+                    {
+                    PlayL();
+                    }
+                }
+//            iClipObserver.SetDurationVisible();
+            iSharingObserver.HighlightSelectedToolbarItem( EMusuiCmdToolbarFFRev );
+            break;
+            }
+        default:    // Not clip specific, let the base class handle
+            {
+            CMusUiEventController::OfferToolbarEventL( aCommand );
+            break;
+            }    
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::OfferToolbarEventL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::HandleCommandL(TInt aCommand)
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::HandleCommandL" );
+    
+    __ASSERT_ALWAYS( !ExitOccured(), User::Leave( KErrDied ) );
+
+    switch ( aCommand )
+        {
+        case EMusuiCmdViewPause:
+            {
+            PauseL();
+            iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
+            break;
+            }
+        case EMusuiCmdViewContinue:
+            {
+            PlayL();
+            iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPlay );
+            break;
+            }
+
+        case EMusuiCmdViewReplay:
+            {
+            if( !MUS_NO_TOOLBAR )
+                {
+    			if (!AknLayoutUtils::PenEnabled())
+    				{
+    				iEventObserver.SetToolbarVisibility( ETrue );
+            		}
+    
+                if ( ClipEnded() )
+                    {
+                    iEventObserver.SetToolbarVisibility( ETrue );
+                    // Simulate press of play in toolbar
+                    OfferToolbarEventL( EMusuiCmdToolbarUnPause );             
+                    }
+                }
+            break;
+            }
+
+        case EMusuiCmdViewShareVideo:
+            {
+            PauseL();
+            // TODO: Change to video sharing
+            break;
+            }
+        case EMusuiCmdViewShareImage:
+            {
+            PauseL();
+            // TODO: Change to image sharing
+            break;
+            }
+        case EMusuiCmdViewShareLive:
+            {
+            // TODO: Change to live sharing
+            break;
+            }
+
+        case EMusuiCmdViewAudioNormal:
+            {
+            if( !MUS_NO_TOOLBAR )
+                {
+    			if (!AknLayoutUtils::PenEnabled())
+    				{
+    				iEventObserver.SetToolbarVisibility( ETrue );
+            		}
+                }
+            iSession->UnmuteL();
+            break;
+            }
+        case EMusuiCmdViewAudioMute:
+            {
+			if (!AknLayoutUtils::PenEnabled())
+				{
+				iEventObserver.SetToolbarVisibility( ETrue );
+        		}
+
+            iSession->MuteL();
+            break;
+            }
+        case EMusuiCmdViewFastForward:
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::HandleCommandL: EMusuiCmdViewFastForward" );
+            if ( DoFastForwardingL( ETrue ) )
+                {
+                iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconForward );
+                iClipObserver.SetPositionValueL( iSession->PositionL().Int() );
+                //iClipObserver.SetDurationVisible();
+                }
+            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::HandleCommandL: EMusuiCmdViewFastForward END" );
+            break;
+            }
+        case EMusuiCmdViewFastReverse:
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::HandleCommandL: EMusuiCmdViewFastReverse" );
+            if ( DoFastRewindingL( ETrue ) )
+                {
+                iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconRew );
+                iClipObserver.SetPositionValueL( iSession->PositionL().Int() );
+                //iClipObserver.SetDurationVisible();
+                }
+            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::HandleCommandL: EMusuiCmdViewFastReverse END" );
+            break;
+            }
+        case EMusuiCmdViewFastForwardEnd:
+            {
+            if ( DoFastForwardingL( EFalse ) )
+                {
+                iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
+                PauseL();
+                }
+            break;
+            }
+        case EMusuiCmdViewFastReverseEnd:
+            {
+            if ( DoFastRewindingL( EFalse ) )
+                {
+                iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
+                PauseL();
+                }
+            break;
+            }
+        default:
+            {
+            // Try more general handling
+            CMusUiEventController::HandleCommandL( aCommand );
+            break;
+            }
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::HandleCommandL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::SetFileNameL( const TDesC& aFileName )
+    {
+    iFileName = aFileName.AllocL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingController::ClipEnded()
+    {
+    return iClipEnded;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingController::ClipMutedL()
+    {
+    return iSession->IsMutedL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingController::ClipContainsAudioL()
+    {
+    if ( !iConnectionInitialized || !iSession )
+        {
+        return EFalse; // We cannot be sure yet
+        }
+        
+    return iSession->ContainsAudioL();
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::CancelTranscodingL()
+    {
+    if ( iSession && iTranscodingGoing )
+        {
+        iTranscodingGoing = EFalse;
+        iSession->CancelTranscodeL();
+        }
+    iVideoToBeSaved = EFalse;
+    HandleExitL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::StopWindingL()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiClipSharingController::StopWindingL" );
+    
+    if ( DoFastForwardingL( EFalse ) || DoFastRewindingL( EFalse ) )
+        {
+        iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiClipSharingController::StopWindingL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingController::ToolbarFFRevSelected()
+    {
+    return iToolbarFFRevSelected;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TranscodingProgressedL( TInt aPercentage )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingProgressedL ( %d )", aPercentage );
+    if ( aPercentage < KMusOneHundredPercent )
+        {
+        iTranscodingGoing = ETrue;
+        iClipObserver.UpdateClipTranscodingPercentageL( aPercentage );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingProgressedL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TranscodingCompletedInitL()
+    {
+    MUS_LOG( 
+        "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingCompletedInitL" );
+    if ( iTranscodingGoing )
+        {
+        iVideoToBeSaved = ETrue;
+        iTranscodingGoing = EFalse;
+        iClipObserver.CancelTranscodingDialogL();
+        MusUiDialogUtil::ShowInformationDialogL( R_MUS_VIEW_NOTE_TRANSCODING_COMPLETE );
+        }
+    MUS_LOG( 
+        "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingCompletedInitL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TranscodingCompletedFinalizeL()
+    {
+    MUS_LOG( 
+        "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingCompletedFinalizeL" );
+    SetConnectionInitialized( ETrue );
+    if ( !iTranscodingGoing )
+        {
+        ShowInvitingWaitDialogL();
+        }
+    MUS_LOG( 
+        "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingCompletedFinalizeL" );
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiClipSharingController::FormattedDurationString(
+                            const TTimeIntervalSeconds& aDurationSeconds,
+                            const TTimeIntervalSeconds& aPositionSeconds )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::FormattedDurationString" );
+    _LIT( KDurationAndPositionSeparator, "/" );
+
+    iDurationStringBuffer.SetLength( 0 );
+    TLocale locale;
+    _LIT( KZeroSymbol, "0" );
+
+    TInt durationMinutes( 0 );
+    TInt durationSeconds( aDurationSeconds.Int() );
+    if ( aDurationSeconds.Int() > ( KMusOneMinuteInSeconds - 1 ) )
+        {
+        durationMinutes = (int)( aDurationSeconds.Int() / KMusOneMinuteInSeconds );
+        durationSeconds = durationSeconds - ( durationMinutes * KMusOneMinuteInSeconds );
+        }
+
+    iDurationStringBuffer.AppendNum( durationMinutes );
+    iDurationStringBuffer.Append( locale.TimeSeparator( KMusLocaleMinutesAndSecondsSeparator ) );
+    if ( durationSeconds < KMusNumberValueTen )
+        {
+        iDurationStringBuffer.Append( KZeroSymbol );
+        }
+    iDurationStringBuffer.AppendNum( durationSeconds );
+    iDurationStringBuffer.Append( KDurationAndPositionSeparator );
+
+    TInt positionMinutes( 0 );
+    TInt positionSeconds( aPositionSeconds.Int() );
+    if ( aPositionSeconds.Int() > ( KMusOneMinuteInSeconds - 1 ) )
+        {
+        positionMinutes = (int)( aPositionSeconds.Int() / KMusOneMinuteInSeconds );
+        positionSeconds = positionSeconds - ( positionMinutes * KMusOneMinuteInSeconds );
+        }
+
+    iDurationStringBuffer.AppendNum( positionMinutes );
+    iDurationStringBuffer.Append( locale.TimeSeparator( KMusLocaleMinutesAndSecondsSeparator ) );
+    if ( positionSeconds < KMusNumberValueTen )
+        {
+        iDurationStringBuffer.Append( KZeroSymbol );
+        }
+    iDurationStringBuffer.AppendNum( positionSeconds );
+
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::FormattedDurationString" );
+    return iDurationStringBuffer;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::EndOfClip()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::EndOfClip" );
+    iClipEnded = ETrue;
+    
+        TRAP_IGNORE( iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconStop ) );
+        if(!MUS_NO_TOOLBAR)
+            {
+            iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPause,
+                                                    EMusuiCmdToolbarUnPause,
+                                                    ETrue );
+            }
+    iCloseTimer->Cancel();
+    iCloseTimer->After( iOperatorSpecificFunctionality ?
+                                   KMusTimeToCloseAfterClipEndedOpVariant : 
+                                   KMusTimeToCloseAfterClipEndedStandard );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::EndOfClip" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TranscodingNeeded(TBool aDueUnknownRemoteCapabilities)
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingNeeded, %d", 
+               aDueUnknownRemoteCapabilities);
+    iTranscode = ETrue;
+    iTranscodeDueUnknownRemoteCapas = aDueUnknownRemoteCapabilities;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingNeeded" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TranscodingProgressed( TInt aPercentage )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingProgressed %d",
+                            aPercentage );
+    TRAP_IGNORE( TranscodingProgressedL( aPercentage ) )
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingProgressed" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TranscodingCompletedInit()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingCompleted" );
+    TRAPD( error, TranscodingCompletedInitL() );
+    if ( error != KErrNone )
+        {
+        HandleError( error );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingCompleted" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TranscodingCompletedFinalize()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingCompleted" );
+    TRAPD( error, TranscodingCompletedFinalizeL() );
+    if ( error != KErrNone )
+        {
+        HandleError( error );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingCompleted" );
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TranscodingFailed()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingFailed" );
+    iTranscodingGoing = EFalse;
+    DismissWaitDialog();
+    TRAP_IGNORE( iClipObserver.CancelTranscodingDialogL();
+                 MusUiDialogUtil::ShowGlobalErrorModalDialogL( 
+                                    R_MUS_VIEW_NOTE_UNABLE_TO_CONVERT ) );
+    DeleteEngineSession();
+    delete iFileName;
+    iFileName = NULL;
+    TRAPD( error,
+           iCallbackService->AsyncEventL( EMusUiAsyncStartMediaGallery ) );
+    if ( error != KErrNone )
+        {
+        HandleError( error );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingFailed" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::SessionRecipientNotFound()
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiClipSharingController::SessionRecipientNotFound [%d]", iTriedInvitations );
+    
+    // If the address has to be queried again...:
+    iTranscode = EFalse;    
+    
+    CMusUiSendController::SessionRecipientNotFound();
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionRecipientNotFound" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::SessionTerminated()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionTerminated" );
+    DismissWaitDialog();
+    if ( iTranscodingGoing )
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                                R_MUS_VIEW_NOTE_UNABLE_TO_CONVERT ) );
+        }
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionTerminated" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::SessionConnectionLost()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionConnectionLost" );
+    DismissWaitDialog();
+    TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_CONNECTION_LOST ) );
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionConnectionLost" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::SessionFailed()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionFailed" );
+    DismissWaitDialog();
+    if ( iTranscodingGoing )
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                            R_MUS_VIEW_NOTE_UNABLE_TO_CONVERT ) );
+        }
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionFailed" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::StreamIdle()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::StreamIdle" );
+    iClipObserver.InvalidVideoFrame( ETrue );
+    TRAPD( error, StreamIdleL() );
+    if ( error != KErrNone )
+        {
+        iEventObserver.HandleError( error );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::StreamIdle" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::StreamStreaming()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::StreamStreaming" );
+    iClipObserver.InvalidVideoFrame( EFalse );
+    TRAPD( error, StreamStreamingL() );
+    if ( error != KErrNone )
+        {
+        iEventObserver.HandleError( error );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::StreamStreaming" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::SessionTimeChanged(
+                        const TTimeIntervalSeconds& aSeconds )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionTimeChanged" );
+    TRAP_IGNORE( SessionTimeChangedL( aSeconds ) );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionTimeChanged" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::InactivityTimeout()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::InactivityTimeout" );
+    DismissWaitDialog();
+    TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_SERVICE_N_A ) );
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::InactivityTimeout" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called when predefined time elapsed 
+// after the clip had reached the end
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::TimerComplete( CMusUiActiveTimer* /*aTimer*/ )
+    {
+    MUS_LOG( "mus: [MUSUI ]  Close time elapsed from clip ending => \
+             closing session" );
+    TRAP_IGNORE( HandleExitL() )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::StreamStreamingL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::StreamStreamingL" );
+    
+    if ( ConnectionEstablished() )
+        {
+        iClipEnded = EFalse;
+        iCloseTimer->Cancel();    
+        iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPlay );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::StreamStreamingL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::StreamIdleL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::StreamIdleL" );
+    
+    if ( ConnectionEstablished() )
+        {    
+        iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::StreamIdleL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::SessionTimeChangedL( const TTimeIntervalSeconds& aSeconds )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionTimeChangedL" );
+    if ( aSeconds.Int() > -1 )
+        {
+        TTimeIntervalSeconds clipDuration = iSession->DurationL();
+        TTimeIntervalSeconds clipPosition = iSession->PositionL();
+                
+        iSharingObserver.UpdateSessionTime( SessionTimeFormatted( aSeconds ) );
+        iClipObserver.UpdateClipPositionL( clipPosition.Int(),
+                                          FormattedDurationString(  
+                                                clipPosition, 
+                                                clipDuration ) );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionTimeChangedL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiClipSharingController::SessionEstablished()
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingController::SessionEstablished()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionEstablished" );
+    
+    TRAPD( error, iResourceHandler->RequestVideoPlayerL( ETrue ) );
+    if ( error != KErrNone )
+        {
+        MUS_LOG1( "mus: [MUSUI ]     RequestVideoPlayerL leave code: %d", error )
+        }
+    
+    // Duration setting visible
+    TRAP( error, iClipObserver.SetDurationValue( iSession->DurationL().Int() ) )
+    if ( error != KErrNone )
+        {
+        HandleError( error );
+        }
+    iClipObserver.SetDurationVisible();
+
+    // General handling
+    CMusUiSendController::SessionEstablished(); // Base class handling    
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionEstablished" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiClipSharingController::DoFastForwardingL()
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingController::DoFastForwardingL( TBool aUseWinding )
+    {
+    if( iFastForward ^ aUseWinding ) 
+        {
+        iSession->FastForwardL( aUseWinding );
+        iFastForward = aUseWinding;
+        return ETrue;
+        }
+    return EFalse;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiClipSharingController::DoFastRewindingL()
+// -----------------------------------------------------------------------------
+//    
+TBool CMusUiClipSharingController::DoFastRewindingL( TBool aUseWinding )
+    {
+    if( iFastRewind ^ aUseWinding ) 
+        {
+        iSession->FastRewindL( aUseWinding );
+        iFastRewind = aUseWinding;
+        return ETrue;
+        }
+    return EFalse;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// CMusUiClipSharingController::RewindFromEndL()
+// -----------------------------------------------------------------------------
+//    
+void CMusUiClipSharingController::RewindFromEndL()
+	{
+	MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::RewindFromEndL" );
+    PauseL();
+    iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
+    iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPause,
+                                            EMusuiCmdToolbarUnPause,
+                                            ETrue );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::RewindFromEndL" );
+	}
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiclipsharingview.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,677 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#include "musuiclipsharingview.h"
+#include "musuiclipsharingviewcontainer.h"
+#include "musuibackgroundviewcontainer.h"
+#include "musuiclipsharingcontroller.h"
+#include "musuiactivitymanger.h"
+#include "musuiappui.h"
+#include "musuistatuspanehandler.h"
+#include "musui.hrh"
+#include "musuidefinitions.h"
+#include "muslogger.h" // debug logging
+#include <musui.rsg>
+#include <musui.mbg>
+#include "musuidialogutil.h"
+
+#include <aknViewAppUi.h>
+#include <avkon.hrh>
+#include <eikmenup.h>
+#include <eikbtgpc.h>
+#include <akntoolbar.h>
+
+
+const TInt KMusUiContainerHeight = 50;
+const TInt KDefaultResolutionHeight = 640;
+
+// -----------------------------------------------------------------------------
+// EPOC two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::ConstructL" );
+
+    CMusUiSendView::ConstructL();
+
+    Toolbar()->SetToolbarObserver( this );
+    Toolbar()->UpdateBackground();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CMusUiClipSharingView::~CMusUiClipSharingView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::~CMusUiClipSharingView" );
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        }
+    delete iContainer;
+    
+    delete iController;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::~CMusUiClipSharingView" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TUid CMusUiClipSharingView::Id() const
+    {
+    return KMusUidClipSharingView;
+    }
+
+// -----------------------------------------------------------------------------
+// From MEikMenuObserver, Called by framework before constructing menupane
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::DynInitMenuPaneL( TInt aResourceId,
+                                              CEikMenuPane* aMenuPane )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::DynInitMenuPaneL" );
+    
+ 
+    // Base class initiated initialization first
+    CMusUiGeneralView::DynInitMenuPaneL( aResourceId, aMenuPane );
+    
+    if(! MUS_NO_TOOLBAR )
+        {
+            SetInitialFocusedItemL();        
+        }
+    
+    if ( aResourceId == R_MUSUI_VIEW_MENU )
+        {
+        
+        // Delete items not related to clip sharing:
+        aMenuPane->DeleteMenuItem( EMusuiCmdRecord );
+        aMenuPane->DeleteMenuItem( EMusuiCmdStopRecording );        
+
+        aMenuPane->DeleteMenuItem( EMusuiCmdToolbarZoom );
+        aMenuPane->DeleteMenuItem( EMusuiCmdToolbarBrightness );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewZoom );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewBrightness );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewFullScreen );       
+        
+        // Delete EMusuiCmdViewAudioNormal or EMusuiCmdViewAudioMute
+        // depending on the audio state of the clip:
+        if ( iController->ClipContainsAudioL() )
+            {
+            aMenuPane->DeleteMenuItem( iController->ClipMutedL() ? 
+                                        EMusuiCmdViewAudioMute : 
+                                        EMusuiCmdViewAudioNormal );
+            }
+         else
+            {
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewAudioMute );
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewAudioNormal );
+            }
+        
+        // Delete "Replay" item, if the end of the clip not reached:
+        if ( !iController->ClipEnded() )
+            {
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewReplay );
+            }
+
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::DynInitMenuPaneL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::HandleToolbarCommandL( TInt aCommand )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::HandleToolbarCommandL" );
+
+     __ASSERT_ALWAYS( iController, User::Leave( KErrNotReady ) );
+
+    switch ( aCommand )
+        {
+        case EKeyLeftArrow:
+            {
+            HandleCommandL(
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeDown :
+                    iController->ToolbarFFRevSelected() ? EMusuiCmdViewFastReverse :
+                    EMusUiCmdToolbarLastIndex );
+            break;
+            }
+        case EKeyRightArrow:
+            {
+            HandleCommandL(
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeUp :
+                    iController->ToolbarFFRevSelected() ? EMusuiCmdViewFastForward :
+                    EMusUiCmdToolbarLastIndex );
+            break;
+            }
+        case EKeyUpArrow:
+            {
+            HandleCommandL(
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeUp :
+                    iController->ToolbarFFRevSelected() ? EMusuiCmdViewFastForward :
+                    EMusUiCmdToolbarLastIndex );
+            break;
+            }
+        case EKeyDownArrow:
+            {
+            HandleCommandL(
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeDown :
+                    iController->ToolbarFFRevSelected() ? EMusuiCmdViewFastReverse :
+                    EMusUiCmdToolbarLastIndex );
+            break;
+            }
+        case EMusuiCmdViewVolumeDown:
+            {
+            HandleCommandL( EMusuiCmdViewVolumeDown );
+            break;
+            }
+        case EMusuiCmdViewVolumeUp:
+            {
+            HandleCommandL( EMusuiCmdViewVolumeUp );
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::HandleToolbarCommandL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::HandleKeyUpEvent( TInt /*aKeyCode*/ )
+    {
+    TRAP_IGNORE( iController->StopWindingL() )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::SetInitialFocusedItemL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::SetInitialFocusedItemL" );
+
+    __ASSERT_ALWAYS( iController, User::Leave( KErrNotReady ) );
+
+    if ( iOperatorSpecificFunctionality && !AknLayoutUtils::PenEnabled() )
+        {
+        MUS_LOG( "Focus changed in OPERATOR mode !!!!!!!!!!!!!" );
+  
+        if ( !( iController->DeviceHasDedicatedVolumeKeys() ) )
+            {
+            Toolbar()->SetFocusedItemL( EMusuiCmdToolbarVolume );
+            }
+        else
+            {
+      
+	        Toolbar()->SetFocusedItemL( EventControllerL().IsMicMutedL() ?
+                                                    EMusuiCmdToolbarUnmute :
+                                                    EMusuiCmdToolbarMute );
+    		}        
+        
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::SetInitialFocusedItemL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::DynInitToolbarL( TInt aResourceId,
+                                             CAknToolbar* aToolbar )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::DynInitToolbarL" );
+
+    // Items to be removed in Clip Sharing View:
+    
+
+ 	if (!AknLayoutUtils::PenEnabled())//(aResourceId == R_MUS_TOOLBAR_NONTOUCH)//
+	{
+   		if ( iController->DeviceHasDedicatedVolumeKeys() )
+        	{
+        	aToolbar->RemoveItem( EMusuiCmdToolbarVolume );
+        	}
+    	else
+        	{
+        	aToolbar->SetFocusedItemL( EMusuiCmdToolbarVolume );
+        	}        	
+	    
+		aToolbar->RemoveItem( EMusuiCmdToolbarZoom );
+    	aToolbar->RemoveItem( EMusuiCmdToolbarBrightness );
+	}
+
+    Toolbar()->RemoveItem( EMusuiCmdToolbarPauseLive );
+    Toolbar()->RemoveItem( EMusuiCmdToolbarUnPauseLive );
+    Toolbar()->RemoveItem( EMusuiCmdToolbarFullScreen );
+    
+    
+    if ( iOperatorSpecificFunctionality )
+        {
+        // Remove pause/unpause functionality in operator variant case
+        Toolbar()->RemoveItem( EMusuiCmdToolbarPause );
+        Toolbar()->RemoveItem( EMusuiCmdToolbarUnPause );
+        
+        if ( aToolbar->FocusedItem() == KErrNotFound &&
+             !AknLayoutUtils::PenEnabled() )
+            {
+            aToolbar->SetFocusedItemL( EventControllerL().IsMicMutedL() ?
+                                                    EMusuiCmdToolbarUnmute :
+                                                    EMusuiCmdToolbarMute );
+            }                
+
+        }
+    else        
+        {
+        // Toggled items to be hidden:
+        Toolbar()->HideItem( iPauseSelected ?
+                                EMusuiCmdToolbarPause :
+                                EMusuiCmdToolbarUnPause,
+                             ETrue,
+                             ETrue );
+        if ( aToolbar->FocusedItem() == KErrNotFound &&
+             !AknLayoutUtils::PenEnabled() )
+            {
+            aToolbar->SetFocusedItemL( EMusuiCmdToolbarPause );
+            }    
+    	Toolbar()->RemoveItem( EMusuiCmdToolbarBlank );
+        }
+            
+    // Last generic base class functionality
+    CMusUiGeneralView::DynInitToolbarL( aResourceId, aToolbar );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::DynInitToolbarL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::RunFetchDialogL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::RunFetchDialogL" );
+    iContainer->RunFetchDialogL();
+    if ( iContainer->FileSelected() )
+        {
+        iController->SetFileNameL( iContainer->FetchedFileName() );
+		RefreshView();
+        }
+    else
+        {
+		if ( SendController() && SendController()->IsAudioRoutingLoudSpeaker() )
+            {
+            MusUiDialogUtil::ShowGlobalInformationDialogL(
+                             R_MUS_NOTE_HF_DEACTIVATED );
+            }
+        MusAppUi()->HandleExit();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::RunFetchDialogL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::ShowTranscodingProgressDialogL()
+    {
+    iContainer->ShowTranscodingProgressDialogL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::UpdateClipTranscodingPercentageL( TInt aPercetage )
+    {
+    iContainer->UpdateClipTranscodingPercentageL( aPercetage );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::CancelTranscodingDialogL()
+    {
+    iContainer->CancelTranscodingL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::UpdateClipPositionL( 
+                                        TInt aPositionInSeconds,
+                                        const TDesC& aFormattedPosition )
+    {
+    MUS_LOG_TDESC( "mus: [MUSUI ] -> CMusUiClipSharingView::UpdateClipPositionL: ",
+                   aFormattedPosition );
+    
+    MusAppUi()->MusStatusPane()->SetRightLabelL( aFormattedPosition );
+    iContainer->SetPositionValueL( aPositionInSeconds );
+        
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiClipSharingView::UpdateClipPositionL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::SetDurationValue( TInt aDurationValue )
+    {
+    iContainer->SetDurationValue( aDurationValue );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::SetPositionValueL( TInt aDurationValue )
+    {
+    iContainer->SetPositionValueL( aDurationValue );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::SetDurationVisible()
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingView::SetDurationVisible: %d",
+                            iToolbarItemSelected );
+    if ( !iToolbarItemSelected )
+        {
+        iContainer->SetDurationIndicatorVisible( ETrue );
+        }
+    else
+        {
+        iContainer->SetDurationIndicatorVisible( EFalse );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::SetDurationVisible" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::ReplaceToolbarCommand( TInt aOldCommand, 
+                                                   TInt aNewCommand,
+                                                   TBool aSetNewCommandFocused )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingView::ReplaceToolbarCommand: %d",
+                            aOldCommand );
+    switch ( aOldCommand )
+        {
+        case EMusuiCmdToolbarPause:
+            {
+            iPauseSelected = ETrue;
+            break;
+            }
+        case EMusuiCmdToolbarUnPause:
+            {
+            iPauseSelected = EFalse;
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        
+        }
+
+    // Call base class version for generic part
+    
+    CMusUiGeneralView::ReplaceToolbarCommand( aOldCommand, 
+                                              aNewCommand,
+                                              aSetNewCommandFocused );
+    
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiClipSharingView::ReplaceToolbarCommand: %d",
+                            aOldCommand );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::RefreshView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::RefreshView" );
+    
+    RefreshBackgroundContainer();
+    
+    if ( iContainer )
+        {            
+        TInt height = MusAppUi()->ApplicationRect().Height();
+        MUS_LOG1( "mus: [MUSUI ]  -> application rect height: %d", height );
+        TInt containerHeight = (KMusUiContainerHeight * height) / KDefaultResolutionHeight;
+
+        MUS_LOG1( "mus: [MUSUI ]  -> container rect height: %d", containerHeight );
+        TRect containerRect( 
+                        ClientRect().iTl.iX, 
+                        ClientRect().iBr.iY - ToolbarPlaceHolderHeight() 
+                                            - containerHeight,//KMusUiContainerHeight,
+                        ClientRect().iBr.iX,
+                        ClientRect().iBr.iY - ToolbarPlaceHolderHeight() );
+
+        if (!AknLayoutUtils::PenEnabled())
+        	{
+        	containerRect = TRect(
+        			ClientRect().iTl.iX,
+        			ClientRect().iTl.iY,
+        			ClientRect().iBr.iX,
+        			ClientRect().iTl.iY +  containerHeight );
+        	}
+        iContainer->SetRect( containerRect );
+   
+        if ( iController )
+            {
+            
+            TRect videoRect( ClientRect().iTl.iX,
+                     ClientRect().iTl.iY,
+                     ClientRect().iBr.iX,
+                     ClientRect().iBr.iY - ToolbarPlaceHolderHeight()
+                                         - iContainer->Size().iHeight );
+
+             if (!AknLayoutUtils::PenEnabled())
+             	{
+             	TInt dy = iContainer->Size().iHeight;
+             	videoRect.Move(0, dy);
+            	}
+            iController->SetRect( videoRect );
+
+            }
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::RefreshView" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::CancelTranscodingL()
+    {
+    if ( iController )
+        {
+        iController->CancelTranscodingL();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendController* CMusUiClipSharingView::SendController() const
+    {
+    return iController;
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendViewContainer* CMusUiClipSharingView::SendContainer() const
+    {
+    return iContainer;
+    }
+
+
+// -----------------------------------------------------------------------------
+// From CAknView, Gets called from framework when activating this view
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::DoActivateL( const TVwsViewId& aPrevViewId,
+                                         TUid aCustomMessageId,
+                                         const TDesC8& aCustomMessage )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::DoActivateL" );
+
+    // Base class activation first
+    CMusUiSendView::DoActivateL( aPrevViewId,
+                                 aCustomMessageId,
+                                 aCustomMessage );
+        
+    TInt height = MusAppUi()->ApplicationRect().Height();
+    MUS_LOG1( "mus: [MUSUI ]  -> application rect height: %d", height );
+    TInt containerHeight = (KMusUiContainerHeight * height) / KDefaultResolutionHeight;
+
+    MUS_LOG1( "mus: [MUSUI ]  -> container rect height: %d", containerHeight );  
+    TRect containerRect( 
+        ClientRect().iTl.iX, 
+        ClientRect().iBr.iY - ToolbarPlaceHolderHeight() 
+                            - containerHeight,//KMusUiContainerHeight,
+        ClientRect().iBr.iX,
+        ClientRect().iBr.iY - ToolbarPlaceHolderHeight() );
+                         
+   if (!AknLayoutUtils::PenEnabled())
+        {
+    	containerRect = TRect(
+    			ClientRect().iTl.iX,
+    			ClientRect().iTl.iY,
+    			ClientRect().iBr.iX,
+    			ClientRect().iTl.iY +  containerHeight );
+    	}
+ 
+    if ( !iContainer )
+        {
+        MUS_LOG( "mus: [MUSUI ]  CMusUiClipSharingView::DoActivateL: !iContainer" );
+        iContainer = new ( ELeave ) CMusUiClipSharingViewContainer();
+        iContainer->SetMopParent( this );
+        iContainer->ConstructL( this, containerRect );
+        AppUi()->AddToViewStackL( *this, iContainer );
+        }
+
+    /* Increase the ordinal position of background container
+     * So that other control will be drawn first.     
+     */
+    UpdateBackgroundOrdinalPosition( ETrue );
+        
+    TRect videoRect( ClientRect().iTl.iX,
+                     ClientRect().iTl.iY,
+                     ClientRect().iBr.iX,
+                     ClientRect().iBr.iY - ToolbarPlaceHolderHeight() 
+                                         - iContainer->Size().iHeight );
+
+    if (!AknLayoutUtils::PenEnabled())
+    	{
+    	TInt dy = iContainer->Size().iHeight;
+    	videoRect.Move(0, dy);
+    	}
+    if ( !iController )
+        {
+        MUS_LOG( "mus: [MUSUI ]  CMusUiClipSharingView::DoActivateL: !iController" );
+        iController = CMusUiClipSharingController::NewL( *MusAppUi(),
+                                                         *this, 
+                                                         *this,
+                                                         *this,
+                                                         videoRect );
+        }
+    
+    iContainer->SetController( iController );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::DoActivateL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From AknView, Gets called from framework when deactivating this view
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::DoDeactivate()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::DoDeactivate" );
+    
+    CMusUiSendView::DoDeactivate(); // Base class deactivation first
+    
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        delete iContainer;
+        iContainer = NULL;
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::DoDeactivate" );
+    }
+
+// -----------------------------------------------------------------------------
+// When Mmc is removed, dimmed the pause icon on toolbar
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingView::InvalidVideoFrame( TBool aInvalid )
+	{
+	MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingView::InvalidVideoFrame" );
+	Toolbar()->SetItemDimmed( iPauseSelected ?
+                                EMusuiCmdToolbarUnPause :
+                                EMusuiCmdToolbarPause,
+	                          aInvalid ?
+			                    ETrue :
+								EFalse,
+	                          ETrue ); 
+	MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingView::InvalidVideoFrame" );
+	}
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiclipsharingviewcontainer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,428 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#include "musuidefinitions.h"
+#include "musuiclipsharingviewcontainer.h"
+#include "musuieventcontroller.h"
+#include "musuilevelindicator.h"
+#include "musuiclipsharingview.h"
+#include "musuiappui.h"
+#include "musuidialogutil.h"
+#include "musui.hrh"
+#include "muslogger.h" // debug logging
+#include "mussettings.h"
+#include <musui.rsg>
+
+
+#include <AknsDrawUtils.h>
+#include <AknProgressDialog.h>
+#include <eikprogi.h>                   // CEikProgressInfo
+#include <AknDef.h>
+#include <MGFetch.h>
+#include <MediaFileTypes.hrh>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::ConstructL( CMusUiGeneralView* aView,
+                                                 const TRect& aRect )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::ConstructL" );
+    
+    CMusUiSendViewContainer::ConstructL( aView, 
+                                         aRect,
+                                         EAknOrientationHorizontal,
+                                         ETrue,
+                                         EFalse );
+    // check if operator specific functionality is needed  
+    iOperatorSpecificFunctionality = 
+        ( MultimediaSharingSettings::OperatorVariantSettingL() == 
+                                        MusSettingsKeys::EOperatorSpecific );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingViewContainer::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiClipSharingViewContainer::~CMusUiClipSharingViewContainer()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::~CMusUiClipSharingViewContainer" );
+    
+    delete iFileName;
+
+    TRAP_IGNORE( CancelTranscodingL() );
+
+    if ( iTranscodingDialog )
+        {
+        TRAP_IGNORE( iTranscodingDialog->ProcessFinishedL() );
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingViewContainer::~CMusUiClipSharingViewContainer" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::ShowTranscodingProgressDialogL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::ShowTranscodingProgressDialogL" );
+    iTranscodingOngoing = ETrue;
+    HBufC* transcodText;
+    iTranscodingDialog =
+        new ( ELeave ) CAknProgressDialog(
+            ( reinterpret_cast<CEikDialog**>( &iTranscodingDialog ) ) );
+
+    iTranscodingDialog->SetCallback( this );
+    transcodText = iEikonEnv->AllocReadResourceLC(
+                            R_MUS_PROGRESS_NOTE_CONVERTING_CLIP );
+    iTranscodingDialog->SetCurrentLabelL( EAknCtNote, *transcodText );
+    CleanupStack::PopAndDestroy( transcodText );
+    iTranscodingDialog->ExecuteLD( R_MUS_VIEW_TRANSCODING_WAIT_NOTE );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingViewContainer::ShowTranscodingProgressDialogL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::UpdateClipTranscodingPercentageL(
+                        TInt aPercentage )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::UpdateClipTranscodingPercentageL" );
+    if ( iTranscodingDialog )
+        {
+        if ( aPercentage < KMusOneHundredPercent )
+            {
+            iTranscodingProgress = iTranscodingDialog->GetProgressInfoL();
+            iTranscodingProgress->SetFinalValue( KMusOneHundredPercent );
+            if ( iTranscodingProgress )
+                {
+                iTranscodingProgress->IncrementAndDraw(
+                        aPercentage - iTranscodingProgress->CurrentValue() );
+                }
+            }
+        else
+            {
+            iTranscodingOngoing = EFalse;
+            iTranscodingDialog->ProcessFinishedL();
+            iTranscodingDialog = NULL;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingViewContainer::UpdateClipTranscodingPercentageL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::CancelTranscodingL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::CancelTranscodingL" );
+    if ( iTranscodingOngoing )
+        {
+        iTranscodingOngoing = EFalse;
+        MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingViewContainer::CancelTranscodingL: iTranscodingOngoing" );
+        if ( iTranscodingDialog )
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingViewContainer::CancelTranscodingL: iTranscodingDialog" );
+            iTranscodingDialog->ProcessFinishedL();
+            iTranscodingDialog = NULL;
+            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingViewContainer::CancelTranscodingL: ProcessFinishedL()" );
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingViewContainer::CancelTranscodingL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Runs the Media Gallery Fetch dialog.
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::RunFetchDialogL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::RunFetchDialogL" );
+
+    // Create array of descriptors for the selected files
+    CDesCArrayFlat* fileArray = new ( ELeave ) CDesCArrayFlat( KMusDefaultArrayGranularity );
+    CleanupStack::PushL( fileArray );
+
+    // Open the dialog.
+    TBool ret = MGFetch::RunL(
+        *fileArray, // When dialog is closed, fileArray contains selected files
+        EVideoFile, // Displays only media files of type aMediaType
+        EFalse,     // Not used in S60 2.0 ( single or multiple file selection )
+        this        // Pointer to class implementing MMGFetchVerifier;
+                    // when user has selected file( s ),
+                    // MMGFetchVerifier::VerifySelectionL is called.
+        );
+
+    if ( ret )
+        {
+        iFileSelected = ETrue;
+        iFileName = fileArray->MdcaPoint( 0 ).AllocL();
+        }
+    else
+        {
+        // The user has not selected any file
+        iFileSelected = EFalse;
+        }
+
+    CleanupStack::PopAndDestroy( fileArray );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingViewContainer::RunFetchDialogL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiClipSharingViewContainer::FetchedFileName()
+    {
+    MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingViewContainer::FetchedFileName" );
+    return *iFileName;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingViewContainer::FileSelected()
+    {
+    MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingViewContainer::FileSelected" );
+    return iFileSelected;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::SetDurationValue( TInt aDurationValue )
+    {
+    const TInt KMinLevel = 0;
+    iIndicator->SetRange( KMinLevel, aDurationValue, EFalse );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::SetPositionValueL( TInt aPositionValue )
+    {
+    iIndicator->SetLevelL( EMusUiIndicatorTypeDuration, 
+                           aPositionValue, 
+                           EFalse /*never use timer*/ );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::SetDurationIndicatorVisible( TBool aVisible )
+    {
+    iIndicator->SetIndicatorType(EMusUiIndicatorTypeDuration);
+    iIndicator->MakeVisible( aVisible );
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Verifies the current user selection.
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingViewContainer::VerifySelectionL( const MDesCArray* 
+                                                        aSelectedFiles )
+    {
+    MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingViewContainer::\
+                                VerifySelectionL" );
+    return ( aSelectedFiles->MdcaCount() > 0 ) ? ETrue : EFalse;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::DialogDismissedL( TInt /*aButtonId*/ )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::DialogDismissedL" );
+    if ( iTranscodingOngoing )
+        {
+        (static_cast <CMusUiClipSharingView*>(MusUiView()))->CancelTranscodingL();
+        iTranscodingOngoing = EFalse;
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingViewContainer::DialogDismissedL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework when to retrieve the no. of controls.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiClipSharingViewContainer::CountComponentControls() const
+    {
+    return 1; // return nbr of controls inside this container
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to retrieve the control specified by index.
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CMusUiClipSharingViewContainer::ComponentControl( TInt aIndex ) const
+    {
+    CCoeControl* control = NULL;
+
+    switch ( aIndex )
+        {
+        case 0:
+            control = iIndicator;
+            break;
+        default:
+            break;
+        }
+    return control;
+    }
+
+// -----------------------------------------------------------------------------
+// Called by framework to redraw the screen area.
+// -----------------------------------------------------------------------------
+//
+void CMusUiClipSharingViewContainer::Draw( const TRect& aRect ) const
+    {
+    CWindowGc& gc = SystemGc();
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+    if(!AknsDrawUtils::Background( skin, cc,this,gc,aRect,KAknsDrawParamDefault ))
+        {
+        MUS_LOG( "mus: [MUSUI ]     Skin not valid or not found" );
+        gc.SetBrushColor( iEikonEnv->ControlColor( EColorWindowBackground, *this ) );
+        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+        gc.Clear( aRect );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// Called by framework to act on key events if required.
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CMusUiClipSharingViewContainer::OfferKeyEventL(
+                        const TKeyEvent& aKeyEvent,
+                        TEventCode aType )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::OfferKeyEventL: %d",
+                            aKeyEvent.iCode );
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingViewContainer::OfferKeyEventL: %d",
+                            aKeyEvent.iScanCode );
+
+    TKeyResponse ret( EKeyWasNotConsumed );
+
+    /**
+    * special keys have scancode
+    */
+    switch( aKeyEvent.iScanCode )
+        {
+        // Fast Forward:
+        case EStdKeyUpArrow: // EKeyUpArrow:
+            {                
+            if ( !MUS_NO_TOOLBAR )
+                {
+            if( aType == EEventKeyDown )
+                {
+                (static_cast <CMusUiClipSharingView*>
+                        (MusUiView()))->HandleCommandL( EMusuiCmdViewFastForward );
+                }
+
+            if( aType == EEventKeyUp )
+                {
+                (static_cast <CMusUiClipSharingView*>
+                        (MusUiView()))->HandleCommandL( EMusuiCmdViewFastForwardEnd );
+                    }
+                }
+            return EKeyWasConsumed;
+            }
+
+        // Fast Reverse:
+        case EStdKeyDownArrow: // EKeyDownArrow:
+            {
+            if ( !MUS_NO_TOOLBAR )
+            {
+            if( aType == EEventKeyDown )
+                {
+                (static_cast <CMusUiClipSharingView*>
+                            (MusUiView()))->HandleCommandL( EMusuiCmdViewFastReverse );
+                }
+            if( aType == EEventKeyUp )
+                {
+                (static_cast <CMusUiClipSharingView*>
+                            (MusUiView()))->HandleCommandL( EMusuiCmdViewFastReverseEnd );
+                    }
+                }
+            return EKeyWasConsumed;
+            }
+        default:
+            {
+            ret = EKeyWasNotConsumed;
+            break;
+            }
+        }
+
+
+    switch ( aKeyEvent.iCode )
+        {
+        // Volume Control
+        case EKeyLeftArrow:
+            {
+            (static_cast <CMusUiClipSharingView*>
+                    (MusUiView()))->HandleCommandL( EMusuiCmdViewVolumeDown );
+            ret = EKeyWasConsumed;
+            break;
+            }
+        case EKeyRightArrow:
+            {
+            (static_cast <CMusUiClipSharingView*>
+                    (MusUiView()))->HandleCommandL( EMusuiCmdViewVolumeUp );
+            ret = EKeyWasConsumed;
+            break;
+            }
+
+        default:
+            {
+            ret = EKeyWasNotConsumed;
+            break;
+            }
+        }
+    
+    return ret;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuicontactutil.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,388 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "musuicontactutil.h"
+#include "musuidefinitions.h"
+#include "muslogger.h"
+#include "musenguriparser.h"
+#include "musuid.hrh"
+
+#include <RPbkViewResourceFile.h>         // Phonebook view resource
+#include <CPbkContactEditorDlg.h>
+#include <CPbkFieldsInfo.h>
+#include <TPbkContactItemField.h>
+
+#include <cntdb.h>
+#include <cntitem.h>
+#include <cntfield.h>
+#include <cntdef.h>
+#include <cntfldst.h>
+#include <CPbkContactEngine.h>
+#include <apgtask.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool MusUiContactUtil::ShareViewFieldExistsL( CCoeEnv& aEnv, TInt aContactId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> MusUiContactUtil::ShareViewFieldExistsL" );
+
+    TBool ret( EFalse );
+
+    RPbkViewResourceFile pbkResourceFile( aEnv );
+    CleanupClosePushL( pbkResourceFile );
+    pbkResourceFile.OpenL();
+    CPbkContactEngine* pbkContactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( pbkContactEngine );
+    CPbkContactItem* contactItem = NULL;
+    CleanupStack::PushL( contactItem );
+    if ( aContactId > 0 )
+        {
+        contactItem = pbkContactEngine->OpenContactL( aContactId );
+        if ( contactItem->FindField( EPbkFieldIdShareView ) )
+            {
+            MUS_LOG( "mus: [MUSUI ]  EPbkFieldIdShareView found!!" );
+            ret = ETrue;
+            }
+        else if ( contactItem->FindField( EPbkFieldIdSIPID ) )
+            {
+            MUS_LOG( "mus: [MUSUI ]  EPbkFieldIdSIPID found, NOT EPbkFieldIdShareView defined!!!" );
+            ret = ETrue;
+            }
+        else
+            {
+            ret = EFalse;
+            }
+        }
+    else
+        {
+        ret = EFalse;
+        }
+    CleanupStack::PopAndDestroy( 3 );   // contactItem, pbkContactEngine, &pbkResourceFile    
+    MUS_LOG( "mus: [MUSUI ]  <- MusUiContactUtil::ShareViewFieldExistsL" );
+    return ret;
+
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool MusUiContactUtil::CheckPbContactForVSAddressesL(	CCoeEnv& aEnv,
+														const TDesC& aOriginator,
+														TInt aContactId)
+{
+	MUS_LOG( "mus: [MUSUI ]  -> MusUiContactUtil::CheckPbContactForVSAddressesL" );
+	
+	TBool sipAddrMatches(EFalse);
+	TBool shareViewAddrMatches(EFalse);
+	TBool ret(EFalse);
+	
+	if(MatchTextWithPbFieldsL(aEnv, EPbkFieldIdSIPID, aOriginator, aContactId))
+    	{
+    	sipAddrMatches=ETrue;	
+    	}
+	if(MatchTextWithPbFieldsL(aEnv, EPbkFieldIdShareView, aOriginator, aContactId))
+	    {
+	    shareViewAddrMatches=ETrue;	
+    	}
+	
+	if(aOriginator.Find(KMusPrefixSipUri) != KErrNotFound)
+	    {
+    	//pb field without sip:-prefix are checked.
+    	HBufC * withoutPrefix;
+    	withoutPrefix = HBufC::NewLC(aOriginator.Length());
+    	*withoutPrefix = aOriginator;
+    	TPtr ptr = withoutPrefix->Des();
+    	ptr.Delete(0,KMusPrefixMaxLength);
+	
+    	if(MatchTextWithPbFieldsL(aEnv, EPbkFieldIdSIPID, *withoutPrefix, aContactId))
+        	{
+        	sipAddrMatches=ETrue;	
+        	}
+    	if(MatchTextWithPbFieldsL(aEnv, EPbkFieldIdShareView, *withoutPrefix, aContactId))
+        	{
+        	shareViewAddrMatches=ETrue;	
+        	}
+    	
+    	CleanupStack::PopAndDestroy(withoutPrefix);
+	    }
+        
+    if(sipAddrMatches||shareViewAddrMatches)
+        {
+        ret=ETrue;	
+        }
+    else
+        {
+        ret=EFalse;	
+        }
+    
+	MUS_LOG( "mus: [MUSUI ]  -> MusUiContactUtil::CheckPbContactForVSAddressesL" );
+	return ret;
+}
+// -----------------------------------------------------------------------------
+// @function MatchTextWithPbFieldsL 
+// searches all contactId´s fieldIds of same type for a text
+// returns ETrue if text is found from at least one of them.   
+// -----------------------------------------------------------------------------
+//
+TBool MusUiContactUtil::MatchTextWithPbFieldsL( CCoeEnv& aEnv,
+											   TPbkFieldId aFieldId,
+											   const TDesC& aText,
+											   TInt aContactId )
+{
+	MUS_LOG( "mus: [MUSUI ]  -> MusUiContactUtil::MatchTextWithPbFieldsL" );
+	
+	TBool textMatch(EFalse);
+	
+	RPbkViewResourceFile pbkResourceFile(aEnv);
+	CleanupClosePushL( pbkResourceFile );
+    pbkResourceFile.OpenL();
+	CPbkContactEngine* pbkContactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( pbkContactEngine );
+	CPbkContactItem* contactItem = NULL;
+    CleanupStack::PushL( contactItem );
+
+	if ( aContactId > 0 )
+        {
+		contactItem = pbkContactEngine->OpenContactL( aContactId );	
+     	
+     	TInt index(0);
+  
+       		while(index!=KErrNotFound)
+       			{
+       			TPbkContactItemField* contactItemField = 
+       								contactItem->FindField( aFieldId, index );
+			        
+			    if( contactItemField )
+			    	{
+				    if( contactItemField->Text() == aText && !textMatch )
+				    	{
+				    	textMatch=ETrue;	
+				    	}
+				   	}
+
+				if( index != KErrNotFound ) 
+					{
+					index++;	       	
+					}
+	       		}
+	       		
+		}
+
+	CleanupStack::PopAndDestroy( 3 );   // contactItem, pbkContactEngine, &pbkResourceFile    
+
+	MUS_LOG( "mus: [MUSUI ] <- MusUiContactUtil::MatchTextWithPbFieldsL" );
+	return textMatch;
+		
+}
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiContactUtil::ActivateContactViewL( CCoeEnv& aEnv, 
+                                             TContactItemId aId, 
+                                             const TDesC& aTypedAddress, 
+                                             const TDesC& aMusTelNumberValue )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> MusUiContactUtil::ActivateContactViewL" );
+    RPbkViewResourceFile pbkResourceFile( aEnv );
+    CleanupClosePushL( pbkResourceFile );
+    pbkResourceFile.OpenL();
+    CPbkContactEngine* pbkContactEngine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( pbkContactEngine );
+    
+    CPbkContactItem* contactItem = NULL;
+    CleanupStack::PushL( contactItem );
+    
+    if ( aId > 0 )
+        {
+        MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::ActivateContactViewL\
+                  TContactItemId > 0 => Opening Existing Contact..." );
+        contactItem = pbkContactEngine->OpenContactL( aId );
+        EditContactL( *contactItem, 
+                      EFalse, 
+                      pbkContactEngine, 
+                      aTypedAddress, 
+                      aMusTelNumberValue, 
+                      aId );
+        }
+    else
+        {
+        MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::ActivateContactViewL\
+                  TContactItemId < 1 => Creating new Contact..." );
+        contactItem = pbkContactEngine->CreateEmptyContactL();
+        EditContactL( *contactItem, 
+                      ETrue, 
+                      pbkContactEngine, 
+                      aTypedAddress, 
+                      aMusTelNumberValue, 
+                      aId );
+        }
+
+    CleanupStack::PopAndDestroy( 3 );   // contactItem, pbkContactEngine, &pbkResourceFile
+    MUS_LOG( "mus: [MUSUI ]  <- MusUiContactUtil::ActivateContactViewL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiContactUtil::EditContactL( CPbkContactItem& aContact,
+                                     TBool aNewOne,
+                                     CPbkContactEngine* aPbkContactEngine,
+                                     const TDesC& aTypedAddress,
+                                     const TDesC& aMusTelNumberValue,
+                                     TContactItemId aContactId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> MusUiContactUtil::EditContactL" );
+
+    TMusEngUriParser parser( aTypedAddress );
+    parser.ParseUriL();
+    HBufC* uri = NULL;
+    CleanupStack::PushL( uri );
+
+    CContactTextField* addressField = NULL;
+    CleanupStack::PushL( addressField );
+
+    if ( parser.UriType() == TMusEngUriParser::ESip )
+        {
+        MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditContactL\
+                                parser.UriType() == TMusEngUriParser::ESip" );
+        addressField = EditableContactFieldL(
+                            aContact,
+                            EPbkFieldIdShareView,
+                            aPbkContactEngine );
+        uri = parser.GetUri16L( ETrue );
+        }
+    else if ( parser.UriType() == TMusEngUriParser::ETel )
+        {
+        MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditContactL\
+                                parser.UriType() == TMusEngUriParser::ETel" );
+        addressField = EditableContactFieldL(
+                            aContact,
+                            EPbkFieldIdPhoneNumberMobile,
+                            aPbkContactEngine );
+        uri = parser.GetUri16L( EFalse );
+        }
+
+    if ( addressField )
+        {
+        MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditContactL\
+                                addressField OK" );
+        addressField->SetTextL( *uri );
+        }
+
+    if ( ( aMusTelNumberValue.Length() > 0 ) && aContactId == KErrNotFound )
+        {
+        MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditContactL\
+                                !iPhoneNumberFieldFound" );
+        CContactTextField* phoneNumberField = EditableContactFieldL(
+                                aContact,
+                                EPbkFieldIdPhoneNumberMobile,
+                                aPbkContactEngine );
+        if ( phoneNumberField )
+            {
+            MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditContactL\
+                                    phoneNumberField OK" );
+            phoneNumberField->SetTextL( aMusTelNumberValue );
+            }
+        }
+
+    MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditContactL: Creating dialog..." );
+
+    // Bring MuSh UI foreground
+    RWsSession wsSession;
+    User::LeaveIfError( wsSession.Connect() );
+    CleanupClosePushL( wsSession );
+    TApaTaskList taskList( wsSession );
+    TUid appUid;
+    appUid.iUid = KMusUiUid;
+    TApaTask task = taskList.FindApp( appUid );
+    task.BringToForeground();
+    CleanupStack::PopAndDestroy( &wsSession );
+    
+    // Launch pbk new entry editor dlg
+    CPbkContactEditorDlg* editorDlg =  CPbkContactEditorDlg::NewL(
+                            *aPbkContactEngine,
+                            aContact,
+                            aNewOne,
+                            -1, // Move focus to the topmost field
+                            ETrue );
+    editorDlg->ResetWhenDestroyed( &editorDlg );
+    editorDlg->HideExitCommand();
+    editorDlg->ExecuteLD();
+    
+    CleanupStack::Pop( 2 );   // uri, addressField
+
+    MUS_LOG( "mus: [MUSUI ]  <- MusUiContactUtil::EditContactL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Get editable contact field.
+// -----------------------------------------------------------------------------
+//
+CContactTextField* MusUiContactUtil::EditableContactFieldL(
+                        CPbkContactItem& aContact,
+                        TInt aFieldId,
+                        CPbkContactEngine* aPbkContactEngine )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> MusUiContactUtil::EditableContactFieldL" );
+
+    // Get fields info from pbk engine
+    const CPbkFieldsInfo& fieldsInfo = aPbkContactEngine->FieldsInfo();
+
+    // Try to get the SIP URI storage field for this contact
+    TPbkContactItemField* itemField = aContact.FindField( aFieldId );
+
+    if ( !itemField )
+        {
+        MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditableContactFieldL: !itemField" );
+        CPbkFieldInfo* fieldInfo = fieldsInfo.Find( aFieldId );
+        // Add field to this contact
+        if ( fieldInfo )
+            {
+            MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditableContactFieldL\
+                            fieldInfo OK" );
+            // Contact takes ownership of the field.
+            aContact.AddFieldL( *fieldInfo );
+            itemField = aContact.FindField( aFieldId );
+            return ( itemField ) ? itemField->TextStorage() : NULL;
+            }
+        else
+            {
+            MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditableContactFieldL\
+                            fieldInfo == NULL" );
+            return NULL;
+            }
+        }
+    else
+        {
+        // Does not pass ownership.
+        MUS_LOG( "mus: [MUSUI ]     MusUiContactUtil::EditableContactFieldL\
+                        itemField OK" );
+        return itemField->TextStorage();
+        }
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuidialogutil.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,193 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "musuidialogutil.h"
+#include <musui.rsg>
+
+#include <AknGlobalConfirmationQuery.h>
+#include <aknnotewrappers.h>
+#include <AknGlobalNote.h>
+#include <aknlistquerydialog.h>
+#include <StringLoader.h>
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool MusUiDialogUtil::ShowGlobalConfirmationQueryDialogL( const TDesC& aPrompt )
+    {
+	CAknGlobalConfirmationQuery* dlg = CAknGlobalConfirmationQuery::NewLC();
+	TRequestStatus status;
+	dlg->ShowConfirmationQueryL( status, aPrompt, R_AVKON_SOFTKEYS_YES_NO );
+	User::WaitForRequest( status );
+	CleanupStack::PopAndDestroy( dlg );
+    return ( status == EAknSoftkeyYes ) ? ETrue : EFalse;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiDialogUtil::ShowInformationDialogL( const TDesC& aPrompt )
+    {
+    CAknInformationNote* dlg = new ( ELeave ) CAknInformationNote( ETrue );
+    dlg->ExecuteLD( aPrompt );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiDialogUtil::ShowInformationDialogL( TInt aResourceId )
+    {
+    HBufC* dlgPrompt = StringLoader::LoadLC( aResourceId );
+    ShowInformationDialogL( *dlgPrompt );
+    CleanupStack::PopAndDestroy( dlgPrompt );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiDialogUtil::ShowGlobalInformationDialogL( const TDesC& aMessage )
+    {
+    TRequestStatus status;
+    CAknGlobalNote* dlg= CAknGlobalNote::NewLC();
+    dlg->ShowNoteL( status, EAknGlobalInformationNote, aMessage );
+    User::WaitForRequest( status );
+    CleanupStack::PopAndDestroy( dlg );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiDialogUtil::ShowGlobalInformationDialogL( TInt aResourceId )
+    {
+    HBufC* dlgPrompt = StringLoader::LoadLC( aResourceId );
+	ShowGlobalInformationDialogL( *dlgPrompt );
+    CleanupStack::PopAndDestroy( dlgPrompt );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiDialogUtil::ShowGlobalErrorDialogL( const TDesC& aMessage )
+    {
+    CAknGlobalNote* dlg = CAknGlobalNote::NewLC();
+    dlg->ShowNoteL( EAknGlobalErrorNote, aMessage );
+    CleanupStack::PopAndDestroy( dlg );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiDialogUtil::ShowGlobalErrorDialogL( TInt aResourceId )
+    {
+    HBufC* dlgPrompt = StringLoader::LoadLC( aResourceId );
+    ShowGlobalErrorDialogL( *dlgPrompt );
+    CleanupStack::PopAndDestroy( dlgPrompt );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiDialogUtil::ShowGlobalErrorModalDialogL( const TDesC& aMessage )
+    {
+    CAknGlobalNote* dlg = CAknGlobalNote::NewLC();
+    TRequestStatus status;
+    dlg->ShowNoteL( status , EAknGlobalErrorNote, aMessage );
+    User::WaitForRequest( status );
+    CleanupStack::PopAndDestroy( dlg );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiDialogUtil::ShowGlobalErrorModalDialogL( TInt aResourceId )
+    {
+    HBufC* dlgPrompt = StringLoader::LoadLC( aResourceId );
+    ShowGlobalErrorModalDialogL( *dlgPrompt );
+    CleanupStack::PopAndDestroy( dlgPrompt );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool MusUiDialogUtil::SelectAddressDialogL( CDesCArray* aAddressArray,
+                                             TDes& aSelectedAddress )
+    {
+    __ASSERT_ALWAYS( aAddressArray, User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS( aAddressArray->Count() > 0, User::Leave( KErrArgument ) );
+    
+    TInt selectedIndex( 0 );
+    CAknListQueryDialog* dlg = new ( ELeave ) CAknListQueryDialog( &selectedIndex );
+    dlg->PrepareLC( R_MUS_LIVESHARINGVIEW_ADDRESS_QUERY );
+    dlg->SetItemTextArray( aAddressArray );
+    dlg->SetOwnershipType( ELbmDoesNotOwnItemArray );
+    TInt dlgResponse( dlg->RunLD() );
+    aSelectedAddress = (*aAddressArray)[ selectedIndex ];
+    delete aAddressArray;
+    aAddressArray = NULL;
+    return dlgResponse;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool MusUiDialogUtil::ShowTextQueryDialogL( const TDesC& aPrompt, TDes& aValue )
+    {
+    CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL( aValue );
+    CleanupStack::PushL( dlg );
+    dlg->SetPromptL( aPrompt );
+    CleanupStack::Pop( dlg );
+    return dlg->ExecuteLD( R_MUS_TEXT_QUERY_DIALOG );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool MusUiDialogUtil::ShowTextQueryDialogL( TInt aPromptResourceId, TDes& aValue )
+    {
+    TBool retval( EFalse );
+    HBufC* dlgPrompt = StringLoader::LoadLC( aPromptResourceId );
+    retval = ShowTextQueryDialogL( *dlgPrompt, aValue );
+    CleanupStack::PopAndDestroy( dlgPrompt );
+    return retval;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuidocument.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Document class of MUS App.
+*
+*/
+
+
+
+#include "musuidocument.h"        // Header for this class
+#include "musuiappui.h"           // Application UI class
+
+#include <AknGlobalNote.h>
+#include <musui.rsg>
+
+
+// -----------------------------------------------------------------------------
+// CMusUiDocument::CMusUiDocument
+// C++ default constructor.
+// -----------------------------------------------------------------------------
+CMusUiDocument::CMusUiDocument( CEikApplication& aApp ) : CAknDocument( aApp )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiDocument::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+CMusUiDocument* CMusUiDocument::NewL( CEikApplication& aApp )
+    {
+    CMusUiDocument* self = new( ELeave ) CMusUiDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiDocument::ConstructL
+// Symbian 2nd phase constructor.
+// -----------------------------------------------------------------------------
+void CMusUiDocument::ConstructL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiDocument::~CMusUiDocument
+// Destructor.
+// -----------------------------------------------------------------------------
+CMusUiDocument::~CMusUiDocument()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiDocument::CreateAppUiL()
+// Constructs CMusUiAppUi.
+// -----------------------------------------------------------------------------
+CEikAppUi* CMusUiDocument::CreateAppUiL()
+    {
+    return new ( ELeave ) CMusUiAppUi( );
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuieventcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,1124 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Application's UI class.
+*
+*/
+
+
+
+#include "musuieventcontroller.h"
+#include "musuieventobserver.h"
+#include "musuisharingobserver.h"
+#include "musuipropertywatch.h"
+#include "musuicallbackservice.h"
+#include "musuiactivitymanger.h"
+#include "musuifileutil.h"
+#include "musuidialogutil.h"
+#include "musuicontactutil.h"
+#include "mussessionproperties.h"
+#include "musuibitmapdecoder.h"
+#include "muscommon.h"
+#include "mussettings.h"
+#include "musenguriparser.h"
+#include "musuimmcmonitor.h"
+#include "musresourceproperties.h"
+#include "musuiresourcehandler.h"
+#include "musui.hrh"
+#include "muslogger.h" // debug logging
+#include "musuigeneralview.h"
+
+#include "musengmcesession.h"
+
+#include <musui.rsg>
+
+#include <fbs.h>
+#include <e32property.h>
+
+#include <StringLoader.h>
+#include <pathinfo.h>
+#include <featmgr.h>
+#include <bldvariant.hrh> // for feature definitions
+#include <pathconfiguration.hrh>
+
+#include <hlplch.h> // HlpLauncher
+#include <AknUtils.h>
+#include <telmicmutestatuspskeys.h>
+
+using namespace MusSettingsKeys;
+using namespace NMusSessionApi;
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiEventController::~CMusUiEventController()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::~CMusUiEventController" );
+    delete iStatusPropertyWatch;    
+    delete iContactName;
+    delete iTelNumber;
+    delete iVideoCodec;
+    delete iDialogPrompt;
+    delete iCallbackService;
+    delete iMmcMonitor;
+    delete iActivityManager;
+    delete iMicMuteStatusPropertyWatch;
+    FeatureManager::UnInitializeLib();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::~CMusUiEventController" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::ConstructL()
+    {
+   MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::ConstructL" );
+
+    TInt error( KErrNotFound );
+
+    FeatureManager::InitializeLibL();
+
+    iCallbackService = CMusUiCallbackService::NewL( *this );
+
+    // read ps properties (no need to read again later)
+
+    TRAP( error, iVideoCodec = CMusUiPropertyWatch::ReadDescPropertyL(
+                            KVideoCodecs ) );
+    if ( error != KErrNone )
+        {
+        iVideoCodec = KNullDesC().AllocL();
+        }
+
+    TRAP( error, iTelNumber = CMusUiPropertyWatch::ReadDescPropertyL(
+                            KTelNumber ) );
+    if ( error != KErrNone )
+        {
+        iTelNumber = KNullDesC().AllocL();
+        }
+
+    TRAP( error, iSipProfileId = CMusUiPropertyWatch::ReadIntPropertyL(
+                            NMusSessionApi::KSipProfileId ) );
+    if ( error != KErrNone )
+        {
+        iSipProfileId = KErrNotFound;
+        }
+
+    TRAP( error,
+          iContactId = CMusUiPropertyWatch::ReadIntPropertyL( KContactId ) );
+    if ( error != KErrNone )
+        {
+        iContactId = KErrNotFound;
+        }
+
+    TRAP( error, iContactName = CMusUiPropertyWatch::ReadDescPropertyL(
+                            KContactName ) );
+
+    if ( error != KErrNone )
+        {
+        iContactName = KNullDesC().AllocL();
+        }
+    
+    // follow session status property
+    iStatusPropertyWatch = CMusUiPropertyWatch::NewL(
+                            *this,
+                            NMusSessionApi::KCategoryUid,
+                            KStatus );
+
+    iMmcMonitor = CMusUiMmcMonitor::NewL( *this );
+
+    iResourceHandler = iEventObserver.ResourceHandler();
+    __ASSERT_ALWAYS( iResourceHandler, User::Leave( KErrNotFound ) );
+    
+    //Mic mute status property
+    iMicMuteStatusPropertyWatch = CMusUiPropertyWatch::NewL(
+							*this,
+							KPSUidTelMicrophoneMuteStatus,
+							KTelMicrophoneMuteState );
+
+    // start monitoring activity
+    iActivityManager = CMusUiActivityManager::NewL( KMusBacklightTimeOut );
+    iActivityManager->Reset();
+
+    // check if operator specific functionality is needed  
+    iOperatorSpecificFunctionality = 
+        ( MultimediaSharingSettings::OperatorVariantSettingL() == 
+                                                    EOperatorSpecific );
+
+    iShutdownState = EMusUiShutdownNotDefined;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiEventController::CMusUiEventController(
+                            MMusUiEventObserver& aEventObserver,
+                            MMusUiSharingObserver& aSharingObserver )
+    : iEventObserver( aEventObserver ),
+      iSharingObserver( aSharingObserver ),
+	  iForeground( ETrue ),
+	  iShowDialog( EFalse ),
+	  iActiveCall( ETrue )
+	  
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by CMusUiPropertyWatch, when resource key values change in P&S
+// Sets the member values common to all sharing types.
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::PropertyChanged( const TUint aKey,
+                                                     const TInt aValue )
+    {
+    MUS_LOG2( "mus: [MUSUI ] -> CMusUiEventController::ResourcePropertyChanged:\
+              aKey: [%u] aValue: [%d]", aKey, aValue );
+    switch( aKey )
+        {
+    	case KTelMicrophoneMuteState:
+    		{
+		  if ( aValue ==  EPSTelMicMuteOff)
+			  {
+			  iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnmute,
+												   EMusuiCmdToolbarMute,ETrue );
+			  }
+		  else if ( aValue == EPSTelMicMuteOn )
+			  {
+			  iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarMute,
+												 EMusuiCmdToolbarUnmute,ETrue );
+			  }
+			break;
+    		}
+        case KStatus:
+            {
+            TRAP_IGNORE(
+                    HandleChangedStatusL( ( TMusAvailabilityStatus ) aValue ) );
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::ResourcePropertyChanged" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::HandlePropertyError( const TInt aReason )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiEventController::HandleError [%d]",
+                            aReason );
+    
+    HandleError( aReason );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::HandleError" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::HandleAsyncEventL( TMusUiAsyncEvent aEventId )
+    {
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiEventController::HandleAsyncEventL [%d]",
+              aEventId );
+    
+    switch ( aEventId )
+        {
+        case EMusUiAsyncHandleExit:
+            {
+            MUS_LOG( "mus: [MUSUI ]   CMusUiEventController::\
+                                    HandleAsyncEventL: EMusUiAsyncHandleExit" );
+            HandleExitL();
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiEventController::HandleAsyncEventL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiEventController::HandleAsyncError( TInt aError )
+    {
+    iEventObserver.HandleError( aError ); // Stop the execution
+    
+    return KErrNone;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::MmcRemoved()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::MmcRemoved" );
+    TRAP_IGNORE( MusUiDialogUtil::ShowInformationDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_SHARING_ENDED ) )
+                            
+    iEventObserver.HandleExit();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::MmcRemoved" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::SessionEstablished()
+    {
+    TRAPD( error, iSharingObserver.ShowStatusPaneTitleL() )
+    
+    if ( error != KErrNone )    
+        {
+        iEventObserver.HandleError( error );
+        }
+
+    if ( MUS_NO_TOOLBAR )
+        {
+        TRAPD( error, iSharingObserver.EnableMiddleSoftkeyL( IsLoudSpeakerEnabled() ? 
+                            R_MUSUI_VIEW_OPS_MSK_IHF_OFF :
+                            R_MUSUI_VIEW_OPS_MSK_IHF_ON ));
+        if ( error != KErrNone )    
+            {
+            iEventObserver.HandleError( error );
+            }        
+        }
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::AudioRoutingChanged( TBool aShowNote )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::AudioRoutingChanged" );
+    
+    if ( aShowNote )
+        {
+        if ( IsLoudSpeakerEnabled() )
+            {
+            MUS_LOG( "mus: [MUSUI ]     show activated note" );
+            TRAP_IGNORE( 
+            	MusUiDialogUtil::ShowGlobalInformationDialogL( R_MUS_NOTE_HF_ACTIVATED ) )
+            }
+        }
+    
+    iSharingObserver.RefreshAudioRoutingToolbarButton();
+      
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::AudioRoutingChanged" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::AudioRouteChangeAllowed() const
+    {
+    // Do not allow audio routing if call has ended
+    return iActiveCall;
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::VolumeChanged( TInt aVolume, TBool aAudioRouteChanged )
+    {
+    // Set Volume:
+    //If volume changed due to audio route change, we want to update volume
+    //popup control only if it is already visible
+    TBool onlyIfVisible = aAudioRouteChanged;
+    TRAP_IGNORE( iSharingObserver.ActivateVolumeControlL(aVolume, onlyIfVisible) );
+    }
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::SetRect(const TRect& aRect)
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::SetRect" );
+    
+    if ( EngineSession() )
+        {
+        TRAPD( err, EngineSession()->SetRectL( aRect ) );
+        if ( err != KErrNone )
+            {
+            iEventObserver.HandleError( err );
+            }
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::SetRect" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiEventController::MusContactName()
+    {
+    return *iContactName;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiEventController::MusVideoCodecValue()
+    {
+    return *iVideoCodec;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiEventController::MusTelNumberValue()
+    {
+    MUS_LOG_TDESC("mus: [MUSUI ] <> CMusUiEventController::MusTelNumberValue()",
+                   iTelNumber->Des() )
+    return *iTelNumber;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiEventController::SessionTimeFormatted(
+                        const TTimeIntervalSeconds& aSeconds )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::SessionTimeFormatted" );
+    iTimeBuffer.SetLength( 0 );
+    TLocale locale;
+    _LIT( KZeroSymbol, "0" );
+    TInt sessionHours( 0 );
+    TInt sessionMinutes( 0 );
+    TInt sessionSeconds( aSeconds.Int() );
+    if ( aSeconds.Int() > ( KMusOneMinuteInSeconds - 1 ) )
+        {
+        sessionMinutes = (int)(aSeconds.Int() / KMusOneMinuteInSeconds );
+        sessionSeconds = sessionSeconds - ( sessionMinutes * KMusOneMinuteInSeconds );
+        }
+    if ( sessionMinutes > ( KMusOneMinuteInSeconds - 1 ) )
+        {
+        sessionHours = (int)( sessionMinutes / KMusOneMinuteInSeconds );
+        sessionMinutes = sessionMinutes - ( sessionHours * KMusOneMinuteInSeconds );
+        }
+    if ( sessionHours != 0 )
+        {
+        iTimeBuffer.AppendNum( sessionHours );
+        iTimeBuffer.Append( locale.TimeSeparator( KMusLocaleHoursAndMinutesSeparator ) );
+        if ( sessionMinutes < KMusNumberValueTen )
+            {
+            iTimeBuffer.Append( KZeroSymbol );
+            }
+        }
+
+    iTimeBuffer.AppendNum( sessionMinutes );
+    iTimeBuffer.Append( locale.TimeSeparator( KMusLocaleMinutesAndSecondsSeparator ) );
+    if ( sessionSeconds < KMusNumberValueTen )
+        {
+        iTimeBuffer.Append( KZeroSymbol );
+        }
+    iTimeBuffer.AppendNum( sessionSeconds );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::SessionTimeFormatted" );
+    return iTimeBuffer;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::SaveContactQueryL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::SaveContactQueryL" );
+    if ( !MusUiContactUtil::ShareViewFieldExistsL( *iEventObserver.EikonEnv(), 
+                                                   iContactId ) )
+        {
+        delete iDialogPrompt;
+        iDialogPrompt = NULL;
+        iDialogPrompt = StringLoader::LoadL( R_MUS_VIEW_SAVE_ADDRESS_QUERY_TXT );
+        iEventObserver.ShowAsyncConfirmationQueryDialogL( *iDialogPrompt );
+        }
+    else
+        {
+        AsyncQueryDialogAcceptedL( EFalse );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::SaveContactQueryL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::HandleError( const TInt aError )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiEventController::HandleError %d", 
+              aError );
+
+    iEventObserver.HandleError( aError );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::HandleError" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::ExitOccured()
+    {
+    return ( iShutdownState != EMusUiShutdownNotDefined );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::AudioRoutingCanBeChanged()
+    {
+    return ( EngineSession() && EngineSession()->AudioRoutingCanBeChanged() );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::IsLoudSpeakerEnabled()
+    {
+    return ( EngineSession() && EngineSession()->IsLoudSpeakerEnabled() );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::DeviceHasDedicatedVolumeKeys()
+    {
+    return FeatureManager::FeatureSupported( KFeatureIdSideVolumeKeys );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::HandleExitL( TBool aTerminateCall )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::HandleExitL" );
+    if ( iShutdownState == EMusUiShutdownNotDefined )
+        {
+        iShutdownState = EMusUiShutdownStarted;
+        
+        if ( iStatusPropertyWatch )
+            {
+            iStatusPropertyWatch->Cancel();    
+            }
+        
+        if ( iMmcMonitor )
+            {
+            iMmcMonitor->Cancel();    
+            }
+        
+        if ( iActivityManager )
+            {
+            iActivityManager->Cancel();    
+            }
+        
+        if ( iCallbackService )
+            {
+            iCallbackService->Cancel();    
+            }
+
+        iEventObserver.SetToolbarVisibility( EFalse );
+        
+        // This must be done before showing the end note, because showing of
+        // note may cause the session to continue for extra few seconds.
+        DeleteEngineSession();
+        if ( iShowDialog )
+        	{
+            MusUiDialogUtil::ShowGlobalInformationDialogL( 
+            		                 R_MUS_NOTE_HF_DEACTIVATED );
+        	}
+        // Sharing Ended note
+        MusUiDialogUtil::ShowGlobalInformationDialogL( 
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_SHARING_ENDED );
+        
+        if( aTerminateCall )
+			{
+			iEventObserver.TerminateCall();
+			}
+
+        // TODO: Continue Recording query, if sharing live video and receiving end
+        //    terminates the sharing session
+
+        ExitProcedureL( EFalse );
+
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::HandleExitL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::ExitProcedureL( TBool aUserAcceptance )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::ExitProcedureL" );
+    
+    iSharingObserver.DismissMenuBar();
+    
+    switch ( iShutdownState )
+        {
+        case EMusUiShutdownStarted: 
+            {
+            MUS_LOG( "mus: [MUSUI ]     ExitProcedureL: EMusUiShutdownStarted" );
+            // No general functionality, skip the state
+            iShutdownState = EMusUiShutdownVideoSaved;
+            ExitProcedureL( EFalse );
+            break;
+            }
+        case EMusUiShutdownVideoSaved:
+            {
+            MUS_LOG( "mus: [MUSUI ]     ExitProcedureL: EMusuiShutdownVideoSaved" );
+            iEventObserver.HandleExit();
+            break;
+            }
+
+        case EMusUiShutdownContactSavingQueried:
+            {
+            MUS_LOG( "mus: [MUSUI ]     ExitProcedureL: EMusUiShutdownContactSavingQueried" );
+            // Stop app execution
+            if ( aUserAcceptance )
+                {
+                if ( iResourceHandler->RequestKeypadL( EFalse ) )
+                	{
+                		MusUiContactUtil::ActivateContactViewL( 
+                                                    *iEventObserver.EikonEnv(), 
+                                                    iContactId, 
+                                                    TypedAddress(), 
+                                                    MusTelNumberValue() );
+                	}
+                }
+            iEventObserver.HandleExit();
+            break;
+            }
+        case EMusUiShutdownOver:
+            {
+            iEventObserver.HandleExit();
+            break;
+            }
+        case EMusUiShutdownNotDefined:
+        default:
+            {
+            break;
+            }
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::ExitProcedureL" );
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::AsyncQueryDialogAcceptedL( TBool aAccepted )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::AsyncQueryDialogAcceptedL" );
+    
+    if ( ExitOccured() )
+        {
+        ExitProcedureL( aAccepted );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::AsyncQueryDialogAcceptedL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::ConnectionEstablished() const
+    {
+    return iConnectionEstablished;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::SetConnectionInitialized( 
+    TBool aConnectionInitialized )
+    {
+    MUS_LOG1( 
+        "mus: [MUSUI ]  -> CMusUiEventController::SetConnectionInitialized ( %d )", 
+        aConnectionInitialized );
+    
+    iConnectionInitialized = aConnectionInitialized;
+    
+    if ( !iForeground && !ExitOccured() )
+        {
+        TRAP_IGNORE( EnableDisplayL(EFalse) )
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::ConnectionInitialized() const
+    {
+    return iConnectionInitialized;
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::EnableDisplayL( TBool aEnable )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::EnableDisplayL" );
+    if ( EngineSession() )
+        {
+        EngineSession()->EnableDisplayL( aEnable );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::EnableDisplayL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::ChangeOrientationL( 
+                        CAknAppUiBase::TAppUiOrientation aOrientation )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::ChangeOrientationL" );
+    iEventObserver.SwitchOrientationL( aOrientation );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::ChangeOrientationL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::IsDisplayEnabledL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::IsDisplayEnabledL" );
+    TBool ret = EFalse;
+    if ( EngineSession() )
+        {
+        ret = EngineSession()->IsDisplayEnabledL();
+        }
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiEventController::IsDisplayEnabledL, %d", ret );
+    return ret;   
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::IsAudioRoutingLoudSpeaker()
+	{
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::IsAudioRoutingLoudSpeaker" );
+    TBool ret = EFalse;
+    if ( EngineSession() )
+        {
+        ret = EngineSession()->IsAudioRoutingLoudSpeaker();
+        }
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiEventController::IsAudioRoutingLoudSpeaker, %d", ret );
+    return ret;   
+	}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::ToolbarVolumeSelected()
+    {
+    return iToolbarVolumeSelected;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::IsMicMutedL()
+    {
+    __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
+    
+    return EngineSession()->IsMicMutedL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::ManualAddressTyped() const
+    {
+    return EFalse;
+    }    
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::HandleForegroundEventL( TBool aForeground )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::HandleForegroundEventL" );
+    
+    iForeground = aForeground;
+
+    if ( ConnectionInitialized() &&  !ExitOccured() )
+        {
+        EnableDisplayL( aForeground );
+        
+        // Change toolbar according to a real state. Other items than speaker
+        // and mic states cannot be changed from phone app and thus there is
+        // no need to check them
+        if ( aForeground )
+            {
+            if ( MUS_NO_TOOLBAR )
+                {
+                iSharingObserver.EnableMiddleSoftkeyL( IsLoudSpeakerEnabled() ?
+                                            R_MUSUI_VIEW_OPS_MSK_IHF_OFF :
+                                            R_MUSUI_VIEW_OPS_MSK_IHF_ON );
+                }
+            else
+                {
+                if ( IsMicMutedL() )
+                    {
+                    iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarMute,
+                                                            EMusuiCmdToolbarUnmute,
+                                                            EFalse );
+                    }
+                else
+                    {
+                    iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnmute,
+                                                            EMusuiCmdToolbarMute,
+                                                            EFalse );
+                    }
+                
+                if ( IsLoudSpeakerEnabled() )
+                    {
+                    iSharingObserver.ReplaceToolbarCommand( 
+                                                        EMusuiCmdToolbarSpeakerOn,
+                                                        EMusuiCmdToolbarSpeakerOff,
+                                                        EFalse );
+                    }
+                else
+                    {
+                    iSharingObserver.ReplaceToolbarCommand( 
+                                                        EMusuiCmdToolbarSpeakerOff,
+                                                        EMusuiCmdToolbarSpeakerOn,
+                                                        EFalse );
+                    }          
+               if ( ConnectionEstablished() )
+                    {
+                    iEventObserver.SetToolbarVisibility( aForeground );
+                    }
+               
+                }            
+            }
+            
+        }
+    
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::HandleForegroundEventL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::IsForeground() const
+    {
+    return iForeground;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::OfferToolbarEventL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiEventController::OfferToolbarEventL [%d]",
+              aCommand );
+    
+    __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
+
+    switch ( aCommand )
+        {
+        case EMusuiCmdToolbarVolume:
+            {
+            iToolbarVolumeSelected = !iToolbarVolumeSelected;
+            iSharingObserver.HighlightSelectedToolbarItem( 
+                                                EMusuiCmdToolbarVolume );
+            iSharingObserver.ActivateVolumeControlL( 
+                                            EngineSession()->VolumeL() );
+            break;
+            }  
+        case EMusuiCmdToolbarMute:
+            {       
+            EngineSession()->MuteMicL( ETrue );
+            iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarMute,
+                                                    EMusuiCmdToolbarUnmute,
+                                                    ETrue );
+            break;
+            }
+        case EMusuiCmdToolbarUnmute:
+            {
+            EngineSession()->MuteMicL( EFalse );
+            iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnmute,
+                                                    EMusuiCmdToolbarMute,
+                                                    ETrue );
+            break;
+            }
+        case EMusuiCmdToolbarSpeakerOff:
+            {
+            EngineSession()->EnableLoudspeakerL( ELoudspeakerDisabled, EFalse );
+            // Toolbar will be changed when asynchronous request is completed
+            break;
+            }
+        case EMusuiCmdToolbarSpeakerOn:
+            {
+            EngineSession()->EnableLoudspeakerL( ELoudspeakerEnabled, EFalse );
+            // Toolbar will be changed when asynchronous request is completed
+            break;     
+            }
+        default:    // Never should be the case
+            {
+            HandleExitL();
+            break;
+            }
+                
+        }
+    
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiEventController::OfferToolbarEventL [%d]",
+              aCommand );
+                                                            
+    }
+
+
+// -----------------------------------------------------------------------------
+// Handles commands common to all sharing types.
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::HandleCommandL( TInt aCommand )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::HandleCommandL" );
+    
+    switch ( aCommand )
+        {
+        case EMusuiCmdViewVolumeUp:
+            {
+            // Set Volume:
+            __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
+            EngineSession()->VolumeUpL();
+            // Status pane update will be done later. When we get 
+			// VolumeChanged() callback
+            break;
+            }
+        case EMusuiCmdViewVolumeDown:
+            {
+            // Set Volume:
+            __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
+            EngineSession()->VolumeDownL();
+            // Status pane update will be done later. When we get 
+			// VolumeChanged() callback
+            break;
+            }
+        case EMusuiCmdViewVolumeChanged:
+            {
+            __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
+            TInt volumeFromEngine = EngineSession()->VolumeL();
+            TInt volumeFromUi = iEventObserver.GetUiVolumeValue();
+            if ( volumeFromUi != volumeFromEngine )
+                {
+                EngineSession()->SetVolumeL( volumeFromUi );
+                }
+            break;
+            }
+           
+        case EMusuiCmdViewLoadspeaker:
+            {
+            EngineSession()->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
+            break;
+            }
+            
+        case EMusuiCmdViewHandset:
+            {
+            EngineSession()->EnableLoudspeakerL( ELoudspeakerDisabled, ETrue );
+            break;
+            }
+
+        case EMusuiCmdViewMicrophoneMute:
+            {
+            EngineSession()->MuteMicL( ETrue );
+            break;            
+            }
+            
+        case EMusuiCmdViewMicrophoneUnmute:
+            {
+            EngineSession()->MuteMicL( EFalse );
+            break;
+            }
+           
+        case EMusuiCmdViewEndActiveCall:
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiReceiveController::ConstructL:\
+                                    EMusuiCmdViewEndActiveCall" );
+            HandleExitL( ETrue );
+            break;
+            }
+        case EMusuiGenCmdExit:
+        case EAknSoftkeyExit:
+            {
+            HandleExitL();
+            break;
+            }
+
+        case EAknCmdHelp:
+            {
+            if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
+                {
+                HlpLauncher::LaunchHelpApplicationL(
+                        iEventObserver.EikonEnv()->WsSession(),
+                        iEventObserver.EikonEnv()->AppUi()->AppHelpContextL() );
+                }
+            break;
+            }
+
+        default:
+            {
+            //NOP
+            break;
+            }
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::HandleCommandL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Handles status changes common to all sharing types.
+// -----------------------------------------------------------------------------
+//
+void CMusUiEventController::HandleChangedStatusL(
+                        TMusAvailabilityStatus aStatus )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::HandleChangedStatusL" );
+    switch( aStatus )
+        {
+        case EErrNoActiveCall:
+            {
+            MUS_LOG( "mus: [MUSUI ]     EErrNoActiveCall" );
+            iActiveCall = EFalse;
+            HandleExitL();
+            break;
+            }
+        case EErrCallOnHold:
+        case EErrConferenceCall: 
+        case EMultimediaSharingNotAvailable:
+            {
+            MUS_LOG( "mus: [MUSUI ]\
+    EErrCallOnHold, EErrConferenceCall, EMultimediaSharingNotAvailable" );
+            HandleExitL();
+            break;
+            }
+        case EErrSipRegistration:
+            {
+            MUS_LOG( "mus: [MUSUI ]     EErrSipRegistration" );
+            MusUiDialogUtil::ShowInformationDialogL( 
+                                    R_MUS_LIVE_SHARING_VIEW_NOTE_SERVICE_N_A );
+            HandleExitL();
+            break;
+            }
+        case EErrRoaming:
+            {
+            MUS_LOG( "mus: [MUSUI ]     EErrRoaming" );
+            HandleExitL();
+            break;
+            }
+        case EErrNetwork:
+            {
+            MUS_LOG( "mus: [MUSUI ]     EErrNetwork" );
+            MusUiDialogUtil::ShowInformationDialogL( 
+                                    R_MUS_LIVE_SHARING_VIEW_NOTE_SERVICE_N_A );
+            HandleExitL();
+            break;
+            }
+        case EErrConnection:
+            {
+            MUS_LOG( "mus: [MUSUI ]     EErrConnection" );
+            MusUiDialogUtil::ShowInformationDialogL( 
+                                    R_MUS_LIVE_SHARING_VIEW_NOTE_ONLY_3G );
+            HandleExitL();
+            break;
+            }
+
+        case EErrServerShutDown:
+            {
+            MUS_LOG( "mus: [MUSUI ]     EErrServerShutDown" );
+            HandleExitL();
+            break;
+            }
+
+        default:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Default" );
+            // TODO
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::HandleChangedStatusL" );
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuifileutil.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "musuifileutil.h"
+#include "muslogger.h" // debug logging
+#include "musuidefinitions.h"
+#include "musuidialogutil.h"
+#include "mussettings.h"
+#include <musui.rsg>
+
+#include <f32file.h>
+#include <StringLoader.h>
+#include <AknGlobalNote.h>
+#include <apparc.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool MusUiFileUtil::FileExists( const TDesC& aFullFileName )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> MusUiFileUtil::FileExists" );
+    
+    TBool fileExists( EFalse );
+    RFs fs;    
+
+    if ( fs.Connect() == KErrNone )
+        {
+        TUint att;
+        fileExists = ( fs.Att( aFullFileName, att ) != KErrNotFound );
+        fs.Close();
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- MusUiFileUtil::FileExists" );
+    
+    return fileExists;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiFileUtil::VideoFilePathExistsL( const TDesC& aVideoFilePath)
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> MusUiFileUtil::VideoFilePathExistsL" );
+    
+    RFs fs;
+    
+    User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL( fs );
+    TInt error = fs.MkDirAll( aVideoFilePath );
+    CleanupStack::PopAndDestroy( &fs );
+    
+    MUS_LOG1( "mus: [MUSUI ]  <- MusUiFileUtil::VideoFilePathExistsL,%d",error );
+    User::Leave(error);
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiFileUtil::CreateVideoFileNameL( const TDesC& aVideoFilePath, 
+                                          TFileName& aFileName )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> MusUiFileUtil::CreateVideoFileNameL" );
+    
+    RFs fs;
+    TParse parse;
+    TFileName fullFileName;
+    TUint att;
+     
+    User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL( fs );
+    
+    if ( fs.Att( aVideoFilePath, att ) == KErrNone )
+        {
+        if ( MultimediaSharingSettings::OperatorVariantSettingL() == 
+             MusSettingsKeys::EStandard )
+            {
+            HBufC* temp = StringLoader::LoadLC( R_MUS_VIEW_SAVED_FILENAME );
+            User::LeaveIfError( parse.Set( aVideoFilePath, temp, NULL ) );
+            CleanupStack::PopAndDestroy( temp );
+            fullFileName = parse.FullName();
+            fullFileName.Append( KMusVideoFileNameExtension );
+            User::LeaveIfError( 
+                CApaApplication::GenerateFileName( fs, fullFileName ) );
+            User::LeaveIfError( parse.Set( fullFileName, NULL, NULL ) );
+            }
+        else    // operator specific case
+            {
+            RBuf newName;
+            newName.CreateL( KMaxFileName );
+            CleanupClosePushL( newName );
+
+            TEntry entry;
+            TInt i = 1;
+            // path + 'VS' + date + 'V' + counter + extension
+            _LIT( KFormatStringOne, "%S%S%S%S%02d%S" );
+            _LIT( KFormatStringTwo, "%S%S%S%S%d%S" );
+            TBuf<16> format;
+            format = KFormatStringOne;
+
+            // get current date
+            _LIT( KDateFormat, "%F%M%D%*Y" );
+            TTime time;
+            time.UniversalTime();
+            TBuf<6> dateString;
+            time.FormatL( dateString, KDateFormat );
+
+            // generate a valid filename that doesn't already exist...
+            do
+                {
+                TPtrC driveAndPath = aVideoFilePath;
+                TPtrC date = dateString;  
+                newName.Format( format, 
+                                &driveAndPath, &KMusVideoFileNameBegining, 
+                                &date, &KMusVideoFileNameVersion, 
+                                i++, &KMusVideoFileNameExtension );
+
+                if ( newName.Length() > KMaxFileName )
+                    {
+                    User::Leave( KErrOverflow );
+                    }
+
+                if ( i >= 100 )
+                    {
+                    format = KFormatStringTwo;
+                    }        			
+                }       // Continue until DoesNotExist
+            while ( fs.Entry( newName, entry ) == KErrNone ); 
+
+            fullFileName.Copy( newName );
+            User::LeaveIfError( parse.Set( newName, NULL, NULL ) );
+
+            CleanupStack::PopAndDestroy( &newName );            
+            }
+        
+        RFile file;
+        CleanupClosePushL( file );
+        User::LeaveIfError( 
+            file.Create( fs, fullFileName, EFileWrite | EFileShareExclusive ) );
+        CleanupStack::PopAndDestroy( &file );
+        }
+   
+    CleanupStack::PopAndDestroy( &fs );
+    
+    aFileName = parse.Name();
+    
+    MUS_LOG( "mus: [MUSUI ] < - MusUiFileUtil::CreateVideoFileNameL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void MusUiFileUtil::DeleteFileL( const TDesC& aFileName )
+    {
+    RFs fs;
+    User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL( fs );
+    TInt error = fs.Delete( aFileName );
+    if ( ( error != KErrNone ) && ( error != KErrNotFound ) )
+        {
+        User::Leave( error );
+        }
+    CleanupStack::PopAndDestroy( &fs );
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuigeneralview.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,930 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#include "musuigeneralview.h"     
+#include "musui.hrh"
+#include "musuiappui.h"         // Application UI class
+#include "musuistatuspanehandler.h"
+#include "musuieventcontroller.h"
+#include "musuiviewcontainer.h"
+#include "musuidefinitions.h"
+#include "mussettings.h"
+#include "mussettingskeys.h"
+#include "muslogger.h" // debug logging
+#include "musuiactivetimer.h"
+#include "musuibackgroundviewcontainer.h"
+#include <musui.rsg>
+#include <musui.mbg>
+
+#include <eikenv.h>               // Eikon enviroment
+#include <aknViewAppUi.h>
+#include <avkon.hrh>
+#include <eikmenup.h>
+#include <akntoolbar.h>
+#include <aknbutton.h>
+#include <AknIncallBubbleNotify.h>
+#include <featmgr.h>
+
+const TInt KBackgroundIntervalForClose = 10 * 1000 * 1000; // 10s
+const TInt KMusFgBgEventFiltering = 200 * 1000; // 200 ms
+
+// -----------------------------------------------------------------------------
+// EPOC two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::ConstructL" );
+
+    BaseConstructL( R_MUSUI_VIEW );
+    TInt toolbarId = R_MUS_TOOLBAR;
+    if (!AknLayoutUtils::PenEnabled())
+	    {
+	    toolbarId = R_MUS_TOOLBAR_NONTOUCH;
+	    }
+    CreateAndSetToolbarL(toolbarId);    
+    
+    // check if operator specific functionality is needed  
+    iOperatorSpecificFunctionality = 
+        ( MultimediaSharingSettings::OperatorVariantSettingL() == 
+                                        MusSettingsKeys::EOperatorSpecific );
+    
+    iIncallBubble = CAknIncallBubble::NewL();
+    iSessionEndTimer = CMusUiActiveTimer::NewL( this );
+    
+    iFgBgTimer = CMusUiActiveTimer::NewL( this );
+                                                    
+    if( MUS_NO_TOOLBAR )
+        {
+        MUS_LOG( "mus: [MUSUI ] Operator variant hides toolbar!" );
+        Toolbar()->SetToolbarVisibility( EFalse );
+        Toolbar()->MakeVisible(EFalse);
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CMusUiGeneralView::~CMusUiGeneralView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::~CMusUiGeneralView" );
+            
+    delete iSessionEndTimer; 
+    
+    delete iFgBgTimer;          
+    
+    if ( iIncallBubble )
+        {
+        TRAP_IGNORE( iIncallBubble->SetIncallBubbleAllowedInUsualL( ETrue ) )    
+        }
+    delete iIncallBubble; 
+    
+    /* Remove and delete background container */
+    if ( iBackgroundContainer )
+      {
+      AppUi()->RemoveFromViewStack( *this, iBackgroundContainer );
+      }
+    delete iBackgroundContainer;
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::~CMusUiGeneralView" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Fetches a pointer to the application's AppUi class ( CMusUiAppUi )
+// -----------------------------------------------------------------------------
+//
+CMusUiAppUi* CMusUiGeneralView::MusAppUi() const
+    {
+    MUS_LOG( "mus: [MUSUI ]     CMusUiGeneralView::MusAppUi()" );
+    return static_cast<CMusUiAppUi*>( iEikonEnv->AppUi() );
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// To be overridden in subclasses
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::HandleKeyUpEvent( TInt /*aKeyCode*/ )
+    {
+    // NOP
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::SetToolbarVisibility( TBool aVisible )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiGeneralView::SetToolbarVisibility: %d",
+                            aVisible );
+    
+    if( MUS_NO_TOOLBAR )
+        {
+        MUS_LOG( "mus: [MUSUI ] Operator variant hides toolbar!" );
+        Toolbar()->SetToolbarVisibility( EFalse );
+        Toolbar()->MakeVisible(EFalse);
+        return;
+        }
+    
+    // Show toolbar only after established session and before of exit procedure 
+    if ( aVisible &&
+         EventController() &&
+         !EventController()->ExitOccured() &&
+         EventController()->ConnectionEstablished() )
+        {
+        MUS_LOG( "mus: [MUSUI ] setting toolbar visible" );
+        
+        if ( SharingContainer().WaitDialogShown() )
+            {
+            // Cannot show toolbar at the moment as it would go over the dialog.
+            // Instead, request container to set visibility once dialog
+            // is dismissed.
+            SharingContainer().RequestToolbarVisibilityOnceDialogDismissed( this );
+            }
+        else
+            {
+            Toolbar()->SetToolbarVisibility( ETrue );
+			Toolbar()->MakeVisible(ETrue);
+            }
+        }
+    else if ( !aVisible && EventController()->ExitOccured() )
+        {
+        Toolbar()->SetToolbarVisibility( EFalse );
+		Toolbar()->MakeVisible(EFalse);
+        }
+    else
+        {
+        MUS_LOG( "mus: [MUSUI ] We do not set fixed toolbar invisible" );
+        if (!AknLayoutUtils::PenEnabled())
+        	{
+        	Toolbar()->SetToolbarVisibility( EFalse );
+			Toolbar()->MakeVisible(EFalse);
+        	}
+        
+        SharingContainer().RequestToolbarVisibilityOnceDialogDismissed( NULL );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::SetToolbarVisibility" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::AsyncQueryDialogAcceptedL( TBool aAccepted )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::AsyncQueryDialogAcceptedL" );
+    
+    EventControllerL().AsyncQueryDialogAcceptedL( aAccepted );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::AsyncQueryDialogAcceptedL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiGeneralView::FocusedToolbarItem() const
+    {
+    MUS_LOG( "mus: [MUSUI ]  <-> CMusUiGeneralView::FocusedToolbarItem" );
+    return Toolbar()->FocusedItem();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::DynInitToolbarL( TInt /*aResourceId*/,
+                                         CAknToolbar* /*aToolbar*/ )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::DynInitToolbarL" );
+
+    Toolbar()->SetWithSliding( EFalse );
+
+    // Hide items according to states of speaker and microphone:
+    
+    Toolbar()->HideItem( EventControllerL().IsMicMutedL() ?
+                            EMusuiCmdToolbarMute :
+                            EMusuiCmdToolbarUnmute,
+                        ETrue,
+                        ETrue );
+    
+    TBool loudSpeakerEnabled( EventControllerL().IsLoudSpeakerEnabled() );
+      
+    Toolbar()->HideItem( loudSpeakerEnabled ?
+                                EMusuiCmdToolbarSpeakerOn :
+                                EMusuiCmdToolbarSpeakerOff,
+                         ETrue,
+                         ETrue );
+    
+    // Dim audio routing button if audio routing cannot be changed
+    // or when some button is selected
+    TBool dimAudioRouting( iToolbarItemSelected || 
+                           !EventControllerL().AudioRoutingCanBeChanged() );
+                                                 
+    Toolbar()->SetItemDimmed( loudSpeakerEnabled ?
+                                    EMusuiCmdToolbarSpeakerOff :
+                                    EMusuiCmdToolbarSpeakerOn,
+                              dimAudioRouting,
+                              ETrue );                 
+    
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::DynInitToolbarL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::OfferToolbarEventL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiGeneralView::OfferToolbarEventL: %d",
+                            aCommand );
+    EventControllerL().OfferToolbarEventL( aCommand );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::OfferToolbarEventL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiGeneralView::ShowWaitDialogL( const TDesC& aPrompt, 
+                                       TInt aTimerInSeconds,
+                                       TInt aExpirationMessageResourceId )
+    {
+    MUS_LOG_TDESC( "mus: [MUSUI ]    -> CMusUiGeneralView::ShowWaitDialogL: ",
+                            aPrompt );
+                            
+    TBool retVal = SharingContainer().RunWaitDialogL( 
+                                                aPrompt, 
+                                                aTimerInSeconds,
+                                                aExpirationMessageResourceId );
+    
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiGeneralView::ShowWaitDialogL: retVal = %d",
+              retVal )
+    
+    return retVal;
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::DismissWaitDialogL( TBool aReturnValue )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::DismissWaitDialogL" );
+ 
+    SharingContainer().DismissWaitDialogL( aReturnValue );       
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::DismissWaitDialogL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::SetWaitDialogCallbackL( MProgressDialogCallback* aCallback )
+    {
+    SharingContainer().SetWaitDialogCallbackL( aCallback );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::ShowStatusPaneTitleL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::ShowStatusPaneTitleL" );
+
+    MusAppUi()->MusStatusPane()->ActivateNaviPaneMediaL();
+
+    // Status Pane Title:
+    if ( EventControllerL().MusContactName().Length() > 0 )
+        {
+        MusAppUi()->MusStatusPane()->SetTitleL( 
+                                        EventControllerL().MusContactName() );
+        }
+    else if ( EventControllerL().MusTelNumberValue().Length() > 0 )
+        {
+        MusAppUi()->MusStatusPane()->SetTitleL(
+                                    EventControllerL().MusTelNumberValue() );
+        }
+    else
+        {
+        MusAppUi()->MusStatusPane()->SetTitleFromResourceL(
+                                R_MUS_LIVE_SHARING_VIEW_TITLE );
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::ShowStatusPaneTitleL" );
+    }
+        
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::EnableMiddleSoftkeyL( TInt aResourceId )
+    {
+    // Update Middle softkey
+    CEikButtonGroupContainer* cba = Cba();
+    if ( cba )
+        {
+        cba->SetCommandL( CEikButtonGroupContainer::EMiddleSoftkeyPosition,
+                          aResourceId );
+        cba->DrawDeferred();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::ActivateVolumeControlL( TInt aValue, TBool aOnlyIfVisible )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::ActivateVolumeControlL" );
+    MusAppUi()->MusStatusPane()->ActivateVolumeControlL( aValue, aOnlyIfVisible );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::ActivateVolumeControlL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::HighlightSelectedToolbarItem( TInt aCommand )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::HightlightSelectedToolbarItem" );
+    iToolbarItemSelected = !iToolbarItemSelected;
+    CAknButton* button = static_cast<CAknButton*>( Toolbar()->ControlOrNull(
+                                                                aCommand ) );
+    button->SetCurrentState( iToolbarItemSelected ? 1 : 0, ETrue );
+
+    TBool dimAudioRouting( iToolbarItemSelected || 
+                           !( EventController() &&
+                              EventController()->AudioRoutingCanBeChanged() ) );
+                           
+    for ( TInt i = EMusuiCmdToolbarVolume; i < EMusUiCmdToolbarLastIndex; i++ )
+        {
+        // Undim audio routing buttons only if changing the routing is allowed                  
+        if ( i == EMusuiCmdToolbarSpeakerOn )
+            {
+            Toolbar()->SetItemDimmed( 
+                                EMusuiCmdToolbarSpeakerOn,
+                                dimAudioRouting,
+                                ETrue );  
+            }
+        else if ( i == EMusuiCmdToolbarSpeakerOff )
+            {
+            Toolbar()->SetItemDimmed( 
+                                EMusuiCmdToolbarSpeakerOff,
+                                dimAudioRouting,
+                                ETrue );  
+            }
+        else if ( i != aCommand )
+            {
+            Toolbar()->SetItemDimmed( i, iToolbarItemSelected, ETrue );
+            }
+        else
+            {
+            // NOP
+            }
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::HightlightSelectedToolbarItem" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::ReplaceToolbarCommand( TInt aOldCommand,
+                                               TInt aNewCommand,
+                                               TBool aSetNewCommandFocused )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiGeneralView::ReplaceToolbarCommand: %d",
+                            aNewCommand );  
+    
+    // Hide the old item:
+    Toolbar()->HideItem( aOldCommand, ETrue, EFalse );
+    // Show new item:
+    Toolbar()->HideItem( aNewCommand, EFalse, ETrue );
+    
+    TBool dimAudioRouting( iToolbarItemSelected || 
+                           !( EventController() &&
+                              EventController()->AudioRoutingCanBeChanged() ) );
+    
+    if ( aNewCommand == EMusuiCmdToolbarSpeakerOn ||
+         aNewCommand == EMusuiCmdToolbarSpeakerOff )
+        {
+        // Dim audio routing button if audio routing cannot be changed                     
+        Toolbar()->SetItemDimmed( aNewCommand,
+                                  dimAudioRouting,
+                                  ETrue );    
+        }
+        
+    if ( aSetNewCommandFocused &&
+         !AknLayoutUtils::PenEnabled() )
+        {
+        TRAP_IGNORE( Toolbar()->SetFocusedItemL( aNewCommand ) );
+        }
+        
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiGeneralView::ReplaceToolbarCommand: %d",
+                            aNewCommand );    
+    }   
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::DismissMenuBar()
+	{
+	 MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::DismissMenuBar" );
+	 StopDisplayingMenuBar();
+	 MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::DismissMenuBar" );
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::RefreshAudioRoutingToolbarButton()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::RefreshAudioRoutingToolbarButton" )
+    TBool loudSpeakerEnabled( EventController() &&
+                          EventController()->IsLoudSpeakerEnabled() );
+    if ( MUS_NO_TOOLBAR )
+        {
+        TRAP_IGNORE( EnableMiddleSoftkeyL( loudSpeakerEnabled ?
+                                               R_MUSUI_VIEW_OPS_MSK_IHF_OFF :
+                                               R_MUSUI_VIEW_OPS_MSK_IHF_ON ) );
+        } 
+    else if ( Toolbar()->IsShown() )
+        {
+        // If toolbar is not shown, it will be refreshed automatically when shown.
+        TInt focusedItem( Toolbar()->FocusedItem() );
+        TBool focusInAudioRouting( focusedItem == EMusuiCmdToolbarSpeakerOff ||
+                                   focusedItem == EMusuiCmdToolbarSpeakerOn );
+                                   
+        TBool loudSpeakerEnabled( EventController() &&
+                                  EventController()->IsLoudSpeakerEnabled() );
+        
+        // Hide old audio routing buttton
+        Toolbar()->HideItem( loudSpeakerEnabled ?
+                                EMusuiCmdToolbarSpeakerOn :
+                                EMusuiCmdToolbarSpeakerOff,
+                             ETrue,
+                             EFalse );
+                                  
+        // Show new audio routing button                              
+        Toolbar()->HideItem( loudSpeakerEnabled ?
+                                    EMusuiCmdToolbarSpeakerOff :
+                                    EMusuiCmdToolbarSpeakerOn,
+                             EFalse,
+                             ETrue );                     
+        
+        // Dim new audio routing button if audio routing cannot be changed
+        // or when some button is selected        
+        TBool dimAudioRouting( iToolbarItemSelected || 
+                               !( EventController() &&
+                               EventController()->AudioRoutingCanBeChanged() ) );
+                                                     
+        Toolbar()->SetItemDimmed( loudSpeakerEnabled ?
+                                        EMusuiCmdToolbarSpeakerOff :
+                                        EMusuiCmdToolbarSpeakerOn,
+                                  dimAudioRouting,
+                                  ETrue );
+        
+        // If audio routing button has been focused, focus also the new button
+        // if it is not dimmed
+        if ( focusInAudioRouting && 
+             !dimAudioRouting && 
+             !AknLayoutUtils::PenEnabled() )
+            {
+            TRAP_IGNORE( Toolbar()->SetFocusedItemL( loudSpeakerEnabled ?
+                                                EMusuiCmdToolbarSpeakerOff :
+                                                EMusuiCmdToolbarSpeakerOn ) )
+            }  
+        
+         
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::RefreshAudioRoutingToolbarButton" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::UpdateSessionTime( const TDesC& aSessionTime )
+    {
+    MUS_LOG_TDESC( "mus: [MUSUI ]  -> CMusUiGeneralView::UpdateSessionTime: ",
+                   aSessionTime );
+    
+    TRAPD( err, MusAppUi()->MusStatusPane()->SetLeftLabelL( aSessionTime ) );
+    if ( err != KErrNone )
+        {
+        EventController()->HandleError( err );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::UpdateSessionTime" );
+    }
+        
+
+// -----------------------------------------------------------------------------
+// takes care of view command handling
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::HandleCommandL( TInt aCommand )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::HandleCommandL" );
+    
+    EventControllerL().HandleCommandL( aCommand );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::HandleCommandL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiEventController& CMusUiGeneralView::EventControllerL() const
+    {
+    __ASSERT_ALWAYS( EventController(), User::Leave( KErrNotFound ) );
+    
+    return *EventController();
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called when focus event occurs. Timer is started once coming to foreground
+// as often in such case we receive burst of foreground/background events.
+// Timer is used to filter that burst and to determine the final condition.
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::HandleForegroundEventL( TBool aForeground, TBool aExit )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiGeneralView::HandleForegroundEventL: %d",
+                            aForeground );
+    
+    SetCurrentFgBgEvent( ( aForeground ? EMusFgEvent : EMusBgEvent ) );
+    iCurrentExitSetting = aExit;
+        
+    if ( !iFgBgTimer->IsActive() )
+        {
+        if ( aForeground )
+            {
+            MUS_LOG( "mus: [MUSUI ] delayed to fg" );
+            }
+        else
+            {
+            DoBackgroundEventL( iCurrentExitSetting );
+            MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::HandleForegroundEventL,\
+immediately to bg" );
+            return;
+            }
+        }
+
+    iFgBgTimer->After( KMusFgBgEventFiltering );    
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::HandleForegroundEventL" );
+    }
+ 
+ 
+// -----------------------------------------------------------------------------
+// From MMusUiActiveTimerObserver
+// -----------------------------------------------------------------------------
+//    
+void CMusUiGeneralView::TimerComplete( CMusUiActiveTimer* aTimer )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiGeneralView::TimerComplete" );
+                          
+    if ( aTimer == iSessionEndTimer )
+        {
+        MUS_LOG( "mus: [MUSUI ]     Close application because of going \
+in background" );
+                  
+        TRAP_IGNORE( EventControllerL().HandleExitL() )
+        }
+    else
+        {        
+        TRAP_IGNORE( CompleteForegroundEventL() )
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::TimerComplete" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MEikMenuObserver, Called by framework before constructing menupane.
+// Initializes menu items common to all sharing types.
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::DynInitMenuPaneL( TInt aResourceId,
+                                          CEikMenuPane* aMenuPane )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiGeneralView::DynInitMenuPaneL [%d]",
+                            aResourceId );
+
+    if ( aResourceId == R_MUSUI_VIEW_MENU )
+        {
+
+        // Delete Single session items:
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewShareVideo );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewShareImage );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewShareLive );        
+        if ( MUS_NO_TOOLBAR )
+            {
+            aMenuPane->DeleteMenuItem( EventControllerL().IsMicMutedL() ?
+                                           EMusuiCmdViewMicrophoneMute :
+                                           EMusuiCmdViewMicrophoneUnmute );
+            }
+        else
+            {
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewMicrophoneMute );
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewMicrophoneUnmute );
+            }
+        
+        if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
+            {
+            aMenuPane->DeleteMenuItem( EAknCmdHelp );
+            }
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::DynInitMenuPaneL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiGeneralView::DoActivateL
+// From CAknView, Gets called from framework when activating this view
+// -----------------------------------------------------------------------------
+void CMusUiGeneralView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
+                                     TUid /*aCustomMessageId*/,
+                                     const TDesC8& /*aCustomMessage*/ )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiGeneralView::DoActivateL()" )
+    
+    
+    MusAppUi()->MusStatusPane()->ClearNaviPaneL();
+    MusAppUi()->MusStatusPane()->SetTitleFromResourceL(
+        R_MUS_LIVE_SHARING_VIEW_TITLE );
+    
+    iIncallBubble->SetIncallBubbleAllowedInUsualL( EFalse );
+    
+    /* Draw the skin background in the client rectangle area.*/
+    if ( !iBackgroundContainer )
+       {
+       /* Construct background container with clientrect area and
+        * Ordinal position of 0 ie highest so that it draws the initial 
+        * skin background first.
+        */       
+       iBackgroundContainer = 
+           CMusUiBackgroundViewContainer::NewL( ClientRect(), 0 );
+       /* Add container to view stack so that it get view events */
+       AppUi()->AddToViewStackL( *this, iBackgroundContainer );
+       }
+    else
+       {
+       /* Set the windows ordinal position to highest ie 0,
+        * so that background gets priority and drawn first.        
+        */
+       iBackgroundContainer->SetOrdinalPosition( 0 );       
+       }
+    /* Draw the skin background now */
+    iBackgroundContainer->DrawNow();
+                            
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiGeneralView::DoActivateL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusUiGeneralView::DoDeactivate
+// From AknView, Gets called from framework when deactivating this view
+// -----------------------------------------------------------------------------
+void CMusUiGeneralView::DoDeactivate()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiGeneralView::DoDeactivate()" )
+    if ( iBackgroundContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iBackgroundContainer );
+        delete iBackgroundContainer;
+        iBackgroundContainer = NULL;
+        }
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiGeneralView::DoDeactivate()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Asynchronous completion of last fg/bg condition.
+// -----------------------------------------------------------------------------
+// 
+void CMusUiGeneralView::CompleteForegroundEventL()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiGeneralView::CompleteForegroundEventL()" )
+    
+    if ( iCurrentFgBgEvent == EMusFgEvent )
+        {
+        DoForegroundEventL();
+        }
+    else if ( iCurrentFgBgEvent == EMusBgEvent && EventControllerL().IsForeground() )
+        {
+        // Bg handling when already at bg would cause problems in state
+        // restoring phase when coming back to fg. Easiest to deal with that
+        // at this level.
+        DoBackgroundEventL( iCurrentExitSetting );
+        }
+
+    SetCurrentFgBgEvent( EMusFgBgEventNone );   
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiGeneralView::CompleteForegroundEventL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Complete foreground event.
+// -----------------------------------------------------------------------------
+// 
+void CMusUiGeneralView::DoForegroundEventL()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiGeneralView::DoForegroundEventL()" )
+    
+    RefreshView();
+    
+    iSessionEndTimer->Cancel();    
+        
+    EventControllerL().HandleForegroundEventL( ETrue );
+    iIncallBubble->SetIncallBubbleAllowedInUsualL( EFalse );
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiGeneralView::DoForegroundEventL()" )
+    }
+
+    
+// -----------------------------------------------------------------------------
+// Complete background event.
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::DoBackgroundEventL( TBool aExit )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiGeneralView::DoBackgroundEventL()" )
+    
+    if ( aExit )
+        {
+        MUS_LOG( "mus: [MUSUI ]     Go to background, \
+                  wait some seconds before closing..." );
+        iSessionEndTimer->After( KBackgroundIntervalForClose );
+        }
+    if ( !MusAppUi()->ExitValue() )
+        {
+        MUS_LOG( "mus: [MUSUI ]     Calling EventControllerL()" );
+        EventControllerL().HandleForegroundEventL( EFalse );
+        // If exiting, next will be called by destructor    
+    	iIncallBubble->SetIncallBubbleAllowedInUsualL( ETrue );  
+        } 
+        
+    SetCurrentFgBgEvent( EMusFgBgEventNone );
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiGeneralView::DoBackgroundEventL()" )
+    }
+
+// -----------------------------------------------------------------------------
+// Set current fg/bg condition.
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::SetCurrentFgBgEvent( TMusFgBgEventType aEventType )
+    {
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiGeneralView::SetCurrentFgBgEvent() event:%d",
+              aEventType )
+             
+    iCurrentFgBgEvent = aEventType;         
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiGeneralView::OperatorSpecificFunctionality() const
+    {
+    return iOperatorSpecificFunctionality;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiGeneralView::ToolbarPlaceHolderHeight() const
+    {
+    TInt toolbarPlaceHolderHeight( 0 );
+    CAknAppUiBase::TAppUiOrientation orientation = MusAppUi()->AppOrientation();
+    if ( !Toolbar()->IsShown() && 
+         orientation == CAknAppUiBase::EAppUiOrientationPortrait &&                        
+         AknLayoutUtils::PenEnabled() )
+        {
+        // In touch UI in portrait mode the toolbar 
+        // fills the whole lower part of the screen
+        toolbarPlaceHolderHeight = Toolbar()->Size().iHeight;
+        }
+    return toolbarPlaceHolderHeight;       
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiGeneralView::ToolbarPlaceHolderWidth() const 
+    { 
+    TInt toolbarPlaceHolderWidth( 0 ); 
+    CAknAppUiBase::TAppUiOrientation orientation = MusAppUi()->AppOrientation(); 
+    if ( !Toolbar()->IsShown() && 
+         orientation == CAknAppUiBase::EAppUiOrientationLandscape &&                        
+         AknLayoutUtils::PenEnabled() ) 
+        { 
+        // In touch UI in EAppUiOrientationLandscape mode the toolbar 
+        // fills the whole lower part of the screen 
+        toolbarPlaceHolderWidth = Toolbar()->Size().iWidth; 
+        } 
+    return toolbarPlaceHolderWidth;       
+    } 
+
+// -----------------------------------------------------------------------------
+// Increase/Decrease background container ordinal so that other controls
+// can preceed background
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::UpdateBackgroundOrdinalPosition( TBool aUp )
+    {
+    // If there is no background container then do not care
+    if ( iBackgroundContainer )
+        {
+        iBackgroundContainer->UpdateOrdinalPositionValue( aUp );              
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// Do refresh for background container only if display is disabled.
+// Refreshing if display is enabled would cause bg container
+// to draw itself on top of display area, making it invisible.
+// -----------------------------------------------------------------------------
+//
+void CMusUiGeneralView::RefreshBackgroundContainer()
+    {
+    if ( !iBackgroundContainer )
+        {
+        return;
+        }  
+    TBool displayEnabled( EFalse );
+    if ( EventController() )
+        {
+        TRAP_IGNORE( displayEnabled = EventController()->IsDisplayEnabledL() )
+        }
+
+    if ( !displayEnabled )
+        {
+        MUS_LOG( "mus: [MUSUI ] <-> CMusUiGeneralView::RefreshBackgroundContainer()" )
+        iBackgroundContainer->SetRect( ClientRect() );
+        }
+    }
+
+// end of file
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiinvitationquery.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,193 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#include "musuiinvitationquery.h"
+#include "musuiinvitationqueryobserver.h"
+#include "musuidefinitions.h"
+#include "musuiactivetimer.h"
+#include "muslogger.h"
+#include "musunittesting.h"
+
+#include <AknGlobalConfirmationQuery.h>
+#include <avkon.rsg>
+#include <musui.rsg>
+#include <StringLoader.h>
+
+
+// -----------------------------------------------------------------------------
+// Two phase constructor
+// -----------------------------------------------------------------------------
+//
+CMusUiInvitationQuery* CMusUiInvitationQuery::NewL(
+                                MMusUiInvitationQueryObserver& aView )
+    {
+    CMusUiInvitationQuery* self
+            = new( ELeave ) CMusUiInvitationQuery( aView );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CMusUiInvitationQuery::~CMusUiInvitationQuery()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiInvitationQuery::~CMusUiInvitationQuery" );
+
+    delete iGlobalQuery;
+    delete iPrompt;
+    
+    delete iActiveTimer;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiInvitationQuery::~CMusUiInvitationQuery" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CMusUiInvitationQuery::CMusUiInvitationQuery( MMusUiInvitationQueryObserver& aView )
+    : CActive( EPriorityNormal ), iObserver( aView )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CMusUiInvitationQuery::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiInvitationQuery::ConstructL" );
+
+    iGlobalQuery = CAknGlobalConfirmationQuery::NewL();
+    iPrompt = NULL;
+    
+    iActiveTimer = CMusUiActiveTimer::NewL( this );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiInvitationQuery::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Shows the confirmation query dialog
+// -----------------------------------------------------------------------------
+//
+void CMusUiInvitationQuery::ShowL( const TDesC& aContact )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiInvitationQuery::ShowL" );
+    if ( iPrompt )
+        {
+        delete iPrompt;
+        iPrompt = NULL;
+        }
+
+    iPrompt = StringLoader::LoadL(
+                            R_MUS_RECEIVE_VIEW_NOTE_INCOMING_VIDEO_REQUEST,
+                            aContact );
+	if ( iActiveTimer->IsActive() )
+	    {
+	    // If Timer is active already , dont know what to do
+	    // It might mean a invitation ongoing.
+	    }
+	else
+	    {
+		iActiveTimer->After( KMusInviteExpireTimeout * KMusOneSecond );
+        iGlobalQuery->ShowConfirmationQueryL( 
+                                iStatus,
+                                *iPrompt,
+                                R_AVKON_SOFTKEYS_YES_NO );
+        SetActive();    
+	    }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiInvitationQuery::ShowL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Timer Expiry event.
+// -----------------------------------------------------------------------------
+//
+void CMusUiInvitationQuery::TimerComplete( CMusUiActiveTimer* /*aTimer*/ )
+    {
+    Cancel();
+    TRAP_IGNORE( iObserver.InvitationRejectedL() );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CActive RunL implementation.
+// -----------------------------------------------------------------------------
+//
+void CMusUiInvitationQuery::RunL()
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiInvitationQuery::RunL [%d]", iStatus.Int() );
+    iActiveTimer->Cancel();
+    if ( iStatus == EAknSoftkeyYes )
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiInvitationQuery::RunL: if" );
+        iObserver.InvitationAcceptedL();
+        }
+    else    // EAknSoftkeyNo
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiInvitationQuery::RunL: else" );
+        iObserver.InvitationRejectedL();
+        }
+    Cancel();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiInvitationQuery::RunL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Cancel() will call this
+// -----------------------------------------------------------------------------
+//
+void CMusUiInvitationQuery::DoCancel()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiInvitationQuery::DoCancel" );
+    iGlobalQuery->CancelConfirmationQuery();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiInvitationQuery::DoCancel" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// If RunL() leaves should be handled here.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiInvitationQuery::RunError( TInt aError )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiInvitationQuery::RunError [%d]", aError );
+
+    // Handle the error fully here. No cleanup needed in this case.
+    // default active scheduler will panic by calling Error() if 
+    // it not handled here. so return KErrNone.
+    aError = KErrNone;
+
+    return aError;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuilevelindicator.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,490 @@
+/*
+* Copyright (c) 2003, 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class for displaying level indicator icons
+*
+*/
+
+
+// USER
+#include "musuilevelindicator.h"
+#include "musuilevelindicatorobserver.h"
+#include "muslogger.h"
+#include "musresourcefinderutil.h"
+#include "musuiactivetimer.h"
+#include <musuiicons.mbg>
+#include <musui.rsg>
+
+// SYSTEM
+#include <aknslider.h>
+#include <barsread.h>
+#include <AknUtils.h>
+#include <AknsUtils.h>
+#include <data_caging_path_literals.hrh>
+#include <gulicon.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <AknsDrawUtils.h>
+
+
+// CONSTANTS
+const TInt KMusUiLevelDisableTime = 4000000;
+const TInt KMusUiSliderEventDelay = 300000;
+
+
+_LIT( KMyBitmapRomFile, "Z:\\resource\\apps\\musuiicons.mif" );
+//_LIT( KMyBitmapRamFile, "C:\\resource\\apps\\musuiicons.mif" );
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiLevelIndicator::CMusUiLevelIndicator(
+        						TInt aMinLevel, 
+        						TInt aMaxLevel, 
+        						MMusUiLevelIndicatorObserver* aObserver )
+    : iMinLevel( aMinLevel ),
+      iMaxLevel( aMaxLevel ),
+      iObserver( aObserver )
+    {
+    MUS_LOG( "mus: mus: [MUSUI ] -> CMusUiLevelIndicator::CMusUiLevelIndicator()" );
+    // pass    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::CMusUiLevelIndicator()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiLevelIndicator* CMusUiLevelIndicator::NewL(
+                        TAknOrientation aLayout, 
+                        TInt aMinLevel,
+                        TInt aMaxLevel,
+                        CCoeControl* aParent,
+                        const TRect& aRect,
+                        MMusUiLevelIndicatorObserver* aObserver )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiLevelIndicator::NewL()" );
+    
+    CMusUiLevelIndicator* self = NewLC( aLayout,
+                                        aMinLevel,
+                                        aMaxLevel,
+                                        aParent,
+                                        aRect,
+                                        aObserver );
+    CleanupStack::Pop( self );
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::NewL()" );
+    
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiLevelIndicator* CMusUiLevelIndicator::NewLC(
+                        TAknOrientation aLayout, 
+                        TInt aMinLevel,
+                        TInt aMaxLevel,
+                        CCoeControl* aParent,
+                        const TRect& aRect,
+                        MMusUiLevelIndicatorObserver* aObserver )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiLevelIndicator::NewLC()" );
+    
+    CMusUiLevelIndicator* self = new ( ELeave ) CMusUiLevelIndicator(
+                            aMinLevel,
+                            aMaxLevel,
+                            aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL( aLayout, aParent, aRect );
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::NewLC()" );
+    
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiLevelIndicator::~CMusUiLevelIndicator()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiLevelIndicator::~CMusUiLevelIndicator()" );
+
+    delete iSlider;
+    delete iSliderEventTimer;
+    delete iDisableLevelTimer;
+  
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::~CMusUiLevelIndicator()" );
+    }
+        
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLevelIndicator::ConstructL( TAknOrientation aLayout,
+                                       CCoeControl* aParent,
+                                       const TRect& aRect )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiLevelIndicator::ConstructL()" );
+    
+    SetRect(aRect);
+        
+    if( iMinLevel > iMaxLevel )
+        {
+        User::Leave( KErrArgument );
+        }
+        
+    iDisableLevelTimer = CMusUiActiveTimer::NewL( this ); 
+    iSliderEventTimer = CMusUiActiveTimer::NewL( this );
+
+    iSlider = new CAknSlider();     
+    
+    TResourceReader reader;
+
+    if( aLayout == EAknOrientationHorizontal )   
+        {
+        iEikonEnv->CreateResourceReaderLC( reader, R_MUS_SLIDER_HORIZONTAL );                                        
+        MUS_LOG( "mus: [MUSUI ] -> ConstructFromResourceL" );    
+        iSlider->ConstructFromResourceL( aParent, 0, reader);            
+        CleanupStack::PopAndDestroy(); // reader 
+        iSlider->SetRange( iMinLevel, iMaxLevel );          
+        iSlider->SetRect( aRect );        
+        }
+    else
+        {
+        iEikonEnv->CreateResourceReaderLC( reader, R_MUS_SLIDER_VERTICAL );                    
+        iSlider->ConstructFromResourceL( aParent, 0 ,reader);            
+        CleanupStack::PopAndDestroy(); // reader          
+        TRect rect = TRect( TPoint( (aRect.iBr.iX - iSlider->Size().iWidth),(aRect.iTl.iY) ),TSize( iSlider->Size() ) );             
+        iSlider->SetRect(rect);                   
+           
+        /* Draw the Min and Max Zoom */
+        TParse parse;
+        parse.Set( KMyBitmapRomFile, &KDC_APP_RESOURCE_DIR, NULL );
+        CFbsBitmap* bitmap = NULL;
+        CFbsBitmap* mask = NULL;
+        AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+                           KAknsIIDQsnBgScreen,
+                           bitmap,
+                           mask,
+                           parse.FullName(),
+                           EMbmMusuiiconsQgn_indi_browser_tb_zoom_in,                           
+                           EMbmMusuiiconsQgn_indi_browser_tb_zoom_in_mask);   
+        iSlider->SetGraphics(CAknSlider::EElemEmptyLeftCap,bitmap,mask);
+        AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+                           KAknsIIDQsnBgScreen,                           
+                           bitmap,
+                           mask,
+                           parse.FullName(),
+                           EMbmMusuiiconsQgn_indi_browser_tb_zoom_out,
+                           EMbmMusuiiconsQgn_indi_browser_tb_zoom_out_mask);           
+        iSlider->SetGraphics(CAknSlider::EElemEmptyRightCap,bitmap,mask); 
+        }
+            
+    iSlider->HandleResourceChange( 
+                            KEikMessageCaptionedControlEditableStateChange );  
+    iSlider->SetObserver( this );     
+    iSlider->SetPositionIndicators( CAknSlider::EPosMarker );    
+    iSlider->SetTicksEnabled( EFalse );    
+    iSlider->EnableDrag();       
+    iSlider->SetStepSize( 1 );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLevelIndicator::ConstructL()" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLevelIndicator::SetLevelL( TMusUiIndicatorType aType, 
+                                      TInt aLevel, 
+                                      TBool aUseTimer )
+    {
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiLevelIndicator::SetLevelL( %d ) ", 
+                            aLevel );
+    if ( aLevel >= iMinLevel && aLevel <= iMaxLevel )
+        {
+            switch(aType)
+                {
+                case EMusUiIndicatorTypeZoom:
+                    {
+                    iZoomLevel=aLevel;                    
+                    break;
+                    }
+                case EMusUiIndicatorTypeBrightness:
+                    {
+                    iBrightnessLevel=aLevel;
+                    break;
+                    }
+                case EMusUiIndicatorTypeDuration:
+                    {
+                    iDurationLevel=aLevel;
+                    break;
+                    }
+                 }
+        }
+
+    // Set it to the slider
+    if ( !iSliderEventTimer->IsActive() )
+        {
+        iSlider->SetValueL( aLevel );
+        }
+    
+    DrawNow();
+        
+    if ( aUseTimer )
+        {
+        iDisableLevelTimer->After( KMusUiLevelDisableTime );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::SetLevelL()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiLevelIndicator::GetLevel( TMusUiIndicatorType aType )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiLevelIndicator::GetLevel()" );
+    
+    TInt ret=KErrNotFound;
+    
+    switch(aType)
+        {
+        case EMusUiIndicatorTypeZoom:
+            {
+            ret=iZoomLevel;
+            break;
+            }
+        case EMusUiIndicatorTypeBrightness:
+            {
+            ret=iBrightnessLevel;
+            break;
+            }
+
+        case EMusUiIndicatorTypeDuration:
+            {
+            ret = iSlider->Value();
+            break;
+            }
+         }
+ 
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::GetLevel()" );
+    return ret;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLevelIndicator::SetRange( TInt aMinLevel, 
+                                     TInt aMaxLevel, 
+                                     TBool aUseTimer)
+    {
+    MUS_LOG2( "mus: [MUSUI ] -> CMusUiLevelIndicator::SetRange( %d - %d ) ",
+                            aMinLevel, aMaxLevel );
+                            
+    if( aMinLevel < aMaxLevel )
+        {
+        iMinLevel = aMinLevel;
+        iMaxLevel = aMaxLevel;
+        iSlider->SetRange( iMinLevel, iMaxLevel );
+        }
+        
+    if ( aUseTimer )
+       {
+       iDisableLevelTimer->After( KMusUiLevelDisableTime );
+       }
+   
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::SetRange()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLevelIndicator::SetIndicatorType( TMusUiIndicatorType aType )
+    {
+    iIndicatorType = aType;
+    }
+    
+  
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TMusUiIndicatorType CMusUiLevelIndicator::GetIndicatorType()
+	{
+	return iIndicatorType;
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLevelIndicator::SizeChanged()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiLevelIndicator::SizeChanged()" );
+    
+    if ( iSlider )
+        { 
+        iSlider->SetRect( Rect() );
+        }
+        
+    DrawNow();
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::SizeChanged()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+void CMusUiLevelIndicator::Draw( const TRect& aRect ) const
+    {
+    CWindowGc& gc = SystemGc();    
+    gc.SetBrushColor( iEikonEnv->ControlColor( EColorWindowBackground, *this ) );
+    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+    gc.Clear( aRect );    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiLevelIndicator::CountComponentControls() const
+    {
+    return 1;   // return nbr of controls inside this container
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to retrieve the control specified by index.
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CMusUiLevelIndicator::ComponentControl( TInt aIndex ) const
+    {
+    switch ( aIndex )
+        {        
+        case 0:
+            {
+            return iSlider;
+            }
+        default:
+            {
+            return NULL;
+            }
+        }
+    }
+ 
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiLevelIndicator::HandleResourceChange( TInt aType )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiLevelIndicator::HandleResourceChange()" );
+    
+    if( aType==KEikDynamicLayoutVariantSwitch )
+        {
+        if ( iSlider ) // Force a re-layout
+            {
+            iSlider->SetRect( Rect() );        
+            }            
+        }
+        
+    DrawNow();
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLevelIndicator::HandleResourceChange()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiLevelIndicator::HandleControlEventL( CCoeControl* aControl,
+                                        TCoeEvent aEventType)
+    {
+    // No logging due to huge amount of events
+    
+    if ( aControl == iSlider &&
+         aEventType == MCoeControlObserver::EEventStateChanged )
+        {
+        // Restart the disable timer if running
+        if ( iDisableLevelTimer->IsActive() )
+            {
+            iDisableLevelTimer->After( KMusUiLevelDisableTime );
+            }
+            
+        if ( iObserver )
+            {
+            iSliderEventTimer->After( KMusUiSliderEventDelay );
+            }
+        }
+    
+    // No logging due to huge amount of events
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiLevelIndicator::TimerComplete( CMusUiActiveTimer* aTimer )
+    {    
+    if ( aTimer == iSliderEventTimer )
+        {
+        MUS_LOG( "mus: [MUSUI ]    Slider event timer complete" );
+
+        if ( iObserver )
+            {
+            iObserver->IndicatorLevelChanged( iSlider->Value() );
+            }
+        }
+    else if ( aTimer == iDisableLevelTimer )
+        {
+        MUS_LOG( "mus: [MUSUI ]    Slider visibility timer complete" );
+
+        if ( iObserver )
+            {
+            iObserver->SetLevelIndicatorVisibility( EFalse );
+            }
+        }
+    else
+        {
+        // NOP
+        }
+    }
+    
+
+
+// End of File
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuilivesharingcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,991 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Application's UI class.
+*
+*/
+
+
+
+#include "musuilivesharingcontroller.h"
+#include "musuicallbackservice.h"
+#include "musuieventobserver.h"
+#include "musuisharingobserver.h"
+#include "musuisendobserver.h"
+#include "musuilivesharingobserver.h"
+#include "musuidialogutil.h"
+#include "musenglivesession.h"
+#include "musuiresourcehandler.h"
+#include "musui.hrh"
+#include "mussettings.h"
+#include "mussettingskeys.h"
+#include "muslogger.h" // debug logging
+#include "musuigeneralview.h"
+#include "musuiactivetimer.h"
+
+#include <musui.rsg>
+#include <avkon.hrh>
+#include <StringLoader.h>
+
+#include <AknUtils.h>
+
+using namespace NMusResourceApi;
+using namespace MusSettingsKeys;
+
+const TInt KMusUiPauseResumeGuardPeriod = 500000;
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiLiveSharingController* CMusUiLiveSharingController::NewL(
+                        MMusUiEventObserver& aEventObserver,
+                        MMusUiSharingObserver& aSharingObserver,
+	                    MMusUiSendObserver& aSendObserver,
+                        MMusUiLiveSharingObserver& aLiveObserver,
+                        const TRect& aRect )
+    {
+    CMusUiLiveSharingController* self =
+             new( ELeave ) CMusUiLiveSharingController( aEventObserver,
+                                                        aSharingObserver,
+                                                        aSendObserver,
+                                                        aLiveObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiLiveSharingController::~CMusUiLiveSharingController()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::~CMusUiLiveSharingController" );
+    delete iSession;
+    delete iPauseResumeGuardTimer;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::~CMusUiLiveSharingController" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiLiveSharingController::CMusUiLiveSharingController(
+                            MMusUiEventObserver& aEventObserver,    
+                        	MMusUiSharingObserver& aSharingObserver,
+	                        MMusUiSendObserver& aSendObserver,
+	                        MMusUiLiveSharingObserver& aLiveObserver )
+	: CMusUiSendController( aEventObserver, aSharingObserver, aSendObserver ),
+	  iLiveObserver( aLiveObserver )
+    {
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::ConstructL( const TRect& aRect )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::ConstructL" );
+    
+    CMusUiSendController::ConstructL(); // Base class construction
+
+    iSession = CMusEngLiveSession::NewL( VideoFileNameL(),
+                                         aRect,
+                                         *this,
+                                         *this,
+                                         *this,
+                                         iSipProfileId );
+
+    iSession->SetAudioRoutingObserver( this );
+    iSession->SetVolumeChangeObserver( this );
+        
+    if ( iSession->AudioRoutingCanBeChanged() && !iSession->IsAudioRoutingHeadset() )
+        {
+        iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
+        }
+        
+    if ( iVideoCodec && iVideoCodec->Length() > 0 )
+        {
+        iSession->SetSupportedVideoCodecListL( *iVideoCodec );
+        }
+    
+    iPauseResumeGuardTimer = CMusUiActiveTimer::NewL( NULL );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::ConstructL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::PlayL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::PlayL" );
+    
+    CMusUiSendController::PlayL();
+    iEventObserver.ShowNaviPaneIconL( 
+                    (!iDiskFull) ? RecordIcon() : EMusUiNaviIconRecordNot );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::PlayL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// When orientation changed , Camera instances has to be recreated inorder
+// to receive proper orientated frames.
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::RefreshCameraOrientationL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::RefreshCameraOrientationL" );
+
+    if ( EngineSession() ){
+        EngineSession()->RefreshOrientationL();
+    }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::RefreshCameraOrientationL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::PauseL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::PauseL" );
+    
+    CMusUiSendController::PauseL();
+    iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::PauseL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::DeleteEngineSession()
+    {
+    CMusUiSendController::DeleteEngineSession();
+    if ( iSession && iSession->IsAudioRoutingLoudSpeaker() )
+	    {
+	    iShowDialog = ETrue; 
+	    }
+    delete iSession;
+    iSession = NULL;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngMceOutSession* CMusUiLiveSharingController::EngineOutSession()
+    {
+    return iSession; // Live session is CMusEngMceOutSession
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::InviteL( const TDesC& aRecipient )
+    {
+    MUS_LOG_TDESC( "mus: [MUSUI ]    -> CMusUiLiveSharingController::InviteL:",
+                            aRecipient );
+
+    // Registration must not be pending in this phase
+    __ASSERT_ALWAYS( !iSipRegistrationPending, 
+                     iEventObserver.HandleError( KErrNotReady ) );
+    
+    delete iAddress;
+    iAddress = NULL;
+    iAddress = aRecipient.AllocL();
+
+    
+    TRAPD( err, iSession->InviteL( aRecipient ) );
+    MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingController::InviteL: After TRAPD" );
+
+    // If address is in wrong format, Manual Address Entry Dialog
+    // is displayed
+    if ( err != KErrNone )
+        {
+        // Display the error message
+        DismissWaitDialog();
+        if ( !ExitOccured() )
+            {
+            MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_INVITE_ERROR );
+            }
+        if ( ( ++iTriedInvitations < 2 )  && ( err == KErrArgument ) )
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingController::InviteL: iTriedInvitations < 2" );
+            iManualAddressTyped = ETrue;
+            iResourceHandler->RequestKeypadL( ETrue );
+            iSendObserver.ManualAddressEntryL( *iRemoteSipAddressProposal );
+            return;
+            }
+        else
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingController::InviteL: ++iTriedInvitations > 1" );
+            HandleExitL();
+            return;
+            }
+        }
+    
+    SetConnectionInitialized( ETrue );
+        
+    ShowInvitingWaitDialogL();
+    
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::InviteL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::HandleSliderValueChangeL( TInt aNewLevel )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingController::HandleSliderValueChangeL(%d)",
+              aNewLevel )
+
+    __ASSERT_ALWAYS( !ExitOccured(), User::Leave( KErrDied ) );
+    __ASSERT_ALWAYS( iConnectionEstablished, User::Leave( KErrNotReady ) );
+    
+    if ( iToolbarZoomSelected )
+        {
+        iSession->SetZoomL( aNewLevel );
+        iLiveObserver.SetZoomL( iSession->CurrentZoomL() );
+        }
+    else
+        {
+        iSession->SetBrightnessL( aNewLevel );
+        iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() );
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::HandleSliderValueChangeL" )
+    }
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::OfferToolbarEventL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingController::OfferToolbarEventL [%d]",
+                            aCommand );
+    
+    iLiveObserver.SetZoomVisible( EFalse );
+    iLiveObserver.SetBrightnessVisible( EFalse );
+                                                    
+    switch ( aCommand )
+        {
+        case EMusuiCmdToolbarPauseLive:
+            {
+            HandleCommandL( EMusuiCmdViewPause );
+            HandlePauseResumeInToolbar();
+            break;
+            }
+            
+        case EMusuiCmdToolbarUnPauseLive:
+            {
+            HandleCommandL( EMusuiCmdViewContinue );
+            HandlePauseResumeInToolbar();
+            break;
+            }
+        case EMusuiCmdToolbarZoom:
+            {
+            iToolbarZoomSelected = !iToolbarZoomSelected;
+            
+            if ( iToolbarZoomSelected )
+                {
+                iLiveObserver.SetZoomValues( iSession->MinZoomL(), 
+                                             iSession->MaxZoomL() );
+                iLiveObserver.SetZoomL( iSession->CurrentZoomL() );
+                }
+            
+            iLiveObserver.SetZoomVisible( iToolbarZoomSelected );
+            iSharingObserver.HighlightSelectedToolbarItem( EMusuiCmdToolbarZoom );
+            
+            break;
+            }
+        case EMusuiCmdToolbarBrightness:
+            {
+            iToolbarBrightnessSelected = !iToolbarBrightnessSelected;
+            
+            if ( iToolbarBrightnessSelected )
+                {
+                MUS_LOG1( "mus: [MUSUI ]     CMusUiLiveSharingController::OfferToolbarEventL: Brightness %d",
+                                iSession->CurrentBrightnessL() );
+                                
+                iLiveObserver.SetBrightnessValues( iSession->MinBrightnessL(),
+                                                   iSession->MaxBrightnessL() );
+                
+                iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() );
+                }
+            
+            iLiveObserver.SetBrightnessVisible( iToolbarBrightnessSelected );
+            iSharingObserver.HighlightSelectedToolbarItem( EMusuiCmdToolbarBrightness );
+            
+            break;
+            }        
+        default:    // Not live specific, let the base class handle
+            {
+            CMusUiEventController::OfferToolbarEventL( aCommand );
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::OfferToolbarEventL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::HandleCommandL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingController::HandleCommandL [%d]",
+                            aCommand );
+
+    __ASSERT_ALWAYS( !ExitOccured(), User::Leave( KErrDied ) );
+
+    switch ( aCommand )
+        {
+        case EMusuiCmdViewPause:
+            {            
+            UserInitiatedCameraStateChangeL(EFalse);
+            break;
+            }
+        case EMusuiCmdViewContinue:
+            {
+            UserInitiatedCameraStateChangeL(ETrue);
+            break;
+            }
+
+        case EMusuiCmdViewShareVideo:
+            {
+            PauseL();
+            // TODO: Change to video sharing
+            break;
+            }
+        case EMusuiCmdViewShareImage:
+            {
+            PauseL();
+            // TODO: Change to image sharing
+            break;
+            }
+
+        case EMusuiCmdToolbarZoom:
+            {
+            iToolbarZoomSelected = ETrue;
+            iToolbarBrightnessSelected = EFalse;
+            iLiveObserver.SetZoomValues( iSession->MinZoomL(), 
+                                         iSession->MaxZoomL() );
+            iLiveObserver.SetZoomL( iSession->CurrentZoomL() );
+            
+            iLiveObserver.SetZoomVisible( iToolbarZoomSelected );
+            break;
+            }
+        case EMusuiCmdViewMiddleSoftkeyOk:
+            {
+            HandleMiddleSoftkeyOkL();
+            break;
+            }            
+
+        case EMusuiCmdViewZoom:
+            {
+            ZoomL();
+            break;
+            }
+            
+        case EMusuiCmdViewZoomIn:
+            {
+            iLiveObserver.SetZoomVisible( MUS_NO_TOOLBAR ? iZoomSelected : iToolbarZoomSelected ); 
+            iSession->ZoomInL();
+            iLiveObserver.SetZoomL( iSession->CurrentZoomL() );
+            break;
+            }
+        case EMusuiCmdViewZoomOut:
+            {
+            iLiveObserver.SetZoomVisible( MUS_NO_TOOLBAR ? iZoomSelected : iToolbarZoomSelected ); 
+            iSession->ZoomOutL();
+            iLiveObserver.SetZoomL( iSession->CurrentZoomL() );
+            break;
+            }
+
+        case EMusuiCmdToolbarBrightness:
+            {
+            iToolbarZoomSelected = EFalse;
+            iToolbarBrightnessSelected = ETrue;
+            iLiveObserver.SetBrightnessValues( iSession->MinBrightnessL(),
+                                               iSession->MaxBrightnessL() );
+            iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() );
+            
+            iLiveObserver.SetBrightnessVisible( iToolbarBrightnessSelected );
+            break;
+            }
+        case EMusuiCmdViewBrightness:
+            {
+            BrightnessL();
+            break;
+            }            
+            
+        case EMusuiCmdViewIncreaseBrightness:
+            {
+			iLiveObserver.SetBrightnessVisible( MUS_NO_TOOLBAR ? iBrightnessSelected : iToolbarBrightnessSelected ); 
+            iSession->IncreaseBrightnessL();
+            iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() );
+            break;
+            }
+        case EMusuiCmdViewDecreaseBrightness:
+            {
+			iLiveObserver.SetBrightnessVisible( MUS_NO_TOOLBAR ? iBrightnessSelected : iToolbarBrightnessSelected ); 
+            iSession->DecreaseBrightnessL();
+            iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() );
+            break;
+            }            
+
+        case EMusuiCmdRecord:
+            {
+            // Show toolbar hidden while showing options menu
+            iEventObserver.SetToolbarVisibility( ETrue );
+            
+            if ( iDiskFull )
+            	{
+            	DiskFull();
+            	}
+            else
+            	{
+	            iSession->RecordL( ETrue );
+	            iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconRecord );
+            	}
+            break;
+            }
+        case EMusuiCmdStopRecording:
+            {
+            // Show toolbar hidden while showing options menu
+            iEventObserver.SetToolbarVisibility( ETrue );
+            
+            iSession->RecordL( EFalse );
+            iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconRecordNot );
+            break;
+            }
+            
+        default:
+            {
+            // Try more general handling
+            CMusUiEventController::HandleCommandL( aCommand );
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::HandleCommandL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::LevelIndicatorDismissed()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::LevelIndicatorDismissed" );
+    if ( MUS_NO_TOOLBAR )
+        {
+        iZoomSelected = EFalse;
+        iBrightnessSelected = EFalse;
+        TRAP_IGNORE( iSharingObserver.EnableMiddleSoftkeyL( IsLoudSpeakerEnabled() ?
+                                                R_MUSUI_VIEW_OPS_MSK_IHF_OFF :
+                                                R_MUSUI_VIEW_OPS_MSK_IHF_ON ) );
+        }
+    else
+        {
+        if ( iToolbarZoomSelected )
+            {
+            iToolbarZoomSelected = EFalse;
+            if ( !AknLayoutUtils::PenEnabled() )
+                {
+                TRAP_IGNORE( iSharingObserver.HighlightSelectedToolbarItem(EMusuiCmdToolbarZoom) );
+                }
+            }
+        else if( iToolbarBrightnessSelected )
+            {
+            iToolbarBrightnessSelected = EFalse;            
+            if ( !AknLayoutUtils::PenEnabled() )
+                {
+                TRAP_IGNORE( iSharingObserver.HighlightSelectedToolbarItem(EMusuiCmdToolbarBrightness) );
+                }
+            }
+            
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::LevelIndicatorDismissed" );
+    }
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TMusUiNaviMediaDecorator CMusUiLiveSharingController::RecordIcon()
+    {
+    MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingController::RecordIcon" );
+        
+    return (iSession->IsRecording() == EFalse) ?
+                            EMusUiNaviIconRecordNot :
+                            EMusUiNaviIconRecord;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiLiveSharingController::IsBrightnessSupported()
+    {
+    if ( !iSession )
+        {
+        return EFalse;
+        }
+    TRAPD( error, iSession->SetBrightnessL( iSession->CurrentBrightnessL() ) )
+    return ( error == KErrNotSupported ) ? EFalse : ETrue;
+    }
+
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiLiveSharingController::IsDiskFull()
+    {
+    return iDiskFull;	
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiLiveSharingController::ToolbarZoomSelected()
+    {
+    return iToolbarZoomSelected;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiLiveSharingController::ToolbarBrightnessSelected()
+    {
+    return iToolbarBrightnessSelected;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiLiveSharingController::ZoomSelected()
+    {
+    return iZoomSelected;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiLiveSharingController::BrightnessSelected()
+    {
+    return iBrightnessSelected;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::ZoomL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::ZoomL" );
+    iZoomSelected = ETrue;
+    iLiveObserver.SetZoomValues( iSession->MinZoomL(), iSession->MaxZoomL() );
+    iLiveObserver.SetZoomL( iSession->CurrentZoomL() );
+    iLiveObserver.SetZoomVisible( ETrue );
+    
+    if ( MUS_NO_TOOLBAR )
+        {
+        iSharingObserver.EnableMiddleSoftkeyL( R_MUSUI_VIEW_MSK_OK );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::ZoomL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::BrightnessL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::BrightnessL" );
+    iBrightnessSelected = ETrue;
+    iLiveObserver.SetBrightnessValues( iSession->MinBrightnessL(), 
+            iSession->MaxBrightnessL() );
+    iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() );
+    iLiveObserver.SetBrightnessVisible( ETrue );
+
+    if ( MUS_NO_TOOLBAR )
+        {
+        iSharingObserver.EnableMiddleSoftkeyL( R_MUSUI_VIEW_MSK_OK );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::BrightnessL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::HandleMiddleSoftkeyOkL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::HandleMiddleSoftkeyOkL" );
+
+    if ( iZoomSelected )
+        {
+        iZoomSelected = EFalse;
+        iLiveObserver.SetZoomVisible( EFalse );
+        }
+    else if ( iBrightnessSelected )
+        {
+        iZoomSelected = EFalse;
+        iLiveObserver.SetBrightnessVisible( EFalse );
+        }
+    
+    iSharingObserver.EnableMiddleSoftkeyL( IsLoudSpeakerEnabled() ?
+                                                R_MUSUI_VIEW_OPS_MSK_IHF_OFF :
+                                                R_MUSUI_VIEW_OPS_MSK_IHF_ON );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::HandleMiddleSoftkeyOkL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::ZoomInL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::ZoomInL" );
+    iSession->ZoomInL();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::ZoomInL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::ZoomOutL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::ZoomOutL" );
+    iSession->ZoomOutL();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::ZoomOutL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::IncreaseBrightnessL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::IncreaseBrightnessL" );
+    iSession->IncreaseBrightnessL();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::IncreaseBrightnessL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::DecreaseBrightnessL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::DecreaseBrightnessL" );
+    iSession->DecreaseBrightnessL();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::DecreaseBrightnessL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::DiskFull()
+    {
+    // Update the icon:
+    TRAP_IGNORE( iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconRecordNot );
+    DismissWaitDialog();
+    // Saving ends when disk is full but streaming continues (user is notified)
+    TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( R_MUS_VIEW_NOTE_MEMORY_LOW ) ) );
+    iDiskFull = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::OrientationRefreshEnded()  
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::OrientationRefreshEnded" );
+    iLiveObserver.DoRefreshView();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::OrientationRefreshEnded" );
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::SessionEstablished()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionEstablished" );
+    
+    iSessionEstablished = ETrue;
+    
+    TRAPD( error, iResourceHandler->RequestCameraL( ETrue ) );
+    if ( error != KErrNone )
+        {
+        MUS_LOG1( "mus: [MUSUI ]     RequestCameraL leave code: %d", error )
+        }
+        
+    CMusUiSendController::SessionEstablished(); // Base class handling
+    
+    iVideoToBeSaved = ETrue;
+    
+    MusSettingsKeys::TAutoRecord autoRecordValue = EAutoRecordOff; 
+        TRAPD ( errAutoRecord, autoRecordValue = 
+                    MultimediaSharingSettings::AutoRecordSettingL() );
+    if ( errAutoRecord != KErrNone )
+        {
+        MUS_LOG1( "mus: [MUSUI ]     AutoRecordSettingL leave code: %d", errAutoRecord )
+        HandleError( errAutoRecord );
+        }
+    
+    if ( autoRecordValue != EAutoRecordOff )
+        {
+        TRAPD ( errRecordL, iSession->RecordL( ETrue ) );
+        if ( errRecordL != KErrNone )
+            {
+            MUS_LOG1( "mus: [MUSUI ]     RecordL leave code: %d", errRecordL )
+            HandleError( errRecordL );
+            }
+        }
+
+    TRAP_IGNORE( iEventObserver.ShowNaviPaneIconL( RecordIcon() ) )
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::SessionEstablished" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::SessionTerminated()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionTerminated" );    
+    iSessionEstablished = EFalse;
+    if ( !ExitOccured() )
+        {
+        DismissWaitDialog();
+        
+        TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::SessionTerminated" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::SessionConnectionLost()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionConnectionLost" );
+    iSessionEstablished = EFalse;
+    DismissWaitDialog();
+    if ( !ExitOccured() )
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_CONNECTION_LOST ) );
+        }
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::SessionConnectionLost" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::SessionFailed()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionFailed" );
+    iSessionEstablished = EFalse;
+    if ( !ExitOccured() )
+        {
+        DismissWaitDialog();
+       
+        TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::SessionFailed" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::StreamIdle()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::StreamIdle" );
+    DismissWaitDialog();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::StreamIdle" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::StreamStreaming()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::StreamStreaming" );
+    //DismissWaitDialog();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::StreamStreaming" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::SessionTimeChanged(
+                        const TTimeIntervalSeconds& aSeconds )
+    {
+    if ( aSeconds.Int() > -1 )
+        {
+        iSharingObserver.UpdateSessionTime( SessionTimeFormatted( aSeconds ) );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::InactivityTimeout()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::InactivityTimeout" );
+    DismissWaitDialog();
+    if ( !ExitOccured() )
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_SERVICE_N_A ) );
+        }
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::InactivityTimeout" );
+    }
+
+// -----------------------------------------------------------------------------
+// Determines whether Session established or not
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiLiveSharingController::IsSessionEstablished()
+	{
+	return iSessionEstablished;
+	}
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::HandlePauseResumeInToolbar()
+    {
+    TBool isPlaying( EFalse );
+    TRAP_IGNORE( isPlaying = IsPlayingL() )
+    if ( isPlaying )
+        {
+        iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnPauseLive,
+                                                EMusuiCmdToolbarPauseLive,
+                                                ETrue );
+        }
+    else
+        {
+        iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPauseLive,
+                                                EMusuiCmdToolbarUnPauseLive,
+                                                ETrue );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// Workaround for problem at lower level (encoder side) which causes crash
+// if several sequential pause/resumes are done too rapidly. Discard state change
+// attempt if it occurs too quickly after previous state change.
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::UserInitiatedCameraStateChangeL( TBool aEnable )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingController::UserInitiatedCameraStateChangeL, enable:", 
+              aEnable );
+    
+    if ( iPauseResumeGuardTimer->IsActive() ){
+        MUS_LOG( "mus: [MUSUI ]  <- State change ignored as guard timer is running!" );
+        return;
+    }
+    
+    if ( aEnable )
+        {
+        PlayL();
+        }
+    else
+        {
+        PauseL();
+        }
+    
+    iPauseResumeGuardTimer->After( KMusUiPauseResumeGuardPeriod );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::UserInitiatedCameraStateChangeL" );
+    }
+
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuilivesharingview.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,786 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#include "musenglivesession.h"
+#include "musuilivesharingview.h"
+#include "musuilivesharingviewcontainer.h"
+#include "musuibackgroundviewcontainer.h"
+#include "musuilivesharingcontroller.h"
+#include "musuiactivitymanger.h"
+#include "musuiappui.h"
+#include "musuistatuspanehandler.h"
+#include "musui.hrh"
+#include "musuidefinitions.h"
+#include "muslogger.h" // debug logging
+#include <musui.rsg>
+#include <musui.mbg>
+#include "musengmcesession.h"
+
+#include <aknViewAppUi.h>
+#include <avkon.hrh>
+#include <eikmenup.h>
+#include <akntoolbar.h>
+
+
+const TInt KMusUiContainerWidth = 30;
+
+
+// -----------------------------------------------------------------------------
+// EPOC two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::ConstructL" );
+
+    CMusUiSendView::ConstructL();
+
+    Toolbar()->SetToolbarObserver( this );
+    Toolbar()->UpdateBackground();
+/*
+    if( MUS_NO_TOOLBAR )
+        {
+        MUS_LOG( "mus: [MUSUI ]  Operator variant hides toolbar!" );
+        Toolbar()->SetToolbarVisibility( EFalse );
+        Toolbar()->MakeVisible(EFalse);
+        }
+*/
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CMusUiLiveSharingView::~CMusUiLiveSharingView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::~CMusUiLiveSharingView" );
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        }
+    delete iContainer;
+    delete iController;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::~CMusUiLiveSharingView" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TUid CMusUiLiveSharingView::Id() const
+    {
+    MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingView::Id()" );
+    return KMusUidLiveSharingView;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Handle EKeyUpArrow key presses 
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::HandleKeyUpArrowL()
+    {
+    HandleCommandL(
+            iController->ZoomSelected() ? EMusuiCmdViewZoomIn :
+            iController->BrightnessSelected() ? EMusuiCmdViewIncreaseBrightness :
+            EMusUiCmdToolbarLastIndex );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Handle EKeyDownArrow key presses
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::HandleKeyDownArrowL()
+    {
+    HandleCommandL(
+            iController->ZoomSelected() ? EMusuiCmdViewZoomOut :
+            iController->BrightnessSelected() ? EMusuiCmdViewDecreaseBrightness :
+            EMusUiCmdToolbarLastIndex );
+    }
+
+
+
+
+// -----------------------------------------------------------------------------
+// From MEikMenuObserver, Called by framework before constructing menupane
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::DynInitMenuPaneL( TInt aResourceId,
+                                              CEikMenuPane* aMenuPane )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::DynInitMenuPaneL [%d]" );
+    SetZoomVisible(EFalse);
+    SetBrightnessVisible(EFalse);
+    // Base class initiated initialization first
+    CMusUiGeneralView::DynInitMenuPaneL( aResourceId, aMenuPane );
+    if( !MUS_NO_TOOLBAR )
+        {
+        SetInitialFocusedItemL();
+        }
+    
+    if ( aResourceId == R_MUSUI_VIEW_MENU )
+        {
+        // Delete items not related to live sharing:
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewReplay );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewAudioMute );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewAudioNormal );        
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewFullScreen );
+        
+        if ( iController->ConnectionEstablished()
+                     && !iController->IsDiskFull() )
+            {
+            CMusEngLiveSession *session = dynamic_cast <CMusEngLiveSession*>
+                ( iController->EngineOutSession() );
+            
+            if ( session->IsPlayingL() )
+                {
+                aMenuPane->DeleteMenuItem( session->IsRecording() ?
+                                           EMusuiCmdRecord :
+                                           EMusuiCmdStopRecording );
+                }
+            else
+                { 
+                // when camera source was paused, hide the command
+                aMenuPane->DeleteMenuItem( EMusuiCmdRecord );
+                aMenuPane->DeleteMenuItem( EMusuiCmdStopRecording );
+                }
+            }
+        else
+            {
+            // Hide recording commands if the session is not established
+            // TODO: check autorecord on/off
+            aMenuPane->DeleteMenuItem( EMusuiCmdRecord );
+            aMenuPane->DeleteMenuItem( EMusuiCmdStopRecording );                    
+            }
+
+        __ASSERT_ALWAYS( iController, User::Leave( KErrNotReady ) );
+    
+        if( MUS_NO_TOOLBAR )
+            {
+            aMenuPane->DeleteMenuItem( EMusuiCmdToolbarBrightness );
+            aMenuPane->DeleteMenuItem( EMusuiCmdToolbarZoom );            
+            if ( !iController->IsBrightnessSupported() ||
+                 !SendController()->IsPlayingL() )
+                {
+                aMenuPane->DeleteMenuItem( EMusuiCmdViewBrightness );
+                }
+            
+            if ( !SendController()->IsPlayingL() )
+                {
+                aMenuPane->DeleteMenuItem( EMusuiCmdViewZoom );
+                }
+            }
+        else
+            {
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewBrightness );
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewZoom );            
+            if ( !iController->IsBrightnessSupported() ||
+                 !SendController()->IsPlayingL() || 
+                 !AknLayoutUtils::PenEnabled() )
+                {
+                aMenuPane->DeleteMenuItem( EMusuiCmdToolbarBrightness );
+                }
+            
+            if ( !SendController()->IsPlayingL() ||
+                 !AknLayoutUtils::PenEnabled() )
+                {
+                aMenuPane->DeleteMenuItem( EMusuiCmdToolbarZoom );
+                }
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::DynInitMenuPaneL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::HandleToolbarCommandL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingView::HandleToolbarCommandL: %d",
+                            aCommand );
+    
+     __ASSERT_ALWAYS( iController, User::Leave( KErrNotReady ) );
+
+    switch ( aCommand )
+        {
+        case EKeyLeftArrow:
+            {
+            if( MUS_NO_TOOLBAR )
+                {
+            HandleCommandL(
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeDown :
+                    iController->BrightnessSelected() ? EMusuiCmdViewDecreaseBrightness :
+                    iController->ZoomSelected() ? EMusuiCmdViewZoomOut :
+                    EMusUiCmdToolbarLastIndex );
+                }
+            else
+                {
+                HandleCommandL(
+                        iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeDown :
+                        iController->ToolbarBrightnessSelected() ? EMusuiCmdViewDecreaseBrightness :
+                        iController->ToolbarZoomSelected() ? EMusuiCmdViewZoomOut :
+                        EMusUiCmdToolbarLastIndex );
+                }
+            break;
+            }
+        case EKeyRightArrow:
+            {
+            if( MUS_NO_TOOLBAR )
+                {
+            HandleCommandL(
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeUp :
+                    iController->BrightnessSelected() ? EMusuiCmdViewIncreaseBrightness :
+                    iController->ZoomSelected() ? EMusuiCmdViewZoomIn :
+                    EMusUiCmdToolbarLastIndex );
+                }
+            else
+                {
+                HandleCommandL(
+                        iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeUp :
+                        iController->ToolbarBrightnessSelected() ? EMusuiCmdViewIncreaseBrightness :
+                        iController->ToolbarZoomSelected() ? EMusuiCmdViewZoomIn :
+                        EMusUiCmdToolbarLastIndex );
+                }
+            break;
+            }
+        case EKeyUpArrow:
+            {
+            if( MUS_NO_TOOLBAR )
+                {
+            HandleCommandL(
+                    iController->ZoomSelected() ? EMusuiCmdViewZoomIn :
+                    iController->BrightnessSelected() ? EMusuiCmdViewIncreaseBrightness :
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeUp :
+                    EMusUiCmdToolbarLastIndex );
+                }
+            else
+                {
+                HandleCommandL(
+                        iController->ToolbarZoomSelected() ? EMusuiCmdViewZoomIn :
+                        iController->ToolbarBrightnessSelected() ? EMusuiCmdViewIncreaseBrightness :
+                        iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeUp :
+                        EMusUiCmdToolbarLastIndex );
+                }
+            break;
+            }
+        case EKeyDownArrow:
+            {
+            if( MUS_NO_TOOLBAR )
+                {
+            HandleCommandL(
+                    iController->ZoomSelected() ? EMusuiCmdViewZoomOut :
+                    iController->BrightnessSelected() ? EMusuiCmdViewDecreaseBrightness :
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeDown :
+                    EMusUiCmdToolbarLastIndex );
+                }
+            else
+                {
+                HandleCommandL(
+                        iController->ToolbarZoomSelected() ? EMusuiCmdViewZoomOut :
+                        iController->ToolbarBrightnessSelected() ? EMusuiCmdViewDecreaseBrightness :
+                        iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeDown :
+                        EMusUiCmdToolbarLastIndex );
+                }
+            break;
+            }
+        case EMusuiCmdViewVolumeDown:
+            {
+            HandleCommandL( EMusuiCmdViewVolumeDown );
+            break;
+            }
+        case EMusuiCmdViewVolumeUp:
+            {
+            HandleCommandL( EMusuiCmdViewVolumeUp );
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::HandleToolbarCommandL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::SetInitialFocusedItemL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> MusUiLiveSharingView::SetInitialFocusedItemL" );
+
+    __ASSERT_ALWAYS( iController, User::Leave( KErrNotReady ) );
+
+    if ( iOperatorSpecificFunctionality  && !AknLayoutUtils::PenEnabled() )
+        {
+        MUS_LOG( "Focus changed in OPERATOR mode !!!!!!!!!!!!!" );
+        Toolbar()->SetFocusedItemL( EMusuiCmdToolbarZoom );
+        
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::SetInitialFocusedItemL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::DynInitToolbarL( TInt aResourceId,
+                                             CAknToolbar* aToolbar )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::DynInitToolbarL" );
+
+    // Items to be removed in Live Sharing View:    
+ 	if (!AknLayoutUtils::PenEnabled())//(aResourceId == R_MUS_TOOLBAR_NONTOUCH)//
+	{
+    	Toolbar()->RemoveItem( EMusuiCmdToolbarFFRev );
+  		
+		// Items to be removed in Live Sharing View:
+    	if ( iController->DeviceHasDedicatedVolumeKeys() )
+        	{
+       		Toolbar()->RemoveItem( EMusuiCmdToolbarVolume );
+        	}
+    	else
+        	{
+        	aToolbar->SetFocusedItemL( EMusuiCmdToolbarVolume );
+        	}
+
+        
+   		if ( !iController->IsBrightnessSupported() )
+        	{
+        	Toolbar()->HideItem( EMusuiCmdToolbarBrightness, ETrue, ETrue );
+        	}
+   	 	else
+        	{
+        	if ( aToolbar->FocusedItem() == KErrNotFound )
+            	{
+            	aToolbar->SetFocusedItemL( EMusuiCmdToolbarBrightness );
+            	}
+        	}                      
+	}
+    Toolbar()->RemoveItem( EMusuiCmdToolbarPause );
+    Toolbar()->RemoveItem( EMusuiCmdToolbarUnPause );
+    Toolbar()->RemoveItem( EMusuiCmdToolbarFullScreen );
+
+    if ( iOperatorSpecificFunctionality )
+        {
+        // Remove pause/unpause functionality in operator variant case
+        Toolbar()->RemoveItem( EMusuiCmdToolbarPauseLive );
+        Toolbar()->RemoveItem( EMusuiCmdToolbarUnPauseLive );            
+        if ( (aToolbar->FocusedItem() == KErrNotFound ) &&
+			 !AknLayoutUtils::PenEnabled() )
+            {
+            aToolbar->SetFocusedItemL( EMusuiCmdToolbarZoom );
+            }
+        }
+    else        
+        {
+        // Toggled items to be hidden:
+        Toolbar()->HideItem( iPauseSelected ?
+                                EMusuiCmdToolbarPauseLive :
+                                EMusuiCmdToolbarUnPauseLive,
+                             ETrue,
+                             ETrue ); 
+        if ( aToolbar->FocusedItem() == KErrNotFound &&
+             !AknLayoutUtils::PenEnabled() )
+            {
+            aToolbar->SetFocusedItemL( EMusuiCmdToolbarPauseLive );
+            }     
+        Toolbar()->RemoveItem( EMusuiCmdToolbarBlank );
+        }
+                        
+    // Last generic base class functionality
+    CMusUiGeneralView::DynInitToolbarL( aResourceId, aToolbar );
+
+    MUS_LOG1( "aToolbar Focused Item: %d", aToolbar->FocusedItem() );
+    MUS_LOG1( "toolbar() Focused Item: %d", Toolbar()->FocusedItem() );
+                  
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::DynInitToolbarL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::SetZoomValues( TInt aMinZoom, TInt aMaxZoom )
+    {
+    iContainer->SetZoomValues( aMinZoom, aMaxZoom );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::SetBrightnessValues( TInt aMinBrightness,
+                                                 TInt aMaxBrightness )
+    {
+    iContainer->SetBrightnessValues( aMinBrightness, aMaxBrightness );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::SetZoomL( TInt aZoomLevel )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::SetZoomL" );
+    iContainer->SetZoomL( aZoomLevel );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::SetZoomL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::SetBrightnessL( TInt aBrightnessLevel )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::SetBrightnessL" );
+    iContainer->SetBrightnessL( aBrightnessLevel );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::SetBrightnessL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::SetZoomVisible( TBool aVisible )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::SetZoomVisible" );
+    
+    iContainer->SetZoomVisible( aVisible );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::SetZoomVisible" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::SetBrightnessVisible( TBool aVisible )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::SetBrightnessVisible" );
+    
+    iContainer->SetBrightnessVisible( aVisible );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::SetBrightnessVisible" );
+    }
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::LevelIndicatorDismissed()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::LevelIndicatorDismissed" );
+        iController->LevelIndicatorDismissed();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::LevelIndicatorDismissed" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::RefreshAudioRoutingButton()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::RefreshAudioRoutingButton" );
+    //We ignore audio routing change event in case there is Zoom/Brightness
+    //adjustment ongoing in operator variant. Middle softkey will be
+    //updated once adjustment is done    
+    if ( !MUS_NO_TOOLBAR ||
+         ( !iController->ZoomSelected() &&
+         !iController->BrightnessSelected() ) )
+        {
+        CMusUiGeneralView::RefreshAudioRoutingToolbarButton();        
+        }
+    
+   MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::RefreshAudioRoutingButton" );
+   }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::ReplaceToolbarCommand( TInt aOldCommand, 
+                                                   TInt aNewCommand,
+                                                   TBool aSetNewCommandFocused )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingView::ReplaceToolbarCommand: %d",
+                            aOldCommand );
+    switch ( aOldCommand )
+        {
+        case EMusuiCmdToolbarPauseLive:
+            {            
+            iPauseSelected = ETrue;
+            /* Hide pause related toolbar items */
+            HideToolbarCommandForPause(ETrue);
+            break;
+            }
+        case EMusuiCmdToolbarUnPauseLive:
+            {
+            iPauseSelected = EFalse;
+            /* Unhide pause related toolbar items */
+            HideToolbarCommandForPause(EFalse);
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    
+    // Call base class version for generic part
+    
+    CMusUiGeneralView::ReplaceToolbarCommand( aOldCommand, 
+                                              aNewCommand,
+                                              aSetNewCommandFocused );
+    
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiLiveSharingView::ReplaceToolbarCommand: %d",
+                            aNewCommand );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::RefreshView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::RefreshView" );
+    if ( iController )
+        {
+        DoRefreshView();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::RefreshView" );
+    }
+
+ 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::DoRefreshView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::DoRefreshView" );
+    
+    // Refresh background container before and after as display status
+    // may change due async orientation change handling.
+    RefreshBackgroundContainer();
+    
+    if ( iContainer )
+        {
+        TRect containerRect( ClientRect().iBr.iX - KMusUiContainerWidth, 
+                             ClientRect().iTl.iY, 
+                             ClientRect().iBr.iX,
+                             ClientRect().iBr.iY - ToolbarPlaceHolderHeight() );
+        iContainer->SetRect( containerRect );    
+        }
+    
+    if ( iController )
+        {
+        TRect videoRect( ClientRect().iTl.iX,
+                         ClientRect().iTl.iY,
+                         ClientRect().iBr.iX,
+                         ClientRect().iBr.iY - ToolbarPlaceHolderHeight() );        
+        // if this function leaves we can nothing to do for camera orientation.
+        // Alteast we can try further to set right rectangle for display
+        TRAPD(err,RefreshCameraOrientationL(videoRect));       
+        if( err )
+            {
+            MUS_LOG1( "mus: [MUSUI ]  -> Orientation can not be changed =%d",err );
+            }                        
+        iController->SetRect( videoRect );
+        }
+    
+    RefreshBackgroundContainer();
+            
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::DoRefreshView" );
+    } 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendController* CMusUiLiveSharingView::SendController() const
+    {
+    return iController;
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendViewContainer* CMusUiLiveSharingView::SendContainer() const
+    {
+    return iContainer;
+    }
+
+
+// -----------------------------------------------------------------------------
+// From CAknView, Gets called from framework when activating this view
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::DoActivateL( const TVwsViewId& aPrevViewId,
+                                         TUid aCustomMessageId,
+                                         const TDesC8& aCustomMessage )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::DoActivateL" );
+
+    // Base class activation first
+    CMusUiSendView::DoActivateL( aPrevViewId, 
+                                 aCustomMessageId,
+                                 aCustomMessage );
+    
+    TRect clientRect = ClientRect(); 
+    clientRect.iBr.iX -= ToolbarPlaceHolderWidth(); 
+    clientRect.iBr.iY -= ToolbarPlaceHolderHeight(); 
+
+    TRect containerRect( clientRect.iBr.iX - KMusUiContainerWidth, 
+    		             clientRect.iTl.iY, 
+    		             clientRect.iBr.iX,
+    		             clientRect.iBr.iY );
+
+    if ( !iContainer )
+        {
+        MUS_LOG( "mus: [MUSUI ]  CMusUiLiveSharingView::DoActivateL: !iContainer" );
+        iContainer = new ( ELeave ) CMusUiLiveSharingViewContainer();
+        iContainer->SetMopParent( this );
+        iContainer->ConstructL( this,
+                                containerRect );
+        AppUi()->AddToViewStackL( *this, iContainer );
+        }
+
+    /* Increase the ordinal position of background container
+     * So that other control will be drawn first.     
+     */
+    UpdateBackgroundOrdinalPosition( ETrue );
+    
+    TRect videoRect( ClientRect().iTl.iX,
+                     ClientRect().iTl.iY,
+                     ClientRect().iBr.iX,
+                     ClientRect().iBr.iY - ToolbarPlaceHolderHeight() );
+
+    if ( !iController )
+        {
+        MUS_LOG( "mus: [MUSUI ]  CMusUiLiveSharingView::DoActivateL: !iController" );
+        iController = CMusUiLiveSharingController::NewL( *MusAppUi(),
+                                                         *this, 
+                                                         *this,
+                                                         *this,
+                                                         videoRect );
+        iController->StartInvitationL();
+        }
+
+    iContainer->SetController( iController );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::DoActivateL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From AknView, Gets called from framework when deactivating this view
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::DoDeactivate()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::DoDeactivate" );
+
+    CMusUiSendView::DoDeactivate(); // Base class deactivation first
+
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        delete iContainer;
+        iContainer = NULL;
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::DoDeactivate" );
+    }
+
+// -----------------------------------------------------------------------------
+// When orientation changed , Camera instances has to be recreated inorder
+// to receive proper orientated frames.
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::RefreshCameraOrientationL(TRect& aNewRect)
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::RefreshCameraOrientation" );
+    if ( !iController || !iController->EngineSession() )
+        {        
+        MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::RefreshCameraOrientation, no session" );
+        return;
+        }
+        TRect oldRect = iController->EngineSession()->Rect();
+        MUS_LOG2( "mus: [MUSUI ]  -> Old Rect (width = %d,height=%d)",oldRect.Width(),oldRect.Height() );
+        MUS_LOG2( "mus: [MUSUI ]  -> New Rect (width = %d,height=%d)",aNewRect.Width(),aNewRect.Height() );
+        if ( !( (  ( oldRect.Width() > oldRect.Height() ) && //check lanscape
+                   ( aNewRect.Width() > aNewRect.Height() )
+                )
+                ||
+                (  
+                   ( oldRect.Width() < oldRect.Height() ) && // check portrait
+                   ( aNewRect.Width() < aNewRect.Height() )
+                )
+              )
+           )
+           {
+           MUS_LOG( "mus: [MUSUI ]  -> Orientation Changed.Restart Camera" );
+           iController->RefreshCameraOrientationL();
+           }  
+        else
+           {
+           MUS_LOG( "mus: [MUSUI ]  -> Orientation Not changed. dont restart camera");    
+           }          
+       
+
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::RefreshCameraOrientation" );
+    }
+
+// -----------------------------------------------------------------------------
+// When Live sharing paused , camera source will be unavilable, hence 
+// it is inappropriate to show the zoom and brightness
+// so hide those item. And unhide it again when unpaused.
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::HideToolbarCommandForPause( TBool aIsPaused )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingView::HideToolbarCommandForPause() %d",aIsPaused); 
+    /* Hide brightness toolbar item if paused else unhide. Draw immediately.*/
+    Toolbar()->HideItem( EMusuiCmdToolbarBrightness, aIsPaused, ETrue );
+    /* Hide zoom toolbar item if paused else unhide. Draw immediately.*/
+    Toolbar()->HideItem( EMusuiCmdToolbarZoom, aIsPaused, ETrue );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::HideToolbarCommandForPause");
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuilivesharingviewcontainer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,258 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#include "musuidefinitions.h"
+#include "musuilivesharingviewcontainer.h"
+#include "musuieventcontroller.h"
+#include "musuigeneralview.h"
+#include "musuilivesharingview.h"
+#include "musuiappui.h"
+#include "musuilevelindicator.h"
+#include "musuidialogutil.h"
+#include "musui.hrh"
+#include "muslogger.h" // debug logging
+#include "mussettings.h"
+#include <musui.rsg>
+
+#include <AknsDrawUtils.h>
+#include <AknDef.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingViewContainer::ConstructL( CMusUiGeneralView* aView,
+                                                 const TRect& aRect )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingViewContainer::ConstructL" );
+    
+    CMusUiSendViewContainer::ConstructL( aView, 
+                                         aRect,
+                                         EAknOrientationVertical );
+    // check if operator specific functionality is needed  
+    iOperatorSpecificFunctionality = 
+        ( MultimediaSharingSettings::OperatorVariantSettingL() == 
+                                        MusSettingsKeys::EOperatorSpecific );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingViewContainer::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiLiveSharingViewContainer::~CMusUiLiveSharingViewContainer()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingViewContainer::~CMusUiLiveSharingViewContainer" );
+    // NOP
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingViewContainer::~CMusUiLiveSharingViewContainer" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingViewContainer::SetZoomValues( TInt aMinZoom, TInt aMaxZoom )
+    {
+    iIndicator->SetRange( aMinZoom, aMaxZoom, ETrue );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingViewContainer::SetBrightnessValues( TInt aMinBrightness, 
+                                                          TInt aMaxBrightness )
+    {
+    iIndicator->SetRange( aMinBrightness, aMaxBrightness, ETrue );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingViewContainer::SetZoomL( TInt aZoomLevel )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingViewContainer::SetZoomL" )
+
+    iIndicator->SetLevelL( EMusUiIndicatorTypeZoom, 
+                           aZoomLevel, 
+                           ETrue /* use timer */ );
+                          
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingViewContainer::SetZoomL" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingViewContainer::SetBrightnessL( TInt aBrightnessLevel )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingViewContainer::SetBrightnessL" )
+    
+    iIndicator->SetLevelL( EMusUiIndicatorTypeBrightness, 
+                           aBrightnessLevel, 
+                           ETrue /* use timer */ );
+                          
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingViewContainer::SetBrightnessL" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingViewContainer::SetZoomVisible(  TBool aVisible )
+    {
+    iIndicator->SetIndicatorType( EMusUiIndicatorTypeZoom );
+    MakeVisible( aVisible );
+    SetGloballyCapturing( aVisible );
+    SetPointerCapture( aVisible );  
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingViewContainer::SetBrightnessVisible( TBool aVisible)
+    {
+    iIndicator->SetIndicatorType(EMusUiIndicatorTypeBrightness);
+    MakeVisible( aVisible );
+    SetGloballyCapturing( aVisible );
+    SetPointerCapture( aVisible );  
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TMusUiIndicatorType CMusUiLiveSharingViewContainer::GetIndicatorType()
+	{
+	return iIndicator->GetIndicatorType();
+	}
+
+
+// -----------------------------------------------------------------------------
+// Called by framework when to retrieve the no. of controls.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiLiveSharingViewContainer::CountComponentControls() const
+    {
+    return 1; // return nbr of controls inside this container
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to retrieve the control specified by index.
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CMusUiLiveSharingViewContainer::ComponentControl( TInt aIndex ) const
+    {
+    CCoeControl* control = NULL;
+    switch ( aIndex )
+        {
+        case 0:
+            control = iIndicator;
+            break;
+        default:
+            break;
+        }
+    return control;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to act on key events if required.
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CMusUiLiveSharingViewContainer::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent,
+    TEventCode /*aType*/ )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingViewContainer::OfferKeyEventL: %d",
+              aKeyEvent.iCode );
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiLiveSharingViewContainer::OfferKeyEventL: %d",
+              aKeyEvent.iScanCode );
+            
+    TKeyResponse ret( EKeyWasNotConsumed );
+
+    if ( MUS_NO_TOOLBAR )
+        {
+        CMusUiLiveSharingView* view = 
+            static_cast< CMusUiLiveSharingView* >( MusUiView() );      
+        switch ( aKeyEvent.iCode )
+            {
+            case EKeyLeftArrow:
+                {
+                view->HandleCommandL( EMusuiCmdViewVolumeDown );
+                ret = EKeyWasConsumed;
+                break;
+                }
+            case EKeyRightArrow:
+                {
+                view->HandleCommandL( EMusuiCmdViewVolumeUp );
+                ret = EKeyWasConsumed;
+                break;
+                }
+            case EKeyUpArrow:
+                {
+                view->HandleKeyUpArrowL();
+                ret = EKeyWasConsumed;
+                break;
+                }
+            case EKeyDownArrow:
+                {
+                view->HandleKeyDownArrowL();
+                ret = EKeyWasConsumed;
+                break;
+                }
+            default:
+                break;
+            }
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingViewContainer::OfferKeyEventL" );
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingViewContainer::HandlePointerEventL( 
+                                            const TPointerEvent& aPointerEvent)
+    {
+        // Forward to base class in order to use slider
+        CCoeControl::HandlePointerEventL( aPointerEvent );
+	    
+	if ( !Rect().Contains( aPointerEvent.iPosition ) )
+        {
+        MakeVisible( EFalse );
+        }
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuimmcmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,196 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "musuimmcmonitor.h"
+#include "muslogger.h" // debug logging
+
+#include <pathinfo.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiMmcMonitor* CMusUiMmcMonitor::NewL( MMusUiMmcObserver& aObserver )
+    {
+    CMusUiMmcMonitor* self = new ( ELeave ) CMusUiMmcMonitor( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiMmcMonitor::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiMmcMonitor::ConstructL" );
+    User::LeaveIfError( iFs.Connect() );
+    const TDesC& memoryCardPath = PathInfo::MemoryCardRootPath();
+    TInt driveNumber = 0;
+    if ( memoryCardPath.Length() > 0 )
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiMmcMonitor::ConstructL: \
+                                ( memoryCardPath.Length() > 0 )" );
+        TChar driveChar( memoryCardPath[0] );
+        iFs.CharToDrive( driveChar, driveNumber );
+        iDriveNumber = static_cast<TDriveNumber>(driveNumber);
+        }
+    else
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiMmcMonitor::ConstructL: else" );
+        TParsePtrC parser( RProcess().FileName() );
+        TChar driveChar( parser.Drive()[0] );
+        iFs.CharToDrive( driveChar, driveNumber );
+        iDriveNumber = static_cast<TDriveNumber>(driveNumber);
+        }
+        
+    iRemovableDrive = IsRemovableDrive( iDriveNumber );
+    iDriveRemoved = DriveRemoved();
+    MonitorMmc();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiMmcMonitor::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiMmcMonitor::CMusUiMmcMonitor( MMusUiMmcObserver& aObserver )  
+    : CActive( CActive::EPriorityStandard ),
+      iObserver( aObserver )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiMmcMonitor::~CMusUiMmcMonitor()
+    {
+    Cancel();
+    iFs.Close();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiMmcMonitor::RunL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiMmcMonitor::RunL" );
+    if( DriveRemoved() )
+        {
+        iObserver.MmcRemoved();
+        }
+    else // continue monitoring
+        {
+        MonitorMmc();
+        }    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiMmcMonitor::RunL" );
+    }
+
+// -------------------------------------------------------------------------
+//  If RunL() leaves,It should be handled here.
+// -------------------------------------------------------------------------
+//
+TInt CMusUiMmcMonitor::RunError( TInt aError )
+    {
+	MUS_LOG( "mus: [MUSUI ]  -> CMusUiMmcMonitor::RunError" );
+    // Nothing can be done here.
+    aError = KErrNone;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiMmcMonitor::RunError" );
+    return aError;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiMmcMonitor::DoCancel()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiMmcMonitor::DoCancel" );
+    iFs.NotifyChangeCancel();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiMmcMonitor::DoCancel" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiMmcMonitor::MonitorMmc()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiMmcMonitor::MonitorMmc" );
+    if( !IsActive() && iRemovableDrive && !iDriveRemoved )
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiMmcMonitor::MonitorMmc: calling iFs.NotifyChange" );
+        iFs.NotifyChange( ENotifyDisk, iStatus );
+        SetActive();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiMmcMonitor::MonitorMmc" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiMmcMonitor::DriveRemoved()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiMmcMonitor::DriveRemoved" );
+    if ( iDriveRemoved )
+        {
+        return iDriveRemoved;
+        }
+
+    TDriveInfo driveInfo;
+    iFs.Drive( driveInfo, iDriveNumber ); 
+
+    if ( driveInfo.iType == EMediaNotPresent )
+        {
+        iDriveRemoved = ETrue;
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiMmcMonitor::DriveRemoved" );
+    return iDriveRemoved;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiMmcMonitor::IsRemovableDrive( TDriveNumber aDriveNumber )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiMmcMonitor::IsRemovableDrive" );
+    TDriveInfo driveInfo;
+    iFs.Drive( driveInfo, aDriveNumber );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiMmcMonitor::IsRemovableDrive" );
+    return ( driveInfo.iDriveAtt & KDriveAttRemovable );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuinavimediaanimator.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,333 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#include "musuinavimediaanimator.h"
+#include "musuidefinitions.h"
+#include "muslogger.h" // debug logging
+#include <musuiicons.mbg>
+//#include <musui.mbg>
+//#include <musui_temp_icons.mbg>
+#include <musui.rsg>
+#include "musresourcefinderutil.h"
+
+#include <data_caging_path_literals.hrh>    // KDC_APP_BITMAP_DIR
+#include <AknsUtils.h>
+#include <aknnavi.h>           // CAknNavigationControlContainer
+#include <eikspane.h>          // CEikStatusPaneBase
+#include <StringLoader.h>
+#include <applayout.cdl.h>     // scalable UI
+#include <AknIconUtils.h>      // SetSize for the icons
+#include <AknIconArray.h>
+#include <gulicon.h>
+#include <applayout.cdl.h>
+#include <e32std.h>
+#include <e32base.h>
+
+using namespace AppLayout;
+
+
+// CONSTANTS
+const TInt KMusUiAnimatorTimer = 50000;  // Default 50 ms, 20 fps
+
+const TInt KIconArraySize = 15;
+
+_LIT( KMyBitmapRomFile, "Z:\\resource\\apps\\musuiicons.mif" );
+_LIT( KMyBitmapRamFile, "C:\\resource\\apps\\musuiicons.mif" );
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiNaviMediaAnimator* CMusUiNaviMediaAnimator::NewL( 
+        MMusUiNaviMediaAnimatorObserver& aObserver, TSize aImageSize )
+    {
+    CMusUiNaviMediaAnimator* self = 
+                new( ELeave ) CMusUiNaviMediaAnimator( aObserver, aImageSize );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiNaviMediaAnimator::~CMusUiNaviMediaAnimator()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiNaviMediaAnimator::~CMusUiNaviMediaAnimator" );
+
+    if ( iAnimationTimer->IsActive() )
+        {
+        iAnimationTimer->Cancel();
+        }
+    delete iAnimationTimer;        
+    delete iBitmapArray;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaAnimator::~CMusUiNaviMediaAnimator" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiNaviMediaAnimator::CMusUiNaviMediaAnimator( 
+                MMusUiNaviMediaAnimatorObserver& aObserver, TSize aImageSize )
+                : iObserver( aObserver )
+    {
+    iSize = aImageSize;
+    MUS_LOG1( "mus: [MUSUI ] -> \
+          CMusUiNaviMediaAnimator::CMusUiNaviMediaAnimator(): iSize.iWidth %d",
+                            iSize.iWidth )
+    MUS_LOG1( "mus: [MUSUI ] -> \
+          CMusUiNaviMediaAnimator::CMusUiNaviMediaAnimator(): iSize.iHeight %d",
+                            iSize.iHeight )
+    iBitmapArray = NULL;
+    iInterval = KMusUiAnimatorTimer;
+    iIndex = 0;
+
+
+
+    
+/*    iAnimationTimer->Start( iInterval,
+                            iInterval,
+                            TCallBack( AnimationInterval, this ) );
+                            */
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaAnimator::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiNaviMediaAnimator::ConstructL" );
+
+    if( MusResourceFinderUtil::IsExistL( KMyBitmapRomFile ) )
+        {
+        iResourceRam = EFalse;
+        }
+    else if( MusResourceFinderUtil::IsExistL( KMyBitmapRamFile ) )
+        {
+        iResourceRam = ETrue;
+        }
+    else
+        {
+        MUS_LOG( "mus: [MUSUI ]  Icon File Not Found " );
+        User::Leave(KErrNotFound);
+        }
+
+
+    LoadImagesL();
+    
+    iAnimationTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    
+    iAnimationTimer->Start( iInterval,
+                            iInterval,
+                            TCallBack( AnimationInterval, this ) );
+
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaAnimator::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaAnimator::SetInterval( const TInt aAnimationInterval )
+    {
+    iInterval = aAnimationInterval;
+
+
+    if ( iAnimationTimer->IsActive() )
+        {
+        iAnimationTimer->Cancel();
+        }
+    
+    iAnimationTimer->Start( iInterval,
+                            iInterval,
+                            TCallBack( AnimationInterval, this ) );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Callback for disable level indicator.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiNaviMediaAnimator::AnimationInterval( TAny* aThis )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiNaviMediaAnimator::AnimationInterval()" );
+    CMusUiNaviMediaAnimator* animator =
+                            static_cast< CMusUiNaviMediaAnimator* > ( aThis );
+                            
+    
+    if ( animator->iBitmapArray ) 
+        {
+        animator->iObserver.SetIcon( animator->iBitmapArray->At( animator->iIndex ) );
+        if( animator->iIndex < ( animator->iBitmapArray->Count() - 1 ) ) 
+            {
+            animator->iIndex++;
+            }
+        else 
+            {
+            animator->iIndex = 0;
+            }
+        }
+        
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiNaviMediaAnimator::AnimationInterval()" );
+    return KErrNone;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Layouts the text depending on current icon situation.
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaAnimator::LoadImagesL()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiNaviMediaAnimator::DoLayoutText" );
+
+    delete iBitmapArray;
+    iBitmapArray = NULL;
+    iBitmapArray = new ( ELeave ) CAknIconArray( KIconArraySize );
+
+    TParse parse;
+    if( iResourceRam ) 
+        {
+        parse.Set( KMyBitmapRamFile, &KDC_APP_RESOURCE_DIR, NULL );
+        }
+    else 
+        {
+        parse.Set( KMyBitmapRomFile, &KDC_APP_RESOURCE_DIR, NULL );
+        }
+
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    TAknsItemID item;
+    item.Set( 0xFFCC, 0xC ); // It's a kind a magic
+    
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_wait1,
+                     EMbmMusuiiconsQgn_indi_video_wait1_mask,
+                     parse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_wait2,
+                     EMbmMusuiiconsQgn_indi_video_wait2_mask,
+                     parse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_wait3,
+                     EMbmMusuiiconsQgn_indi_video_wait3_mask,
+                     parse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_wait4,
+                     EMbmMusuiiconsQgn_indi_video_wait4_mask,
+                     parse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_wait5,
+                     EMbmMusuiiconsQgn_indi_video_wait5_mask,
+                     parse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_wait6,
+                     EMbmMusuiiconsQgn_indi_video_wait6_mask,
+                     parse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_wait7,
+                     EMbmMusuiiconsQgn_indi_video_wait7_mask,
+                     parse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_wait8,
+                     EMbmMusuiiconsQgn_indi_video_wait8_mask,
+                     parse );
+
+                     
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiNaviMediaAnimator::DoLayoutText" );
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void  CMusUiNaviMediaAnimator::ConstructImageL( MAknsSkinInstance* aSkin,
+                                                const TAknsItemID& aId,
+                                                TInt aBitmapId,
+                                                TInt aMaskId,
+                                                TParse parse )
+
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiNaviMediaAnimator::ConstructImageL()" );
+
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* mask = NULL;
+
+
+    AknsUtils::CreateIconL(aSkin,
+                           aId,
+                           bitmap,
+                           mask,
+                           parse.FullName(),
+                           aBitmapId,
+                           aMaskId);
+
+    AknIconUtils::SetSize( bitmap, iSize );
+    AknIconUtils::SetSize( mask, iSize );
+    
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiNaviMediaAnimator::ConstructImageL(): iSize.iWidth %d",
+                            iSize.iWidth )
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiNaviMediaAnimator::ConstructImageL(): iSize.iHeight %d",
+                            iSize.iHeight )
+    
+    CGulIcon* icon = CGulIcon::NewL();
+    icon->SetBitmap( bitmap );
+    icon->SetMask( mask );
+    
+    CleanupStack::PushL( icon );
+    iBitmapArray->AppendL( icon );
+    CleanupStack::Pop( icon );
+
+    //aImage->SetPicture(bitmap, mask); // Owership transferred to CEikImage
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiNaviMediaAnimator::ConstructImageL()" );
+
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuinavimediadecorator.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,546 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#include "musuinavimediadecorator.h"
+#include "musuinavimediaanimator.h"
+#include "musuidefinitions.h"
+#include "muslogger.h" // debug logging
+#include <musuiicons.mbg>
+//#include <musui.mbg>
+//#include <musui_temp_icons.mbg>
+#include <musui.rsg>
+#include "musresourcefinderutil.h"
+
+#include <data_caging_path_literals.hrh>    // KDC_APP_BITMAP_DIR
+#include <AknsUtils.h>
+#include <aknnavi.h>           // CAknNavigationControlContainer
+#include <eikspane.h>          // CEikStatusPaneBase
+#include <StringLoader.h>
+#include <applayout.cdl.h>     // scalable UI
+#include <AknIconUtils.h>      // SetSize for the icons
+#include <AknsDrawUtils.h>
+#include <AknIconArray.h>
+#include <gulicon.h>
+#include <applayout.cdl.h>
+#include <AknUtils.h>
+
+using namespace AppLayout;
+
+
+const TInt KMusDecoratorStability = 0;
+const TInt KIconArraySize = 15;
+
+_LIT( KMyBitmapRomFile, "Z:\\resource\\apps\\musuiicons.mif" );
+_LIT( KMyBitmapRamFile, "C:\\resource\\apps\\musuiicons.mif" );
+
+
+#ifndef __MIN
+#define __MIN(A, B) ((A) < (B) ? (A): (B)) 
+#endif
+//macro 
+//_LIT( KMyMbmFileName, "z:Camcorder.mbm");
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiNaviMediaDecorator* CMusUiNaviMediaDecorator::NewL()
+    {
+    CMusUiNaviMediaDecorator* self = new( ELeave ) CMusUiNaviMediaDecorator();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiNaviMediaDecorator::~CMusUiNaviMediaDecorator()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiNaviMediaDecorator::~CMusUiNaviMediaDecorator" );
+    delete iLeftLabel;
+    delete iRightLabel;
+    delete iIconArray;
+    delete iAnimation;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaDecorator::~CMusUiNaviMediaDecorator" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiNaviMediaDecorator::CMusUiNaviMediaDecorator()
+    {
+    iMiddle = 0;
+    iLeftTextSize = TSize( 0, 0 );
+    iRightTextSize = TSize( 0, 0 );
+    iIcon = NULL; 
+    iIconLeft = 50; // Only defaylt valut, it's overrided right away
+    iImageSize = TSize( 18, 18 ); // Only default value, it's overrided right avay
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaDecorator::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiNaviMediaDecorator::ConstructL" );
+    iLeftLabel = HBufC16::NewL(0);
+    iRightLabel = HBufC16::NewL(0);
+    
+
+    iIconLayout.LayoutRect( Rect(), R_MUS_NAVI_MEDIA_ICON_LAYOUT_SIZE );
+    iImageSize.iWidth = iIconLayout.Rect().Width();
+    iImageSize.iHeight = iIconLayout.Rect().Height();
+    
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiNaviMediaDecorator::ConstructL(): iImageSize.iWidth %d",
+                            iImageSize.iWidth )
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiNaviMediaDecorator::ConstructL(): iImageSize.iHeight %d",
+                            iImageSize.iHeight )
+    iLeftTextLayout.LayoutText( Rect(),
+                                R_MUS_NAVI_MEDIA_TEXT_LEFT_LAYOUT );
+    iRightTextLayout.LayoutText( Rect(),
+                                 R_MUS_NAVI_MEDIA_TEXT_RIGHT_LAYOUT );
+                                 
+
+    if( MusResourceFinderUtil::IsExistL( KMyBitmapRomFile ) ) 
+        {
+        iResourceRam = EFalse;
+        }
+    else if( MusResourceFinderUtil::IsExistL( KMyBitmapRamFile ) ) 
+        {
+        iResourceRam = ETrue;
+        }
+    else
+        {
+        MUS_LOG( "mus: [MUSUI ]  Icon File Not Found " );
+        User::Leave(KErrNotFound);
+        }    
+
+    LoadImagesL();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaDecorator::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaDecorator::SetLeftLabelL( const TDesC& aLabel )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiNaviMediaDecorator::SetLabelL" );
+    HBufC* newLabel = aLabel.AllocL();
+    delete iLeftLabel; // after the AllocL succeeds
+    iLeftLabel = NULL;
+    iLeftLabel = newLabel;
+    TPtr ptr( iLeftLabel->Des() );
+    AknTextUtils::LanguageSpecificNumberConversion( ptr );
+    DoLayoutText();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaDecorator::SetLabelL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaDecorator::SetRightLabelL( const TDesC& aLabel )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiNaviMediaDecorator::SetLabelL" );
+    HBufC* newLabel = aLabel.AllocL();
+    delete iRightLabel; // after the AllocL succeeds
+    iRightLabel = NULL;
+    iRightLabel = newLabel;
+    TPtr ptr( iRightLabel->Des() );
+    AknTextUtils::LanguageSpecificNumberConversion( ptr );
+    DoLayoutText();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaDecorator::SetLabelL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaDecorator::ShowIcon( TMusUiNaviMediaDecorator aIcon )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiNaviMediaDecorator::ShowIcon( \
+              TMusMediaNaviIcons aIcon ) #%d", aIcon );
+              
+    delete iAnimation;
+    iAnimation = NULL;
+                  
+    if( aIcon == EMusUiNaviIconNone )
+        {
+        iIcon = NULL;
+        return;
+        }
+    else if( aIcon == EMusUiNaviIconWaitAnim ) 
+        {
+        iIcon = NULL;
+        iIconLayout.LayoutRect( Rect(), R_MUS_NAVI_MEDIA_ICON_LAYOUT_SIZE );
+        iImageSize.iWidth = iIconLayout.Rect().Width();
+        iImageSize.iHeight = iIconLayout.Rect().Height();
+        TRAPD( err, iAnimation = CMusUiNaviMediaAnimator::NewL( *this, iImageSize ); )
+        if( err == KErrNone )
+            {
+            //iAnimation->SetInterval( 50000 );
+            }
+        }
+    else if( iIconArray->Count() > aIcon )
+    		{
+    		iIcon = static_cast< CGulIcon* > ( iIconArray->At( aIcon) );
+    		}
+    else
+        {
+        iIcon = NULL;        
+        }
+    if( !iAnimation ) 
+        {
+        DrawNow();
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaDecorator::ShowIcon( \
+             TMusMediaNaviIcons aIcon )" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaDecorator::SetIcon( CGulIcon* aIcon )
+    {
+    iIcon = aIcon; 
+    DrawNow();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaDecorator::SizeChanged()
+    {
+    AknsUtils::RegisterControlPosition( this );
+    DoLayoutText();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaDecorator::Draw( const TRect& aRect ) const
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiNaviMediaDecorator::Draw" );
+
+    CWindowGc& gc = SystemGc();
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    // Get skinned bitmap
+    CFbsBitmap* skinBitmap =
+                    AknsUtils::GetCachedBitmap( skin, KAknsIIDQsnIconColors );
+    if( iIcon )
+        {
+        MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+        AknsDrawUtils::Background( skin, cc,this, gc , aRect , KAknsDrawParamDefault );        
+        gc.BitBltMasked( TPoint( iIconLeft,1),
+                         iIcon->Bitmap(),
+                         iIconLayout.Rect(),
+                         iIcon->Mask(),
+                         EFalse );
+        }
+    // draw time indicator
+
+    //TRgb color = iLeftTextLayout.Color();
+
+	TRgb color;
+
+	AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG2 );
+
+    gc.SetPenColor( color );
+    gc.UseFont( iLeftTextLayout.Font() );
+    
+
+    TInt flTop = ( ( aRect.Height() >> 1 ) 
+                 - ( iLeftTextLayout.Font()->AscentInPixels() >> 1 ) ) 
+                 + aRect.iTl.iY - 1; // -1 because some rounding things
+
+    gc.DrawText( *iLeftLabel,
+                 TRect( aRect.iTl.iX+1, flTop, aRect.iBr.iX, aRect.iBr.iY  ),
+                 iLeftTextLayout.Font()->AscentInPixels() + 1,
+                 iLeftTextLayout.Align() );
+
+    TInt frTop = ( ( aRect.Height() >> 1 ) 
+                 - ( iRightTextLayout.Font()->AscentInPixels() >> 1 ) ) 
+                 + aRect.iTl.iY - 1; // -1 because some rounding things
+      
+    TInt frLeft;  
+    TInt frRight;
+                 
+    if ( AknLayoutUtils::LayoutMirrored() )
+        {
+        frLeft  = aRect.iTl.iX;
+        frRight = iRightTextSize.iWidth + 1;
+        }
+    else
+        {
+        frLeft  = aRect.iBr.iX - iRightTextSize.iWidth - 1;
+        frRight = aRect.iBr.iX;
+        }
+                 
+    gc.DrawText( *iRightLabel,
+                 TRect( frLeft, frTop, frRight, aRect.iBr.iY  ),
+                 iRightTextLayout.Font()->AscentInPixels() + 1,
+                 iRightTextLayout.Align() );
+
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaDecorator::Draw " );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Layouts the text depending on current icon situation.
+// -----------------------------------------------------------------------------
+//
+void CMusUiNaviMediaDecorator::DoLayoutText()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiNaviMediaDecorator::DoLayoutText" );
+    TRect parent( Rect() );
+    if ( parent.IsEmpty() )
+        {
+        MUS_LOG( "mus: [MUSUI ] <- CMusUiNaviMediaDecorator::DoLayoutText: return" );
+        return;
+        }
+
+    TInt minsize = __MIN( parent.Width(), parent.Height() );
+    iImageSize = TSize( minsize-2, minsize-2 );
+     
+
+    // Reassign text sizes
+    TAknTextLineLayout txtLayout = AppLayout::Navipanetexts_Line_2();
+    const TInt spaceBetweenIconsAndText = 1;
+    txtLayout.il = spaceBetweenIconsAndText;
+
+    iLeftTextLayout.LayoutText( parent, txtLayout );
+    iRightTextLayout.LayoutText( parent, txtLayout );
+
+    TSize parentSize = TSize( parent.iBr.iX - parent.iTl.iX,
+                              parent.iBr.iY - parent.iTl.iY );
+
+    //TInt clientWidth = parent.iBr.iX - parent.iTl.iX;
+
+    iLeftTextSize.iWidth =
+            iLeftTextLayout.Font()->TextWidthInPixels( iLeftLabel->Des() );
+    iRightTextSize.iWidth =
+            iRightTextLayout.Font()->TextWidthInPixels( iRightLabel->Des() );
+
+    // First testing elements total width
+    if( iLeftTextSize.iWidth + iRightTextSize.iWidth + iIconLayout.Rect().iBr.iX
+        > parentSize.iWidth )
+        {
+        // Whole stuff is too large
+        _LIT( KMusStringThreeDots, "...");
+            TRAP_IGNORE( SetRightLabelL( KMusStringThreeDots ) );
+        }
+
+    // Middle point of Icon box in current text parameters
+    TInt middle = parent.iTl.iX + ( parentSize.iWidth >> 1 );
+
+    // If there collision, calculates middle of the text fields
+    iIconLeft = middle - parent.iTl.iX - ( iIconLayout.Rect().iBr.iX >> 1 );
+    TInt iconRight =
+            middle - parent.iTl.iX + ( iIconLayout.Rect().iBr.iX >> 1 );
+
+    if( iLeftTextSize.iWidth > iIconLeft ||
+        ( parentSize.iWidth - iRightTextSize.iWidth ) < iconRight )
+        {
+        middle = (( parentSize.iWidth
+                 - ( iLeftTextSize.iWidth + iRightTextSize.iWidth )) >> 1 )
+                 + parent.iTl.iX + iLeftTextSize.iWidth;
+        }
+
+
+    // Move only if middle place moves enough eq. ignoring jumping
+    if( middle < ( iMiddle - KMusDecoratorStability )
+        || middle > ( iMiddle + KMusDecoratorStability ) )
+        {
+        iMiddle = middle;
+        }
+
+    iLeftTextSize.iHeight = iLeftTextLayout.Font()->HeightInPixels();
+    iRightTextSize.iHeight = iRightTextLayout.Font()->HeightInPixels();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiNaviMediaDecorator::DoLayoutText" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void  CMusUiNaviMediaDecorator::LoadImagesL() 
+    {
+    
+    delete iIconArray;
+    iIconArray = NULL;
+    iIconArray = new ( ELeave ) CAknIconArray( KIconArraySize );
+
+    TParse parse;
+    if( iResourceRam ) 
+        {
+        parse.Set( KMyBitmapRamFile, &KDC_APP_RESOURCE_DIR, NULL );
+        }
+    else 
+        {
+        parse.Set( KMyBitmapRomFile, &KDC_APP_RESOURCE_DIR, NULL );
+        }
+
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    TAknsItemID item;
+    item.Set( 0xFFCC, 0xC ); // It's a kind a magic
+    
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_forw,
+                     EMbmMusuiiconsQgn_indi_video_forw_mask,
+                     parse,
+                     EFalse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_pause,
+                     EMbmMusuiiconsQgn_indi_video_pause_mask,
+                     parse,
+                     EFalse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_play,
+                     EMbmMusuiiconsQgn_indi_video_play_mask,
+                     parse,
+                     ETrue );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_record,
+                     EMbmMusuiiconsQgn_indi_video_record_mask,
+                     parse,
+                     ETrue );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_record_not,
+                     EMbmMusuiiconsQgn_indi_video_record_not_mask,
+                     parse,
+                     ETrue );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_rew,
+                     EMbmMusuiiconsQgn_indi_video_rew_mask,
+                     parse,
+                     EFalse );
+
+    ConstructImageL( skin,
+                     item,
+                     EMbmMusuiiconsQgn_indi_video_stop,
+                     EMbmMusuiiconsQgn_indi_video_stop_mask,
+                     parse,
+                     EFalse );
+
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void  CMusUiNaviMediaDecorator::ConstructImageL( MAknsSkinInstance* aSkin,
+                                                const TAknsItemID& aId,
+                                                TInt aBitmapId,
+                                                TInt aMaskId,
+                                                TParse parse,
+                                                TBool aIconHasOwnColor )
+
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiNaviMediaDecorator::ConstructImageL()" );
+
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* mask = NULL;
+   
+    if (aIconHasOwnColor)
+        {
+   	    AknsUtils::CreateIconL(aSkin,
+                           aId,
+                           bitmap,
+                           mask,
+                           parse.FullName(),
+                           aBitmapId,
+                           aMaskId);
+
+  	    }
+    else
+        {
+        AknsUtils::CreateColorIconL(aSkin,
+        		                aId,
+        		                KAknsIIDQsnIconColors,
+        		                EAknsCIQsnIconColorsCG7,
+        		                bitmap,
+    							          mask,
+    							          parse.FullName(),
+    							          aBitmapId,
+    							          aMaskId,
+    							          KRgbBlack);
+        }
+
+    AknIconUtils::SetSize( bitmap, iImageSize );
+    AknIconUtils::SetSize( mask, iImageSize );
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiNaviMediaDecorator::ConstructIconL(): iImageSize.iWidth %d",
+                            iImageSize.iWidth )
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiNaviMediaDecorator::ConstructIconL(): iImageSize.iHeight %d",
+                            iImageSize.iHeight )
+    
+    
+    CGulIcon* icon = CGulIcon::NewL();
+    icon->SetBitmap( bitmap );
+    icon->SetMask( mask );
+    
+    CleanupStack::PushL( icon );
+    iIconArray->AppendL( icon );
+    CleanupStack::Pop( icon );
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiNaviMediaDecorator::ConstructIconL()" );
+
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuipropertywatch.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,178 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#include "musuipropertywatch.h"
+#include "musuipropertyobserver.h"
+#include "mussessionproperties.h"
+#include "musresourceproperties.h"
+#include "muslogger.h" // debug logging
+
+using namespace NMusSessionApi;
+
+// -----------------------------------------------------------------------------
+// Symbian two-phase constructor.
+// -----------------------------------------------------------------------------
+//
+CMusUiPropertyWatch* CMusUiPropertyWatch::NewL(
+                                      MMusUiPropertyObserver& aObserver,
+                                      TUid aCategory,
+                                      const TInt aPropertyName )
+    {
+    CMusUiPropertyWatch* self = new (ELeave) CMusUiPropertyWatch(
+                                            aObserver,
+                                            aCategory,
+                                            aPropertyName );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// C++ destructor.
+// -----------------------------------------------------------------------------
+//
+CMusUiPropertyWatch::~CMusUiPropertyWatch()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiPropertyWatch::~CMusUiPropertyWatch" );
+    if ( IsActive() )
+        {
+        Cancel();
+        }
+    iProperty.Close();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiPropertyWatch::~CMusUiPropertyWatch" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// C++ constructor.
+// -----------------------------------------------------------------------------
+//
+CMusUiPropertyWatch::CMusUiPropertyWatch( MMusUiPropertyObserver& aObserver,
+                                          TUid aCategory,
+                                          const TInt aPropertyName ) :
+    CActive( EPriorityNormal ),
+    iObserver( aObserver )
+    {
+    iPropertyCategory = aCategory;
+    iPropertyKey = aPropertyName;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Symbian second-phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CMusUiPropertyWatch::ConstructL( )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiPropertyWatch::ConstructL" );
+    User::LeaveIfError( iProperty.Attach( iPropertyCategory,
+                                          iPropertyKey) );
+    CActiveScheduler::Add( this );
+    RunL();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiPropertyWatch::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiPropertyWatch::ReadIntPropertyL( TUint aKey )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiPropertyWatch::ReadIntPropertyL: aKey: [%d]",
+                            aKey );
+    TInt val;
+    User::LeaveIfError( RProperty::Get( KCategoryUid,
+                                        aKey,
+                                        val ) );
+    MUS_LOG1( "mus: [MUSUI ]     <- CMusUiPropertyWatch::ReadIntPropertyL: val: [%d]",
+                            val );
+    return val;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+HBufC* CMusUiPropertyWatch::ReadDescPropertyL( TUint aKey )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiPropertyWatch::ReadDescPropertyL: aKey: [%d]",
+                            aKey );
+    TBuf<RProperty::KMaxPropertySize> buffer;
+
+    User::LeaveIfError( RProperty::Get( KCategoryUid,
+                                        aKey,
+                                        buffer ) );
+    HBufC* desc = buffer.AllocL();
+    MUS_LOG_TDESC( "mus: [MUSUI ]    <- CMusUiPropertyWatch::ReadDescPropertyL: val: ",
+                            (*desc) );
+    return desc;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiPropertyWatch::DoCancel()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiPropertyWatch::DoCancel" );
+    iProperty.Cancel();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiPropertyWatch::DoCancel" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiPropertyWatch::RunL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiPropertyWatch::RunL" );
+    TInt val;
+
+    User::LeaveIfError( RProperty::Get( iPropertyCategory,
+                                        iPropertyKey,
+                                        val ) );
+    iProperty.Subscribe( iStatus );
+    SetActive();
+
+    iObserver.PropertyChanged( iPropertyKey, val );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiPropertyWatch::RunL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiPropertyWatch::RunError( TInt aError )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiPropertyWatch::RunError [%d]", aError );
+    iObserver.HandlePropertyError( aError );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiPropertyWatch::RunError" );
+    return KErrNone;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuireceivecontainer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,341 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#include "musuireceivecontainer.h"
+#include "musuieventcontroller.h"
+#include "musuigeneralview.h"
+#include "musuireceiveview.h"
+#include "musuiinvitationquery.h"
+#include "musuiinvitationqueryobserver.h"
+#include "musuiappui.h"
+#include "musuidialogutil.h"
+#include "musuidefinitions.h"
+#include "musui.hrh"
+#include "muslogger.h" // debug logging
+#include <musui.rsg>
+
+#include <AknsControlContext.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include <AknsDrawUtils.h>
+#include <AknWaitDialog.h>
+#include <AknDef.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiReceiveContainer* CMusUiReceiveContainer::NewL(
+                                CMusUiReceiveView& aView,
+                                const TRect aRect )
+    {
+    CMusUiReceiveContainer* self
+            = new( ELeave ) CMusUiReceiveContainer( aView );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiReceiveContainer::~CMusUiReceiveContainer()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveContainer::~CMusUiReceiveContainer" );
+
+    if ( iInvitationQuery )
+        {
+        iInvitationQuery->Cancel();
+        delete iInvitationQuery;
+        iInvitationQuery = NULL;
+        }
+
+    delete iBackGround;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveContainer::~CMusUiReceiveContainer" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiReceiveContainer::CMusUiReceiveContainer( CMusUiReceiveView& aView )
+    : iView( aView )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveContainer::ConstructL( const TRect& aRect )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveContainer::ConstructL" );
+    CreateWindowL();
+    iBackGround = CAknsBasicBackgroundControlContext::NewL(
+                             KAknsIIDQsnBgAreaMain,
+                             aRect,
+                             EFalse );
+    iFullScreen = EFalse;
+    SetRect( aRect );
+    ActivateL();
+    
+    iOperatorSpecificFunctionality = iView.OperatorSpecificFunctionality();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveContainer::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveContainer::ShowInvitationQueryL(
+                                    const TDesC& aContact,
+                                    MMusUiInvitationQueryObserver& aObserver )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveContainer::ShowInvitationQueryL" );
+    if ( !iInvitationQuery )
+        {
+        iInvitationQuery = CMusUiInvitationQuery::NewL( aObserver );
+        }
+    iInvitationQuery->ShowL( aContact );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveContainer::ShowInvitationQueryL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveContainer::DismissInvitationQuery( TBool aDelete )
+    {
+    if ( iInvitationQuery )
+        {
+        iInvitationQuery->Cancel();
+        if ( aDelete )
+            {
+            delete iInvitationQuery;        
+            iInvitationQuery = NULL;
+            }
+        }
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Fetches a pointer to the view that owns this container.
+// -----------------------------------------------------------------------------
+//
+CMusUiGeneralView* CMusUiReceiveContainer::MusUiView() const
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveContainer::MusUiView" );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveContainer::MusUiView" );
+    return &iView;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveContainer::SetFullScreen( TBool aFullScreen, TRect aRect )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiReceiveContainer::SetFullScreen: %d",
+                            aFullScreen );
+    iFullScreen = aFullScreen;
+    
+    if ( aFullScreen )
+        {
+        // In order to capture pointer events this container must be visible.
+        // Thus we make it as small as possible.
+        SetRect( TRect( 0, 0, 0, 0) );
+        MakeVisible( ETrue );
+        SetGloballyCapturing( ETrue );
+        SetPointerCapture( ETrue );    
+        }
+    else
+        {
+        SetRect( aRect );
+        SetPointerCapture( EFalse );
+        MakeVisible( EFalse );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveContainer::SetFullScreen" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework when the view size is changed
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveContainer::SizeChanged()
+    {
+    TRect parentRect(Rect());
+    if (iBackGround)
+        {
+        (static_cast<CAknsBasicBackgroundControlContext*>(iBackGround))->SetRect(parentRect);
+        }
+    MakeVisible( EFalse );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework when to retrieve the no. of controls.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiReceiveContainer::CountComponentControls() const
+    {
+    return 0; // return nbr of controls inside this container
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to retrieve the control specified by index.
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CMusUiReceiveContainer::ComponentControl( TInt aIndex ) const
+    {
+    switch ( aIndex )
+        {
+        default:
+            return NULL;
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to redraw the screen area.
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveContainer::Draw( const TRect& aRect ) const
+    {
+    CWindowGc& gc = SystemGc();
+
+    gc.Clear( aRect );
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+    if(!AknsDrawUtils::Background( skin, cc,this,gc,aRect,KAknsDrawParamDefault ))
+        {
+        gc.SetBrushColor( iEikonEnv->ControlColor( EColorWindowBackground, *this ) );
+        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+        gc.Clear( aRect );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CMusUiReceiveContainer::OfferKeyEventL( const TKeyEvent& aEvent,
+                                                     TEventCode aType )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveContainer::OfferKeyEventL" );
+    
+    if ( iFullScreen && aType == EEventKey )
+        {
+        // We respond to whatever key by returning from fullscreen
+        if( MUS_NO_TOOLBAR )
+            {
+            (static_cast <CMusUiReceiveView*> 
+                (MusUiView()))->HandleCommandL( EMusuiCmdViewFullScreen );            
+            }
+        else
+            {
+            (static_cast <CMusUiReceiveView*> 
+                (MusUiView()))->HandleCommandL( EMusuiCmdToolbarFullScreen );
+            }
+         return EKeyWasConsumed;
+        }
+        
+    switch ( aEvent.iCode )
+        {
+        // Volume Control
+        case EKeyLeftArrow:
+            {
+            (static_cast <CMusUiReceiveView*> 
+                    (MusUiView()))->HandleCommandL( EMusuiCmdViewVolumeDown );
+            return EKeyWasConsumed;
+            }
+        case EKeyRightArrow:
+            {
+            (static_cast <CMusUiReceiveView*> 
+                    (MusUiView()))->HandleCommandL( EMusuiCmdViewVolumeUp );
+            return EKeyWasConsumed;
+            }
+
+        //  TODO:
+        case EKeyUpArrow:
+            {
+            break;
+            }
+        case EKeyDownArrow:
+            {
+            break;
+            }
+        default:
+            return EKeyWasNotConsumed;
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveContainer::OfferKeyEventL" );
+    return EKeyWasNotConsumed;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveContainer::HandlePointerEventL( const TPointerEvent& )
+    {
+    if ( iFullScreen )
+        {
+        // We respond to whatever pointer event by returning from fullscreen
+        (static_cast <CMusUiReceiveView*> 
+                (MusUiView()))->HandleCommandL( EMusuiCmdToolbarFullScreen );
+        }
+    }
+	
+	
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveContainer::UpdatePointerCapture()
+	{
+	MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveContainer::UpdatePointerCapture" );
+	
+	if ( iFullScreen )
+		{
+		// In order to capture pointer events this container must be visible.
+		// Thus we make it as small as possible.
+		SetRect( TRect( 0, 0, 0, 0 ) );
+		MakeVisible( ETrue );
+		SetGloballyCapturing( ETrue );
+		SetPointerCapture( ETrue );    	
+		}
+	
+	MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveContainer::UpdatePointerCapture" );
+	}
+	
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuireceivecontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,876 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Application's UI class.
+*  Version     : %version:  be1sipx1#75.1.17 % << Don't touch! Updated by Synergy at check-out.
+*
+*/
+
+
+
+#include "musuireceivecontroller.h"
+#include "musuieventobserver.h"
+#include "musuisharingobserver.h"
+#include "musuireceiveobserver.h"
+#include "musuicallbackservice.h"
+#include "musuiactivetimer.h"
+#include "musuidialogutil.h"
+#include "musuicontactutil.h"
+#include "mussettings.h"
+#include "mussettingskeys.h"
+#include "musuiresourcehandler.h"
+#include "musengreceivesession.h"
+#include "musenguriparser.h"
+#include "mussessionproperties.h"
+#include "muslogger.h" // debug logging
+#include "musuiappui.h"
+#include "musuireceiveview.h"
+#include "musuipropertywatch.h"
+#include "mussesseioninformationapi.h"
+#include "musui.hrh"
+#include <musui.rsg>
+
+#include <avkon.hrh>
+#include <aknappui.h>           
+#include <StringLoader.h>
+
+using namespace MusSettingsKeys;
+using namespace NMusSessionApi;
+
+const TInt KMusMinDigitCountInValidTelNumber = 7;
+
+/*
+ * Private number.
+*/
+_LIT( KPrivateNumber, "" );
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiReceiveController* CMusUiReceiveController::NewL(
+                        MMusUiEventObserver& aEventObserver,
+                        MMusUiSharingObserver& aSharingObserver,
+                        MMusUiReceiveObserver& aReceiveObserver,
+                        const TRect& aRect )
+    {
+    CMusUiReceiveController* self = new( ELeave ) CMusUiReceiveController( 
+                                                        aEventObserver,
+                                                        aSharingObserver, 
+                                                        aReceiveObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiReceiveController::~CMusUiReceiveController()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::~CMusUiReceiveController" );
+    delete iSession;
+    delete iOriginator;
+    delete iTimer;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::~CMusUiReceiveController" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiReceiveController::CMusUiReceiveController(
+                                MMusUiEventObserver& aEventObserver,
+                                MMusUiSharingObserver& aSharingObserver,
+                                MMusUiReceiveObserver& aReceiveObserver )
+    : CMusUiEventController( aEventObserver, aSharingObserver ), 
+      iReceiveObserver( aReceiveObserver )
+    {
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::ConstructL( const TRect& aRect )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::ConstructL" );
+
+    // construct event listener
+    CMusUiEventController::ConstructL();
+
+    // construct an engine session
+    iSession = CMusEngReceiveSession::NewL( aRect, *this, *this );
+    iSession->SetAudioRoutingObserver( this );
+    iSession->SetVolumeChangeObserver( this );
+        
+    iTimer = CMusUiActiveTimer::NewL( this );
+    iTimer->After( KMusReceiveTimeout );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::ConstructL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::ChangeFullScreenModeL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::ChangeFullScreenModeL" );
+
+    iFullScreenSelected = !iFullScreenSelected;
+    
+    if ( !MUS_NO_TOOLBAR )
+        {
+        iSharingObserver.HighlightSelectedToolbarItem( EMusuiCmdToolbarFullScreen );
+        }
+        
+    iReceiveObserver.SetFullScreenL( iFullScreenSelected );
+
+    if ( ( iEventObserver.AppOrientation()!= CAknAppUiBase::EAppUiOrientationLandscape ) 
+            && iFullScreenSelected )
+        {
+        if( !iEventObserver.OrientationCanBeChanged() ) 
+            {
+            MUS_LOG( "mus: [MUSUI ]    !OrientationCanBeChanged()" );
+            iSession->SetOrientationL( CMusEngMceSession::ELandscape );
+            }
+        }
+    else if ( ( iSession->OrientationL() != iOriginalMceOrientation ) 
+                            && !iFullScreenSelected )
+        {
+        if( !iEventObserver.OrientationCanBeChanged() ) 
+            {
+            MUS_LOG( "mus: [MUSUI ]    !OrientationCanBeChanged()" );
+            iSession->SetOrientationL( iOriginalMceOrientation );
+            }
+        }    
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::ChangeFullScreenModeL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::OfferToolbarEventL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiReceiveController::OfferToolbarEventL [%d]",
+                            aCommand );
+    
+    switch ( aCommand )
+        {
+        case EMusuiCmdToolbarFullScreen:
+            {
+            ChangeFullScreenModeL();
+            break;
+            }
+        default:    // Not receive specific, let the base class handle
+            {
+            CMusUiEventController::OfferToolbarEventL( aCommand );
+            break;
+            }
+            
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::OfferToolbarEventL" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::HandleCommandL( TInt aCommand )
+    {
+    MUS_LOG1( "mus: [MUSUI ] ->  CMusUiReceiveController::HandleCommandL: %d",
+                            aCommand );
+
+    switch ( aCommand )
+        {
+        // Menu commands from view's HandleCommandL:
+        case EMusuiCmdViewAudioNormal:
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiReceiveController::ConstructL:\
+                                    EMusuiCmdViewAudioNormal" );
+            if ( iSession->ContainsAudioL() )
+                {
+                iSession->UnmuteL();
+                }
+            break;
+            }
+        case EMusuiCmdViewAudioMute:
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiReceiveController::ConstructL:\
+                                    EMusuiCmdViewAudioMute" );
+            if ( iSession->ContainsAudioL() )
+                {
+                iSession->MuteL();
+                }
+            break;
+            }
+        case EMusuiCmdToolbarFullScreen:
+            {
+            OfferToolbarEventL( EMusuiCmdToolbarFullScreen );
+            break;
+            }            
+        case EMusuiCmdViewFullScreen:
+            {
+            ChangeFullScreenModeL();
+            break;
+            }
+        default:
+            {
+            // Try more general handling
+            CMusUiEventController::HandleCommandL( aCommand );
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::HandleCommandL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::HandleIncomingSessionL( 
+                                            const TDesC& aOriginator,
+                                            const TDesC& aOriginatorIdentity )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::HandleIncomingSessionL" )
+    
+    delete iOriginator;
+    iOriginator = NULL;
+    TInt privacyStatus(0);
+    
+    
+    MUS_LOG( "mus: [MUSUI ]  Check private number" )
+    TRAPD( errorPrivacyStatus, privacyStatus = 
+            CMusUiPropertyWatch::ReadIntPropertyL( NMusSessionApi::KPrivacyStatus ) );        
+    if ( errorPrivacyStatus != KErrNone )
+        {
+       	MUS_LOG1( "mus: [MUSUI ]     ReadIntPropertyL leave code: %d", errorPrivacyStatus )
+        HandleError( errorPrivacyStatus );
+        }
+        
+    if ( privacyStatus == 1 && !iOperatorSpecificFunctionality )
+      {
+       MUS_LOG( "mus: [MUSUI ]  Call is from private number" )
+       iOriginator = KPrivateNumber().AllocL();
+      }
+    else if( iOperatorSpecificFunctionality )
+        {
+        iOriginator = aOriginatorIdentity.AllocL();	
+        }
+    else
+      {
+      iOriginator = aOriginator.AllocL();
+      }
+         
+    // Cancel the 10 seconds timer:
+    iTimer->Cancel();
+    
+    // Display the query dialog:
+    
+    if ( privacyStatus == 1 && !iOperatorSpecificFunctionality )
+        {
+        iReceiveObserver.ShowInvitationQueryL( *iOriginator );
+        }  
+    else if ( iOperatorSpecificFunctionality && aOriginatorIdentity.Length() != 0 )
+        {
+        // We compare last seven digits, since that is the minimum amount
+        // that can make up a valid telephone number.
+        MUS_LOG_TDESC( "mus: [MUSUI ]       Right7 of MusTelNumberValue(): ",
+                       MusTelNumberValue().Right( KMusMinDigitCountInValidTelNumber ) )
+        MUS_LOG_TDESC( "mus: [MUSUI ]       Right7 of aOriginatorIdentity: ",
+                       aOriginatorIdentity.Right( KMusMinDigitCountInValidTelNumber ) )
+        MUS_LOG_TDESC( "mus: [MUSUI ]       MusContactName: ", MusContactName() )                            
+            
+        if  ( !( MusTelNumberValue().Length() >= 
+              						KMusMinDigitCountInValidTelNumber && 
+              aOriginatorIdentity.Length() >= 
+              						KMusMinDigitCountInValidTelNumber &&
+              MusTelNumberValue().Right( KMusMinDigitCountInValidTelNumber ) ==
+              aOriginatorIdentity.Right( KMusMinDigitCountInValidTelNumber ) &&
+              MusContactName().Length() > 0 ) )
+            {
+            // In some very rare scenario a valid session may come from MSISDN
+        	// that is not the same as the one received from manager. To avoid
+        	// showing of wrong MSISDN, we replace phone number with one 
+        	// received from P-Asserted-Identity header. Since in this scenario 
+        	// we cannot be sure about contact name either, we replace it with 
+        	// phone number. Replacing of contact name must happen also when we 
+        	// have no name for contact.
+        	delete iTelNumber;
+        	iTelNumber = NULL;
+        	iTelNumber = aOriginatorIdentity.AllocL();
+        	
+        	delete iContactName;
+        	iContactName = NULL;
+        	iContactName = aOriginatorIdentity.AllocL();
+            }
+            
+        iReceiveObserver.ShowInvitationQueryL( MusContactName() );
+        
+        }
+    else
+        {
+       	if( MusUiContactUtil::CheckPbContactForVSAddressesL(
+       	            *( iEventObserver.EikonEnv() ), *iOriginator, iContactId ) )
+        	{
+        	if ( MusContactName().Length() < 1 )
+        	    { // originator is defined in Contacts but the name is empty
+        	    iReceiveObserver.ShowInvitationQueryL( *iOriginator );
+        	    }
+        	else
+        	    {
+        	    iReceiveObserver.ShowInvitationQueryL( MusContactName() );
+        	    }
+       		}
+       	else
+       	    {
+        	iReceiveObserver.ShowInvitationQueryL( *iOriginator );
+        	}        
+        }
+   
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::HandleIncomingSessionL" )
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiReceiveController::ClipMutedL()
+    {
+    return iSession->IsMutedL();
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiReceiveController::ClipContainsAudioL()
+    {
+    if ( !ConnectionInitialized() )
+        {
+        return EFalse; // We cannot be sure yet
+        }
+        
+    return iSession->ContainsAudioL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+// 
+CMusEngMceSession* CMusUiReceiveController::EngineSession()
+    {
+    return iSession; // CMusEngReceiveSession is CMusEngMceSession
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Virtual function from CMusUiEventController
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::HandleAsyncEventL( TMusUiAsyncEvent aEventId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::HandleAsyncEventL" );
+    switch ( aEventId )
+        {
+        case EMusUiAsyncInviteAccepted:
+            {
+            ShowWaitDialogL();
+            break;
+            }
+        default:
+            {
+            // Not receive specific, let the base class handle
+            CMusUiEventController::HandleAsyncEventL( aEventId );
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::HandleAsyncEventL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Virtual function from CMusUiEventController
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiReceiveController::TypedAddress() const
+    {
+    return *iOriginator;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Virtual function from CMusUiEventController
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::DeleteEngineSession()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::DeleteEngineSession" );
+    if ( iSession && iSession->IsAudioRoutingLoudSpeaker() )
+	    {
+	    iShowDialog = ETrue; 
+	    }
+    delete iSession;
+    iSession = NULL;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::DeleteEngineSession" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiReceiveController::FullScreenSelected()
+    {
+    return iFullScreenSelected;
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngReceiveSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::IncomingSessionPreNotification()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::IncomingSessionPreNotification" );
+    iTimer->Cancel();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::IncomingSessionPreNotification" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngReceiveSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::IncomingSession( const TDesC& aOriginator, 
+                                               const TDesC& aOriginatorIdentity )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::IncomingSession" );
+    TRAPD( err, HandleIncomingSessionL( aOriginator, aOriginatorIdentity ) );
+    if ( err != KErrNone )
+        {
+        iEventObserver.HandleError( err );
+        }
+    else
+        {
+        SetConnectionInitialized( ETrue );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::IncomingSession" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngReceiveSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::StreamBuffering()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::StreamBuffering" );
+    if ( iStreamPaused )
+        {
+        MUS_LOG( "mus: [MUSUI ]  Stream was paused, not show buffering state" );
+        }
+    else
+        {
+        TRAPD( err, iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconWaitAnim ) );
+        if ( err != KErrNone )
+            {
+            iEventObserver.HandleError( err );
+            }        
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::StreamBuffering" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::SessionEstablished()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::SessionEstablished" );
+    
+    // Common handling first
+    CMusUiEventController::SessionEstablished();
+
+    TRAPD( error, SessionEstablishedL() )
+
+    if ( error != KErrNone )
+        {
+        iEventObserver.HandleError( error );
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::SessionEstablished" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::SessionTerminated()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::SessionTerminated" );
+    if ( !ConnectionEstablished() )
+        {
+        iReceiveObserver.DismissInvitationQuery( ETrue );
+        TRAP_IGNORE( MusUiDialogUtil::ShowInformationDialogL(
+                        R_MUS_LIVE_SHARING_VIEW_NOTE_INVITATION_CANCELLED ) )
+        iEventObserver.HandleExit();
+        }
+    else
+        {
+        TRAP_IGNORE( iSharingObserver.DismissWaitDialogL() );
+        
+        TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+            
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::SessionTerminated" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::SessionConnectionLost()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::SessionConnectionLost" );
+    TRAPD( err,
+           iSharingObserver.DismissWaitDialogL();
+           MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_CONNECTION_LOST ) );
+    if ( err != KErrNone )
+        {
+        iEventObserver.HandleError( err );
+        }
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );   
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::SessionConnectionLost" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::SessionFailed()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::SessionFailed" );
+    TRAPD( error, iSharingObserver.DismissWaitDialogL() );
+    if ( error != KErrNone )
+        {
+        iEventObserver.HandleError( error );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::SessionFailed" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::StreamIdle()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::StreamIdle" );
+    iStreamPaused = ETrue;
+    TRAPD( err, iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause ) );
+    if ( iFullScreenSelected )
+    	{
+        TRAP_IGNORE( ChangeFullScreenModeL() );
+    	}
+    if ( err != KErrNone )
+        {
+        iEventObserver.HandleError( err );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::StreamIdle" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::StreamStreaming()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::StreamStreaming" );
+    
+    if ( ConnectionEstablished() )
+        {
+        TRAP_IGNORE( iSharingObserver.DismissWaitDialogL() )
+        TRAPD( err, iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPlay ) )
+        
+        if ( err != KErrNone )
+            {
+            iEventObserver.HandleError( err );
+            }
+        iStreamPaused = EFalse;    
+        }
+   
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::StreamStreaming" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::SessionTimeChanged(
+                        const TTimeIntervalSeconds& aSeconds )
+    {
+    if ( aSeconds.Int() > -1 )
+        {
+        iSharingObserver.UpdateSessionTime( SessionTimeFormatted( aSeconds ) );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::InactivityTimeout()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::InactivityTimeout" );
+    TRAP_IGNORE( iSharingObserver.DismissWaitDialogL();
+                 MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_SERVICE_N_A ) );
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::InactivityTimeout" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusUiInvitationQueryObserver: Invitation accepted by the user
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::InvitationAcceptedL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::InvitationAcceptedL" );
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    
+    // Enable loud speaker already before answering but disable it immediately
+    // if accepting fails for some reason
+    if ( iSession->AudioRoutingCanBeChanged() && !iSession->IsAudioRoutingHeadset() )
+        {
+        iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
+        }
+            
+    TRAPD( err, iSession->AcceptInvitationL( ETrue ) );
+    if ( err )
+        {
+        if ( iSession->AudioRoutingCanBeChanged() )
+            {
+            iSession->EnableLoudspeakerL( ELoudspeakerDisabled, ETrue );
+            }
+        User::Leave( err );
+        }
+          
+    iCallbackService->AsyncEventL( EMusUiAsyncInviteAccepted );
+    
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::InvitationAcceptedL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusUiInvitationQueryObserver: Invitation rejected by the user
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::InvitationRejectedL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::InvitationRejectedL" );
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    iSession->AcceptInvitationL( EFalse );
+    HandleExitL();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::InvitationRejectedL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusUiActiveTimerObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::TimerComplete( CMusUiActiveTimer* /*aTimer*/ )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::TimerComplete" );
+    iEventObserver.HandleExit();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::TimerComplete" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::ExitProcedureL( TBool aUserAcceptance )
+    {
+    
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::ExitProcedureL" );
+    
+    switch ( iShutdownState )
+        {
+        case EMusUiShutdownVideoSaved:
+            {
+            MUS_LOG( "mus: [MUSUI ]     ExitProcedureL: EMusuiShutdownVideoSaved" );
+            
+            // Check if our address is valid sip or tel uri. If not, there is no
+            // reason to query user about permission to save it to contacts.
+            
+            TInt error = KErrNotFound;
+            if ( iOriginator )
+                {
+                TMusEngUriParser parser( *iOriginator );
+                TRAP( error, parser.ParseUriL() )                
+                }
+
+            // Save Address to Contacts query if contact found and
+            // there is no address in contacts 
+            // and if is the standard variant.
+            if ( !iOperatorSpecificFunctionality && iContactId > 0 && 
+                 !MusUiContactUtil::ShareViewFieldExistsL( 
+                            *( iEventObserver.EikonEnv() ), iContactId ) &&
+                 error == KErrNone )
+                {
+                iShutdownState = EMusUiShutdownContactSavingQueried;
+                iEventObserver.SetToolbarVisibility( EFalse );
+                SaveContactQueryL();
+                }
+            else
+                {
+                // Nothing receive specific, let the base class handle
+                CMusUiEventController::ExitProcedureL( aUserAcceptance );
+                }
+            break;
+            }
+
+        default:
+            {
+            // Nothing receive specific, let the base class handle
+            CMusUiEventController::ExitProcedureL( aUserAcceptance );
+            break;
+            }
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::ExitProcedureL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::ShowWaitDialogL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::ShowWaitDialogL" );
+    
+    delete iDialogPrompt;
+    iDialogPrompt = NULL;
+        
+    iDialogPrompt = StringLoader::LoadL( 
+                            R_MUS_RECEIVE_VIEW_WAITING_FOR_STREAM,
+                            ( MusContactName().Length() > 0 ) ?
+                                                    MusContactName() :
+                                                    *iOriginator );
+    
+    if ( !iSharingObserver.ShowWaitDialogL( 
+                            *iDialogPrompt, 
+                            KMusInviteExpireTimeout,
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_TIMEOUT_EXPIRED ) )
+        {
+        HandleExitL();
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::ShowWaitDialogL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From MMusEngSessionObserver
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveController::SessionEstablishedL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveController::SessionEstablishedL" );
+
+    iConnectionEstablished = ETrue;
+    iSharingObserver.DismissWaitDialogL();
+
+    if ( iCallbackService->CurrentEvent() == EMusUiAsyncInviteAccepted )
+        {
+        iCallbackService->Cancel();
+        }
+    
+    // Orientation for video player
+    iResourceHandler->RequestVideoPlayerL( ETrue );
+
+    iOriginalMceOrientation = iSession->OrientationL();
+
+    // set the mce orientation if different than videoplayer orientation
+    CAknAppUiBase::TAppUiOrientation currentOrientation = 
+        STATIC_CAST(CMusUiReceiveView&,iReceiveObserver).MusAppUi()->Orientation();
+
+    if( (iOriginalMceOrientation == CMusEngMceSession::EPortrait && 
+        currentOrientation== CAknAppUiBase::EAppUiOrientationPortrait ) ||
+        (iOriginalMceOrientation == CMusEngMceSession::ELandscape && 
+        currentOrientation== CAknAppUiBase::EAppUiOrientationLandscape ))
+        {
+        MUS_LOG( "mus: [MUSUI ]  -> MCE & Videoplayer orientation is same" );
+        // Both MCE and Videoplayer has same orientation.
+        }
+    else
+        {        
+        if(currentOrientation == CAknAppUiBase::EAppUiOrientationPortrait)
+            {
+            MUS_LOG( "mus: [MUSUI ]  -> Setting MCE Orientation to Portrait" );
+            iSession->SetOrientationL(CMusEngMceSession::EPortrait);    
+            }
+        else if(currentOrientation == CAknAppUiBase::EAppUiOrientationLandscape)
+            {
+            MUS_LOG( "mus: [MUSUI ]  -> Setting MCE Orientation to Landscape" );
+            iSession->SetOrientationL(CMusEngMceSession::ELandscape); 
+            }        
+        else
+            {
+            MUS_LOG( "mus: [MUSUI ]  -> Undefined Orientation. " );
+            }
+        }       
+
+    if ( iForeground )
+        {
+        EnableDisplayL( ETrue );
+        iEventObserver.SetToolbarVisibility( ETrue );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveController::SessionEstablishedL" );
+    }
+
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuireceiveview.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,503 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+
+#include "musuireceiveview.h"
+#include "musuireceivecontainer.h"
+#include "musuibackgroundviewcontainer.h"
+#include "musuireceivecontroller.h"
+#include "musuiactivitymanger.h"
+#include "musuiappui.h"
+#include "musuistatuspanehandler.h"
+#include "musui.hrh"
+#include "musuidefinitions.h"
+#include "muslogger.h" // debug logging
+#include <musui.rsg>
+#include <musui.mbg>
+
+#include <aknViewAppUi.h>
+#include <avkon.hrh>
+#include <eikmenup.h>
+#include <akntoolbar.h>
+
+
+// -----------------------------------------------------------------------------
+// EPOC two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::ConstructL" );
+    
+    CMusUiGeneralView::ConstructL();
+
+    Toolbar()->SetToolbarObserver( this );
+    Toolbar()->UpdateBackground();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CMusUiReceiveView::~CMusUiReceiveView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::~CMusUiReceiveView" );
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        }
+    delete iContainer;
+
+    delete iController;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::~CMusUiReceiveView" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TUid CMusUiReceiveView::Id() const
+    {
+    return KMusUidReceivingView;
+    }
+
+// -----------------------------------------------------------------------------
+// From MEikMenuObserver, Called by framework before constructing menupane
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::DynInitMenuPaneL( TInt aResourceId,
+                                          CEikMenuPane* aMenuPane )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::DynInitMenuPaneL" );
+    
+    // Base class initiated initialization first
+    CMusUiGeneralView::DynInitMenuPaneL( aResourceId, aMenuPane );
+    if(!MUS_NO_TOOLBAR)
+        {
+        SetInitialFocusedItemL();
+        }
+    
+    if ( aResourceId == R_MUSUI_VIEW_MENU )
+        {
+        // Delete item which is present on toolbar
+        if ( !MUS_NO_TOOLBAR )
+            {
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewFullScreen );
+            }
+
+        // Delete items not related to receiving side:
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewReplay );
+        aMenuPane->DeleteMenuItem( EMusuiCmdToolbarZoom );
+        aMenuPane->DeleteMenuItem( EMusuiCmdToolbarBrightness );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewZoom );
+        aMenuPane->DeleteMenuItem( EMusuiCmdViewBrightness );
+        aMenuPane->DeleteMenuItem( EMusuiCmdRecord );
+        aMenuPane->DeleteMenuItem( EMusuiCmdStopRecording );
+        
+        // Delete EMusuiCmdViewAudioNormal or EMusuiCmdViewAudioMute
+        // depending on the audio state of the clip:
+        if ( iController->ClipContainsAudioL() )
+            {
+            aMenuPane->DeleteMenuItem( iController->ClipMutedL() ? 
+                                        EMusuiCmdViewAudioMute : 
+                                        EMusuiCmdViewAudioNormal );
+            }
+         else
+            {
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewAudioMute );
+            aMenuPane->DeleteMenuItem( EMusuiCmdViewAudioNormal );
+            }
+        
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::DynInitMenuPaneL" );
+    }
+ 
+    
+// -----------------------------------------------------------------------------
+// Called when focus event occurs.
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::DoHandleForegroundEventL( TBool aForeground )
+    {
+    CMusUiGeneralView::HandleForegroundEventL( aForeground, EFalse );
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::HandleToolbarCommandL( TInt aCommand )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::HandleToolbarCommandL" );
+    
+    __ASSERT_ALWAYS( iController, User::Leave( KErrNotReady ) );
+    
+    switch ( aCommand )
+        {
+        case EKeyLeftArrow:
+            {
+            HandleCommandL( 
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeDown :
+                    EMusUiCmdToolbarLastIndex );
+            break;
+            }
+        case EKeyRightArrow:
+            {
+            HandleCommandL( 
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeUp :
+                    EMusUiCmdToolbarLastIndex );
+            break;
+            }
+        case EKeyUpArrow:
+            {
+            HandleCommandL( 
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeUp :
+                    EMusUiCmdToolbarLastIndex );
+            break;
+            }
+        case EKeyDownArrow:
+            {
+            HandleCommandL( 
+                    iController->ToolbarVolumeSelected() ? EMusuiCmdViewVolumeDown :
+                    EMusUiCmdToolbarLastIndex );
+            break;
+            }
+        case EMusuiCmdViewVolumeDown:
+            {
+            HandleCommandL( EMusuiCmdViewVolumeDown );
+            break;
+            }
+        case EMusuiCmdViewVolumeUp:
+            {
+            HandleCommandL( EMusuiCmdViewVolumeUp );
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::HandleToolbarCommandL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::SetInitialFocusedItemL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::SetInitialFocusedItemL" );
+    
+    __ASSERT_ALWAYS( iController, User::Leave( KErrNotReady ) );
+    
+    if ( iOperatorSpecificFunctionality && !AknLayoutUtils::PenEnabled()  )
+        {
+        MUS_LOG( "Focus changed in OPERATOR mode !!!!!!!!!!!!!" );
+         if ( !( iController->DeviceHasDedicatedVolumeKeys() ) )
+            {
+            Toolbar()->SetFocusedItemL( EMusuiCmdToolbarVolume );
+            }
+        else
+            {
+       
+        	Toolbar()->SetFocusedItemL( EMusuiCmdToolbarFullScreen );    
+        	}
+        
+        }
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::SetInitialFocusedItemL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::SetToolbarVisibility( TBool aVisible )
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiReceiveView::SetToolbarVisibility: %d",
+                            aVisible );
+    if ( MUS_NO_TOOLBAR )
+        {
+        MUS_LOG( "                  Operator variant, no toolbar! Ignoring.." )
+        MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::SetToolbarVisibility" );
+        return;        
+        }
+    
+    // Show toolbar only after established session and before of exit procedure
+    if ( iController->FullScreenSelected() )
+        {
+        MUS_LOG( "mus: [MUSUI ] setting toolbar invisible" );
+        
+        Toolbar()->SetToolbarVisibility( EFalse );
+        
+        SharingContainer().RequestToolbarVisibilityOnceDialogDismissed( NULL );
+        }
+    else
+        {
+        CMusUiGeneralView::SetToolbarVisibility( aVisible );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiGeneralView::SetToolbarVisibility" );
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::DynInitToolbarL( TInt aResourceId, 
+                                         CAknToolbar* aToolbar )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::DynInitToolbarL" );
+    
+    // Items to be removed in Receive View:  
+ 	if (!AknLayoutUtils::PenEnabled())//(aResourceId == R_MUS_TOOLBAR_NONTOUCH)//
+	{
+	    if ( iController->DeviceHasDedicatedVolumeKeys() )
+	        {
+	        MUS_LOG( "mus: [MUSUI ]     CMusUiReceiveView::DynInitToolbarL\
+	                                    DeviceHasDedicatedVolumeKeys" );
+	        Toolbar()->RemoveItem( EMusuiCmdToolbarVolume );
+	        }
+	    else
+	        {
+	        aToolbar->SetFocusedItemL( EMusuiCmdToolbarVolume );
+	        }   
+
+	    Toolbar()->RemoveItem( EMusuiCmdToolbarFFRev );
+	    Toolbar()->RemoveItem( EMusuiCmdToolbarZoom );
+	    Toolbar()->RemoveItem( EMusuiCmdToolbarBrightness);
+	}
+             
+    Toolbar()->RemoveItem( EMusuiCmdToolbarPauseLive );
+    Toolbar()->RemoveItem( EMusuiCmdToolbarUnPauseLive );
+    Toolbar()->RemoveItem( EMusuiCmdToolbarPause );
+    Toolbar()->RemoveItem( EMusuiCmdToolbarUnPause );
+    
+    if ( aToolbar->FocusedItem() == KErrNotFound && 
+         !AknLayoutUtils::PenEnabled() )
+        {
+        aToolbar->SetFocusedItemL( EMusuiCmdToolbarFullScreen );
+        }
+		
+    Toolbar()->RemoveItem( EMusuiCmdToolbarBlank );
+    
+    // Last generic base class functionality
+    CMusUiGeneralView::DynInitToolbarL( aResourceId, aToolbar );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::DynInitToolbarL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::ShowInvitationQueryL( const TDesC& aQuery )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::ShowInvitationQueryL" );
+    iContainer->ShowInvitationQueryL( aQuery, *iController );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::ShowInvitationQueryL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::DismissInvitationQuery( TBool aDelete )
+    {
+    iContainer->DismissInvitationQuery( aDelete );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::SetFullScreenL( TBool aFullScreen )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::SetFullScreenL" );
+
+    if ( aFullScreen )
+        {
+        Cba()->MakeVisible( EFalse );
+		SetToolbarVisibility( EFalse );
+        MusAppUi()->StatusPane()->MakeVisible( EFalse );
+        
+		if( MusAppUi()->CurrentFixedToolbar() )
+                MusAppUi()->CurrentFixedToolbar()->MakeVisible( EFalse );  
+		
+        if( MusAppUi()->CurrentPopupToolbar() )
+                MusAppUi()->CurrentPopupToolbar()->MakeVisible( EFalse );    
+		
+        if( MusAppUi()->PopupToolbar() )
+                MusAppUi()->PopupToolbar()->MakeVisible( EFalse );        
+        iController->ChangeOrientationL( CAknAppUiBase::EAppUiOrientationLandscape );
+
+        iContainer->SetFullScreen( ETrue, MusAppUi()->ApplicationRect() );
+        iController->SetRect( MusAppUi()->ApplicationRect() );
+        }
+    else
+        {
+        if( MusAppUi()->CurrentFixedToolbar() )
+                MusAppUi()->CurrentFixedToolbar()->MakeVisible( ETrue );   
+		
+        if( MusAppUi()->CurrentPopupToolbar() )
+                MusAppUi()->CurrentPopupToolbar()->MakeVisible( ETrue );   
+		
+        if( MusAppUi()->PopupToolbar() )
+                MusAppUi()->PopupToolbar()->MakeVisible( ETrue);
+        // First make toolbar, cba and statuspane visible as those affect
+        // to client rect
+        MusAppUi()->StatusPane()->MakeVisible( ETrue );
+        SetToolbarVisibility( ETrue );
+        Cba()->MakeVisible( ETrue );
+        
+        iController->ChangeOrientationL( CAknAppUiBase::EAppUiOrientationAutomatic );
+        iContainer->SetFullScreen( EFalse, ClientRect() );
+        iController->SetRect( ClientRect() );
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::SetFullScreenL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::RefreshView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::RefreshView" );
+    
+    RefreshBackgroundContainer();
+    
+    if ( iContainer )
+        {
+        iContainer->SetRect( ClientRect() );
+        iContainer->UpdatePointerCapture();
+        }
+    
+    TRect videoRect( ClientRect().iTl.iX,
+                     ClientRect().iTl.iY,
+                     ClientRect().iBr.iX,
+                     ClientRect().iBr.iY - ToolbarPlaceHolderHeight() );
+    
+    if ( iController )
+        {
+        iController->SetRect( videoRect );
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::RefreshView" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiEventController* CMusUiReceiveView::EventController() const
+    {
+    return iController;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiViewContainer& CMusUiReceiveView::SharingContainer() const
+    {
+    return *iContainer;
+    }
+        
+
+// -----------------------------------------------------------------------------
+// From CAknView, Gets called from framework when activating this view
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::DoActivateL( const TVwsViewId& aPrevViewId,
+                                         TUid aCustomMessageId,
+                                         const TDesC8& aCustomMessage )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::DoActivateL" );
+
+    // Base class activation first
+    CMusUiGeneralView::DoActivateL( aPrevViewId,
+                                    aCustomMessageId,
+                                    aCustomMessage );
+                                    
+    if ( !iContainer )
+        {
+        // create the container and then add myself to the view stack
+        iContainer = CMusUiReceiveContainer::NewL( *this, ClientRect() );
+        iContainer->SetMopParent( this );
+        AppUi()->AddToViewStackL( *this, iContainer );
+        }
+    
+    /* Increase the ordinal position of background container
+     * So that other control will be drawn first.     
+     */
+    UpdateBackgroundOrdinalPosition( ETrue );
+        
+    TRect videoRect( ClientRect().iTl.iX,
+                     ClientRect().iTl.iY,
+                     ClientRect().iBr.iX,
+                     ClientRect().iBr.iY - ToolbarPlaceHolderHeight() );
+
+    if ( !iController )
+        {
+        iController = CMusUiReceiveController::NewL( *MusAppUi(),
+                                                     *this, 
+                                                     *this, 
+                                                     videoRect );
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::DoActivateL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// From AknView, Gets called from framework when deactivating this view
+// -----------------------------------------------------------------------------
+//
+void CMusUiReceiveView::DoDeactivate()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiReceiveView::DoDeactivate" );
+    
+    CMusUiGeneralView::DoDeactivate(); // Base class deactivation first
+    
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        delete iContainer;
+        iContainer = NULL;
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiReceiveView::DoDeactivate" );
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiresourcehandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,558 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Handler for camera, keypad and video player resources
+*
+*/
+
+
+
+#include "musuiresourcehandler.h"
+#include "musuipropertywatch.h"
+#include "musuieventobserver.h"
+#include "musuidialogutil.h"
+#include "muslogger.h"
+#include "mussettings.inl"
+
+#include <musui.rsg>
+#include <AknWaitDialog.h>
+#include <StringLoader.h>
+
+using namespace NMusResourceApi;
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiResourceHandler::~CMusUiResourceHandler()
+    {    
+    delete iCameraResourceWatch;
+    delete iKeypadResourceWatch;
+    
+    delete iChangeProductModeDialog;
+    delete iDialogPrompt;
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiResourceHandler* CMusUiResourceHandler::NewL( 
+                                            MMusUiEventObserver& aObserver )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiResourceHandler::NewL()" )
+    
+    CMusUiResourceHandler* self = 
+                            new ( ELeave ) CMusUiResourceHandler( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiResourceHandler::NewL()" )
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiResourceHandler::RequestKeypadL( TBool aMandatory )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiResourceHandler::RequestKeypadL" )
+    
+    TBool keypadAvailable( EFalse ); 
+    
+    switch ( iKeypadAvailability )
+        {        
+        case NMusResourceApi::EAvailable:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Keypad is available" )            
+		    break;		            
+            }			         
+        case NMusResourceApi::ENotAvailable:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Keypad is not available, changing mode" )
+            iKeypadAvailibilityInProgress = ETrue;
+            delete iDialogPrompt;
+            iDialogPrompt = NULL;
+            iDialogPrompt = StringLoader::LoadL( R_MUS_CHANGE_KEYPAD_MODE_TXT );
+            ShowChangeProductModeDialogL( *iDialogPrompt );            
+            MUS_LOG( "                 Product mode changed" )
+            MUS_LOG1( "                 Keypad availability is %d", 
+                      iKeypadAvailability )            
+            break;
+            }
+        default:
+            {
+            MUS_LOG( "mus: [MUSUI ]     availability default." )
+            break;
+            }
+            
+        }
+        
+    switch(iKeypadUsability)
+    	{
+    	case MusSettingsKeys::EUsabilityLandscape:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Keypad is usable in landscape" )
+            iObserver.SwitchOrientationL( 
+                                    CAknAppUiBase::EAppUiOrientationLandscape );            
+            break;
+            }
+        case MusSettingsKeys::EUsabilityPortrait:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Keypad is usable in portrait" )
+            iObserver.SwitchOrientationL( 
+                                    CAknAppUiBase::EAppUiOrientationPortrait );            
+            break;
+            }	
+    	case MusSettingsKeys::EUsabilityAlways:
+    		{
+    		MUS_LOG( "mus: [MUSUI ]     Keypad is usable in all mode" )
+    		keypadAvailable = ETrue;	
+    		}
+    		break;
+    	default:
+    	  	MUS_LOG( "mus: [MUSUI ]     usuability default ." )
+    	  	break;
+    	}
+    	
+    keypadAvailable = IsCurrentlyAvailable( iKeypadAvailability,
+		                                    iKeypadUsability );
+            
+    if ( aMandatory && !keypadAvailable )
+        {
+        MUS_LOG( "mus: [MUSUI ]     Mandatory keypad not available, exiting" )
+        MusUiDialogUtil::ShowGlobalInformationDialogL( 
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_SHARING_ENDED );
+        iObserver.HandleExit();
+        }
+    
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiResourceHandler::RequestKeypadL( %d )",
+              keypadAvailable )
+    
+    return keypadAvailable;
+    
+    
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiResourceHandler::RequestCameraL( TBool aMandatory )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiResourceHandler::RequestCameraL" )
+    
+    TBool cameraAvailable( EFalse );
+    
+    switch ( iCameraAvailability )
+        {        
+        case NMusResourceApi::EAvailable:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Camera is available" )            
+            cameraAvailable = ETrue;
+            break;
+            }
+        
+        case NMusResourceApi::ENotAvailable:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Camera is not available, changing mode" )
+
+            iCameraAvailibilityInProgress = ETrue;
+            delete iDialogPrompt;
+            iDialogPrompt = NULL;
+            iDialogPrompt = StringLoader::LoadL(
+                R_MUS_LIVE_SHARING_VIEW_OPEN_CAMERA_LENS_COVER_WAIT_NOTE_TXT );
+            ShowChangeProductModeDialogL( *iDialogPrompt );
+            
+            MUS_LOG( "                 Product mode changed" )
+            MUS_LOG1( "                 Camera availability is %d", 
+                      iCameraAvailability )                                  
+            break;
+            }
+        default:
+        	MUS_LOG( "mus: [MUSUI ]     availability default." )
+            break;
+        }
+        
+    switch(iCameraUsability)
+    	{
+    	case MusSettingsKeys::EUsabilityLandscape:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Camera is usable in landscape" )
+            iObserver.SwitchOrientationL( 
+                                CAknAppUiBase::EAppUiOrientationLandscape );            
+            break;
+            }
+        case MusSettingsKeys::EUsabilityPortrait:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Camera is usable in portrait" )
+            iObserver.SwitchOrientationL( 
+                                CAknAppUiBase::EAppUiOrientationPortrait );           
+            break;
+            }	
+        case MusSettingsKeys::EUsabilityAlways:
+    		{
+    		MUS_LOG( "mus: [MUSUI ]     camera is usable in all mode" )
+    		cameraAvailable = ETrue;	
+    		}
+    	default:
+            {
+            MUS_LOG( "mus: [MUSUI ]     usuability default." )
+            break;
+            }
+    	}
+    
+    cameraAvailable = IsCurrentlyAvailable( iCameraAvailability,
+		                                    iCameraUsability );
+    if ( aMandatory && !cameraAvailable )
+        {
+        MUS_LOG( "mus: [MUSUI ]     Mandatory camera not available, exiting" )
+        MusUiDialogUtil::ShowGlobalInformationDialogL( 
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_SHARING_ENDED ); 
+        iObserver.HandleExit();        
+        }
+    
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiResourceHandler::RequestCameraL( %d )",
+              cameraAvailable )
+        
+    return cameraAvailable;
+    }
+ 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiResourceHandler::RequestVideoPlayerL( TBool aMandatory )
+    { 
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiResourceHandler::RequestVideoPlayerL" )
+    
+    TBool videoPlayerAvailable( EFalse );
+    
+    /* Video Player will be always available. There is no dynamic variation */
+    NMusResourceApi::TAvailability vpAvailability = NMusResourceApi::EAvailable;
+    
+    switch ( iVideoplayerUsability )
+        {       
+        case MusSettingsKeys::EUsabilityAlways:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Video player is usuable in all mode" )            
+            videoPlayerAvailable = ETrue;
+            break;
+            }
+        case MusSettingsKeys::EUsabilityLandscape:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Video player is usable in landscape" )
+
+            iObserver.SwitchOrientationL( 
+                                    CAknAppUiBase::EAppUiOrientationLandscape );
+            videoPlayerAvailable = IsCurrentlyAvailable( vpAvailability,
+                                                         iVideoplayerUsability );
+            break;
+            }
+        case MusSettingsKeys::EUsabilityPortrait:
+            {
+            MUS_LOG( "mus: [MUSUI ]     Video player is usable in portrait" )
+
+            iObserver.SwitchOrientationL( 
+                                    CAknAppUiBase::EAppUiOrientationPortrait );
+            videoPlayerAvailable = IsCurrentlyAvailable( vpAvailability,
+                                                         iVideoplayerUsability );
+            break;
+            }        
+        default:
+            {
+            MUS_LOG( "mus: [MUSUI ]     usuability default." )
+            break;
+            }
+        }
+    
+    if ( aMandatory && !videoPlayerAvailable )
+        {
+        MUS_LOG( "mus: [MUSUI ]     Mandatory player not available, exiting" )
+        MusUiDialogUtil::ShowGlobalInformationDialogL( 
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_SHARING_ENDED );
+        iObserver.HandleExit();
+        }
+        
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiResourceHandler::RequestVideoPlayerL(%d)",
+              videoPlayerAvailable )
+    
+    return videoPlayerAvailable;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by CMusUiPropertyWatch, when resource key values change in P&S
+// -----------------------------------------------------------------------------
+//
+void CMusUiResourceHandler::PropertyChanged( const TUint aKey,
+                                             const TInt aValue )
+    {
+    
+    MUS_LOG2( "mus: [MUSUI ] -> CMusUiResourceHandler::ResourcePropertyChanged:\
+              aKey: [%u] aValue: [%d]", aKey, aValue )
+              
+    switch( aKey )
+        {
+        case NMusResourceApi::KCameraAvailability:
+            {
+            MUS_LOG( "mus: [MUSUI ]  KCameraAvailability   " )            
+            iCameraAvailability = static_cast< TAvailability >( aValue );
+            if ( iCameraAvailibilityInProgress && iChangeProductModeDialog )
+                {
+                TRAP_IGNORE( iChangeProductModeDialog->ProcessFinishedL() );
+                }
+            iCameraAvailibilityInProgress = EFalse;
+            break;
+            }
+        case NMusResourceApi::KKeypadAvailability:
+            {
+            MUS_LOG( "mus: [MUSUI ]  KKeypadAvailability   " )            
+            iKeypadAvailability = static_cast< TAvailability >( aValue );
+            if ( iKeypadAvailibilityInProgress && iChangeProductModeDialog )
+                {
+                TRAP_IGNORE( iChangeProductModeDialog->ProcessFinishedL() );
+                }
+            iKeypadAvailibilityInProgress = EFalse;
+            break;
+            }       
+        default:
+            {
+            MUS_LOG( "mus: [MUSUI ]     avilability property watch default." )
+            break;
+            }
+            
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiResourceHandler::ResourcePropertyChanged" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiResourceHandler::HandlePropertyError( const TInt aReason )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiResourceHandler::HandlePropertyError()" )
+
+    iObserver.HandleError( aReason );
+    }
+
+
+// -----------------------------------------------------------------------------
+// C++ constructor
+// -----------------------------------------------------------------------------
+//
+CMusUiResourceHandler::CMusUiResourceHandler( MMusUiEventObserver& aObserver )
+    :iObserver( aObserver ),
+     iCameraAvailability(NMusResourceApi::EAvailable),
+     iKeypadAvailability(NMusResourceApi::EAvailable),
+     iCameraUsability(MusSettingsKeys::EUsabilityAlways),
+     iKeypadUsability(MusSettingsKeys::EUsabilityAlways),
+     iVideoplayerUsability(MusSettingsKeys::EUsabilityAlways)
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// Symbian second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CMusUiResourceHandler::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiResourceHandler::ConstructL()" )
+    
+	iCameraAvailibilityInProgress = EFalse;
+    iKeypadAvailibilityInProgress = EFalse;     
+             
+    // Read the value from cenrep and check whether camera,keypad
+    // and videoplayer usability.
+    MultimediaSharingSettings::ResourceUsability( iCameraUsability ,
+    											  iKeypadUsability,
+    											  iVideoplayerUsability);
+        
+    // Read the value from cenrep and check whether camera and keypad
+    // available dynamically.
+    MusSettingsKeys::TAvailability camera,keypad;    
+    MultimediaSharingSettings::ResourceAvailability( camera ,
+    												 keypad);
+    
+    TInt err = KErrNone;
+    
+    // Set Camera availability     
+    if(camera == MusSettingsKeys::EAvailabilityDynamic)    												 
+    	{
+    	// read the PS key intial value
+    	err = RProperty::Get(
+                            NMusResourceApi::KCategoryUid,
+                            NMusResourceApi::KCameraAvailability,
+                            (TInt&)iCameraAvailability );
+        if(err) 
+        	{
+        	MUS_LOG1( "mus: [MUSUI ] Error = %d",err )
+        	iCameraAvailability = NMusResourceApi::ENotAvailable;
+        	}
+        // watch the camera ps key for further change
+    	iCameraResourceWatch = CMusUiPropertyWatch::NewL(
+                            *this,
+                            NMusResourceApi::KCategoryUid,
+                            KCameraAvailability ); 
+    	}
+    else
+    	{
+    	iCameraAvailability = NMusResourceApi::EAvailable;	
+    	}
+    	
+    // Set Keypad availability    
+     if(keypad == MusSettingsKeys::EAvailabilityDynamic)    												 
+    	{
+    	// read the PS key intial value
+    	err = RProperty::Get(
+                            NMusResourceApi::KCategoryUid,
+                            NMusResourceApi::KKeypadAvailability,
+                            (TInt&)iKeypadAvailability ); 
+        if(err) 
+        	{
+        	MUS_LOG1( "mus: [MUSUI ] Error = %d",err )
+        	iKeypadAvailability = NMusResourceApi::ENotAvailable;
+        	}
+    	// watch the keypad ps key
+    	iKeypadResourceWatch = CMusUiPropertyWatch::NewL(
+                            		*this,
+                            		NMusResourceApi::KCategoryUid,
+                            		KKeypadAvailability );        
+    	}
+    else
+    	{
+    	iKeypadAvailability = NMusResourceApi::EAvailable;	
+    	}
+    
+    // Videoplayer availability always static
+     
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiResourceHandler::ConstructL()" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiResourceHandler::ShowChangeProductModeDialogL( 
+                                                        const TDesC& aPrompt )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiResourceHandler::ShowChangeProductModeDialogL()" )
+    
+    TBool returnValue = EFalse;
+
+    if ( !iChangeProductModeDialog )
+        {    
+        iChangeProductModeDialog = new ( ELeave ) CAknWaitDialog( (
+                reinterpret_cast<CEikDialog**>( &iChangeProductModeDialog )  ), 
+                ETrue );
+                    
+        iChangeProductModeDialog->SetTextL( aPrompt );
+        
+        iChangeProductModeDialog->PrepareLC( 
+                        R_MUS_LIVE_SHARING_VIEW_ACTIVATE_CAMERA_WAIT_NOTE );
+        returnValue = iChangeProductModeDialog->RunLD();
+        
+        iChangeProductModeDialog = NULL;
+        }
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiResourceHandler::ShowChangeProductModeDialogL()" )
+    
+    return returnValue;
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiResourceHandler::IsCurrentlyAvailable( 
+                        NMusResourceApi::TAvailability aResourceAvailability,
+                        MusSettingsKeys::TUsability aResourceUsability
+                         )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiResourceHandler::IsCurrentlyAvailable()" )
+
+    CAknAppUiBase::TAppUiOrientation orientation = iObserver.AppOrientation();
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiResourceHandler::IsCurrentlyAvailable()" )
+    
+    return ( aResourceAvailability == NMusResourceApi::EAvailable && 
+             (
+              aResourceUsability == MusSettingsKeys::EUsabilityAlways ||
+              (aResourceUsability == MusSettingsKeys::EUsabilityLandscape && 
+               orientation == CAknAppUiBase::EAppUiOrientationLandscape) ||
+              (aResourceUsability == MusSettingsKeys::EUsabilityPortrait &&
+               orientation == CAknAppUiBase::EAppUiOrientationPortrait)
+             )
+            );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiResourceHandler::CheckInitialOrientationL(MultimediaSharing::TMusUseCase aUsecase )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiResourceHandler::CheckInitialOrientationL()" )
+    if ( aUsecase != MultimediaSharing::EMusLiveVideo &&
+         aUsecase != MultimediaSharing::EMusClipVideo &&
+         aUsecase != MultimediaSharing::EMusReceive )
+        {
+        return;   
+        }
+    
+    MusSettingsKeys::TUsability usability = ( aUsecase == MultimediaSharing::EMusLiveVideo ) ?
+        iCameraUsability : iVideoplayerUsability;
+    if ( usability == MusSettingsKeys::EUsabilityPortrait )
+        {
+        iObserver.SwitchOrientationL( CAknAppUiBase::EAppUiOrientationPortrait );
+        }
+    else if ( usability == MusSettingsKeys::EUsabilityLandscape )
+        {
+        iObserver.SwitchOrientationL( CAknAppUiBase::EAppUiOrientationLandscape );
+        }
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiResourceHandler::CheckInitialOrientationL()" )
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuisendcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,1077 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#include "musuisendcontroller.h"
+#include "musuieventobserver.h"
+#include "musuisharingobserver.h"
+#include "musuisendobserver.h"
+#include "musuidialogutil.h"
+#include "musuicallbackservice.h"
+#include "musuifileutil.h"
+#include "mussettings.h"
+#include "musuipropertywatch.h"
+#include "mussessionproperties.h"
+#include "mussettingskeys.h"
+#include "musuiresourcehandler.h"
+#include "muslogger.h" // debug logging
+
+#include "musengmceoutsession.h"
+#include "musenguriparser.h"
+#include <musui.rsg>
+
+#include <StringLoader.h>
+#include <pathinfo.h>
+#include <CDirectoryLocalizer.h>
+
+
+using namespace NMusSessionApi;
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendController::~CMusUiSendController()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::~CMusUiSendController" );
+    
+    delete iAddress;
+    delete iRemoteSipAddress;
+    delete iRemoteSipAddressProposal;
+    TRAP_IGNORE( DeleteFileL() );  
+    delete iVideoFileName;
+    delete iLocalizer;
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::~CMusUiSendController" );
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngMceSession* CMusUiSendController::EngineSession()
+    {
+    return EngineOutSession(); // Engine out session is CMusEngMceSession
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::DeleteEngineSession()
+    {
+    // Cancel invite
+    if ( EngineOutSession() && !ConnectionEstablished() )
+        {
+        MUS_LOG( "mus: [MUSUI ]     CMusUiSendController::DeleteEngineSession:\
+                            Canceling inviting..." );
+        TRAP_IGNORE( EngineOutSession()->CancelInviteL() );
+        }
+    }     
+        
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::HandlePropertyError( const TInt aReason )
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiEventController::HandleError [%d]",
+                            aReason );
+    TRAP_IGNORE( DeleteVideoL() );
+    
+    CMusUiEventController::HandlePropertyError( aReason ); // For the base class
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::HandleError" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::HandleAsyncEventL( TMusUiAsyncEvent aEventId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::HandleAsyncEventL" );
+    switch ( aEventId )
+        {
+        case EMusUiAsyncInviteCancel:
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiSendController::\
+                     HandleAsyncEventL: EMusUiAsyncInviteCancel" );
+            HandleExitL();
+            break;
+            }
+        case EMusUiAsyncManualAddressEntry:
+            {
+            iResourceHandler->RequestKeypadL( ETrue ); // Exits on fail                    
+            iSendObserver.ManualAddressEntryL( *iRemoteSipAddressProposal );
+            break;
+            }
+        case EMusUiAsyncStartInvitation:
+            {
+            MUS_LOG( "mus: [MUSUI ]     CMusUiSendController::\
+                     HandleAsyncEventL: EMusUiAsyncStartInvitation" );
+            InviteL();	            
+            break;
+            }
+        default:
+            {
+            // Not send specific, let the base class handle
+            CMusUiEventController::HandleAsyncEventL( aEventId );
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::HandleAsyncEventL" );
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiSendController::TypedAddress() const
+    {
+    return *iAddress;
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiSendController::ManualAddressTyped() const
+    {
+    return iManualAddressTyped;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::StartInvitationL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::StartInvitationL" );
+    
+    iCallbackService->AsyncEventL( EMusUiAsyncStartInvitation );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::StartInvitationL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::InviteL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::InviteL" );
+    
+    if ( !iSipRegistrationPending )
+        {
+        TRAPD( error, 
+               iRemoteSipAddress = CMusUiPropertyWatch::ReadDescPropertyL(
+                                                    KRemoteSipAddress ) );
+        if ( error != KErrNone )
+            {
+            iRemoteSipAddress = KNullDesC().AllocL();
+            }
+
+        TRAP( error, iRemoteSipAddressProposal =
+                                CMusUiPropertyWatch::ReadDescPropertyL(
+                                                    KRemoteSipAddressProposal ) );
+        if ( error != KErrNone )
+            {
+            iRemoteSipAddressProposal = KNullDesC().AllocL();
+            }
+        
+        if ( iRemoteSipAddress->Length() > 0 )
+            {
+            if ( iRemoteSipAddress->Find( KMusCommaSymbol ) == KErrNotFound )
+                {
+                InviteL( *iRemoteSipAddress );
+                }
+            else
+                {
+                // Split the addresses using KMusCommaSymbol as a separator
+                CDesCArray* addressArray =
+                            new ( ELeave ) CDesCArrayFlat(
+                                                    KMusSipAddressesMaxAmount );
+                SplitL( *iRemoteSipAddress, KMusCommaSymbol, addressArray );
+                // Show List Query Dialog
+                TBuf<KMusSipAddressMaxLength> selectedAddress;
+                if ( MusUiDialogUtil::SelectAddressDialogL( addressArray, 
+                                                            selectedAddress ) )
+                    {
+                    // Invite with the chosen address                    
+                    InviteL( selectedAddress );
+                    }
+                else
+                    {
+                    HandleExitL();
+                    }
+                }
+            }
+        else
+            {
+            iResourceHandler->RequestKeypadL( ETrue ); // Exits on failure
+            iManualAddressTyped = ETrue;
+            iSendObserver.ManualAddressEntryL( *iRemoteSipAddressProposal );
+            }
+        }
+    else
+        {
+        // Show waiting dialog
+        delete iDialogPrompt;
+        iDialogPrompt = NULL;
+        iDialogPrompt = StringLoader::LoadL(
+                                R_MUS_REGISTRATION_PENDING_WAIT_NOTE_TXT );
+                       
+        if ( !iSharingObserver.ShowWaitDialogL( 
+                                    *iDialogPrompt, 
+                                    KMusInviteExpireTimeout, //Reuse 1 min timer
+                                    R_MUS_LIVE_SHARING_VIEW_NOTE_NO_REG ) )
+            {
+            iEventObserver.HandleExit();
+            }
+            
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::InviteL" );
+    }    
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::CancelInvitationL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::CancelInvitationL" );
+    
+    if ( EngineOutSession() && !ConnectionEstablished() )
+        {
+        TRAP_IGNORE( EngineOutSession()->CancelInviteL() );
+        }
+        
+    HandleExitL();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::CancelInvitationL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::HandleForegroundEventL( TBool aForeground )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::HandleForegroundEventL" );
+    
+    CMusUiEventController::HandleForegroundEventL( aForeground );
+    
+    if ( ConnectionEstablished() &&  !ExitOccured() )
+        {
+        if ( aForeground )
+            { 
+            if ( iContinuePlayingWhenForeground )
+                {
+                MUS_LOG( "mus: [MUSUI ]     Resume playing" );
+                PlayL();
+                }
+            }
+        else
+            {
+            MUS_LOG( "mus: [MUSUI ]     Pause playing" );
+            if ( EngineOutSession() )
+                {
+                iContinuePlayingWhenForeground = IsPlayingL(); 
+                }
+            PauseL();
+            }
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::HandleForegroundEventL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::PlayL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::PlayL" );
+    if ( EngineOutSession() )
+        {
+        EngineOutSession()->PlayL();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::PlayL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::PauseL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::PauseL" );
+    if ( EngineOutSession() )
+        {
+        EngineOutSession()->PauseL();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::PauseL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiSendController::IsPlayingL()
+    {
+    TBool isPlaying( EFalse );
+    
+    if ( EngineOutSession() )
+        {
+        isPlaying = EngineOutSession()->IsPlayingL();
+        }
+    
+    return isPlaying;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionEstablished()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionEstablished" );
+    
+    // Common handling first
+    CMusUiEventController::SessionEstablished();
+    
+    iConnectionEstablished = ETrue;
+    DismissWaitDialog();
+    
+    if ( iForeground )
+        {
+        MUS_LOG( "mus: [MUSUI ]     Enable display and start playing" );
+        TRAP_IGNORE( PlayL(); 
+                     EnableDisplayL( ETrue ); )
+                     
+        iEventObserver.SetToolbarVisibility( ETrue );
+        
+        }
+    else
+        {
+        MUS_LOG( "mus: [MUSUI ]     In background, don't start playing yet" );
+        iContinuePlayingWhenForeground = ETrue;
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionEstablished" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionRejected()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionRejected" );
+    DismissWaitDialog();
+    TRAP_IGNORE (
+            MusUiDialogUtil::ShowInformationDialogL( 
+                        R_MUS_LIVE_SHARING_VIEW_NOTE_CONNECTION_REJECTED ) );
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+       
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionRejected" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionBadRequest()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionBadRequest" );
+    
+    DismissWaitDialog();
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionBadRequest" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionUnauthorized()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionUnauthorized" );
+    
+    DismissWaitDialog();
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionUnauthorized" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionPaymentRequired()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionPaymentRequired" );
+    
+    DismissWaitDialog();
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionPaymentRequired" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionRecipientNotFound()
+    {
+    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiSendController::SessionRecipientNotFound [%d]",
+                            iTriedInvitations );
+    DismissWaitDialog();
+    if ( ExitOccured() )
+        {
+        return;
+        }
+    if ( ++iTriedInvitations > 1 )
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowInformationDialogL(
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_WRONG_ADDRESS ) );
+        
+        TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncInviteCancel ) );
+           
+        }
+    else
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowInformationDialogL(
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_WRONG_ADDRESS ) );
+        iManualAddressTyped = ETrue;
+        
+        TRAP_IGNORE(
+            iCallbackService->AsyncEventL( EMusUiAsyncManualAddressEntry ) );
+            
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionRecipientNotFound" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionProxyAuthenticationRequired()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionProxyAuthenticationRequired" );
+    
+    DismissWaitDialog();
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionProxyAuthenticationRequired" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionRequestTimeOut()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionRequestTimeOut" );
+    DismissWaitDialog();    
+    TRAP_IGNORE( MusUiDialogUtil::ShowInformationDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_NO_RESPONSE ) );
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionRequestTimeOut" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionUnsupportedMediaType()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionUnsupportedMediaType" );
+    DismissWaitDialog();
+    if ( !ExitOccured() )
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                                    R_MUS_LIVE_SHARING_VIEW_NOTE_APP_N_A ) );
+        }
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionUnsupportedMediaType" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionBusyHere()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionBusyHere" );
+    DismissWaitDialog();
+    TRAP_IGNORE( 
+            MusUiDialogUtil::ShowInformationDialogL( 
+                               R_MUS_LIVE_SHARING_VIEW_NOTE_RECIPIENT_N_A ) );
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionBusyHere" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionRequestCancelled()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionRequestCancelled" );
+    DismissWaitDialog();
+    TRAP_IGNORE( 
+          MusUiDialogUtil::ShowInformationDialogL( 
+                        R_MUS_LIVE_SHARING_VIEW_NOTE_INVITATION_CANCELLED ) );
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionRequestCancelled" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SessionTemporarilyNotAvailable()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SessionRequestCancelled" );
+    DismissWaitDialog();
+    if ( !ExitOccured() )
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_SERVICE_N_A ) );
+        }
+    
+    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::SessionRequestCancelled" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::ConstructL" );
+    
+    CMusUiEventController::ConstructL(); // Base class construction
+    iLocalizer = CDirectoryLocalizer::NewL();
+     
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::ConstructL" );   
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendController::CMusUiSendController(
+                                    MMusUiEventObserver& aEventObserver,
+                                    MMusUiSharingObserver& aSharingObserver, 
+	                                MMusUiSendObserver& aSendObserver )
+	: CMusUiEventController( aEventObserver, aSharingObserver ),
+	  iSendObserver( aSendObserver ),
+	  iTriedInvitations( 0 ),
+	  iContinuePlayingWhenForeground( ETrue ),
+	  iWaitDialogCallback( *this )
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::ExitProcedureL( TBool aUserAcceptance )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::ExitProcedureL" );
+    
+    DismissWaitDialog();
+    
+    switch ( iShutdownState )
+        {
+        case EMusUiShutdownStarted:
+            {
+            MUS_LOG( "mus: [MUSUI ]     ExitProcedureL: EMusuiShutdownStarted" );
+        
+            if ( iVideoToBeSaved && 
+                 iVideoFileName &&
+                 MusUiFileUtil::FileExists( *iVideoFileName ) )
+                {
+                iShutdownState = EMusUiShutdownVideoSaved;
+                ShowVideoSavedDialogL();
+                ExitProcedureL( ETrue ); // Accept saving
+                }
+            else
+                {
+                CMusUiEventController::ExitProcedureL( aUserAcceptance );
+                }
+            break;
+            }
+            
+        case EMusUiShutdownVideoSaved:
+            {
+            MUS_LOG( "mus: [MUSUI ]     ExitProcedureL: EMusuiShutdownVideoSaved" );
+            
+            // Check if our address is valid sip or tel uri. If not, there is no
+            // point to query user about permission to save it to contacts.
+            
+            TInt error = KErrNotFound;
+            if ( iAddress )
+                {
+                TMusEngUriParser parser( *iAddress );
+                TRAP( error, parser.ParseUriL() )                
+                }
+   
+            // Save Address to Contacts query if manually entered
+            // and if is the standard variant.
+            // NOTE: KErrNotSupported means there is more than one contact id.
+            if ( !iOperatorSpecificFunctionality && ManualAddressTyped() && 
+                 iContactId != KErrNotSupported &&
+                 error == KErrNone )
+                {
+                iShutdownState = EMusUiShutdownContactSavingQueried;
+                SaveContactQueryL();
+                }
+            else
+                {
+                // Nothing send specific, let the base class handle
+                CMusUiEventController::ExitProcedureL( aUserAcceptance );
+                }
+            break;
+            }
+
+        default:
+            {
+            // Nothing send specific, let the base class handle
+            CMusUiEventController::ExitProcedureL( aUserAcceptance );
+            break;
+            }
+        }
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::ExitProcedureL" );
+    }
+    
+    
+// -----------------------------------------------------------------------------
+// Handles status changes specific to sending sharing types.
+// Calls base class version for status changes that are not sending specific. 
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::HandleChangedStatusL(
+                        TMusAvailabilityStatus aStatus )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::HandleChangedStatusL" )
+    switch( aStatus )
+        {
+        case ESipRegistrationPending:
+            {
+            MUS_LOG( "mus: [MUSUI ]     ESipRegistrationPending" );
+            iSipRegistrationPending = ETrue;
+            break;
+            }
+        case ESipOptionsNotSent:    // FALLTHROUGH
+        case ESipOptionsSent:       // FALLTHROUGH
+        	{
+        	break;	
+        	}
+        case EManualActivation:     // FALLTHROUGH
+        case EMultimediaSharingAvailable:
+            {
+            MUS_LOG( "mus: [MUSUI ]     EManualActivation or EMultimediaSharingAvailable" )
+      
+            if( iSipRegistrationPending )
+                {
+                iSipRegistrationPending = EFalse;
+                // Set callback service, Call StartInvitationL when wait dialog dismissed
+                TRAPD( err, iSharingObserver.SetWaitDialogCallbackL( 
+                            &iWaitDialogCallback ) );
+                // Dismiss pending wait note
+                iSharingObserver.DismissWaitDialogL();
+                if ( err == KErrNotReady )
+                    {
+                    StartInvitationL(); 
+                    }
+                }
+            break;
+            }
+
+        default:
+            {
+            // Not sending specific, let the base class handle
+            CMusUiEventController::HandleChangedStatusL( aStatus );
+            break;
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::HandleChangedStatusL" )
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC& CMusUiSendController::VideoFileNameL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::VideoFileNameL" );
+    
+    TParse parse;
+    TPtrC rootPath;
+    
+    SetVideoPathValueL();//sets video rootpath according to setting value.
+   
+    if ( parse.Set( iVideoFilePath,NULL,NULL) != KErrBadName )
+        {
+         
+         if(parse.Drive().Compare( PathInfo::MemoryCardRootPath()))
+            {
+            TRAPD(error,MusUiFileUtil::VideoFilePathExistsL(iVideoFilePath));
+            
+            switch(error)
+                {
+                case KErrNotReady:
+                case KErrCorrupt:
+                case KErrLocked:
+                    {
+                    MusUiDialogUtil::ShowGlobalInformationDialogL(
+                                           R_MUS_VIEW_NOTE_MEMORYCARD_PROBLEM);
+                    
+                    MUS_LOG( "mus: [MUSUI ]  -> Changing to Phone Memory " );
+    		        rootPath.Set(PathInfo::PhoneMemoryRootPath());
+    		        TParsePtrC pathPtr(rootPath);
+    	            iVideoFilePath  = rootPath;
+    	            iVideoFilePath  += PathInfo::VideosPath();
+    	            // Make sure the new path exists
+    	            TRAP_IGNORE( MusUiFileUtil::VideoFilePathExistsL(iVideoFilePath) )
+                    break;
+                    }
+                case KErrAlreadyExists:
+                case KErrNone:
+                    {
+                    MUS_LOG( "mus: [MUSUI ]  -> Using MMC " );
+                    rootPath.Set(PathInfo::MemoryCardRootPath());
+                    break;
+                    }
+                default:
+                    {
+                    delete iVideoFileName;
+                    iVideoFileNamePlain = KNullDesC;
+        	    	iVideoFileName = iVideoFileNamePlain.AllocL(); 
+                    HandleError( error);
+                    break;
+                    }
+                }
+            }
+        else//Phone memory is being used.
+            {
+            TRAPD(error,MusUiFileUtil::VideoFilePathExistsL(iVideoFilePath));
+               
+            switch(error)
+                {
+                case KErrAlreadyExists:
+                case KErrNone:
+                    {
+                    MUS_LOG( "mus: [MUSUI ] -> Using Phone memory" );
+                    rootPath.Set(PathInfo::PhoneMemoryRootPath());
+                    break;
+                    }
+                default:
+                    {
+                    delete iVideoFileName;
+                    iVideoFileNamePlain = KNullDesC;
+        	    	iVideoFileName = iVideoFileNamePlain.AllocL(); 
+                    HandleError( error);
+                    break;
+                    }
+                }
+             }
+        
+        }
+        else
+            {
+            delete iVideoFileName;
+            iVideoFileNamePlain = KNullDesC;
+	    	iVideoFileName = iVideoFileNamePlain.AllocL(); 
+            HandleError(KErrBadName);
+            }
+        
+    TParsePtrC pathPtr(rootPath);
+	iVideoFilePath  += pathPtr.NameAndExt();
+	MusUiFileUtil::CreateVideoFileNameL(iVideoFilePath,
+	                                    iVideoFileNamePlain);
+
+    delete iVideoFileName;
+    TFileName videoFileName;
+    videoFileName += iVideoFilePath;
+    videoFileName += iVideoFileNamePlain;
+    videoFileName += KMusVideoFileNameExtension;
+    iVideoFileName = videoFileName.AllocL();
+   
+    MUS_LOG_TDESC( "mus: [MUSUI ]    <- CMusUiSendController::VideoFileNameL:",
+                            iVideoFileName->Des() );
+    return *iVideoFileName;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::ShowInvitingWaitDialogL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::ShowWaitDialogL" );
+    delete iDialogPrompt;
+    iDialogPrompt = NULL;
+    iDialogPrompt = StringLoader::LoadL(
+                            R_MUS_LIVE_SHARING_VIEW_INVITING_WAIT_NOTE_TXT,
+                            MusContactName().Length() > 0 ?
+                            MusContactName() : iOperatorSpecificFunctionality ?
+                            MusTelNumberValue() : *iAddress );
+                   
+    if ( !iSharingObserver.ShowWaitDialogL( 
+                                *iDialogPrompt, 
+                                KMusInviteExpireTimeout,
+                                R_MUS_LIVE_SHARING_VIEW_NOTE_NO_RESPONSE ) )
+        {
+        CancelInvitationL();
+        }
+            
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::ShowWaitDialogL" );
+    }
+        
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::DismissWaitDialog()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::DismissWaitDialog" );
+    TRAPD( err, iSharingObserver.DismissWaitDialogL(); );
+    if ( err != KErrNone )
+        {
+        HandleError( err );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::DismissWaitDialog" );
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SplitL( const TDesC& aDes,
+                                   const TDesC& aChar,
+                                   CDesCArray* aArray )
+    {
+    TInt charPos( 0 );
+    TPtrC ptr( aDes );
+    TBool found = EFalse;
+    while( ( charPos = ptr.Find( aChar ) ) > 0 )
+        {
+        found = ETrue;
+        TPtrC str = ptr.Left( charPos );
+        aArray->AppendL( str );
+        ptr.Set( ptr.Right( ptr.Length() - str.Length() - 1 ) );
+        }
+    if ( found && ptr.Length() > 0 )
+        {
+        aArray->AppendL( ptr );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::SetVideoPathValueL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::SetVideoPathValueL" );
+    TInt drive = MultimediaSharingSettings::VideoLocationSettingL();                
+
+    TFileName rootPath;
+    User::LeaveIfError( PathInfo::GetRootPath( rootPath, drive ) );
+
+	TParsePtrC pathPtr(rootPath);
+	iVideoFilePath  = rootPath;
+	iVideoFilePath  += PathInfo::VideosPath();
+    MUS_LOG_TDESC( "mus: [MUSUI ]  <- CMusUiSendController::SetVideoPathValueL: ",
+                   iVideoFilePath ); 
+    iLocalizer->SetFullPath( iVideoFilePath );
+    if ( iLocalizer->IsLocalized() )
+        {
+        iLocalizedVideoFilePath =iLocalizer->LocalizedName();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::ShowVideoSavedDialogL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::ShowVideoSavedDialogL" );
+    //MUS_LOG_TDESC( "mus: [MUSUI ]      ", iVideoFileNamePlain );
+    //MUS_LOG_TDESC( "mus: [MUSUI ]      ", iVideoFilePath );
+    
+    delete iDialogPrompt;
+    iDialogPrompt = NULL;
+    
+    TBuf<KMusFileNameMaxLength> buf;
+    TFileName videoFileName;
+    videoFileName += iVideoFileNamePlain;
+    videoFileName += KMusVideoFileNameExtension;
+    buf = videoFileName;
+    
+    CDesCArrayFlat* savingTextsArray = 
+            new ( ELeave ) CDesCArrayFlat( KMusStringSubstArrayGranularity );
+    CleanupStack::PushL( savingTextsArray );
+    //"File %0U saved to folder %1U"
+    //%0U = iVideoFileName
+    //%1U = iVideoFilePath
+    savingTextsArray->InsertL( 0, videoFileName );
+
+    if ( MultimediaSharingSettings::OperatorVariantSettingL() ==
+    	 MusSettingsKeys::EOperatorSpecific ) // For AT&T products
+        {
+    	HBufC* folder = StringLoader::LoadLC( R_MUS_VIDEO_SAVE_FOLDER_NAME );
+    	savingTextsArray->InsertL( 1, *folder );
+		CleanupStack::PopAndDestroy( folder );
+        }
+    else // Standard products
+        {
+	    if ( iLocalizer->IsLocalized() )
+	        {
+	        savingTextsArray->InsertL( 1, iLocalizedVideoFilePath );
+	        }
+	    else
+	        {
+	        savingTextsArray->InsertL( 1, iVideoFilePath );
+	        }
+	    }
+
+    MUS_LOG_TDESC( "mus: [MUSUI ]      filename:", savingTextsArray->MdcaPoint( 0 ) );
+    MUS_LOG_TDESC( "mus: [MUSUI ]      path:", savingTextsArray->MdcaPoint( 1 ) );
+
+    iDialogPrompt = StringLoader::LoadL( R_MUS_VIEW_NOTE_VIDEO_SAVED,
+                                         *savingTextsArray );        
+    CleanupStack::Pop( savingTextsArray );
+                                         
+    MUS_LOG_TDESC( "mus: [MUSUI ]      ", iDialogPrompt->Des() );
+
+    MusUiDialogUtil::ShowGlobalInformationDialogL( *iDialogPrompt );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::ShowVideoSavedDialogL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::DeleteVideoL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::DeleteVideoL" );
+    if ( iVideoFileName )
+        {
+        MusUiFileUtil::DeleteFileL( *iVideoFileName );
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::DeleteVideoL" );
+    }   
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::DeleteFileL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendController::DeleteFileL" );
+    if ( iVideoFileName && 
+    		MusUiFileUtil::FileExists( *iVideoFileName ) && !iVideoToBeSaved ) 
+		{
+        DeleteVideoL();
+		}
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendController::DeleteFileL" );
+    }   
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendController::
+TWaitDialogCallback::TWaitDialogCallback( CMusUiSendController& aController )
+    : iController( aController )
+    {       
+    }
+    
+    
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendController::
+TWaitDialogCallback::DialogDismissedL( TInt /*aButtonId*/ )
+    {
+    iController.StartInvitationL();
+    }
+    
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuisendview.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#include "musuisendview.h"
+#include "musuiappui.h"
+#include "musuisendcontroller.h"
+#include "musuisendviewcontainer.h"
+#include "musuidefinitions.h"
+#include "musuidialogutil.h"
+#include "muslogger.h" // debug logging
+
+#include <musui.rsg>
+
+#include <aknViewAppUi.h>
+
+
+// -----------------------------------------------------------------------------
+// EPOC two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendView::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendView::ConstructL" );
+    CMusUiGeneralView::ConstructL();
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendView::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CMusUiSendView::~CMusUiSendView()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendView::~CMusUiSendView" );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendView::~CMusUiSendView" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendView::ManualAddressEntryL( const TDesC& aAddress )
+    {
+    MUS_LOG_TDESC( "mus: [MUSUI ]    -> CMusUiSendView::ManualAddressEntryL: ",
+                            aAddress );
+     
+    
+     TBuf<KMusSipAddressMaxLength> address( aAddress );
+    if ( SendController() && MusUiDialogUtil::ShowTextQueryDialogL( 
+                                    R_MUS_TEXT_ENTER_ADDRESS_DIALOG_PROMPT, 
+                                    address ) )
+        {      
+        SendController()->InviteL( address );
+        }
+    else
+        {  
+        if ( SendController() && SendController()->IsAudioRoutingLoudSpeaker() )
+            {
+            MusUiDialogUtil::ShowGlobalInformationDialogL( 
+					 R_MUS_NOTE_HF_DEACTIVATED );
+            }
+        MusUiDialogUtil::ShowGlobalInformationDialogL( 
+                            R_MUS_LIVE_SHARING_VIEW_NOTE_SHARING_ENDED );
+        MusAppUi()->HandleExit();
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendView::ManualAddressEntryL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiEventController* CMusUiSendView::EventController() const
+    {
+    return SendController();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiViewContainer& CMusUiSendView::SharingContainer() const
+    {
+    return *SendContainer();
+    }
+        
+
+// -----------------------------------------------------------------------------
+// From CAknView, Gets called from framework when activating this view
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendView::DoActivateL( const TVwsViewId& aPrevViewId,
+                                    TUid aCustomMessageId,
+                                    const TDesC8& aCustomMessage )
+    {
+    // Base class activation first
+    CMusUiGeneralView::DoActivateL( aPrevViewId,
+                                    aCustomMessageId,
+                                    aCustomMessage ); 
+                                    
+    }
+
+
+// -----------------------------------------------------------------------------
+// From AknView, Gets called from framework when deactivating this view
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendView::DoDeactivate()
+    {
+    CMusUiGeneralView::DoDeactivate(); // Base class deactivation first
+    }
+    
+    
+// -----------------------------------------------------------------------------
+// Called when focus event occurs.
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendView::DoHandleForegroundEventL( TBool aForeground )
+    {
+    CMusUiGeneralView::HandleForegroundEventL( 
+                                aForeground, 
+                                iOperatorSpecificFunctionality &&
+                                EventControllerL().ConnectionEstablished() &&
+                                !EventControllerL().ExitOccured() );
+    }    
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuisendviewcontainer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,220 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#include "musuiclipsharingviewcontainer.h"
+#include "musuisendview.h"
+#include "musuilevelindicator.h"
+#include "musuidialogutil.h"
+#include "musuidefinitions.h"
+#include "musuisendcontroller.h"
+#include "muslogger.h" // debug logging
+#include <musui.rsg>
+
+#include <AknWaitDialog.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include <AknsUtils.h>
+#include <AknsDrawUtils.h>
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendViewContainer::CMusUiSendViewContainer()
+    {
+    // NOP
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendViewContainer::ConstructL( CMusUiGeneralView* aView,
+                                          const TRect& aRect,
+                                          TAknOrientation aIndicatorLayout,
+                                          TBool aContainerVisible,
+                                          TBool aIndicatorVisible )
+    {
+    MUS_LOG2( "mus: [MUSUI ]  -> CMusUiSendViewContainer::ConstructL, visibilty:%d,%d",
+        aContainerVisible, aIndicatorVisible );
+    
+    CreateWindowL();
+    iView = aView;
+    iBackGround = CAknsBasicBackgroundControlContext::NewL(
+                            KAknsIIDQsnBgAreaMain,
+                            aRect,
+                            EFalse );
+
+    iIndicator = CMusUiLevelIndicator::NewL( aIndicatorLayout,
+                                             0, 
+                                             100, 
+                                             this,
+                                             aRect,
+                                             this );
+    iIndicator->SetContainerWindowL( *this );
+    
+    iVideoRect = aRect;
+    
+    SetRect( aRect );
+    
+    iIndicator->SetRect( Rect() );
+    
+    if ( aContainerVisible && !aIndicatorVisible )
+        {
+        iIndicator->MakeVisible( aIndicatorVisible );
+        }
+
+    MakeVisible( aContainerVisible );
+    ActivateL();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendViewContainer::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiSendViewContainer::~CMusUiSendViewContainer()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendViewContainer::~CMusUiSendViewContainer" );
+
+    delete iIndicator;
+    delete iBackGround;
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendViewContainer::~CMusUiSendViewContainer" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Fetches a pointer to the view that owns this container.
+// -----------------------------------------------------------------------------
+//
+CMusUiGeneralView* CMusUiSendViewContainer::MusUiView() const
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendViewContainer::MusUiView" );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendViewContainer::MusUiView" );
+    return iView;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendViewContainer::SetController( CMusUiSendController* aController )
+    {
+    iSendController = aController;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Called by framework to redraw the screen area.
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendViewContainer::Draw( const TRect& aRect ) const
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiSendViewContainer::Draw" );
+    CWindowGc& gc = SystemGc();
+  
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+    if(!AknsDrawUtils::Background( skin, 
+                                   cc,
+                                   this,
+                                   gc,
+                                   iVideoRect,
+                                   KAknsDrawParamDefault ))
+        {
+        MUS_LOG( "mus: [MUSUI ]     Skin not valid or not found" );
+        gc.SetBrushColor( iEikonEnv->ControlColor( EColorWindowBackground, *this ) );
+        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+        gc.Clear( aRect );
+        }
+       
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendViewContainer::Draw" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Called by framework when the view size is changed
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendViewContainer::SizeChanged()
+    {
+    if (iBackGround)
+        {
+        static_cast<CAknsBasicBackgroundControlContext*>
+                                ( iBackGround )->SetRect( Rect() );
+        }
+    iIndicator->SetRect( Rect() );    
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Supply the Mob Object for background skin drawing
+// -----------------------------------------------------------------------------
+//
+TTypeUid::Ptr CMusUiSendViewContainer::MopSupplyObject( TTypeUid aId )
+    {
+    if (aId.iUid == MAknsControlContext::ETypeId && iBackGround )
+        {
+        return MAknsControlContext::SupplyMopObject( aId, iBackGround );
+        }
+    return CCoeControl::MopSupplyObject( aId );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendViewContainer::SetLevelIndicatorVisibility( TBool aVisible)
+    {
+    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiSendViewContainer::SetLevelIndicatorVisibility( %d )",
+              aVisible )
+              
+    MakeVisible( aVisible );
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiSendViewContainer::SetLevelIndicatorVisibility" )
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiSendViewContainer::IndicatorLevelChanged( TInt aNewLevel )
+    {
+    if ( iSendController )
+        {
+        TRAPD( error, iSendController->HandleSliderValueChangeL( aNewLevel ) )
+
+        if ( error != KErrNone )
+            {
+            MUS_LOG1( "mus: [MUSUI ]     Error during handling of slider value change( %d )",
+                      error )
+              
+            iSendController->HandleError( error );
+            }
+        }
+    }
+    
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuistartcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Application's UI class.
+*
+*/
+
+
+
+#include "musuistartcontroller.h"
+#include "musmanagercommon.h"
+#include "mussessionproperties.h"
+#include "muslogger.h" // debug logging
+
+#include <e32property.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+MusUiStartController::MusUiStartController()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+MultimediaSharing::TMusUseCase MusUiStartController::ReadUseCaseL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStartController::UseCasePropertyL()" );
+    TInt val;
+    User::LeaveIfError( RProperty::Get( NMusSessionApi::KCategoryUid, 
+                                        NMusSessionApi::KUseCase, 
+                                        val ) );
+                                        
+    MUS_LOG1( "mus: [MUSUI ]     <- CMusUiStartController::UseCasePropertyL():\
+                            [%d]", val );    
+                            
+    return static_cast< MultimediaSharing::TMusUseCase >( val );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuistatuspanehandler.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,325 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#include "musuistatuspanehandler.h"
+#include "musuidefinitions.h"
+#include "muslogger.h" // debug logging
+#include <musui.mbg>
+
+#include <eikspane.h>
+#include <barsread.h>
+#include <StringLoader.h>
+#include <akntitle.h>
+#include <aknenv.h>
+#include <akncontext.h>
+#include <AknIndicatorContainer.h>
+#include <aknnavi.h> // Navi pane container ( CAknNavigationControlContainer )
+#include <AknVolumePopup.h>
+#include <eikapp.h>
+#include <eikenv.h>
+#include <eikappui.h>
+
+
+// constants
+#define KMUSMBMFILENAME iEikonEnvironment.EikAppUi()->Application()->BitmapStoreName()
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiStatusPaneHandler* CMusUiStatusPaneHandler::NewL( CEikonEnv& aEikonEnv )
+    {
+    CMusUiStatusPaneHandler* self = 
+                        new ( ELeave ) CMusUiStatusPaneHandler( aEikonEnv );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiStatusPaneHandler::~CMusUiStatusPaneHandler()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::~CMusUiStatusPaneHandler" );
+    
+    delete iNaviPaneText;
+    delete iMediaControl;
+    delete iVolumePopup;
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::~CMusUiStatusPaneHandler" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiStatusPaneHandler::CMusUiStatusPaneHandler( CEikonEnv& aEikonEnv )
+    :iEikonEnvironment( aEikonEnv )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::ConstructL" );
+    
+    CEikStatusPane* statusPane = iEikonEnvironment.AppUiFactory()->StatusPane();
+    
+    iNaviPane = STATIC_CAST(
+                CAknNavigationControlContainer*,
+                statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
+    iTitlePane = STATIC_CAST(
+                CAknTitlePane*,
+                statusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    iContextPane = STATIC_CAST(
+                CAknContextPane*,
+                statusPane->ControlL( TUid::Uid( EEikStatusPaneUidContext ) ) );
+
+    iVolumePopup = CAknVolumePopup::ConstructFromResourceL( 
+                                        R_AVKON_NAVI_PANE_VOLUME_INDICATOR );
+
+    iMediaControl = CreateMediaNaviL();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::ConstructL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Updates statuspane icons
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::SetStatusPaneIconsL( TInt32 aIconId,
+                                                   TInt32 aIconMaskId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::SetStatusPaneIconsL" )
+
+	iContextPane->SetPictureFromFileL( KMUSMBMFILENAME, aIconId, aIconMaskId );
+													 
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::SetStatusPaneIconsL" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Updates statuspane icons
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::SetStatusPaneIconsL( CFbsBitmap* aBitmap )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::SetStatusPaneIconsL" );
+    CEikImage* image = new (ELeave) CEikImage();
+    image->SetBitmap( aBitmap );
+    CEikImage* oldImage = iContextPane->SwapPicture( image );
+    delete oldImage;
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::SetStatusPaneIconsL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Hides navi-pane decorators and clears text
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::ClearNaviPaneL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::ClearNaviPaneL" );
+    delete iNaviPaneText;
+    iNaviPaneText = NULL;
+
+    // Pushes default decorator object (empty one) to top of the stack
+    // and draws it
+    iNaviPane->PushDefaultL();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::ClearNaviPaneL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Sets title-pane text
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::SetTitleL( const TDesC& aTitle )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::SetTitleL" );
+    iTitlePane->SetTextL( aTitle );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::SetTitleL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::SetTitleFromResourceL( TInt aResourceId )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::SetTitleFromResourceL" );
+    HBufC* titlePaneTitle =  StringLoader::LoadLC( aResourceId );
+    iTitlePane->SetTextL( *titlePaneTitle );
+    CleanupStack::PopAndDestroy( titlePaneTitle );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::SetTitleFromResourceL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Get the current volume setting.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiStatusPaneHandler::GetVolumeControlValue() const
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::GetVolumeControlValue" );
+             
+    TInt volume = iVolumePopup->Value();
+    
+    MUS_LOG1( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::GetVolumeControlValue: [%d]",
+                            volume );                        
+    return volume;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Activates volume control.
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::ActivateVolumeControlL( TInt aVolume, TBool aOnlyIfVisible )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::ActivateVolumeControlL" );
+
+    if ( aVolume < KMusVolumeMuted || aVolume > KMusVolumeMaximum )
+        {
+        MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::SetVolumeControlValue: returning" );
+        return;
+        }
+
+    if ( !aOnlyIfVisible || (aOnlyIfVisible && iVolumePopup->IsVisible()) )
+        {
+        iVolumePopup->SetValue( aVolume );
+        iVolumePopup->ShowVolumePopupL();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::ActivateVolumeControlL" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+// Activate media navi pane.
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::ActivateNaviPaneMediaL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::ActivateNaviPaneMediaL" );
+    iNaviPane->PushL( *iMediaControl );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::ActivateNaviPaneMediaL" );
+    }
+  
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::ShowNaviPaneIconL(
+                        TMusUiNaviMediaDecorator aIcon )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::ShowNaviPaneIconL" );
+    CMusUiNaviMediaDecorator* mediaNavi =
+                            static_cast<CMusUiNaviMediaDecorator*>(
+                                            iMediaControl->DecoratedControl() );
+    mediaNavi->ShowIcon( aIcon );
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::ShowNaviPaneIconL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Sets navi-pane label for left side
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::SetLeftLabelL( const TDesC& aLabel )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::SetLeftLabelL" );
+
+    static_cast<CMusUiNaviMediaDecorator*>
+                    ( iMediaControl->DecoratedControl() )->SetLeftLabelL( aLabel );
+    iNaviPane->DrawNow();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::SetLeftLabelL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Sets navi-pane label for right side
+// -----------------------------------------------------------------------------
+//
+void CMusUiStatusPaneHandler::SetRightLabelL( const TDesC& aLabel )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::SetRightLabelL" );
+
+    static_cast<CMusUiNaviMediaDecorator*>
+                    ( iMediaControl->DecoratedControl() )->SetRightLabelL( aLabel );
+    iNaviPane->DrawNow();
+    
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::SetRightLabelL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Create media navi pane.
+// -----------------------------------------------------------------------------
+//
+CAknNavigationDecorator* CMusUiStatusPaneHandler::CreateMediaNaviL()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiStatusPaneHandler::CreateMediaNaviL" );
+    CMusUiNaviMediaDecorator* naviDecorator = CMusUiNaviMediaDecorator::NewL();
+    CleanupStack::PushL( naviDecorator );
+
+    CAknNavigationDecorator* decoratedFolder =
+                            CAknNavigationDecorator::NewL(
+                                    iNaviPane,
+                                    naviDecorator,
+                                    CAknNavigationDecorator::ENotSpecified );
+    CleanupStack::Pop( naviDecorator );// decoratedFolder owns naviDecorator now
+
+    CleanupStack::PushL( decoratedFolder );
+    decoratedFolder->SetContainerWindowL( *iNaviPane );
+    naviDecorator->SetContainerWindowL( *decoratedFolder );
+    CleanupStack::Pop( decoratedFolder );
+
+    decoratedFolder->MakeScrollButtonVisible( EFalse );
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiStatusPaneHandler::CreateMediaNaviL" );
+    return decoratedFolder;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Get Volump Popup control pointer
+// -----------------------------------------------------------------------------
+//
+CAknVolumePopup* CMusUiStatusPaneHandler::GetVolumePopup() const
+    {
+    return iVolumePopup;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuiviewcontainer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,219 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The MUS application's UI class.
+*
+*/
+
+
+#include "musuiviewcontainer.h"
+#include "musuidialogutil.h"
+#include "musuidefinitions.h"
+#include "muslogger.h" // debug logging
+#include "musuigeneralview.h"
+#include <musui.rsg>
+
+#include <AknWaitDialog.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiViewContainer::~CMusUiViewContainer()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiViewContainer::~CMusUiViewContainer" );
+    
+    CancelWaitTimer();
+    delete iWaitDialogTimer;
+
+    if ( iWaitDialog )
+        {
+        TRAP_IGNORE( iWaitDialog->ProcessFinishedL() );
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiViewContainer::~CMusUiViewContainer" );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiViewContainer::CancelWaitTimer()
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiViewContainer::CancelWaitTimer" );
+    if ( iWaitDialogTimer )
+        {
+        iWaitDialogTimer->Cancel();
+        }
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiViewContainer::CancelWaitTimer" );
+    }  
+
+
+// -----------------------------------------------------------------------------
+// Dismisses the current active wait note, if any.
+// -----------------------------------------------------------------------------
+//
+void CMusUiViewContainer::DismissWaitDialogL( TBool aReturnValue )
+    {
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiViewContainer::DismissWaitDialogL" );
+    
+    if ( iWaitDialog )
+        {
+        iInvitationWaitDialogDismissed = ETrue;
+        iWaitDialogReturnValueWhenDismissed = aReturnValue;
+        
+        iWaitDialog->ProcessFinishedL();
+        iWaitDialog = NULL;
+        }
+        
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiViewContainer::DismissWaitDialogL" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Runs the Inviting recipient wait note
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiViewContainer::RunWaitDialogL( const TDesC& aPrompt,
+                                           TInt aTimerInSeconds,
+                                           TInt aExpirationMessageResourceId )
+    {
+    MUS_LOG_TDESC( "mus: [MUSUI ] -> CMusUiViewContainer::RunWaitDialogL: ", aPrompt );
+
+    __ASSERT_ALWAYS( !iWaitDialog, User::Leave( KErrAlreadyExists ) );
+    __ASSERT_ALWAYS( !iWaitDialogTimer, User::Leave( KErrAlreadyExists ) );
+    
+    MUS_LOG( "                 No previous wait dialog, continue " )
+    
+    iExpirationMessageResourceId = aExpirationMessageResourceId;
+    
+    iWaitDialog = new( ELeave ) CAknWaitDialog(
+                    reinterpret_cast<CEikDialog**>(&iWaitDialog) ); 
+                    
+    iWaitDialog->SetTextL( aPrompt );
+
+    TBool retVal = ETrue;
+    iWaitDialog->PrepareLC( R_MUS_VIEW_INVITING_WAIT_NOTE );
+
+    if ( aTimerInSeconds > 0 )
+        {
+        iWaitDialogTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+        iWaitDialogTimer->Start( KMusOneSecond * aTimerInSeconds,
+                                 KMusOneSecond * aTimerInSeconds,
+                                 TCallBack( DoWaitNoteTimeout, this ) );
+        }
+
+    iShowingWaitDialog = ETrue;
+    retVal = iWaitDialog->RunLD();
+    iShowingWaitDialog = EFalse;
+    iWaitDialog = NULL;
+    
+    MUS_LOG( "                 Wait dialog's RunLD returned" )
+    
+    if ( iToolbarHandler )
+        {
+        MUS_LOG( "                 Completing toobar request" )
+        iToolbarHandler->SetToolbarVisibility( ETrue );
+        iToolbarHandler = NULL;
+        }
+
+    // Cancel timer when dialog returns.
+    CancelWaitTimer();
+    delete iWaitDialogTimer;
+    iWaitDialogTimer = NULL;
+
+    if ( iInvitationWaitDialogDismissed )
+        {
+        iInvitationWaitDialogDismissed = EFalse;
+        retVal = iWaitDialogReturnValueWhenDismissed;
+        }
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiViewContainer::RunWaitDialogL" );
+    return retVal;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiViewContainer::SetWaitDialogCallbackL( MProgressDialogCallback* aCallback )
+    {
+    __ASSERT_ALWAYS( iWaitDialog, User::Leave( KErrNotReady ) );
+    iWaitDialog->SetCallback( aCallback );
+    }
+	
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiViewContainer::WaitDialogShown() const
+    {
+    return iShowingWaitDialog;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//    
+void CMusUiViewContainer::RequestToolbarVisibilityOnceDialogDismissed( 
+    CMusUiGeneralView* aToolbarHandler )
+    {
+    MUS_LOG1( 
+        "mus: [MUSUI ]  <-> \
+CMusUiViewContainer::RequestToolbarVisibilityOnceDialogDismissed, handler:%d", 
+        reinterpret_cast<TUint32>( aToolbarHandler ) );
+    
+    iToolbarHandler = aToolbarHandler;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiViewContainer::CMusUiViewContainer()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Tick handler, callback function directly called by periodic timer
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiViewContainer::DoWaitNoteTimeout( TAny* aObject )
+    {
+    // Cast, and call non-static function.
+    MUS_LOG( "mus: [MUSUI ]  -> CMusUiViewContainer::DoWaitNoteTimeout" );
+    
+    CMusUiViewContainer* self = 
+                            static_cast<CMusUiViewContainer*>( aObject );    
+      
+    TRAP_IGNORE( self->DismissWaitDialogL( EFalse ) );
+    
+    if ( self->iExpirationMessageResourceId != 0 )
+        {
+        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalInformationDialogL( 
+                                        self->iExpirationMessageResourceId ) ) 
+        }
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiViewContainer::DoWaitNoteTimeout" );
+    // Return 0 ( false ) to indicate that we don't want more ticks
+    return KErrNone;
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/src/musuizoomindicator.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,483 @@
+/*
+* Copyright (c) 2003, 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class for displaying icons in viewfinder view
+*
+*/
+
+
+// USER
+#include "musuizoomindicator.h"
+#include "muslogger.h"
+#include "musuizoomindicatorobserver.h"
+
+// SYSTEM
+#include <aknutils.h>
+#include <aknsutils.h>
+#include <data_caging_path_literals.hrh>
+#include <camcorder.mbg>
+#include <gulicon.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <AknsDrawUtils.h>
+
+
+
+// CONSTANTS
+const TInt KMusUiZoomDisableTime = 3000000;
+
+
+using namespace AknLayoutScalable_Apps;
+
+_LIT( KMyMbmFileName, "z:Camcorder.mbm");
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiZoomIndicator::CMusUiZoomIndicator(
+                        TInt aZoomMin,
+                        TInt aZoomMax,
+                        MMusUiZoomIndicatorObserver* aObserver )
+    : iZoomMin( aZoomMin ),
+      iZoomMax( aZoomMax ),
+      iZoomLevel( aZoomMin ),
+      iObserver( aObserver )
+    {
+    MUS_LOG( "mus: mus: [MUSUI ] -> CMusUiZoomIndicator::CMusUiZoomIndicator()" );
+    // pass
+    iDisableZoomTimer = NULL;
+    iTopMargin =  5;
+    iBottomMargin = 5;
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::CMusUiZoomIndicator()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiZoomIndicator* CMusUiZoomIndicator::NewLC(
+                        TInt aZoomMin,
+                        TInt aZoomMax,
+                        MMusUiZoomIndicatorObserver* aObserver )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::NewLC()" );
+    CMusUiZoomIndicator* self = new ( ELeave ) CMusUiZoomIndicator(
+                            aZoomMin,
+                            aZoomMax,
+                            aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::NewLC()" );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiZoomIndicator* CMusUiZoomIndicator::NewL(
+                        TInt aZoomMin,
+                        TInt aZoomMax,
+                        MMusUiZoomIndicatorObserver* aObserver )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::NewL()" );
+    CMusUiZoomIndicator* self = NewLC( aZoomMin,
+                                       aZoomMax,
+                                       aObserver );
+    CleanupStack::Pop( self );
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::NewL()" );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::ConstructL()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::ConstructL()" );
+
+    if( iZoomMin > iZoomMax )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    iIconElevator = new (ELeave) CEikImage();
+    iIconElevator->SetContainerWindowL( *this );
+
+    iIconMin = new (ELeave) CEikImage();
+    iIconMin->SetContainerWindowL( *this );
+
+    iIconMax = new (ELeave) CEikImage();
+    iIconMax->SetContainerWindowL( *this );
+
+    iIconBg = new (ELeave) CEikImage();
+    iIconBg->SetContainerWindowL( *this );
+
+    
+    ConstructImageL( iIconMin,
+                     AknsUtils::SkinInstance(),
+                     KAknsIIDQsnIconColors,
+                     EMbmCamcorderQgn_indi_cams_zoom_bg_min,
+                     EMbmCamcorderQgn_indi_cams_zoom_bg_min);
+
+    ConstructImageL( iIconMax,
+                     AknsUtils::SkinInstance(),
+                     KAknsIIDQsnIconColors,
+                     EMbmCamcorderQgn_indi_cams_zoom_bg_max,
+                     EMbmCamcorderQgn_indi_cams_zoom_bg_max);
+
+    ConstructImageL( iIconBg,
+                     AknsUtils::SkinInstance(),
+                     KAknsIIDQsnIconColors,
+                     EMbmCamcorderQgn_indi_cams_zoom_bg,
+                     EMbmCamcorderQgn_indi_cams_zoom_bg);
+
+    ConstructImageL( iIconElevator,
+                     AknsUtils::SkinInstance(),
+                     KAknsIIDQsnIconColors,
+                     EMbmCamcorderQgn_indi_cams_zoom_elevator,
+                     EMbmCamcorderQgn_indi_cams_zoom_elevator);
+
+
+    UpdateZoomLayout();
+
+    MUS_LOG( "mus: [MUSUI ]  <- CMusUiZoomIndicator::ConstructL()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiZoomIndicator::~CMusUiZoomIndicator()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::~CMusUiZoomIndicator()" );
+
+    DisableTimer();
+    delete iDisableZoomTimer;
+
+    delete iIconElevator;
+    delete iIconMin;
+    delete iIconMax;
+    delete iIconBg;
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::~CMusUiZoomIndicator()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::SetZoomLevel( TInt aZoomLevel )
+    {
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiZoomIndicator::SetZoomLevel( %d ) ",
+              aZoomLevel );
+    if( aZoomLevel >= iZoomMin && aZoomLevel <= iZoomMax )
+        {
+        iZoomLevel = aZoomLevel;
+        }
+    DisableTimer();
+    UpdateZoomLayout();
+    EnableTimer();
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::SetZoomLevel()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiZoomIndicator::GetZoomLevel()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::GetZoomLevel()" );
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::GetZoomLevel()" );
+    return iZoomLevel;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::SetZoomMin( TInt aZoomMin )
+    {
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiZoomIndicator::SetZoomMin( %d ) ", aZoomMin );
+    if( aZoomMin >= 0 && aZoomMin < iZoomMax )
+        {
+        iZoomMin = aZoomMin;
+        }
+    DisableTimer();
+    UpdateZoomLayout();
+    EnableTimer();
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::SetZoomMin()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::SetZoomMax( TInt aZoomMax )
+    {
+    MUS_LOG1( "mus: [MUSUI ] -> CMusUiZoomIndicator::SetZoomMax( %d ) ", aZoomMax );
+    if( aZoomMax >= iZoomMin )
+        {
+        iZoomMax = aZoomMax;
+        }
+    DisableTimer();
+    UpdateZoomLayout();
+    EnableTimer();
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::SetZoomMax()" );
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::SetFullRect( const TRect aRect  )
+    {
+    iFullRect = aRect;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::SizeChanged()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::SizeChanged()" );
+    UpdateZoomLayout();
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::SizeChanged()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::Draw( const TRect& aRect ) const
+    {
+
+    CWindowGc& gc = SystemGc();
+
+    TRect rect( 0,0, iFullRect.Width(), iFullRect.Height() );
+    //TRect rect( iFullRect.Width()-20, iFullRect.iTl.iY, iFullRect.iBr.iX, iFullRect.iBr.iY ); //TRect( 40,0,380,382 ) );
+
+/*
+    AknsUtils::RegisterControlPosition( this, TPoint( iFullRect.Width()-20, iFullRect.iTl.iY ) );
+ //   gc.Clear( aRect );
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+    if(!AknsDrawUtils::Background( skin, cc,this,gc,rect,KAknsDrawParamDefault ))
+        {
+*/        
+        MUS_LOG( "mus: [MUSUI ]     Skin not valid or not found" );
+        gc.SetBrushColor( iEikonEnv->ControlColor( EColorWindowBackground, *this ) );
+        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+        gc.Clear( aRect );
+//        }    
+  
+}
+
+
+// -----------------------------------------------------------------------------
+// Draw all icons and texts to given graphics context.
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::DrawIcons( const TRect& /*aRect*/ )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::DrawIcons()" );
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::DrawIcons()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Draw all icons and texts to given graphics context.
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::UpdateZoomLayout()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::UpdateZoomLayout()" );
+    
+    TSize sz = iIconBg->MinimumSize();
+    
+    TRect rect = Rect();
+    
+    // TODO: Remove all magic constants!
+    AknLayoutUtils::LayoutImage(iIconMax, Rect(), 0, 0, 0, 0, 0, 20, 20 );
+    AknLayoutUtils::LayoutImage(iIconMin, Rect(), 0, 0, 68, 0, 0, 20, 20 );
+    AknLayoutUtils::LayoutImage(iIconBg, Rect(), 0, 0, 20, 0, 0, 20, 48 );
+    
+    // 20 - 68
+    iScaleStep = (  48 << 8 ) /
+                 ( ( iZoomMax - iZoomMin ) );
+    iScaleY = ( 58 ) -
+                            ( ( iScaleStep * iZoomLevel ) >> 8 );
+    
+    
+    AknLayoutUtils::LayoutImage(iIconElevator, Rect(), 0, 0, iScaleY, 0, 0, 20, 20 );
+    
+    DrawNow();
+    
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::UpdateZoomLayout()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiZoomIndicator::CountComponentControls() const
+    {
+    return 4; //iIconElevator ? 1 : 0; // return nbr of controls inside this container
+    //return 0; // return nbr of controls inside this container
+    }
+
+
+// --------------------------------------------------------------------------
+// Called by framework to retrieve the control specified by index.
+// --------------------------------------------------------------------------
+//
+CCoeControl* CMusUiZoomIndicator::ComponentControl( TInt aIndex ) const
+    {
+    switch ( aIndex )
+        {
+        
+        case 0:
+            return iIconMin;
+        case 1:
+            return iIconMax;
+        case 2:
+            return iIconBg;
+        case 3:
+            return iIconElevator;
+        
+        default:
+            return NULL;
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void  CMusUiZoomIndicator::ConstructImageL( CEikImage* aImage,
+                                         MAknsSkinInstance* aSkin,
+                                         const TAknsItemID& aId,
+                                         TInt aBitmapId,
+                                         TInt aMaskId )
+
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::ConstructIconL()" );
+
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* mask = NULL;
+
+    TParse parse;
+    parse.Set( KMyMbmFileName, &KDC_APP_RESOURCE_DIR, NULL );
+
+    AknsUtils::CreateIconL(aSkin,
+                           aId,
+                           bitmap,
+                           mask,
+                           parse.FullName(),
+                           aBitmapId,
+                           aMaskId);
+
+    aImage->SetPicture(bitmap, mask); // Owership transferred to CEikImage
+
+
+
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::ConstructIconL()" );
+
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// Callback for disable zoom indicator.
+// -----------------------------------------------------------------------------
+//
+TInt CMusUiZoomIndicator::DisableZoomIndicator( TAny* aThis )
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::DisableZoomIndicator()" );
+    CMusUiZoomIndicator* indicator =
+                            static_cast< CMusUiZoomIndicator* > ( aThis );
+    indicator->DisableTimer();
+    if( indicator->iObserver )
+        {
+        indicator->iObserver->DisableZoomIndicator();
+        }
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::DisableZoomIndicator()" );
+    return KErrNone;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::DisableTimer()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::DisableTimer()" );
+    if ( iDisableZoomTimer )
+        {
+        if ( iDisableZoomTimer->IsActive() )
+            {
+            iDisableZoomTimer->Cancel();
+            }
+        }
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::DisableTimer()" );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiZoomIndicator::EnableTimer()
+    {
+    MUS_LOG( "mus: [MUSUI ] -> CMusUiZoomIndicator::EnableTimer()" );
+
+    if ( !iDisableZoomTimer )
+        {
+        TRAP_IGNORE( iDisableZoomTimer = CPeriodic::NewL( CActive::EPriorityStandard ) );
+        }
+    else
+        {
+        DisableTimer();
+        }
+
+    // Start disable timer; callback triggers exit.
+    iDisableZoomTimer->Start( KMusUiZoomDisableTime,
+                             KMusUiZoomDisableTime,
+                             TCallBack( DisableZoomIndicator, this ) );
+    MUS_LOG( "mus: [MUSUI ] <- CMusUiZoomIndicator::EnableTimer()" );
+    }
+    
+
+// End of File
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/BWINS/ut_uiU.DEF	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,2 @@
+EXPORTS
+	?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * __cdecl CreateTestSuiteL(void)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+PRJ_TESTMMPFILES
+
+//../../../../internal/stubs/mceclientstub/group/mceclientstub.mmp
+ut_ui.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/group/ut_ui.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,230 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include <eunitcaps.h>
+
+TARGET          ut_ui.dll
+TARGETTYPE      dll
+TARGETPATH      /DigiaEUnit/Tests
+UID             0x1000af5a 0x01700000
+
+CAPABILITY              EUNIT_CAPS
+VENDORID                VID_DEFAULT
+
+MACRO                   UNIT_TESTING
+
+
+SOURCEPATH              ../../../../../tsrc/multimediasharingsettingsstub/src
+SOURCE      			mussettings.cpp
+
+
+// Test suite classes
+SOURCEPATH              ../src
+SOURCE                  ut_musuidllmain.cpp
+
+// Defines, stubs and other test helpers
+SOURCEPATH              ../src
+//SOURCE                  musengstubs.cpp
+
+SOURCEPATH              ../../../../../tsrc/musenginestub/src
+SOURCE      			musengsession.cpp
+SOURCE      			musengmcesession.cpp
+SOURCE      			musengmceoutsession.cpp
+SOURCE          		musenglivesession.cpp
+SOURCE          		musengreceivesession.cpp
+SOURCE      			musengsessiondurationtimer.cpp
+SOURCE					musengclipsession.cpp
+
+//SOURCE          		musengmceutils.cpp
+
+//SOURCEPATH              ../../../../../tsrc/rfsstub/src
+//SOURCE					f32file.cpp
+
+SOURCEPATH              ../../../../../tsrc/fbsbitmapstub/src
+SOURCE					fbs.cpp
+
+SOURCEPATH              ../../../../../tsrc/imagedecoderstub/src
+SOURCE					imageconversion.cpp
+
+//SOURCEPATH              ../../../../../tsrc/centralrepositorystub/src
+//SOURCE					centralrepositorystub.cpp
+ 
+SOURCEPATH              ../../../../../tsrc/stringloaderstub/src
+SOURCE					stringloader.cpp
+
+SOURCEPATH              ../../../../../tsrc/propertystub/src
+SOURCE					e32property.cpp
+
+SOURCEPATH              ../../../../../tsrc/aknstub/src
+SOURCE					aknappui.cpp
+
+
+//SOURCE                  sipstub.cpp
+//SOURCE                  sipprofileregistrybasestub.cpp
+//SOURCE                  sipprofileregistrystub.cpp
+//SOURCE                  sipprofilestub.cpp
+
+//SOURCEPATH              ../../../../../tsrc/telephonyaudioroutingstub/src
+//SOURCE                  telephonyaudioroutingstub.cpp
+
+//SOURCEPATH              ../../../../../tsrc/centralrepositorystub/src
+//SOURCE                  centralrepositorystub.cpp
+
+//SOURCEPATH              ../../../../../tsrc/drmstub/src
+//SOURCE                  drmcommonstub.cpp
+
+// Test classes
+SOURCEPATH              ../src
+SOURCE                  ut_musuiclipsharingcontroller.cpp
+SOURCE                  ut_musuieventcontroller.cpp
+SOURCE                  ut_musuilivesharingcontroller.cpp
+SOURCE                  ut_musuipropertywatch.cpp
+SOURCE                  ut_musuireceivecontroller.cpp
+SOURCE                  ut_musuistartcontroller.cpp
+SOURCE                  musuipropertyobserveradapter.cpp
+SOURCE		        	musuicallbackobserveradapter.cpp
+SOURCE                  musuilivesharingobserveradapter.cpp
+SOURCE		        	musuieventobserveradapter.cpp
+SOURCE                  musuiclipsharingobserveradapter.cpp
+SOURCE                  musuireceiveobserveradapter.cpp
+
+// Tested classes
+SOURCEPATH              ../../../src
+//SOURCE                musuiapp.cpp
+//SOURCE                musuidocument.cpp
+//SOURCE                musuiappui.cpp
+//SOURCE		musuigeneralview.cpp
+//SOURCE		musuisendview.cpp
+//SOURCE		musuinullview.cpp
+//SOURCE		musuilivesharingview.cpp
+//SOURCE		musuilivesharingviewcontainer.cpp
+//SOURCE                musuireceiveview.cpp
+//SOURCE		musuiclipsharingview.cpp
+//SOURCE                musuireceivecontainer.cpp
+//SOURCE		musuiclipsharingviewcontainer.cpp
+
+//SOURCE		musuistatuspanehandler.cpp
+//SOURCE		musuinavimediadecorator.cpp
+//SOURCE                musuiinvitationquery.cpp
+//SOURCE                musuizoomindicator.cpp
+
+SOURCE                  musuistartcontroller.cpp
+SOURCE                  musuipropertywatch.cpp
+
+SOURCE                  musuieventcontroller.cpp
+SOURCE					musuilivesharingcontroller.cpp
+SOURCE                  musuireceivecontroller.cpp
+SOURCE					musuiclipsharingcontroller.cpp
+SOURCE					musuibitmapdecoder.cpp
+//SOURCE					musuiactivitymanger.cpp
+
+SOURCE					musuicallbackservice.cpp
+
+// Includes
+
+
+USERINCLUDE             ../inc
+USERINCLUDE             ../../../inc
+
+// Must be before common
+USERINCLUDE           ../../../../../tsrc/multimediasharingsettingsstub/inc 
+
+USERINCLUDE             ../../../../mmshshared/inc
+
+// to replace musengine with a stub
+USERINCLUDE             ../../../../../tsrc/musenginestub/inc  //TODO: added 4.11.
+USERINCLUDE             ../../../../mmshengine/inc		//TODO: commented 4.11.
+USERINCLUDE             ../../../../inc
+USERINCLUDE             ../../../../../inc
+
+// to replace musengine with a stub
+SYSTEMINCLUDE           ../../../../../tsrc/musenginestub/inc 
+//SYSTEMINCLUDE         ../../../../../tsrc/rfsstub/inc 
+SYSTEMINCLUDE           ../../../../../tsrc/fbsbitmapstub/inc 
+SYSTEMINCLUDE           ../../../../../tsrc/imagedecoderstub/inc 
+//SYSTEMINCLUDE         ../../../../../tsrc/centralrepositorystub/inc 
+SYSTEMINCLUDE           ../../../../../tsrc/stringloaderstub/inc 
+
+//SYSTEMINCLUDE           ../../../../../tsrc/contactdatabasestub/inc 
+SYSTEMINCLUDE           ../../../../../tsrc/propertystub/inc 
+
+SYSTEMINCLUDE           ../../../../../tsrc/aknstub/inc 
+
+
+
+
+
+// ui internal stub
+
+
+// to replace MCE API with a stub:
+//SYSTEMINCLUDE           ../../../../../tsrc/mceclientstub/inc 
+// to replace telephony audio routing with a stub:
+//SYSTEMINCLUDE           ../../../../../tsrc/telephonyaudioroutingstub/src 
+// to replace DRMCommon with a tub
+//SYSTEMINCLUDE           ../../../../../tsrc/drmstub/inc
+
+APP_LAYER_SYSTEMINCLUDE
+
+
+LIBRARY     euser.lib
+LIBRARY     eunit.lib
+
+LIBRARY     musenginestub.lib  
+LIBRARY     pbkeng.lib              // PhoneBook Engine API
+LIBRARY     phoneclient.lib         // Phone client
+LIBRARY	    fbscli.lib		// CFbsBitmap
+LIBRARY                 centralrepository.lib   // Central repository
+LIBRARY                 cntmodel.lib            // Contact Model
+
+
+LIBRARY                 apgrfx.lib              // AppArc server client APIs
+LIBRARY                 apparc.lib              // Application framework API
+LIBRARY                 bafl.lib                // Resource readers
+LIBRARY                 cone.lib                // Cone framework API
+LIBRARY                 efsrv.lib               // File Server API
+LIBRARY                 eikcoctl.lib            // Control framework API
+LIBRARY                 eikcore.lib             // Eikon core controls API
+LIBRARY                 eikctl.lib              // Eikon controls
+LIBRARY                 eikdlg.lib              // Eikon Dialog API
+LIBRARY                 ws32.lib                // Window server client API
+
+// S60 libraries:
+LIBRARY                 aknnotify.lib           // CAknGlobalNote
+LIBRARY                 aknskins.lib            // Avkon Skins Utils
+LIBRARY                 avkon.lib               // Avkon Utils
+LIBRARY                 commonengine.lib        // StringLoader
+LIBRARY                 featmgr.lib             // S60 Feature manager API
+LIBRARY                 mgfetch.lib             // Media Gallery Fetch Dialog
+LIBRARY                 MGXMediaFileApi.lib     // Media Gallery File manager, for updating
+LIBRARY                 pbkview.lib             // PhoneBook view API
+LIBRARY                 platformenv.lib         // PathInfo
+LIBRARY					aknicon.lib				// AknIconUtils
+LIBRARY					aknlayout.lib			// CdlEngine
+LIBRARY					gdi.lib					// CFont
+LIBRARY					imageconversion.lib     // CIImageDecoder
+LIBRARY					egul.lib				// CGulIcon
+
+
+DEBUGLIBRARY		flogger.lib
+
+//EXPORTUNFROZEN
+
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/musengtestdefs.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#ifndef MUSENGTESTDEFS_H
+#define MUSENGTESTDEFS_H
+
+#include <mcesession.h>
+#include <mcemanager.h>
+
+// Next row is to disable warning emerging from EUnit code.
+// Placement is due to a fact that most test case files
+// include this file. Directive can be removed when 
+// EUnit is fixed.  
+#pragma warn_illtokenpasting off
+
+// Test values
+
+_LIT( KTestRecipientSipUri, "sip:TestRecipient@host.domain" );
+_LIT( KTestRecipientSipUriNoSipPrefix, "TestRecipient@host.domain" );
+_LIT( KTestRecipientTelUri, "tel:+3581111111");
+_LIT( KTestRecipientTelUriNoTelPrefix, "+3581111111" );
+
+_LIT( KTestRecipientRandomText, "sfjsfjklsjdkfsj" );
+_LIT( KTestRecipientSipUriWithSpace, "s:re cipi ent@" );
+_LIT( KTestRecipientTelUriWithAtSign, "tel:+3581111111@host.domain" ); //invalid
+
+_LIT8( KTestRecipientSipUri8, "sip:TestRecipient@host.domain" );
+_LIT8( KTestRecipientTelUri8, "tel:+3581111111");
+_LIT8( KTestRecipientRandomText8, "sfjsfjklsjdkfsj" );
+
+_LIT8( KTestOriginator, "Frank Swis" );
+
+_LIT( KTestAudioFileName, "audiofile" );
+_LIT( KTestVideoFileName, "videofile" );
+_LIT( KTestAnotherVideoFileName, "another" );
+
+const TInt KSipStatusCodeNoCodeSet = 0;
+const TInt KSipStatusCode200OK = 200;
+const TInt KSipStatusCode400BadRequest = 400;
+const TInt KSipStatusCode401Unauthorized = 401;
+const TInt KSipStatusCode402PaymentRequired = 402;
+const TInt KSipStatusCode404RecipientNotFound = 404;
+const TInt KSipStatusCode407ProxyAuthenticationRequired = 407;
+const TInt KSipStatusCode408ConnectionTimeOut = 408;
+const TInt KSipStatusCode415UnsupportedMediaType = 415;
+const TInt KSipStatusCode487RequestCancelled = 487;
+const TInt KSipStatusCodeUnknown = 10000;
+const TInt KTelephonyVolumeMinValue = 1;
+const TInt KTelephonyVolumeDefaultValue = 4;
+const TInt KTelephonyVolumeMaxValue = 1;
+
+// Values originally introduced in telephonyinternalcrkeys.h
+
+const TUid KCRUidCallHandling = {0x101F8784};
+const TUint32 KTelephonyIncallEarVolume                           = 0x00000001;
+const TUint32 KTelephonyIncallLoudspeakerVolume                   = 0x00000002;
+
+
+// Helper macros
+
+#define MUS_TEST_FORWARD_ALLOC_FAILURE( error )\
+    if ( error == KErrNoMemory )\
+        {\
+        User::Leave( error );\
+        }
+
+#define ESTABLISH_OUT_SESSION( outSession )\
+    outSession->InviteL( KTestRecipientSipUri );\
+    outSession->iSession->iState = CMceSession::EEstablished;\
+    if ( outSession->iSession->iManager &&\
+         outSession->iSession->iManager->iSessionObserver )\
+        {\
+        outSession->iSession->iManager->iSessionObserver->SessionStateChanged(\
+            *(outSession->iSession),\
+            outSession->iSession->iManager->iContainer );\
+        }
+    
+    
+#endif // MUSENGTESTDEFS_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/musuicallbackobserveradapter.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#ifndef UT_MUSUIOBSERVERSSTUB_H
+#define UT_MUSUIOBSERVERSSTUB_H
+
+
+#include "musuiclipsharingobserver.h"
+#include "musuipropertyobserver.h"
+#include "musuicallbackobserver.h"
+
+
+#include <e32base.h>
+#include <aknappui.h>
+
+
+/**
+*
+* @lib musengine.lib
+* @since S60 v3.2
+*/
+class CMusUiCallbackObserverAdapter : public CBase,
+                            public MMusUiCallbackObserver
+    {
+
+
+
+    public:
+
+        CMusUiCallbackObserverAdapter();
+
+        ~CMusUiCallbackObserverAdapter();
+
+
+
+
+        //virtual void HandleError( const TInt aReason ) = 0;
+
+    public: // MMusUiCallbackObserver
+
+        void HandleAsyncEventL( TMusUiAsyncEvent aEventId );
+
+
+    public: // data
+
+        enum TMusUiCallbackObserverFunction
+            {
+            ENone,                          // default value
+            EHandleAsyncEventL
+            };
+
+
+
+        TMusUiCallbackObserverFunction iCalledObserver;
+        TInt iErrorCode;
+
+        TMusUiAsyncEvent iHandleAsyncEventId;
+
+    };
+
+
+
+
+#endif // UT_MUSSTUBS_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/musuiclipsharingobserveradapter.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __MUSUICLIPSHARINGOBSERVER_H__
+#define __MUSUICLIPSHARINGOBSERVER_H__
+
+#include "musuiclipsharingobserver.h"
+
+#include <e32base.h>
+
+
+
+class CMusUiClipSharingObserverAdapter : public CBase,
+                                         public MMusUiClipSharingObserver
+    {
+
+
+
+    public:
+
+        CMusUiClipSharingObserverAdapter();
+
+        ~CMusUiClipSharingObserverAdapter();
+
+
+    public:
+
+        // MMusUiClipSharingObserver
+        void RunFetchDialogL();
+
+        TBool SelectAddressDialogL( CDesCArray* aAddressArray,
+                                            TDes& aSelectedAddress );
+
+        void ManualAddressEntryL( const TDesC& aAddress );
+
+        void ShowWaitDialogL( const TDesC& aPrompt );
+
+        void DismissWaitDialogL( );
+
+        void DismissWaitDialogL( const TDesC& aReason );
+
+        void ShowErrorDialogL( const TDesC& aMessage );
+
+        void ShowInformationDialogL( TInt aResourceId );
+
+        void ShowClipSharingPanesL();
+
+        void ChangeOrientationL(
+                                CAknAppUiBase::TAppUiOrientation aOrientation );
+
+        void ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon,
+                                TBool aVisible );
+
+        void UpdateSessionTime( const TDesC& aSessionTime );
+
+        void SetVolume( TBool aUp );
+
+        void HandleError( TInt aError );
+
+        void HandleExitL();
+
+        void EndOfClip();
+
+
+        enum TMusUiClipSharingObserverFunction
+            {
+            ENone,                          // default value
+            ERunFetchDialogL,
+            ESelectAddressDialogL,
+            EManualAddressEntryL,
+            EShowWaitDialogL,
+            EDismissWaitDialogL,
+            EDismissWaitDialogL2,
+            EShowErrorDialogL,
+            EShowInformationDialogL,
+            EShowClipSharingPanesL,
+            EChangeOrientationL,
+            EShowNaviPaneIconL,
+            EUpdateSessionTime,
+            ESetVolume,
+            EHandleError,
+            EHandleExitL,
+            EEndOfClip
+
+            };
+
+
+        TMusUiClipSharingObserverFunction iCalledObserver;
+        TInt iErrorCode;
+        TInt iError;
+        TInt iShowErrorDialogErrorCode ;
+        
+        HBufC* iAddress;
+        
+    };
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/musuieventobserveradapter.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+
+#ifndef UT_MUSUIOBSERVERSSTUB_H
+#define UT_MUSUIOBSERVERSSTUB_H
+
+
+#include "musuieventobserver.h"
+
+
+#include <e32base.h>
+#include <aknappui.h>
+
+/**
+*
+* @lib musengine.lib
+* @since S60 v3.2
+*/
+class CMusUiEventObserverAdapter : public CBase,
+                                   public MMusUiEventObserver
+    {
+
+
+
+    public:
+
+        CMusUiEventObserverAdapter();
+
+        ~CMusUiEventObserverAdapter();
+
+
+    public: // MMusUiEventObserver
+
+        void ActivateLocalMusViewL( TUid aViewId );
+        void ActivateLocalMusViewL( TUid aViewId,
+                                            TUid aCustomMessageId,
+                                      const TDesC8& aCustomMessage );
+        TBool ShowConfirmationQueryDialogL( const TDesC& aPrompt );
+        void ShowInformationDialogL( const TDesC& aPrompt );
+        void ActivateContactViewL( TContactItemId aId );
+        void HandleError( const TInt aReason ); // All ready defined
+        void HandleExitL();
+
+
+    public: // Helper
+
+        /**
+        * ETrue if all boolean member variables are set to EFalse and all the
+        * pointers are NULL
+        */
+        TBool IsReseted();
+
+        /**
+        * Resets all the boolean member variable values to EFalse and deletes
+        * and nullifies all the pointer variables.
+        */
+        void Reset();
+
+    public: // Data
+
+        enum TMusUiEventObserverFunction
+            {
+            ENone,                          // default value
+
+            // MMusUiEventObserver
+            EActivateLocalMusViewL,
+            EActivateLocalMusViewL2,
+            EShowConfirmationQueryDialogL,
+            EShowInformationDialogL,
+            EActivateContactViewL,
+            EHandleError,
+            EHandleExitL,
+
+            };
+
+
+        TInt iHandleErrorReason;
+        TContactItemId iActivatedContactId;
+
+        TMusUiEventObserverFunction iCalledObserver;
+
+        TBool iBoolReturn;
+        TInt iErrorCode;
+
+        TUid iViewId;
+        
+        HBufC*  iPrompt;
+        
+
+    };
+
+
+
+
+#endif // UT_MUSSTUBS_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/musuilivesharingobserveradapter.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef MUSUILIVESHARINGOBSERVERADAPTER_H
+#define MUSUILIVESHARINGOBSERVERADAPTER_H
+
+#include "musuidefinitions.h"
+#include "musuilivesharingobserver.h"
+
+#include <e32base.h>
+#include <aknappui.h>
+#include <badesca.h>
+
+class CMusUiLiveSharingObserverAdapter : public MMusUiLiveSharingObserver
+    {
+
+    public:
+
+        CMusUiLiveSharingObserverAdapter();
+        ~CMusUiLiveSharingObserverAdapter();
+
+
+        TBool SelectAddressDialogL( CDesCArray* aAddressArray,
+                                            TDes& aSelectedAddress );
+        void ManualAddressEntryL( const TDesC& aAddress );
+
+        void ShowWaitDialogL( const TDesC& aPrompt );
+
+        void DismissWaitDialogL( );
+
+        void ShowErrorDialogL( const TDesC& aMessage );
+
+        void ShowInformationDialogL( TInt aResourceId );
+
+        void ShowLiveSharingPanesL();
+
+        void ChangeOrientationL(
+                                CAknAppUiBase::TAppUiOrientation aOrientation );
+
+        void ShowNaviPaneIconL(
+                        TMusUiNaviMediaDecorator aIcon,
+                        TBool aVisible );
+
+        void UpdateSessionTime( const TDesC& aSessionTime );
+
+        void SetVolume( TBool aUp );
+
+        void SetZoom( TBool aIn );
+
+        void HandleError( TInt aError );
+
+        void HandleExitL();
+
+        void CancelInvitationTimer();
+
+
+        enum TMusUiLiveSharingObserverFuncion
+            {
+            ENone,                          // default value
+            ESelectAddressDialogL,
+            EManualAddressEntryL,
+            EShowWaitDialogL,
+            EDismissWaitDialogL,
+            EShowErrorDialogL,
+            EShowInformationDialogL,
+            EShowLiveSharingPanesL,
+            EChangeOrientationL,
+            EShowNaviPaneIconL,
+            EUpdateSessionTime,
+            ESetVolume,
+            ESetZoom,
+            EHandleError,
+            EHandleExitL,
+            ECancelInvitationTimer
+            };
+
+
+
+        TMusUiLiveSharingObserverFuncion iCalledObserver;
+
+        // Return values
+        TBool iBoolReturn;
+
+        // Error code
+        TInt iErrorCode;
+        
+        TMusUiNaviMediaDecorator iIcon;
+        
+        CAknAppUiBase::TAppUiOrientation iOrientation;
+        
+        HBufC* iAddress;
+        
+        TInt iError;
+        TInt iShowErrorDialogErrorCode;        
+
+
+    };
+
+#endif
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/musuipropertyobserveradapter.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __MUSUIPROPERTYOBSERVERADAPTER_H__
+#define __MUSUIPROPERTYOBSERVERADAPTER_H__
+
+#include "musuipropertyobserver.h"
+
+class CMusUiPropertyObserverAdapter : public CBase,
+                                      public MMusUiPropertyObserver
+
+    {
+
+    public: // MMusUiPropertyObserver
+
+        CMusUiPropertyObserverAdapter();
+        ~CMusUiPropertyObserverAdapter();
+
+        void ResourcePropertyChanged( const TUint aKey, const TInt aValue );
+        void SessionPropertyChanged( const TUint aKey, const TInt aValue );
+        void HandleError( const TInt aReason );
+
+
+        enum TMusUiPropertyObserverFunction
+            {
+            ENone,                          // default value
+            EResourcePropertyChanged,
+            ESessionPropertyChanged,
+            EHandleError
+            };
+
+
+        TMusUiPropertyObserverFunction iCalledObserver;
+        TInt iErrorCode;
+
+
+    };
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/musuireceiveobserveradapter.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mus Applications Event Observer Interface
+*
+*/
+
+
+
+#ifndef __MUSUIRECEIVEOBSERVERADAPTER_H__
+#define __MUSUIRECEIVEOBSERVERADAPTER_H__
+
+#include "musuidefinitions.h"
+#include "musuireceiveobserver.h"
+
+#include <e32base.h>
+#include <aknappui.h>
+//#include <badesca.h>
+
+class CMusUiReceiveObserverAdapter : public MMusUiReceiveObserver
+    {
+
+    public:
+    
+        CMusUiReceiveObserverAdapter();
+        ~CMusUiReceiveObserverAdapter();
+
+        void ShowErrorDialog( const TDesC& aPrompt );
+
+        void ShowErrorDialogL( const TDesC& aMessage );
+
+        void ShowInvitationQueryL( const TDesC& aQuery );
+
+        void DismissInvitationQuery( TBool aDelete );
+
+        void ShowWaitDialogL( const TDesC& aPrompt );
+
+        void DismissWaitDialogL( );
+
+        void ShowInformationDialogL( TInt aResourceId );
+
+        void ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon,
+                                        TBool aVisible );
+
+        void ShowStatusPaneL( TBool aVisible );
+
+        void ChangeOrientationL(
+                                CAknAppUiBase::TAppUiOrientation aOrientation );
+
+        void UpdateSessionTime(  const TDesC& aSessionTime );
+
+        void SetVolume( TBool aUp );
+
+        void HandleError( TInt aError );
+
+        void HandleExitL();
+
+
+        enum TMusUiReceiveObserverFuncion
+            {
+            ENone,                          // default value
+            EShowErrorDialog,
+            EShowErrorDialogL,
+            EShowInvitationQueryL,
+            EDismissInvitationQuery,
+            EShowWaitDialogL,
+            EDismissWaitDialogL,
+            EShowInformationDialogL,
+            EShowNaviPaneIconL,
+            EShowStatusPaneL,
+            EChangeOrientationL,
+            EUpdateSessionTime,
+            ESetVolume,
+            EHandleError,
+            EHandleExitL
+            };
+
+
+
+        TMusUiReceiveObserverFuncion iCalledObserver;
+
+        // Return values
+        TBool iBoolReturn;
+
+        // Error code
+        TInt iErrorCode;
+
+        TMusUiNaviMediaDecorator iIcon;
+
+        CAknAppUiBase::TAppUiOrientation iOrientation;
+
+        HBufC* iAddress;
+
+        TInt iError;
+        TInt iShowErrorDialogErrorCode;
+        TBool iVisible;
+        TInt iResourceId;
+
+    };
+
+#endif 
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/musuitestdefines.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef __MUSUITESTDEFINES_H__
+#define __MUSUITESTDEFINES_H__
+
+#include <e32base.h>
+
+
+// MusUiPropertyWatch
+const TInt KMusUiTestPropertyReadInteger = 0xCCCC;
+
+const TInt KMusUiTestKey = 1;
+
+_LIT(KMusUiTestPropertyReadDesc, "Test property value");
+
+
+
+
+
+
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuiclipsharingcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __UT_MUSUICLIPSHARINGCONTROLLER_H__
+#define __UT_MUSUICLIPSHARINGCONTROLLER_H__
+
+
+//  EXTERNAL INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitmacros.h>
+
+//  FORWARD DECLARATIONS
+class CMusUiClipSharingObserverAdapter;
+class CMusUiClipSharingController;
+class CMusUiEventObserverAdapter;
+class CMusUiEventController;
+
+//  CLASS DEFINITION
+/**
+ * Tester class for CMusEngSession.
+ * Since CMusEngSession is abstract, it is tested via object of its'
+ * concrete descendant class CMusEngLiveSession. Only concrete
+ * implementations are tested in this tester class.
+ *
+ */
+NONSHARABLE_CLASS( UT_CMusUiClipSharingController ): public CEUnitTestSuiteClass
+    {
+    public:     // Constructors and destructors
+
+        /**
+         * Two phase construction
+         */
+        static UT_CMusUiClipSharingController* NewL();
+        static UT_CMusUiClipSharingController* NewLC();
+
+        /**
+         * Destructor
+         */
+        ~UT_CMusUiClipSharingController();
+
+    private: // Constructors and destructors
+
+        UT_CMusUiClipSharingController();
+        void ConstructL();
+
+    private: // Test case setup and teardown
+
+        void SetupL();
+
+        void Teardown();
+
+    private: // Test methods
+
+
+        void UT_CMusUiClipSharingController_StartInvitationLL();
+        void UT_CMusUiClipSharingController_AddressFoundLL();
+        void UT_CMusUiClipSharingController_InviteLL();
+        void UT_CMusUiClipSharingController_InviteL2L();
+        void UT_CMusUiClipSharingController_SetRectL();
+        void UT_CMusUiClipSharingController_CancelInvitationLL();
+        void UT_CMusUiClipSharingController_HandleCommandLL();
+        void UT_CMusUiClipSharingController_PlayingL();
+        void UT_CMusUiClipSharingController_SetFileNameLL();
+        void UT_CMusUiClipSharingController_ClipEndedL();
+        void UT_CMusUiClipSharingController_ZoomInLL();
+        void UT_CMusUiClipSharingController_ZoomOutLL();
+        void UT_CMusUiClipSharingController_SplitLL();
+        void UT_CMusUiClipSharingController_ShowErrorDialogL();
+        void UT_CMusUiClipSharingController_DismissWaitDialogL();
+        void UT_CMusUiClipSharingController_EndOfClipL();
+        void UT_CMusUiClipSharingController_SessionRejectedL();
+        void UT_CMusUiClipSharingController_SessionBadRequestL();
+        void UT_CMusUiClipSharingController_SessionUnauthorizedL();
+        void UT_CMusUiClipSharingController_SessionPaymentRequiredL();
+        void UT_CMusUiClipSharingController_SessionRecipientNotFoundL();
+        void UT_CMusUiClipSharingController_SessionProxyAuthenticationRequiredL();
+        void UT_CMusUiClipSharingController_SessionRequestTimeOutL();
+        void UT_CMusUiClipSharingController_SessionUnsupportedMediaTypeL();
+        void UT_CMusUiClipSharingController_SessionRequestCancelledL();
+        void UT_CMusUiClipSharingController_SessionEstablishedL();
+        void UT_CMusUiClipSharingController_SessionTerminatedL();
+        void UT_CMusUiClipSharingController_SessionConnectionLostL();
+        void UT_CMusUiClipSharingController_SessionFailedL();
+        void UT_CMusUiClipSharingController_StreamIdleL();
+        void UT_CMusUiClipSharingController_StreamStreamingL();
+        void UT_CMusUiClipSharingController_SessionTimeChangedL();
+        void UT_CMusUiClipSharingController_InactivityTimeoutL();
+
+
+    private:    // Data
+
+	    CMusUiClipSharingObserverAdapter* iClipSharingObserverAdapter;
+	    CMusUiEventObserverAdapter* iEventObserver;
+
+        CMusUiClipSharingController* iClipSharingController;
+        CMusUiEventController* iEventController;
+
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_MUSENGSESSION_H__
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuieventcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __UT_MUSUIEVENTCONTROLLER_H__
+#define __UT_MUSUIEVENTCONTROLLER_H__
+
+
+//  EXTERNAL INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitmacros.h>
+
+
+//  FORWARD DECLARATIONS
+//class CMusEngLiveSession;
+//class CMusEngObserverStub;
+class CMusUiEventController;
+class CMusUiLiveSharingController;
+class CMusUiEventObserverAdapter;
+class CMusUiLiveSharingObserverAdapter;
+
+//  CLASS DEFINITION
+/**
+ * Tester class for CMusEngSession.
+ * Since CMusEngSession is abstract, it is tested via object of its'
+ * concrete descendant class CMusEngLiveSession. Only concrete
+ * implementations are tested in this tester class.
+ *
+ */
+NONSHARABLE_CLASS( UT_CMusUiEventController ): public CEUnitTestSuiteClass
+    {
+    public:     // Constructors and destructors
+
+        /**
+         * Two phase construction
+         */
+        static UT_CMusUiEventController* NewL();
+        static UT_CMusUiEventController* NewLC();
+
+        /**
+         * Destructor
+         */
+        ~UT_CMusUiEventController();
+
+    private: // Constructors and destructors
+
+        UT_CMusUiEventController();
+        void ConstructL();
+
+    private: // Test case setup and teardown
+
+        void SetupL();
+
+        void Teardown();
+
+    private: // Test methods
+
+
+    public: // From MMusUiPropertyObserver
+    
+        void UT_CMusUiEventController_ResourcePropertyChangedL();
+
+        void UT_CMusUiEventController_SessionPropertyChangedL();
+
+        void UT_CMusUiEventController_SessionPropertyChanged2L();
+
+        void UT_CMusUiEventController_HandleErrorL();
+
+
+    public: // From MMusUiBitmapDecoderObserver
+
+        void UT_CMusUiEventController_UpdateBitmapL();
+
+
+    public: // New functions
+
+        void UT_CMusUiEventController_SetEventObserverL();
+
+        void UT_CMusUiEventController_HandleForegroundEventLL();
+
+        void UT_CMusUiEventController_SetCameraStatusL();
+
+        void UT_CMusUiEventController_SetKeypadStatusL();
+
+        void UT_CMusUiEventController_SetVideoPlayerStatusL();
+
+        void UT_CMusUiEventController_SetCameraAvailabilityInProgressL();
+
+        void UT_CMusUiEventController_CameraAvailableL();
+
+        void UT_CMusUiEventController_KeypadAvailableL();
+
+        void UT_CMusUiEventController_VideoPlayerAvailableL();
+
+        void UT_CMusUiEventController_CameraAvailibilityInProgressL();
+
+        void UT_CMusUiEventController_MusRemoteSipAddressValueL();
+
+        void UT_CMusUiEventController_MusProposalAddressValueL();
+
+        void UT_CMusUiEventController_MusContactNameL();
+
+        void UT_CMusUiEventController_MusContactBitmapL();
+
+        void UT_CMusUiEventController_MusVideoCodecValueL();
+
+        void UT_CMusUiEventController_MusTelNumberValueL();
+
+        void UT_CMusUiEventController_SipProfileIdL();
+
+        void UT_CMusUiEventController_SipRegistrationPendingL();
+
+        void UT_CMusUiEventController_SessionTimeFormattedL();
+
+        void UT_CMusUiEventController_SaveContactL();
+
+        void UT_CMusUiEventController_HandleExitLL();
+
+        void UT_CMusUiEventController_InspectKeypadLL();
+
+        void UT_CMusUiEventController_UpdateContactLL();
+
+        void UT_CMusUiEventController_UpdateContactNameL();
+
+        void UT_CMusUiEventController_UpdateContactPictureLL();
+
+        void UT_CMusUiEventController_HandleChangedStatusLL();
+
+
+    private:    // Data
+
+        
+	    CMusUiLiveSharingObserverAdapter* iLiveSharingObserverAdapter;
+	    CMusUiEventObserverAdapter* iEventObserver;
+
+        CMusUiLiveSharingController* iLiveSharingController;
+        CMusUiEventController* iEventController;
+        
+
+        HBufC* _iReturnValue;
+        HBufC* iVideoFolder;
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_MUSENGSESSION_H__
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuilivesharingcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __UT_MUSUILIVESHARINGCONTROLLER_H__
+#define __UT_MUSUILIVESHARINGCONTROLLER_H__
+
+
+//  EXTERNAL INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitmacros.h>
+
+//  FORWARD DECLARATIONS
+class CMusUiLiveSharingObserverAdapter;
+class CMusUiLiveSharingController;
+class CMusUiEventObserverAdapter;
+class CMusUiEventController;
+
+
+//  CLASS DEFINITION
+/**
+ * Tester class for CMusEngSession.
+ * Since CMusEngSession is abstract, it is tested via object of its'
+ * concrete descendant class CMusEngLiveSession. Only concrete
+ * implementations are tested in this tester class.
+ *
+ */
+NONSHARABLE_CLASS( UT_CMusUiLiveSharingController ): public CEUnitTestSuiteClass
+    {
+    public:     // Constructors and destructors
+
+        /**
+         * Two phase construction
+         */
+        static UT_CMusUiLiveSharingController* NewL();
+        static UT_CMusUiLiveSharingController* NewLC();
+
+        /**
+         * Destructor
+         */
+        ~UT_CMusUiLiveSharingController();
+
+    private: // Constructors and destructors
+
+        UT_CMusUiLiveSharingController();
+        void ConstructL();
+
+    private: // Test case setup and teardown
+
+        void SetupL();
+
+        void Teardown();
+
+    private: // Test methods
+
+		//public:	// new functions:
+
+		void UT_CMusUiLiveSharingController_StartInvitationLL();
+		void UT_CMusUiLiveSharingController_AddressFoundLL();
+		void UT_CMusUiLiveSharingController_InviteLL();
+		void UT_CMusUiLiveSharingController_InviteL2L();
+		void UT_CMusUiLiveSharingController_SetRectL();
+		void UT_CMusUiLiveSharingController_CancelInvitationLL();
+		void UT_CMusUiLiveSharingController_HandleCommandLL();
+		void UT_CMusUiLiveSharingController_PlayingL();
+		void UT_CMusUiLiveSharingController_CurrentZoomLL();
+		void UT_CMusUiLiveSharingController_MinZoomLL();
+		void UT_CMusUiLiveSharingController_MaxZoomLL();
+		    
+		//private:	// new functions:
+		    
+		void UT_CMusUiLiveSharingController_CenteredRectL();
+		void UT_CMusUiLiveSharingController_ZoomInLL();
+		void UT_CMusUiLiveSharingController_ZoomOutLL();
+		void UT_CMusUiLiveSharingController_SplitLL();
+		void UT_CMusUiLiveSharingController_ShowErrorDialogL();
+		void UT_CMusUiLiveSharingController_DismissWaitDialogL();
+
+		    
+		//public: // From MMusEngLiveSessionObserver
+
+		    // Empty so far
+			
+		//public: // from MMusEngOutSessionObserver
+			
+		void UT_CMusUiLiveSharingController_SessionRejectedL();                // e.g. 603 DECLINE
+		void UT_CMusUiLiveSharingController_SessionBadRequestL();                   // 400 
+		void UT_CMusUiLiveSharingController_SessionUnauthorizedL();                 // 401 
+		void UT_CMusUiLiveSharingController_SessionPaymentRequiredL();              // 402
+		void UT_CMusUiLiveSharingController_SessionRecipientNotFoundL();            // 404
+		void UT_CMusUiLiveSharingController_SessionProxyAuthenticationRequiredL();  // 407
+		void UT_CMusUiLiveSharingController_SessionRequestTimeOutL();               // 408
+		void UT_CMusUiLiveSharingController_SessionUnsupportedMediaTypeL();         // 415
+		void UT_CMusUiLiveSharingController_SessionRequestCancelledL();             // 487
+
+		//public:	// from MMusEngSessionObserver
+
+		void UT_CMusUiLiveSharingController_SessionEstablishedL();
+		void UT_CMusUiLiveSharingController_SessionTerminatedL();
+		void UT_CMusUiLiveSharingController_SessionConnectionLostL();
+		void UT_CMusUiLiveSharingController_SessionFailedL();
+		void UT_CMusUiLiveSharingController_StreamIdleL();
+		void UT_CMusUiLiveSharingController_StreamStreamingL();	
+		void UT_CMusUiLiveSharingController_SessionTimeChangedL();
+		void UT_CMusUiLiveSharingController_InactivityTimeoutL();
+
+    private:    // Data
+
+	    CMusUiLiveSharingObserverAdapter* iLiveSharingObserverAdapter;
+	    CMusUiEventObserverAdapter* iEventObserver;
+
+        CMusUiLiveSharingController* iLiveSharingController;
+        CMusUiEventController* iEventController;
+        
+
+
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_MUSENGSESSION_H__
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuipropertywatch.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __UT_MUSUIPROPERYWATCH_H__
+#define __UT_MUSUIPROPERYWATCH_H__
+
+
+//  EXTERNAL INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitmacros.h>
+
+//  FORWARD DECLARATIONS
+//class CMusEngLiveSession;
+//class CMusEngObserverStub;
+class CMusUiPropertyWatch;
+class CMusUiPropertyObserverAdapter;
+
+//  CLASS DEFINITION
+/**
+ * Tester class for CMusEngSession.
+ * Since CMusEngSession is abstract, it is tested via object of its'
+ * concrete descendant class CMusEngLiveSession. Only concrete
+ * implementations are tested in this tester class.
+ *
+ */
+NONSHARABLE_CLASS( UT_CMusUiPropertyWatch ): public CEUnitTestSuiteClass
+    {
+    public:     // Constructors and destructors
+
+        /**
+         * Two phase construction
+         */
+        static UT_CMusUiPropertyWatch* NewL();
+        static UT_CMusUiPropertyWatch* NewLC();
+
+        /**
+         * Destructor
+         */
+        ~UT_CMusUiPropertyWatch();
+
+    private: // Constructors and destructors
+
+        UT_CMusUiPropertyWatch();
+        void ConstructL();
+
+    private: // Test case setup and teardown
+
+        void SetupL();
+
+        void Teardown();
+
+    private: // Test methods
+
+	    void UT_CMusUiPropertyWatch_ReadIntPropertyLL();
+	    void UT_CMusUiPropertyWatch_ReadDescPropertyLL();
+	    void UT_CMusUiPropertyWatch_DoCancelL();
+	    void UT_CMusUiPropertyWatch_RunLL();
+	    void UT_CMusUiPropertyWatch_RunErrorL();
+
+
+    private:    // Data
+
+        /*
+        CMusEngLiveSession* iLiveSession;
+        CMusEngObserverStub* iObserver;
+        */
+	    CMusUiPropertyObserverAdapter* iPropertyObserver;
+        CMusUiPropertyWatch* iPropertyWatch;
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_MUSENGSESSION_H__
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuireceivecontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __UT_MUSUIRECEIVECONTROLLER_H__
+#define __UT_MUSUIRECEIVECONTROLLER_H__
+
+
+//  EXTERNAL INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitmacros.h>
+
+//  FORWARD DECLARATIONS
+class CMusUiReceiveObserverAdapter;
+class CMusUiReceiveController;
+class CMusUiEventObserverAdapter;
+class CMusUiEventController;
+
+
+
+//  CLASS DEFINITION
+/**
+ * Tester class for CMusEngSession.
+ * Since CMusEngSession is abstract, it is tested via object of its'
+ * concrete descendant class CMusEngLiveSession. Only concrete
+ * implementations are tested in this tester class.
+ *
+ */
+NONSHARABLE_CLASS( UT_CMusUiReceiveController ): public CEUnitTestSuiteClass
+    {
+    public:     // Constructors and destructors
+
+        /**
+         * Two phase construction
+         */
+        static UT_CMusUiReceiveController* NewL();
+        static UT_CMusUiReceiveController* NewLC();
+
+        /**
+         * Destructor
+         */
+        ~UT_CMusUiReceiveController();
+
+    private: // Constructors and destructors
+
+        UT_CMusUiReceiveController();
+        void ConstructL();
+
+    private: // Test case setup and teardown
+
+        void SetupL();
+
+        void Teardown();
+
+    private: // Test methods
+
+	    void UT_CMusUiReceiveController_HandleCommandLL();
+	    void UT_CMusUiReceiveController_SizeChangedL();
+	    void UT_CMusUiReceiveController_ShowErrorDialogLL();
+	    void UT_CMusUiReceiveController_HandleIncomingSessionLL();
+	    void UT_CMusUiReceiveController_CancelInvitationLL();
+
+	public: // from CMusUiEventController
+
+	    void UT_CMusUiReceiveController_ContinueInvitationLL();
+	    void UT_CMusUiReceiveController_HandleAsyncEventLL();
+	    void UT_CMusUiReceiveController_ConnectionEstablishedL();
+	    void UT_CMusUiReceiveController_PlayLL();
+	    void UT_CMusUiReceiveController_PauseLL();
+	    void UT_CMusUiReceiveController_EnableDisplayLL();
+	    void UT_CMusUiReceiveController_ShowNaviPaneIconLL();
+	    void UT_CMusUiReceiveController_ChangeOrientationLL();
+	    void UT_CMusUiReceiveController_CenteredRectL();
+	    void UT_CMusUiReceiveController_ManualAddressTypedL();
+	    void UT_CMusUiReceiveController_ShowInformationDialogLL();
+	    void UT_CMusUiReceiveController_ShutdownLL();
+	    
+	public: // from MMusEngReceiveSessionObserver
+
+	    void UT_CMusUiReceiveController_IncomingSessionL();
+	    void UT_CMusUiReceiveController_StreamBufferingL();
+
+	public:	// from MMusEngSessionObserver
+
+	    void UT_CMusUiReceiveController_SessionEstablishedL();
+	    void UT_CMusUiReceiveController_SessionTerminatedL();
+	    void UT_CMusUiReceiveController_SessionConnectionLostL();
+	    void UT_CMusUiReceiveController_SessionFailedL();
+	    void UT_CMusUiReceiveController_StreamIdleL();
+	    void UT_CMusUiReceiveController_StreamStreamingL();	
+	    void UT_CMusUiReceiveController_SessionTimeChangedL();
+	    void UT_CMusUiReceiveController_InactivityTimeoutL();
+		
+	public: // from MMusUiInvitationQueryObserver
+
+	    void UT_CMusUiReceiveController_InvitationAcceptedLL();
+	    void UT_CMusUiReceiveController_InvitationRejectedLL();
+		
+	private:	// new functions:
+
+	    void UT_CMusUiReceiveController_UpdateStatusPaneLL();
+	    void UT_CMusUiReceiveController_InspectVideoPlayerLL();
+	    void UT_CMusUiReceiveController_ShowWaitDialogLL();
+    
+	    
+
+
+
+    private:    // Data
+
+	    CMusUiReceiveObserverAdapter* iReceiveObserverAdapter;
+	    CMusUiEventObserverAdapter* iEventObserver;
+
+        CMusUiReceiveController* iReceiveController;
+        CMusUiEventController* iEventController;
+
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_MUSENGSESSION_H__
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/inc/ut_musuistartcontroller.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __UT_MUSUISTARTCONTROLLER_H__
+#define __UT_MUSUISTARTCONTROLLER_H__
+
+
+//  EXTERNAL INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitmacros.h>
+
+//  FORWARD DECLARATIONS
+//class CMusEngLiveSession;
+//class CMusEngObserverStub;
+class CMusUiEventObserverAdapter;
+
+//  CLASS DEFINITION
+/**
+ * Tester class for CMusEngSession.
+ * Since CMusEngSession is abstract, it is tested via object of its'
+ * concrete descendant class CMusEngLiveSession. Only concrete
+ * implementations are tested in this tester class.
+ *
+ */
+NONSHARABLE_CLASS( UT_CMusUiStartController ): public CEUnitTestSuiteClass
+    {
+    public:     // Constructors and destructors
+
+        /**
+         * Two phase construction
+         */
+        static UT_CMusUiStartController* NewL();
+        static UT_CMusUiStartController* NewLC();
+
+        /**
+         * Destructor
+         */
+        ~UT_CMusUiStartController();
+
+    private: // Constructors and destructors
+
+        UT_CMusUiStartController();
+        void ConstructL();
+
+    private: // Test case setup and teardown
+
+        void SetupL();
+
+        void Teardown();
+
+    private: // Test methods
+
+		void UT_CMusUiStartController_UseCasePropertyLL();
+		void UT_CMusUiStartController_SetStartViewLL();
+
+
+
+    private:    // Data
+
+
+        CMusUiEventObserverAdapter* iEventObserver;
+
+        /*
+        CMusEngLiveSession* iLiveSession;
+        CMusEngObserverStub* iEventObserver;
+        */
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_MUSENGSESSION_H__
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/musuicallbackobserveradapter.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "musuicallbackobserveradapter.h"
+
+
+CMusUiCallbackObserverAdapter::CMusUiCallbackObserverAdapter()
+    {
+    iCalledObserver = ENone;
+    }
+
+
+CMusUiCallbackObserverAdapter::~CMusUiCallbackObserverAdapter()
+    {
+    }
+
+
+void CMusUiCallbackObserverAdapter::HandleAsyncEventL( TMusUiAsyncEvent aEventId )
+    {
+    iHandleAsyncEventId = aEventId;
+    iCalledObserver = EHandleAsyncEventL;
+    User::LeaveIfError( iErrorCode );
+    }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/musuiclipsharingobserveradapter.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "musuiclipsharingobserveradapter.h"
+
+
+CMusUiClipSharingObserverAdapter::CMusUiClipSharingObserverAdapter()
+    {
+    iAddress = NULL;
+    iCalledObserver = ENone;
+    iErrorCode = KErrNone;
+    iShowErrorDialogErrorCode  = KErrNone;
+    }
+
+
+CMusUiClipSharingObserverAdapter::~CMusUiClipSharingObserverAdapter()
+    {
+    delete iAddress;
+    }
+
+
+void CMusUiClipSharingObserverAdapter::RunFetchDialogL()
+    {
+    iCalledObserver = ERunFetchDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+TBool CMusUiClipSharingObserverAdapter::SelectAddressDialogL( CDesCArray* aAddressArray,
+                                    TDes& aSelectedAddress )
+    {
+    
+    TInt selectedIndex( 0 );
+    aSelectedAddress = (*aAddressArray)[ selectedIndex ];
+    delete aAddressArray;
+    aAddressArray = NULL;
+    
+    iCalledObserver = ESelectAddressDialogL;
+    User::LeaveIfError( iErrorCode );
+    return ETrue;
+    }
+
+
+void CMusUiClipSharingObserverAdapter::ManualAddressEntryL( const TDesC& aAddress )
+    {
+    delete iAddress;
+    iAddress = aAddress.AllocL();
+    iCalledObserver = EManualAddressEntryL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::ShowWaitDialogL( const TDesC& aPrompt )
+    {
+    iCalledObserver = EShowWaitDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::DismissWaitDialogL( )
+    {
+    iCalledObserver = EDismissWaitDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::DismissWaitDialogL( const TDesC& aReason )
+    {
+    iCalledObserver = EDismissWaitDialogL2;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::ShowErrorDialogL( const TDesC& aMessage )
+    {
+    
+    iCalledObserver = EShowErrorDialogL;
+    User::LeaveIfError( iShowErrorDialogErrorCode  );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::ShowInformationDialogL( TInt aResourceId )
+    {
+    iCalledObserver = EShowInformationDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::ShowClipSharingPanesL()
+    {
+    iCalledObserver = EShowClipSharingPanesL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::ChangeOrientationL(
+                        CAknAppUiBase::TAppUiOrientation aOrientation )
+    {
+    iCalledObserver = EChangeOrientationL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon,
+                        TBool aVisible )
+    {
+    iCalledObserver = EShowNaviPaneIconL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::UpdateSessionTime( const TDesC& aSessionTime )
+    {
+    iCalledObserver = EUpdateSessionTime;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::SetVolume( TBool aUp )
+    {
+    iCalledObserver = ESetVolume;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::HandleError( TInt aError )
+    {
+    iError = aError;
+    iCalledObserver = EHandleError;
+    //User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::HandleExitL()
+    {
+    iCalledObserver = EHandleExitL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiClipSharingObserverAdapter::EndOfClip()
+    {
+    iCalledObserver = EEndOfClip;
+    User::LeaveIfError( iErrorCode );
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/musuieventobserveradapter.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "musuieventobserveradapter.h"
+
+
+// ---- MEMBER FUNCTIONS OF CMusUiObserversStub --------------------------------
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiEventObserverAdapter::CMusUiEventObserverAdapter()
+    {
+    // NOP
+    // Initialize...
+    iCalledObserver = ENone;
+    iBoolReturn = EFalse;
+    iErrorCode = KErrUnknown;
+    iPrompt = NULL;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusUiEventObserverAdapter::~CMusUiEventObserverAdapter()
+    {
+    delete iPrompt;
+    }
+
+
+// -------- Functions from MMusUiEventObserver -----------------
+
+void CMusUiEventObserverAdapter::ActivateLocalMusViewL( TUid aViewId )
+    {
+    iCalledObserver = EActivateLocalMusViewL;
+    iViewId = aViewId;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiEventObserverAdapter::ActivateLocalMusViewL( TUid aViewId,
+                                    TUid aCustomMessageId,
+                              const TDesC8& aCustomMessage )
+    {
+    iCalledObserver = EActivateLocalMusViewL2;
+    iViewId = aViewId;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+TBool CMusUiEventObserverAdapter::ShowConfirmationQueryDialogL( const TDesC& aPrompt )
+    {
+    iPrompt = aPrompt.AllocL();
+    iCalledObserver = EShowConfirmationQueryDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+void CMusUiEventObserverAdapter::ShowInformationDialogL( const TDesC& aPrompt )
+    {
+    iCalledObserver = EShowInformationDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiEventObserverAdapter::ActivateContactViewL(  TContactItemId aId )
+    {
+    iCalledObserver = EActivateContactViewL;
+    iActivatedContactId = aId;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiEventObserverAdapter::HandleError( const TInt aReason )
+    {
+    iHandleErrorReason = aReason;
+    iCalledObserver = EHandleError;
+    }
+
+
+void CMusUiEventObserverAdapter::HandleExitL()
+    {
+    iCalledObserver = EHandleExitL;
+    User::LeaveIfError( iErrorCode );
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/musuilivesharingobserveradapter.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "musuilivesharingobserveradapter.h"
+
+
+CMusUiLiveSharingObserverAdapter::CMusUiLiveSharingObserverAdapter()
+    {
+    iAddress = NULL;
+    iErrorCode = KErrNone;
+    iShowErrorDialogErrorCode = KErrNone;
+    }
+
+CMusUiLiveSharingObserverAdapter::~CMusUiLiveSharingObserverAdapter()
+    {
+    delete iAddress;
+    }
+
+
+TBool CMusUiLiveSharingObserverAdapter::SelectAddressDialogL( CDesCArray* aAddressArray,
+                                    TDes& aSelectedAddress )
+    {
+
+
+    TInt selectedIndex( 0 );
+    aSelectedAddress = (*aAddressArray)[ selectedIndex ];
+    delete aAddressArray;
+    aAddressArray = NULL;
+
+    iCalledObserver = ESelectAddressDialogL;
+    User::LeaveIfError( iErrorCode );
+    return ETrue;
+    }
+
+
+void CMusUiLiveSharingObserverAdapter::ManualAddressEntryL( const TDesC& aAddress )
+    {
+    delete iAddress;
+    iAddress = aAddress.AllocL();
+    iCalledObserver = EManualAddressEntryL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::ShowWaitDialogL( const TDesC& aPrompt )
+    {
+    iCalledObserver = EShowWaitDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::DismissWaitDialogL( )
+    {
+    iCalledObserver = EDismissWaitDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::ShowErrorDialogL( const TDesC& aMessage )
+    {
+    iCalledObserver = EShowErrorDialogL;
+    User::LeaveIfError( iShowErrorDialogErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::ShowInformationDialogL( TInt aResourceId )
+    {
+    iCalledObserver = EShowInformationDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::ShowLiveSharingPanesL()
+    {
+    iCalledObserver = EShowLiveSharingPanesL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::ChangeOrientationL(
+                        CAknAppUiBase::TAppUiOrientation aOrientation )
+    {
+    iOrientation = aOrientation;
+    iCalledObserver = EChangeOrientationL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::ShowNaviPaneIconL(
+                TMusUiNaviMediaDecorator aIcon,
+                TBool aVisible )
+    {
+    iIcon = aIcon;
+    iCalledObserver = EShowNaviPaneIconL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::UpdateSessionTime( const TDesC& aSessionTime )
+    {
+    iCalledObserver = EUpdateSessionTime;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::SetVolume( TBool aUp )
+    {
+    iCalledObserver = ESetVolume;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::SetZoom( TBool aIn )
+    {
+    iCalledObserver = ESetZoom;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::HandleError( TInt aError )
+    {
+    iError = aError;
+    iCalledObserver = EHandleError;
+    //User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::HandleExitL()
+    {
+    iCalledObserver = EHandleExitL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+
+void CMusUiLiveSharingObserverAdapter::CancelInvitationTimer()
+    {
+    iCalledObserver = ECancelInvitationTimer;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/musuipropertyobserveradapter.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "musuipropertyobserveradapter.h"
+
+
+
+CMusUiPropertyObserverAdapter::CMusUiPropertyObserverAdapter()
+    {
+    //iCalledObserver = ENone;
+    }
+
+
+CMusUiPropertyObserverAdapter::~CMusUiPropertyObserverAdapter()
+    {
+    }
+
+
+void CMusUiPropertyObserverAdapter::ResourcePropertyChanged( const TUint aKey, const TInt aValue )
+    {
+    iCalledObserver = EResourcePropertyChanged;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiPropertyObserverAdapter::SessionPropertyChanged( const TUint aKey, const TInt aValue )
+    {
+    iCalledObserver = ESessionPropertyChanged;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiPropertyObserverAdapter::HandleError( const TInt aReason )
+    {
+    iCalledObserver = EHandleError;
+    User::LeaveIfError( iErrorCode );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/musuireceiveobserveradapter.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "musuireceiveobserveradapter.h"
+
+
+CMusUiReceiveObserverAdapter::CMusUiReceiveObserverAdapter()
+    {
+    iAddress = NULL;
+    iErrorCode = KErrNone;
+    iShowErrorDialogErrorCode = KErrNone;
+    }
+
+CMusUiReceiveObserverAdapter::~CMusUiReceiveObserverAdapter()
+    {
+    delete iAddress;
+    }
+
+
+
+void CMusUiReceiveObserverAdapter::ShowErrorDialog( const TDesC& aPrompt )
+    {
+    iCalledObserver = EShowErrorDialog;
+    }
+
+
+
+void CMusUiReceiveObserverAdapter::ShowErrorDialogL( const TDesC& aMessage )
+    {
+    iCalledObserver = EShowErrorDialogL;
+    User::LeaveIfError( iShowErrorDialogErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::ShowInvitationQueryL( const TDesC& aQuery )
+    {
+    iCalledObserver = EShowInvitationQueryL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::DismissInvitationQuery( TBool aDelete )
+    {
+    iCalledObserver = EDismissInvitationQuery;
+    }
+
+
+
+void CMusUiReceiveObserverAdapter::ShowWaitDialogL( const TDesC& aPrompt )
+    {
+    iCalledObserver = EShowWaitDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::DismissWaitDialogL( )
+    {
+    iCalledObserver = EDismissWaitDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::ShowInformationDialogL( TInt aResourceId )
+    {
+    iResourceId = aResourceId;
+    iCalledObserver = EShowInformationDialogL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::ShowNaviPaneIconL(
+                TMusUiNaviMediaDecorator aIcon,
+                TBool aVisible )
+    {
+    iIcon = aIcon;
+    iVisible = aVisible;
+    iCalledObserver = EShowNaviPaneIconL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::ShowStatusPaneL( TBool aVisible )
+    {
+    iCalledObserver = EShowStatusPaneL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::ChangeOrientationL(
+                        CAknAppUiBase::TAppUiOrientation aOrientation )
+    {
+    iOrientation = aOrientation;
+    iCalledObserver = EChangeOrientationL;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::UpdateSessionTime( const TDesC& aSessionTime )
+    {
+    iCalledObserver = EUpdateSessionTime;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::SetVolume( TBool aUp )
+    {
+    iCalledObserver = ESetVolume;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::HandleError( TInt aError )
+    {
+    iError = aError;
+    iCalledObserver = EHandleError;
+    //User::LeaveIfError( iErrorCode );
+    }
+
+
+void CMusUiReceiveObserverAdapter::HandleExitL()
+    {
+    iCalledObserver = EHandleExitL;
+    User::LeaveIfError( iErrorCode );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/ut_musuiclipsharingcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,730 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+//  INTERNAL INCLUDES
+#include "ut_musuiclipsharingcontroller.h"
+#include "musuiclipsharingcontroller.h"
+#include "musuiclipsharingobserveradapter.h"
+#include "musuieventobserveradapter.h"
+#include "musuidefinitions.h"
+#include "musengclipsession.h"
+#include <e32property.h>
+//#include "musestubs.h"
+//#include "musengtestdefs.h"
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/eunitmacros.h>
+//#include <centralrepository.h>
+//#include <mcedisplaysink.h>
+
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiClipSharingController* UT_CMusUiClipSharingController::NewL()
+    {
+    UT_CMusUiClipSharingController* self = UT_CMusUiClipSharingController::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiClipSharingController* UT_CMusUiClipSharingController::NewLC()
+    {
+    UT_CMusUiClipSharingController* self = new( ELeave ) UT_CMusUiClipSharingController();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiClipSharingController::~UT_CMusUiClipSharingController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Default constructor
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiClipSharingController::UT_CMusUiClipSharingController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase construct
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiClipSharingController::ConstructL()
+    {
+    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
+    // It generates the test case table.
+    CEUnitTestSuiteClass::ConstructL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiClipSharingController::SetupL()
+    {
+    iEventObserver = new (ELeave) CMusUiEventObserverAdapter();
+    EUNIT_ASSERT( iEventObserver );
+
+    iClipSharingObserverAdapter = new (ELeave) CMusUiClipSharingObserverAdapter();
+    EUNIT_ASSERT( iClipSharingObserverAdapter );
+
+
+    RProperty::iIntProperty = 0;
+    RProperty::iErrorCode = KErrNone;
+
+
+    iClipSharingController = CMusUiClipSharingController::NewL( iClipSharingObserverAdapter, TRect( 0,0,100,100));
+    iEventController = static_cast<CMusUiEventController*>
+                        ( iClipSharingController );
+
+    EUNIT_ASSERT( iEventController );
+    iEventController->SetEventObserver( iEventObserver );
+    EUNIT_ASSERT( iEventController->iObserver == iEventObserver );
+    
+    // Need fake active object event...
+    _LIT( KFileName , "clip.3gp" );
+    iClipSharingController->iFileName = KFileName().AllocL();
+    iClipSharingController->HandleAsyncEventL( EMusUiAsyncStartMediaGallery );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiClipSharingController::Teardown()
+    {
+    delete iClipSharingController;
+    iEventController = NULL;
+    delete iEventObserver;
+    delete iClipSharingObserverAdapter;
+    }
+
+
+
+// TEST CASES
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_StartInvitationLL()
+    {
+    // TODO:
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_AddressFoundLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_InviteLL()
+    {
+    // Precondititions
+    iClipSharingObserverAdapter->iErrorCode = KErrNone; 
+    iEventController->iCameraAvailable = EAvailable;
+    iEventController->iSipRegistrationPending = EFalse;
+    
+    // sip address length > 0 and no separator
+    _LIT( KRes, "address" );
+    delete iEventController->iRemoteSipAddress;
+    iEventController->iRemoteSipAddress = KRes().AllocL();
+    iClipSharingController->InviteL();
+    
+    EUNIT_ASSERT( iClipSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EShowWaitDialogL );
+
+
+    // sip address length > 0 and separator
+    _LIT( KRes2, "Address1, Address2, Address3" );
+    delete iEventController->iRemoteSipAddress;
+    iEventController->iRemoteSipAddress = KRes2().AllocL();
+    iClipSharingController->iSession->iInvited = EFalse;
+    iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::ENone;
+
+    iClipSharingController->InviteL();
+    EUNIT_ASSERT( iClipSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EShowWaitDialogL );
+    
+    
+    // sip addres length = 0
+    _LIT( KRes3, "" );
+    delete iEventController->iRemoteSipAddress;
+    iEventController->iRemoteSipAddress = KRes3().AllocL();
+    iClipSharingController->iSession->iInvited = EFalse;
+    iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::ENone;
+
+    iClipSharingController->InviteL();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EManualAddressEntryL );
+   
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_InviteL2L()
+    {
+    // Precondititions
+    iClipSharingObserverAdapter->iErrorCode = KErrNone; 
+
+    // registration not pending and triedinvitations > 1
+    iEventController->iSipRegistrationPending = EFalse;
+    iClipSharingController->iSession->iInvited = EFalse;
+    iClipSharingController->iManualAddressTyped = EFalse;
+    iClipSharingController->iTriedInvitations = 2;
+
+    _LIT( KRes, "address" );
+    iClipSharingController->InviteL( KRes );
+    EUNIT_ASSERT( iClipSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EShowWaitDialogL );
+
+
+    // registration not pending and triedinvitations > 1
+    iClipSharingController->iSession->iErrorCode = KErrArgument; 
+
+    iEventController->iSipRegistrationPending = EFalse;
+    iClipSharingController->iSession->iInvited = EFalse;
+    iClipSharingController->iManualAddressTyped = EFalse;
+    iClipSharingController->iTriedInvitations = 2;
+
+    iClipSharingController->InviteL( KRes );
+    EUNIT_ASSERT( iClipSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+
+
+    // registration not pending and triedinvitations = 0 
+    iClipSharingController->iSession->iErrorCode = KErrArgument; 
+
+    iEventController->iSipRegistrationPending = EFalse;
+    iClipSharingController->iSession->iInvited = EFalse;
+    iClipSharingController->iManualAddressTyped = EFalse;
+    iClipSharingController->iTriedInvitations = 0;
+
+    _LIT( KProposal, "proposal_address" );
+    delete iEventController->iRemoteSipAddressProposal;
+    iEventController->iRemoteSipAddressProposal = KProposal().AllocL();
+    
+    // Manual address entry
+    iClipSharingController->InviteL( KRes );
+    EUNIT_ASSERT( iClipSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EShowWaitDialogL );
+    EUNIT_ASSERT( iClipSharingController->iTriedInvitations == 1 );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iAddress->Des().Compare( KProposal ) == 0 );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SetRectL()
+    {
+	TRect rect = TRect( 0,0, 100,100 );
+	
+    iClipSharingController->iSession->iErrorCode = KErrArgument;
+    iClipSharingController->SetRect( rect );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleError );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iError == KErrArgument );
+
+    iClipSharingController->iSession->iErrorCode = KErrNone;
+    iClipSharingController->SetRect( rect );
+    EUNIT_ASSERT( iClipSharingController->iSession->iRect == rect );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_CancelInvitationLL()
+    {
+    // Connection established cancel	
+	iClipSharingController->iSession->iInvited = ETrue;
+    iClipSharingController->iConnectionEstablished = ETrue;
+    iClipSharingController->iManualAddressTyped = EFalse;
+
+    iClipSharingController->CancelInvitationL();
+    EUNIT_ASSERT( iClipSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+
+
+    // No connection cancel	
+	iClipSharingController->iSession->iInvited = ETrue;
+    iClipSharingController->iConnectionEstablished = EFalse;
+    iClipSharingController->iManualAddressTyped = EFalse;
+
+    iClipSharingController->CancelInvitationL();
+    EUNIT_ASSERT( !iClipSharingController->iSession->iInvited  );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_HandleCommandLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_PlayingL()
+    {
+    iClipSharingController->iPlaying = ETrue;
+    EUNIT_ASSERT( iClipSharingController->Playing() );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SetFileNameLL()
+    {
+    _LIT( KRes, "filename" );
+    delete iClipSharingController->iFileName;
+    iClipSharingController->SetFileNameL( KRes );
+    EUNIT_ASSERT( iClipSharingController->iFileName->Des().Compare( KRes ) == 0 );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_ClipEndedL()
+    {
+    iClipSharingController->iClipEnded = ETrue;
+    EUNIT_ASSERT( iClipSharingController->ClipEnded() );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_ZoomInLL()
+    {
+    iClipSharingController->ZoomInL();
+    EUNIT_ASSERT( ETrue );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_ZoomOutLL()
+    {
+    iClipSharingController->ZoomOutL();
+    EUNIT_ASSERT( ETrue );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SplitLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_ShowErrorDialogL()
+    {
+	iClipSharingObserverAdapter->iErrorCode = KErrNone;
+	iClipSharingController->ShowErrorDialog( 1 );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EShowErrorDialogL );
+
+	iClipSharingObserverAdapter->iErrorCode = KErrNone;
+	iClipSharingObserverAdapter->iShowErrorDialogErrorCode = KErrArgument;
+	iClipSharingController->ShowErrorDialog( 1 );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleError );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_DismissWaitDialogL()
+    {
+	iClipSharingObserverAdapter->iErrorCode = KErrNone;
+	iClipSharingController->DismissWaitDialog();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EDismissWaitDialogL );
+
+	iClipSharingObserverAdapter->iErrorCode = KErrArgument;
+	iClipSharingController->DismissWaitDialog();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleError );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iError == KErrArgument );
+    }
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_EndOfClipL()
+    {
+    iClipSharingController->iClipEnded = EFalse;
+    iClipSharingController->EndOfClip();
+    EUNIT_ASSERT( iClipSharingController->iClipEnded );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionRejectedL()
+    {
+	iClipSharingController->SessionRejected();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionBadRequestL()
+    {
+	iClipSharingController->SessionBadRequest();
+    EUNIT_ASSERT( ETrue );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionUnauthorizedL()
+    {
+	iClipSharingController->SessionUnauthorized();
+    EUNIT_ASSERT( ETrue );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionPaymentRequiredL()
+    {
+	iClipSharingController->SessionPaymentRequired();
+    EUNIT_ASSERT( ETrue );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionRecipientNotFoundL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionProxyAuthenticationRequiredL()
+    {
+	iClipSharingController->SessionProxyAuthenticationRequired();
+    EUNIT_ASSERT( ETrue );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionRequestTimeOutL()
+    {
+    iClipSharingController->SessionRequestTimeOut();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionUnsupportedMediaTypeL()
+    {
+    iClipSharingController->SessionUnsupportedMediaType();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionRequestCancelledL()
+    {
+    iClipSharingController->SessionRequestCancelled();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionEstablishedL()
+    {
+    iClipSharingController->SessionEstablished();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EShowClipSharingPanesL );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionTerminatedL()
+    {
+    iClipSharingController->SessionTerminated();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionConnectionLostL()
+    {
+    iClipSharingController->SessionConnectionLost();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionFailedL()
+    {
+    iClipSharingController->SessionFailed();
+	EUNIT_ASSERT( ETrue );	
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_StreamIdleL()
+    {
+    iClipSharingController->StreamIdle();
+	EUNIT_ASSERT( ETrue );	
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_StreamStreamingL()
+    {
+    iClipSharingController->StreamStreaming();
+	EUNIT_ASSERT( ETrue );	
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_SessionTimeChangedL()
+    {
+    iClipSharingController->SessionTimeChanged( TTimeIntervalSeconds( 1  ) );
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EUpdateSessionTime );
+    }
+
+
+void UT_CMusUiClipSharingController::UT_CMusUiClipSharingController_InactivityTimeoutL()
+    {
+    iClipSharingController->InactivityTimeout();
+    EUNIT_ASSERT( iClipSharingObserverAdapter->iCalledObserver == CMusUiClipSharingObserverAdapter::EHandleExitL );
+    }
+
+
+
+
+//  TEST TABLE
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusUiClipSharingController,
+    "UT_CMusUiClipSharingController",
+    "UNIT" )
+
+EUNIT_TEST(
+    "StartInvitationL - test ",
+    "CMusUiClipSharingController",
+    "StartInvitationL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_StartInvitationLL, Teardown)
+
+EUNIT_TEST(
+    "AddressFoundL - test ",
+    "CMusUiClipSharingController",
+    "AddressFoundL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_AddressFoundLL, Teardown)
+
+EUNIT_TEST(
+    "InviteL - test ",
+    "CMusUiClipSharingController",
+    "InviteL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_InviteLL, Teardown)
+
+EUNIT_TEST(
+    "InviteL2 - test ",
+    "CMusUiClipSharingController",
+    "InviteL2",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_InviteL2L, Teardown)
+
+EUNIT_TEST(
+    "SetRect - test ",
+    "CMusUiClipSharingController",
+    "SetRect",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SetRectL, Teardown)
+
+EUNIT_TEST(
+    "CancelInvitationL - test ",
+    "CMusUiClipSharingController",
+    "CancelInvitationL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_CancelInvitationLL, Teardown)
+
+EUNIT_TEST(
+    "HandleCommandL - test ",
+    "CMusUiClipSharingController",
+    "HandleCommandL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_HandleCommandLL, Teardown)
+
+EUNIT_TEST(
+    "Playing - test ",
+    "CMusUiClipSharingController",
+    "Playing",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_PlayingL, Teardown)
+
+EUNIT_TEST(
+    "SetFileNameL - test ",
+    "CMusUiClipSharingController",
+    "SetFileNameL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SetFileNameLL, Teardown)
+
+EUNIT_TEST(
+    "ClipEnded - test ",
+    "CMusUiClipSharingController",
+    "ClipEnded",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_ClipEndedL, Teardown)
+
+EUNIT_TEST(
+    "ZoomInL - test ",
+    "CMusUiClipSharingController",
+    "ZoomInL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_ZoomInLL, Teardown)
+
+EUNIT_TEST(
+    "ZoomOutL - test ",
+    "CMusUiClipSharingController",
+    "ZoomOutL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_ZoomOutLL, Teardown)
+
+EUNIT_TEST(
+    "SplitL - test ",
+    "CMusUiClipSharingController",
+    "SplitL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SplitLL, Teardown)
+
+EUNIT_TEST(
+    "ShowErrorDialog - test ",
+    "CMusUiClipSharingController",
+    "ShowErrorDialog",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_ShowErrorDialogL, Teardown)
+
+EUNIT_TEST(
+    "DismissWaitDialog - test ",
+    "CMusUiClipSharingController",
+    "DismissWaitDialog",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_DismissWaitDialogL, Teardown)
+
+EUNIT_TEST(
+    "EndOfClip - test ",
+    "CMusUiClipSharingController",
+    "EndOfClip",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_EndOfClipL, Teardown)
+
+EUNIT_TEST(
+    "SessionRejected - test ",
+    "CMusUiClipSharingController",
+    "SessionRejected",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionRejectedL, Teardown)
+
+EUNIT_TEST(
+    "SessionBadRequest - test ",
+    "CMusUiClipSharingController",
+    "SessionBadRequest",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionBadRequestL, Teardown)
+
+EUNIT_TEST(
+    "SessionUnauthorized - test ",
+    "CMusUiClipSharingController",
+    "SessionUnauthorized",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionUnauthorizedL, Teardown)
+
+EUNIT_TEST(
+    "SessionPaymentRequired - test ",
+    "CMusUiClipSharingController",
+    "SessionPaymentRequired",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionPaymentRequiredL, Teardown)
+
+EUNIT_TEST(
+    "SessionRecipientNotFound - test ",
+    "CMusUiClipSharingController",
+    "SessionRecipientNotFound",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionRecipientNotFoundL, Teardown)
+
+EUNIT_TEST(
+    "SessionProxyAuthenticationRequired - test ",
+    "CMusUiClipSharingController",
+    "SessionProxyAuthenticationRequired",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionProxyAuthenticationRequiredL, Teardown)
+
+EUNIT_TEST(
+    "SessionRequestTimeOut - test ",
+    "CMusUiClipSharingController",
+    "SessionRequestTimeOut",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionRequestTimeOutL, Teardown)
+
+EUNIT_TEST(
+    "SessionUnsupportedMediaType - test ",
+    "CMusUiClipSharingController",
+    "SessionUnsupportedMediaType",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionUnsupportedMediaTypeL, Teardown)
+
+EUNIT_TEST(
+    "SessionRequestCancelled - test ",
+    "CMusUiClipSharingController",
+    "SessionRequestCancelled",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionRequestCancelledL, Teardown)
+
+EUNIT_TEST(
+    "SessionEstablished - test ",
+    "CMusUiClipSharingController",
+    "SessionEstablished",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionEstablishedL, Teardown)
+
+EUNIT_TEST(
+    "SessionTerminated - test ",
+    "CMusUiClipSharingController",
+    "SessionTerminated",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionTerminatedL, Teardown)
+
+EUNIT_TEST(
+    "SessionConnectionLost - test ",
+    "CMusUiClipSharingController",
+    "SessionConnectionLost",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionConnectionLostL, Teardown)
+
+EUNIT_TEST(
+    "SessionFailed - test ",
+    "CMusUiClipSharingController",
+    "SessionFailed",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionFailedL, Teardown)
+
+EUNIT_TEST(
+    "StreamIdle - test ",
+    "CMusUiClipSharingController",
+    "StreamIdle",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_StreamIdleL, Teardown)
+
+EUNIT_TEST(
+    "StreamStreaming - test ",
+    "CMusUiClipSharingController",
+    "StreamStreaming",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_StreamStreamingL, Teardown)
+
+EUNIT_TEST(
+    "SessionTimeChanged - test ",
+    "CMusUiClipSharingController",
+    "SessionTimeChanged",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_SessionTimeChangedL, Teardown)
+
+EUNIT_TEST(
+    "InactivityTimeout - test ",
+    "CMusUiClipSharingController",
+    "InactivityTimeout",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiClipSharingController_InactivityTimeoutL, Teardown)
+
+EUNIT_END_TEST_TABLE
+
+//  END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/ut_musuidllmain.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+//  USER INCLUDES
+#include "ut_musuiclipsharingcontroller.h"
+#include "ut_musuieventcontroller.h"
+#include "ut_musuilivesharingcontroller.h"
+#include "ut_musuipropertywatch.h"
+#include "ut_musuireceivecontroller.h"
+#include "ut_musuistartcontroller.h"
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/ceunittestsuite.h>
+
+
+// -----------------------------------------------------------------------------
+// Test suite factory function.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C MEUnitTest* CreateTestSuiteL()
+    {
+
+    CEUnitTestSuite* rootSuite = CEUnitTestSuite::NewLC( _L( "Main suite" ) );
+
+    //rootSuite->AddL( UT_MusEngMceUtils::NewLC() );
+    //CleanupStack::Pop();
+
+    rootSuite->AddL( UT_CMusUiClipSharingController::NewLC() );
+    CleanupStack::Pop();
+
+    rootSuite->AddL( UT_CMusUiEventController::NewLC() );
+    CleanupStack::Pop();
+
+    rootSuite->AddL( UT_CMusUiLiveSharingController::NewLC() );
+    CleanupStack::Pop();
+
+    rootSuite->AddL( UT_CMusUiPropertyWatch::NewLC() );
+    CleanupStack::Pop();
+
+    rootSuite->AddL( UT_CMusUiReceiveController::NewLC() );
+    CleanupStack::Pop();
+
+    rootSuite->AddL( UT_CMusUiStartController::NewLC() );
+    CleanupStack::Pop();
+
+    CleanupStack::Pop( rootSuite );
+
+    return rootSuite;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/ut_musuieventcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,761 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+//  INTERNAL INCLUDES
+#include "ut_musuieventcontroller.h"
+#include "musuieventcontroller.h"
+#include "musuilivesharingcontroller.h"
+
+#include "musuilivesharingobserveradapter.h"
+#include "musuieventobserveradapter.h"
+
+#include "musresourceproperties.h"
+#include "mussessionproperties.h"
+#include "musuidefinitions.h"
+#include "musenglivesession.h"
+#include "mussettings.h"
+
+
+#include <e32property.h>
+#include <fbs.h>
+#include <stringloader.h>
+
+//#include "musestubs.h"
+//#include "musengtestdefs.h"
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/eunitmacros.h>
+//#include <centralrepository.h>
+//#include <mcedisplaysink.h>
+
+using namespace NMusSessionApi;
+
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiEventController* UT_CMusUiEventController::NewL()
+    {
+    UT_CMusUiEventController* self = UT_CMusUiEventController::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiEventController* UT_CMusUiEventController::NewLC()
+    {
+    UT_CMusUiEventController* self = new( ELeave ) UT_CMusUiEventController();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiEventController::~UT_CMusUiEventController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Default constructor
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiEventController::UT_CMusUiEventController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase construct
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiEventController::ConstructL()
+    {
+    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
+    // It generates the test case table.
+    CEUnitTestSuiteClass::ConstructL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiEventController::SetupL()
+    {
+    _LIT( KPath, "\\private\\1000af5a\\" );
+    iVideoFolder = KPath().AllocL();
+    
+    //MultimediaSharingSettings::iVideoFolder =  iVideoFolder;
+    MultimediaSharingSettings::iAutoRecord = MusSettingsKeys::EAutoRecordOff;
+    MultimediaSharingSettings::iVideoLocation = 2;
+
+    _LIT( KReturn, "savedfilename" );
+    _iReturnValue = KReturn().AllocL();
+    StringLoader::iReturnValue = _iReturnValue;
+    
+    
+    iEventObserver = new (ELeave) CMusUiEventObserverAdapter();
+    EUNIT_ASSERT( iEventObserver );
+
+    iLiveSharingObserverAdapter = new (ELeave) CMusUiLiveSharingObserverAdapter();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter );
+
+
+    RProperty::iIntProperty = 0;
+    RProperty::iErrorCode = KErrNone;
+
+
+    iLiveSharingController = CMusUiLiveSharingController::NewL( iLiveSharingObserverAdapter, TRect( 0,0,100,100));
+    iEventController = static_cast<CMusUiEventController*>
+                        ( iLiveSharingController );
+
+    EUNIT_ASSERT( iEventController );
+    iEventController->SetEventObserver( iEventObserver );
+    EUNIT_ASSERT( iEventController->iObserver == iEventObserver );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiEventController::Teardown()
+    {
+    delete iLiveSharingController;
+    iEventController = NULL;
+    delete iEventObserver;
+    delete iLiveSharingObserverAdapter;
+    
+    delete iVideoFolder;
+    iVideoFolder = NULL;
+    //MultimediaSharingSettings::iVideoFolder =  NULL;
+    
+    delete _iReturnValue ;
+    _iReturnValue  = NULL;
+   // StringLoader::iReturnValue = NULL;
+    //StringLoader::Cleanup();
+    //MultimediaSharingSettings::Cleanup();
+    
+    }
+
+
+// TEST CASES
+
+void UT_CMusUiEventController::UT_CMusUiEventController_ResourcePropertyChangedL()
+    {
+    //  test for setting status
+    
+    // Camera availability    
+    iEventController->iCameraAvailibilityInProgress = EFalse;
+    iEventController->iCameraAvailable = TAvailability(1);
+    iEventController->ResourcePropertyChanged( KCameraAvailability, 0 );
+    EUNIT_ASSERT( iEventController->iCameraAvailable == 0 );
+    EUNIT_ASSERT( iEventController->iCameraAvailibilityInProgress == EFalse );
+
+    _LIT( KRes, "address" ); // Needed for fake, MUS_LOG leaves if null
+    iLiveSharingController->iAddress = KRes().AllocL();
+    iEventController->iCameraAvailibilityInProgress = ETrue;
+    iEventController->iCameraAvailable = TAvailability(0);
+    iEventController->ResourcePropertyChanged( KCameraAvailability, 1 );
+    EUNIT_ASSERT( iEventController->iCameraAvailable == 1 );
+    EUNIT_ASSERT( iEventController->iCameraAvailibilityInProgress == EFalse );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EShowWaitDialogL );
+    
+
+    // Keypad availablity
+    iEventController->iKeypadAvailable = TAvailability(0);
+    iEventController->ResourcePropertyChanged( KKeypadAvailability, 2 );
+    EUNIT_ASSERT( iEventController->iKeypadAvailable == 2 );
+
+    // Videoplayer availability
+    iEventController->iVideoPlayerAvailable = TAvailability(0);
+    iEventController->ResourcePropertyChanged( KVideoPlayerAvailability, 3 );
+    EUNIT_ASSERT( iEventController->iVideoPlayerAvailable == 3 );
+
+    //Other case
+    iEventController->ResourcePropertyChanged( -99, 0 );
+    EUNIT_ASSERT( iEventController->iCameraAvailable == 1 );
+    EUNIT_ASSERT( iEventController->iKeypadAvailable == 2 );
+    EUNIT_ASSERT( iEventController->iVideoPlayerAvailable == 3 );
+
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SessionPropertyChangedL()
+    {
+    
+    iEventController->SessionPropertyChanged( KStatus, ESipRegistrationPending );
+    EUNIT_ASSERT( iEventController->iSipRegistrationPending );
+
+    // TODO: Cannot test UpdateContactL it leaves CleanupStack::PopAndDestroy function
+    // Need to do changes on code
+    iEventController->SessionPropertyChanged( KContactId, 0 );
+    
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SessionPropertyChanged2L()
+    {
+    // TODO: Is this functions alive? 
+    // EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_HandleErrorL()
+    {
+    
+    iEventController->HandleError( KErrUnknown );
+    EUNIT_ASSERT( iEventObserver->iCalledObserver == CMusUiEventObserverAdapter::EHandleError );
+    EUNIT_ASSERT( iEventObserver->iHandleErrorReason == KErrUnknown );
+    
+    }
+
+void UT_CMusUiEventController::UT_CMusUiEventController_UpdateBitmapL()
+    {
+    delete iEventController->iContactBitmap;
+    iEventController->iContactBitmap = NULL;
+    CFbsBitmap* bitmap = new (ELeave) CFbsBitmap();
+    iEventController->UpdateBitmap( bitmap );
+    EUNIT_ASSERT( iEventController->iContactBitmap == bitmap );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SetEventObserverL()
+    {
+    // Tested in SetupL();
+    EUNIT_ASSERT( ETrue );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_HandleForegroundEventLL()
+    {
+    // Initalization
+    iLiveSharingController->iConnectionEstablished = ETrue; // Need for testing
+    iLiveSharingObserverAdapter->iErrorCode = KErrNone;
+    
+    // Enable display
+    iEventController->HandleForegroundEventL( ETrue );
+    EUNIT_ASSERT( iLiveSharingController->iSession->iDisplayEnabled );
+    EUNIT_ASSERT( iLiveSharingController->iSession->iPlaying );
+    EUNIT_ASSERT( iEventController->iPlaying );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EShowNaviPaneIconL );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iIcon == EMusUiNaviIconPlay );
+
+    // Disable display
+    iEventController->HandleForegroundEventL( EFalse );
+    EUNIT_ASSERT( !iLiveSharingController->iSession->iDisplayEnabled );
+    EUNIT_ASSERT( !iLiveSharingController->iSession->iPlaying );
+    EUNIT_ASSERT( !iEventController->iPlaying );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EShowNaviPaneIconL );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iIcon == EMusUiNaviIconPause );
+
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SetCameraStatusL()
+    {
+    iEventController->iCameraAvailable = TAvailability( 0 );
+    iEventController->SetCameraStatus( TAvailability( 2 ) );
+    EUNIT_ASSERT( iEventController->iCameraAvailable == 2 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SetKeypadStatusL()
+    {
+    iEventController->iKeypadAvailable = TAvailability(0);
+    iEventController->SetKeypadStatus( TAvailability( 2  ) );
+    EUNIT_ASSERT( iEventController->iKeypadAvailable == 2 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SetVideoPlayerStatusL()
+    {
+    iEventController->iVideoPlayerAvailable = TAvailability(0);
+    iEventController->SetVideoPlayerStatus( TAvailability( 3  ) );
+    EUNIT_ASSERT( iEventController->iVideoPlayerAvailable == 3 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SetCameraAvailabilityInProgressL()
+    {
+    iEventController->iCameraAvailibilityInProgress = 0;
+    iEventController->SetCameraAvailabilityInProgress( 1 );
+    EUNIT_ASSERT( iEventController->iCameraAvailibilityInProgress == 1 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_CameraAvailableL()
+    {
+    iEventController->iCameraAvailable = TAvailability( 2 );
+    EUNIT_ASSERT( iEventController->CameraAvailable() == 2 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_KeypadAvailableL()
+    {
+    iEventController->iKeypadAvailable = TAvailability( 2 );
+    EUNIT_ASSERT( iEventController->KeypadAvailable() == 2 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_VideoPlayerAvailableL()
+    {
+    iEventController->iVideoPlayerAvailable = TAvailability( 2 );
+    EUNIT_ASSERT( iEventController->VideoPlayerAvailable() == 2 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_CameraAvailibilityInProgressL()
+    {
+    iEventController->iCameraAvailibilityInProgress = 1;
+    EUNIT_ASSERT( iEventController->CameraAvailibilityInProgress() == 1 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_MusRemoteSipAddressValueL()
+    {
+    _LIT( KRes, "remote_address");
+    delete iEventController->iRemoteSipAddress;
+    iEventController->iRemoteSipAddress = KRes().AllocL();
+    EUNIT_ASSERT(  iEventController->MusRemoteSipAddressValue().Compare( KRes ) == 0 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_MusProposalAddressValueL()
+    {
+    _LIT( KRes, "remote_address");
+    delete iEventController->iRemoteSipAddressProposal;
+    iEventController->iRemoteSipAddressProposal = KRes().AllocL();
+    EUNIT_ASSERT(  iEventController->MusProposalAddressValue().Compare( KRes ) == 0 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_MusContactNameL()
+    {
+    _LIT( KRes, "remote_address");
+    delete iEventController->iContactName;
+    iEventController->iContactName = KRes().AllocL();
+    EUNIT_ASSERT(  iEventController->MusContactName().Compare( KRes ) == 0 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_MusContactBitmapL()
+    {
+    delete iEventController->iContactBitmap;
+    iEventController->iContactBitmap = new (ELeave) CFbsBitmap();
+    EUNIT_ASSERT( iEventController->MusContactBitmap() == iEventController->iContactBitmap );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_MusVideoCodecValueL()
+    {
+    _LIT( KRes, "codec_value");
+    delete iEventController->iVideoCodec;
+    iEventController->iVideoCodec = KRes().AllocL();
+    EUNIT_ASSERT(  iEventController->MusVideoCodecValue().Compare( KRes ) == 0 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_MusTelNumberValueL()
+    {
+    _LIT( KRes, "telnumber");
+    delete iEventController->iTelNumber;
+    iEventController->iTelNumber = KRes().AllocL();
+    EUNIT_ASSERT(  iEventController->MusTelNumberValue().Compare( KRes ) == 0 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SipProfileIdL()
+    {
+    iEventController->iSipProfileId = 99;
+    EUNIT_ASSERT(  iEventController->SipProfileId() == 99 );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SipRegistrationPendingL()
+    {
+    
+    iEventController->iSipRegistrationPending = ETrue;
+    EUNIT_ASSERT(  iEventController->SipRegistrationPending() );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SessionTimeFormattedL()
+    {
+    
+    // Localized time format like "00:00:00"
+    
+    //TLocale locale;
+    //locale.TimeSeparator( 2 )
+    
+    //EUNIT_ASSERT(  iEventController->MusTelNumberValue().Compare( iEventController->iTelNumber->Des() ) );    
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_SaveContactL()
+    {
+    
+    //iEventController->iContactId = TContactItemId( 1 );
+    
+    //iEventController->SaveContact();
+    //EUNIT_ASSERT( iEventObserver->iActivatedContactId == TContactItemId( 1 ) );
+    
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_HandleExitLL()
+    {
+    
+    
+    
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_InspectKeypadLL()
+    {
+    
+    // Initalize 
+    iLiveSharingObserverAdapter->iErrorCode = KErrNone;
+    iEventObserver->iErrorCode = KErrNone;
+
+    
+    // Basic case cannot test, nothing changes
+    // iEventController->iKeypadAvailable = EAvailable;    
+    // iEventController->InspectKeypadL();
+    
+    
+    // case EAvailableInLandscapeOrientation
+    iEventController->iKeypadAvailable = EAvailableInLandscapeOrientation;    
+    iEventController->InspectKeypadL();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EChangeOrientationL );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iOrientation == CAknAppUiBase::EAppUiOrientationLandscape );
+    
+    
+    // case EAvailableInPortraitOrientation
+    iEventController->iKeypadAvailable = EAvailableInPortraitOrientation;    
+    iEventController->InspectKeypadL();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EChangeOrientationL );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iOrientation == CAknAppUiBase::EAppUiOrientationPortrait );
+
+    // case ENotDefined
+    iEventController->iKeypadAvailable = ENotDefined;    
+    iEventController->InspectKeypadL();
+    EUNIT_ASSERT( iEventObserver->iCalledObserver == CMusUiEventObserverAdapter::EHandleExitL );
+
+    // case ENotAvailable
+    iEventController->iKeypadAvailable = ENotAvailable;    
+    iEventController->InspectKeypadL();
+    EUNIT_ASSERT( iEventObserver->iCalledObserver == CMusUiEventObserverAdapter::EHandleExitL );
+
+   
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_UpdateContactLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_UpdateContactNameL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_UpdateContactPictureLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+void UT_CMusUiEventController::UT_CMusUiEventController_HandleChangedStatusLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+
+
+//  TEST TABLE
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusUiEventController,
+    "UT_CMusUiEventController",
+    "UNIT" )
+
+EUNIT_TEST(
+    "ResourcePropertyChangedL - test ",
+    "CMusUiEventController",
+    "ResourcePropertyChangedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_ResourcePropertyChangedL, Teardown)
+
+EUNIT_TEST(
+    "SessionPropertyChangedL - test ",
+    "CMusUiEventController",
+    "SessionPropertyChangedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SessionPropertyChangedL, Teardown)
+
+EUNIT_TEST(
+    "HandleError - test ",
+    "CMusUiEventController",
+    "HandleError",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_HandleErrorL, Teardown)
+
+EUNIT_TEST(
+    "UpdateBitmap - test ",
+    "CMusUiEventController",
+    "UpdateBitmap",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_UpdateBitmapL, Teardown)
+
+EUNIT_TEST(
+    "SetEventObserver - test ",
+    "CMusUiEventController",
+    "SetEventObserver",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetEventObserverL, Teardown)
+
+EUNIT_TEST(
+    "HandleForegroundEventL - test ",
+    "CMusUiEventController",
+    "HandleForegroundEventL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_HandleForegroundEventLL, Teardown)
+
+EUNIT_TEST(
+    "SetCameraStatus - test ",
+    "CMusUiEventController",
+    "SetCameraStatus",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetCameraStatusL, Teardown)
+
+EUNIT_TEST(
+    "SetKeypadStatus - test ",
+    "CMusUiEventController",
+    "SetKeypadStatus",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetKeypadStatusL, Teardown)
+
+EUNIT_TEST(
+    "SetVideoPlayerStatus - test ",
+    "CMusUiEventController",
+    "SetVideoPlayerStatus",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetVideoPlayerStatusL, Teardown)
+
+EUNIT_TEST(
+    "SetCameraAvailabilityInProgress - test ",
+    "CMusUiEventController",
+    "SetCameraAvailabilityInProgress",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetCameraAvailabilityInProgressL, Teardown)
+
+EUNIT_TEST(
+    "EnableLoudspeaker - test ",
+    "CMusUiEventController",
+    "EnableLoudspeaker",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetCameraStatusL, Teardown)
+
+EUNIT_TEST(
+    "CameraAvailable - test ",
+    "CMusUiEventController",
+    "CameraAvailable",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_CameraAvailableL, Teardown)
+
+EUNIT_TEST(
+    "KeypadAvailable - test ",
+    "CMusUiEventController",
+    "KeypadAvailable",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_KeypadAvailableL, Teardown)
+
+EUNIT_TEST(
+    "VideoPlayerAvailable - test ",
+    "CMusUiEventController",
+    "VideoPlayerAvailable",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_VideoPlayerAvailableL, Teardown)
+
+EUNIT_TEST(
+    "CameraAvailibilityInProgress - test ",
+    "CMusUiEventController",
+    "CameraAvailibilityInProgress",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_CameraAvailibilityInProgressL, Teardown)
+
+EUNIT_TEST(
+    "MusRemoteSipAddressValue - test ",
+    "CMusUiEventController",
+    "MusRemoteSipAddressValue",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_MusRemoteSipAddressValueL, Teardown)
+
+EUNIT_TEST(
+    "MusProposalAddressValue - test ",
+    "CMusUiEventController",
+    "MusProposalAddressValue",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_MusProposalAddressValueL, Teardown)
+
+EUNIT_TEST(
+    "MusContactName - test ",
+    "CMusUiEventController",
+    "MusContactName",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_MusContactNameL, Teardown)
+
+EUNIT_TEST(
+    "EnableLoudspeakerL - test ",
+    "CMusUiEventController",
+    "EnableLoudspeakerL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetCameraStatusL, Teardown)
+
+EUNIT_TEST(
+    "MusContactBitmap - test ",
+    "CMusUiEventController",
+    "MusContactBitmap",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_MusContactBitmapL, Teardown)
+
+EUNIT_TEST(
+    "MusVideoCodecValue - test ",
+    "CMusUiEventController",
+    "MusVideoCodecValue",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_MusVideoCodecValueL, Teardown)
+
+EUNIT_TEST(
+    "MusTelNumberValue - test ",
+    "CMusUiEventController",
+    "MusTelNumberValue",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_MusTelNumberValueL, Teardown)
+
+EUNIT_TEST(
+    "SipProfileId - test ",
+    "CMusUiEventController",
+    "SipProfileId",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SipProfileIdL, Teardown)
+
+EUNIT_TEST(
+    "SipRegistrationPending - test ",
+    "CMusUiEventController",
+    "SipRegistrationPending",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SipRegistrationPendingL, Teardown)
+
+EUNIT_TEST(
+    "SessionTimeFormatted - test ",
+    "CMusUiEventController",
+    "SessionTimeFormatted",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SessionTimeFormattedL, Teardown)
+
+EUNIT_TEST(
+    "EnableLoudspeakerL - test ",
+    "CMusUiEventController",
+    "EnableLoudspeakerL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetCameraStatusL, Teardown)
+
+EUNIT_TEST(
+    "SaveContact - test ",
+    "CMusUiEventController",
+    "SaveContact",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SaveContactL, Teardown)
+
+EUNIT_TEST(
+    "SetCameraStatus - test ",
+    "CMusUiEventController",
+    "SetCameraStatus",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_SetCameraStatusL, Teardown)
+
+EUNIT_TEST(
+    "HandleExitL - test ",
+    "CMusUiEventController",
+    "HandleExitL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_HandleExitLL, Teardown)
+
+
+EUNIT_TEST(
+    "InspectKeypadL - test ",
+    "CMusUiEventController",
+    "InspectKeypadL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_InspectKeypadLL, Teardown)
+
+EUNIT_TEST(
+    "UpdateContactL - test ",
+    "CMusUiEventController",
+    "UpdateContactL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_UpdateContactLL, Teardown)
+
+EUNIT_TEST(
+    "UpdateContactName - test ",
+    "CMusUiEventController",
+    "UpdateContactName",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_UpdateContactNameL, Teardown)
+
+EUNIT_TEST(
+    "UpdateContactPictureL - test ",
+    "CMusUiEventController",
+    "UpdateContactPictureL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_UpdateContactPictureLL, Teardown)
+
+EUNIT_TEST(
+    "HandleChangedStatusL - test ",
+    "CMusUiEventController",
+    "HandleChangedStatusL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiEventController_HandleChangedStatusLL, Teardown)
+
+EUNIT_END_TEST_TABLE
+
+
+//  END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/ut_musuilivesharingcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,888 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+//  INTERNAL INCLUDES
+#include "ut_musuilivesharingcontroller.h"
+#include "musuilivesharingcontroller.h"
+#include "musuilivesharingobserveradapter.h"
+//#include "musestubs.h"
+//#include "musengtestdefs.h"
+#include "musuieventobserveradapter.h"
+#include "musuidefinitions.h"
+#include <musenglivesession.h>
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/eunitmacros.h>
+#include <e32property.h>
+
+//#include <centralrepository.h>
+//#include <mcedisplaysink.h>
+
+using namespace NMusResourceApi;
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiLiveSharingController* UT_CMusUiLiveSharingController::NewL()
+    {
+    UT_CMusUiLiveSharingController* self = UT_CMusUiLiveSharingController::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiLiveSharingController* UT_CMusUiLiveSharingController::NewLC()
+    {
+    UT_CMusUiLiveSharingController* self = new( ELeave ) UT_CMusUiLiveSharingController();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiLiveSharingController::~UT_CMusUiLiveSharingController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Default constructor
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase construct
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::ConstructL()
+    {
+    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
+    // It generates the test case table.
+    CEUnitTestSuiteClass::ConstructL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::SetupL()
+    {
+    
+    iEventObserver = new (ELeave) CMusUiEventObserverAdapter();
+    EUNIT_ASSERT( iEventObserver );
+
+    iLiveSharingObserverAdapter = new (ELeave) CMusUiLiveSharingObserverAdapter();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter );
+
+
+    RProperty::iIntProperty = 0;
+    RProperty::iErrorCode = KErrNone;
+
+
+    iLiveSharingController = CMusUiLiveSharingController::NewL( iLiveSharingObserverAdapter, TRect( 0,0,100,100));
+    iEventController = static_cast<CMusUiEventController*>
+                        ( iLiveSharingController );
+
+    EUNIT_ASSERT( iEventController );
+    iEventController->SetEventObserver( iEventObserver );
+    EUNIT_ASSERT( iEventController->iObserver == iEventObserver );
+
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::Teardown()
+    {
+    delete iLiveSharingController;
+    iEventController = NULL;
+    delete iEventObserver;
+    delete iLiveSharingObserverAdapter;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_StartInvitationLL()
+	{
+	
+    //iLiveSharingController->StartInvitationL();
+    //EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleAsyncEventL );
+    //EUNIT_ASSERT( iLiveSharingObserverAdapter->iHandleAsyncEventId == EMusUiAsyncStartInvitation );
+	EUNIT_ASSERT( EFalse );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_AddressFoundLL()
+	{
+	EUNIT_ASSERT( EFalse );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_InviteLL()
+	{
+	
+    // Precondititions
+    iLiveSharingObserverAdapter->iErrorCode = KErrNone; 
+    iEventController->iCameraAvailable = EAvailable;
+    iEventController->iSipRegistrationPending = EFalse;
+    
+    // sip address length > 0 and no separator
+    _LIT( KRes, "address" );
+    delete iEventController->iRemoteSipAddress;
+    iEventController->iRemoteSipAddress = KRes().AllocL();
+    iLiveSharingController->InviteL();
+    
+    EUNIT_ASSERT( iLiveSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EShowWaitDialogL );
+
+
+    // sip address length > 0 and separator
+    _LIT( KRes2, "Address1, Address2, Address3" );
+    delete iEventController->iRemoteSipAddress;
+    iEventController->iRemoteSipAddress = KRes2().AllocL();
+    iLiveSharingController->iSession->iInvited = EFalse;
+    iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::ENone;
+
+    iLiveSharingController->InviteL();
+    EUNIT_ASSERT( iLiveSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EShowWaitDialogL );
+    
+    
+    // sip addres length = 0
+    _LIT( KRes3, "" );
+    delete iEventController->iRemoteSipAddress;
+    iEventController->iRemoteSipAddress = KRes3().AllocL();
+    iLiveSharingController->iSession->iInvited = EFalse;
+    iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::ENone;
+
+    iLiveSharingController->InviteL();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EManualAddressEntryL );
+   
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_InviteL2L()
+	{
+    // Precondititions
+    iLiveSharingObserverAdapter->iErrorCode = KErrNone; 
+
+    // registration not pending and triedinvitations > 1
+    iEventController->iSipRegistrationPending = EFalse;
+    iLiveSharingController->iSession->iInvited = EFalse;
+    iLiveSharingController->iManualAddressTyped = EFalse;
+    iLiveSharingController->iTriedInvitations = 2;
+
+    _LIT( KRes, "address" );
+    iLiveSharingController->InviteL( KRes );
+    EUNIT_ASSERT( iLiveSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EShowWaitDialogL );
+
+
+    // registration not pending and triedinvitations > 1
+    iLiveSharingController->iSession->iErrorCode = KErrArgument; 
+
+    iEventController->iSipRegistrationPending = EFalse;
+    iLiveSharingController->iSession->iInvited = EFalse;
+    iLiveSharingController->iManualAddressTyped = EFalse;
+    iLiveSharingController->iTriedInvitations = 2;
+
+    iLiveSharingController->InviteL( KRes );
+    EUNIT_ASSERT( iLiveSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+
+
+    // registration not pending and triedinvitations = 0 
+    iLiveSharingController->iSession->iErrorCode = KErrArgument; 
+
+    iEventController->iSipRegistrationPending = EFalse;
+    iLiveSharingController->iSession->iInvited = EFalse;
+    iLiveSharingController->iManualAddressTyped = EFalse;
+    iLiveSharingController->iTriedInvitations = 0;
+
+    _LIT( KProposal, "proposal_address" );
+    delete iEventController->iRemoteSipAddressProposal;
+    iEventController->iRemoteSipAddressProposal = KProposal().AllocL();
+    
+    // Manual address entry
+    iLiveSharingController->InviteL( KRes );
+    EUNIT_ASSERT( iLiveSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EShowWaitDialogL );
+    EUNIT_ASSERT( iLiveSharingController->iTriedInvitations == 1 );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iAddress->Des().Compare( KProposal ) == 0 );
+
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SetRectL()
+	{
+	
+	TRect rect = TRect( 0,0, 100,100 );
+	
+    iLiveSharingController->iSession->iErrorCode = KErrArgument;
+    iLiveSharingController->SetRect( rect );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleError );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iError == KErrArgument );
+
+    iLiveSharingController->iSession->iErrorCode = KErrNone;
+    iLiveSharingController->SetRect( rect );
+    EUNIT_ASSERT( iLiveSharingController->iSession->iRect == iLiveSharingController->CenteredRect( rect ) );
+    
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_CancelInvitationLL()
+	{
+
+    // Connection established cancel	
+	iLiveSharingController->iSession->iInvited = ETrue;
+    iLiveSharingController->iConnectionEstablished = ETrue;
+    iLiveSharingController->iManualAddressTyped = EFalse;
+
+    iLiveSharingController->CancelInvitationL();
+    EUNIT_ASSERT( iLiveSharingController->iSession->iInvited );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+
+
+    // No connection cancel	
+	iLiveSharingController->iSession->iInvited = ETrue;
+    iLiveSharingController->iConnectionEstablished = EFalse;
+    iLiveSharingController->iManualAddressTyped = EFalse;
+
+    iLiveSharingController->CancelInvitationL();
+    EUNIT_ASSERT( !iLiveSharingController->iSession->iInvited  );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+    
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_HandleCommandLL()
+	{
+	// TODO: 
+	
+	EUNIT_ASSERT( EFalse );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_PlayingL()
+	{
+    iLiveSharingController->iPlaying = ETrue;
+    EUNIT_ASSERT( iLiveSharingController->Playing() );
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_CurrentZoomLL()
+	{
+    iLiveSharingController->iSession->iCurrentZoom = 14;
+	EUNIT_ASSERT( iLiveSharingController->CurrentZoomL() == 14 );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_MinZoomLL()
+	{
+    iLiveSharingController->iSession->iCurrentZoom = 13;
+	EUNIT_ASSERT( iLiveSharingController->CurrentZoomL() == 13 );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_MaxZoomLL()
+	{
+    iLiveSharingController->iSession->iCurrentZoom = 12;
+	EUNIT_ASSERT( iLiveSharingController->CurrentZoomL() == 12 );	
+	}
+    
+//private:	// new functions:
+    
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_CenteredRectL()
+	{
+	EUNIT_ASSERT( EFalse );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_ZoomInLL()
+	{
+    iLiveSharingController->iSession->iCurrentZoom = 12;
+	EUNIT_ASSERT( iLiveSharingController->CurrentZoomL() == 13 );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_ZoomOutLL()
+	{
+    iLiveSharingController->iSession->iCurrentZoom = 12;
+	EUNIT_ASSERT( iLiveSharingController->CurrentZoomL() == 11 );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SplitLL()
+	{
+	EUNIT_ASSERT( EFalse );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_ShowErrorDialogL()
+	{
+	iLiveSharingObserverAdapter->iErrorCode = KErrNone;
+	iLiveSharingController->ShowErrorDialog( 1 );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EShowErrorDialogL );
+
+	iLiveSharingObserverAdapter->iErrorCode = KErrNone;
+	iLiveSharingObserverAdapter->iShowErrorDialogErrorCode = KErrArgument;
+	iLiveSharingController->ShowErrorDialog( 1 );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleError );
+
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_DismissWaitDialogL()
+	{
+	iLiveSharingObserverAdapter->iErrorCode = KErrNone;
+	iLiveSharingController->DismissWaitDialog();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EDismissWaitDialogL );
+
+	iLiveSharingObserverAdapter->iErrorCode = KErrArgument;
+	iLiveSharingController->DismissWaitDialog();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleError );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iError == KErrArgument );
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionRejectedL()
+	{
+	iLiveSharingController->SessionRejected();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+	}                // e.g. 603 DECLINE
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionBadRequestL()
+	{
+	iLiveSharingController->SessionBadRequest();
+	EUNIT_ASSERT( ETrue );	
+	}                   // 400 
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionUnauthorizedL()
+	{
+	iLiveSharingController->SessionUnauthorized();
+	EUNIT_ASSERT( ETrue );	
+	}                 // 401 
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionPaymentRequiredL()
+	{
+	iLiveSharingController->SessionPaymentRequired();
+	EUNIT_ASSERT( ETrue );	
+	}              // 402
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionRecipientNotFoundL()
+	{
+	EUNIT_ASSERT( EFalse );	
+	}            // 404
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionProxyAuthenticationRequiredL()
+	{
+	iLiveSharingController->SessionProxyAuthenticationRequired();
+	EUNIT_ASSERT( ETrue );	
+	}  // 407
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionRequestTimeOutL()
+	{
+    iLiveSharingController->SessionRequestTimeOut();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+	}               // 408
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionUnsupportedMediaTypeL()
+	{
+    iLiveSharingController->SessionUnsupportedMediaType();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+	}         // 415
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionRequestCancelledL()
+	{
+    iLiveSharingController->SessionRequestCancelled();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+	}             // 487
+
+//public:	// from MMusEngSessionObserver
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionEstablishedL()
+	{
+
+    iLiveSharingController->SessionEstablished();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+
+
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionTerminatedL()
+	{
+    iLiveSharingController->SessionTerminated();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionConnectionLostL()
+	{
+    iLiveSharingController->SessionConnectionLost();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionFailedL()
+	{
+    iLiveSharingController->SessionFailed();
+	EUNIT_ASSERT( ETrue );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_StreamIdleL()
+	{
+    iLiveSharingController->StreamIdle();
+	EUNIT_ASSERT( ETrue );	
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_StreamStreamingL()
+	{
+    iLiveSharingController->StreamStreaming();
+	EUNIT_ASSERT( ETrue );	
+	}	
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_SessionTimeChangedL()
+	{
+    iLiveSharingController->SessionTimeChanged( TTimeIntervalSeconds( 1  ) );
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EUpdateSessionTime );
+	}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiLiveSharingController::UT_CMusUiLiveSharingController_InactivityTimeoutL()
+	{
+    iLiveSharingController->InactivityTimeout();
+    EUNIT_ASSERT( iLiveSharingObserverAdapter->iCalledObserver == CMusUiLiveSharingObserverAdapter::EHandleExitL );
+	}
+
+
+
+// TEST CASES
+
+
+//  TEST TABLE
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusUiLiveSharingController,
+    "UT_CMusUiLiveSharingController",
+    "UNIT" )
+
+EUNIT_TEST(
+    "StartInvitationL - test ",
+    "UT_CMusUiLiveSharingController",
+    "StartInvitationL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_StartInvitationLL, Teardown)
+
+EUNIT_TEST(
+    "AddressFoundL - test ",
+    "UT_CMusUiLiveSharingController",
+    "AddressFoundL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_AddressFoundLL, Teardown)
+
+EUNIT_TEST(
+    "InviteL - test ",
+    "UT_CMusUiLiveSharingController",
+    "InviteL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_InviteLL, Teardown)
+
+EUNIT_TEST(
+    "InviteL2 - test ",
+    "UT_CMusUiLiveSharingController",
+    "InviteL2",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_InviteL2L, Teardown)
+
+EUNIT_TEST(
+    "SetRect - test ",
+    "UT_CMusUiLiveSharingController",
+    "SetRect",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SetRectL, Teardown)
+
+EUNIT_TEST(
+    "CancelInvitationL - test ",
+    "UT_CMusUiLiveSharingController",
+    "CancelInvitationL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_CancelInvitationLL, Teardown)
+
+EUNIT_TEST(
+    "HandleCommandL - test ",
+    "UT_CMusUiLiveSharingController",
+    "HandleCommandL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_HandleCommandLL, Teardown)
+
+EUNIT_TEST(
+    "PlayingL - test ",
+    "UT_CMusUiLiveSharingController",
+    "PlayingL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_PlayingL, Teardown)
+
+EUNIT_TEST(
+    "CurrentZoomL - test ",
+    "UT_CMusUiLiveSharingController",
+    "CurrentZoomL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_CurrentZoomLL, Teardown)
+
+EUNIT_TEST(
+    "MinZoomL - test ",
+    "UT_CMusUiLiveSharingController",
+    "MinZoomL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_MinZoomLL, Teardown)
+
+EUNIT_TEST(
+    "MaxZoomL - test ",
+    "UT_CMusUiLiveSharingController",
+    "MaxZoomL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_MaxZoomLL, Teardown)
+
+EUNIT_TEST(
+    "CenteredRect - test ",
+    "UT_CMusUiLiveSharingController",
+    "CenteredRect",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_CenteredRectL, Teardown)
+
+EUNIT_TEST(
+    "ZoomInL - test ",
+    "UT_CMusUiLiveSharingController",
+    "ZoomInL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_ZoomInLL, Teardown)
+
+EUNIT_TEST(
+    "ZoomOutL - test ",
+    "UT_CMusUiLiveSharingController",
+    "ZoomOutL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_ZoomOutLL, Teardown)
+
+EUNIT_TEST(
+    "SplitL - test ",
+    "UT_CMusUiLiveSharingController",
+    "SplitL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SplitLL, Teardown)
+
+EUNIT_TEST(
+    "ShowErrorDialog - test ",
+    "UT_CMusUiLiveSharingController",
+    "ShowErrorDialog",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_ShowErrorDialogL, Teardown)
+
+EUNIT_TEST(
+    "DismissWaitDialog - test ",
+    "UT_CMusUiLiveSharingController",
+    "DismissWaitDialog",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_DismissWaitDialogL, Teardown)
+
+EUNIT_TEST(
+    "SessionRejected - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionRejected",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionRejectedL, Teardown)
+
+EUNIT_TEST(
+    "SessionUnauthorized - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionUnauthorized",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionUnauthorizedL, Teardown)
+
+EUNIT_TEST(
+    "SessionPaymentRequired - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionPaymentRequired",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionPaymentRequiredL, Teardown)
+
+EUNIT_TEST(
+    "SessionRecipientNotFound - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionRecipientNotFound",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionRecipientNotFoundL, Teardown)
+
+EUNIT_TEST(
+    "SessionProxyAuthenticationRequired - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionProxyAuthenticationRequired",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionProxyAuthenticationRequiredL, Teardown)
+
+EUNIT_TEST(
+    "SessionRequestTimeOut - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionRequestTimeOut",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionRequestTimeOutL, Teardown)
+
+EUNIT_TEST(
+    "SessionUnsupportedMediaType - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionUnsupportedMediaType",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionUnsupportedMediaTypeL, Teardown)
+
+EUNIT_TEST(
+    "SessionRequestCancelled - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionRequestCancelled",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionRequestCancelledL, Teardown)
+
+EUNIT_TEST(
+    "SessionEstablished - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionEstablished",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionEstablishedL, Teardown)
+
+EUNIT_TEST(
+    "SessionTerminated - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionTerminated",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionTerminatedL, Teardown)
+
+EUNIT_TEST(
+    "SessionConnectionLost - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionConnectionLost",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionConnectionLostL, Teardown)
+
+EUNIT_TEST(
+    "SessionFailed - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionFailed",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionFailedL, Teardown)
+
+EUNIT_TEST(
+    "StreamIdle - test ",
+    "UT_CMusUiLiveSharingController",
+    "StreamIdle",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_StreamIdleL, Teardown)
+
+EUNIT_TEST(
+    "StreamStreaming - test ",
+    "UT_CMusUiLiveSharingController",
+    "StreamStreaming",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_StreamStreamingL, Teardown)
+
+EUNIT_TEST(
+    "SessionTimeChanged - test ",
+    "UT_CMusUiLiveSharingController",
+    "SessionTimeChanged",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_SessionTimeChangedL, Teardown)
+
+EUNIT_TEST(
+    "InactivityTimeout - test ",
+    "UT_CMusUiLiveSharingController",
+    "InactivityTimeout",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiLiveSharingController_InactivityTimeoutL, Teardown)
+
+EUNIT_END_TEST_TABLE
+
+//  END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/ut_musuipropertywatch.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,277 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+//  INTERNAL INCLUDES
+#include "ut_musuipropertywatch.h"
+#include "musuipropertywatch.h"
+//#include "musestubs.h"
+//#include "musengtestdefs.h"
+#include "musuitestdefines.h"
+
+#include "musuipropertyobserveradapter.h"
+#include "mussessionproperties.h"
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/eunitmacros.h>
+//#include <centralrepository.h>
+//#include <mcedisplaysink.h>
+
+
+using namespace NMusSessionApi;
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiPropertyWatch* UT_CMusUiPropertyWatch::NewL()
+    {
+    UT_CMusUiPropertyWatch* self = UT_CMusUiPropertyWatch::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiPropertyWatch* UT_CMusUiPropertyWatch::NewLC()
+    {
+    UT_CMusUiPropertyWatch* self = new( ELeave ) UT_CMusUiPropertyWatch();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiPropertyWatch::~UT_CMusUiPropertyWatch()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Default constructor
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiPropertyWatch::UT_CMusUiPropertyWatch()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase construct
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiPropertyWatch::ConstructL()
+    {
+    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
+    // It generates the test case table.
+    CEUnitTestSuiteClass::ConstructL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiPropertyWatch::SetupL()
+    {
+    // Iniatalize
+    iPropertyObserver = new (ELeave) CMusUiPropertyObserverAdapter();
+
+    TUid tmp = { 0 }; // Unit testing dummy
+    iPropertyWatch = CMusUiPropertyWatch::NewL( *iPropertyObserver,
+                                                tmp,
+                                                0 ); // Unit testing dummy
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiPropertyWatch::Teardown()
+    {
+    delete iPropertyWatch;
+    delete iPropertyObserver;
+    }
+
+
+
+// TEST CASES
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiPropertyWatch::UT_CMusUiPropertyWatch_ReadIntPropertyLL()
+    {
+
+    // Teesting leave
+    RProperty::iErrorCode = KErrNotFound;
+    RProperty::iIntProperty = KMusUiTestPropertyReadInteger;
+    TInt value;
+    TRAPD( err, value = CMusUiPropertyWatch::ReadIntPropertyL( KMusUiTestKey ) );
+    EUNIT_ASSERT( err == KErrNotFound );
+
+    // Testing return value
+    RProperty::iErrorCode = KErrNone;
+    RProperty::iIntProperty = KMusUiTestPropertyReadInteger;
+    EUNIT_ASSERT(  CMusUiPropertyWatch::ReadIntPropertyL( KMusUiTestKey ) ==
+                   KMusUiTestPropertyReadInteger );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiPropertyWatch::UT_CMusUiPropertyWatch_ReadDescPropertyLL()
+    {
+    // Teesting leave
+    RProperty::iErrorCode = KErrNotFound;
+    TRAPD( err,  CMusUiPropertyWatch::ReadDescPropertyL( KMusUiTestKey ) );
+    EUNIT_ASSERT( err == KErrNotFound );
+
+    // Testing return value
+    RProperty::iErrorCode = KErrNone;
+    HBufC* result = CMusUiPropertyWatch::ReadDescPropertyL( KMusUiTestKey );
+    EUNIT_ASSERT(  KMusUiTestPropertyReadDesc().Compare( result->Des() ) );
+    delete result;
+
+    //EUNIT_ASSERT( EFalse );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiPropertyWatch::UT_CMusUiPropertyWatch_DoCancelL()
+    {
+    RProperty::iErrorCode = KErrNone;
+    iPropertyWatch->Cancel();
+    EUNIT_ASSERT( RProperty::iCalledFunction == RProperty::ECancel );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiPropertyWatch::UT_CMusUiPropertyWatch_RunLL()
+    {
+
+    // Leave test
+    RProperty::iErrorCode = KErrNotFound;
+    iPropertyWatch->Cancel();
+    TRAPD( err, iPropertyWatch->RunL() );
+    EUNIT_ASSERT( err == KErrNotFound );
+
+
+    // SessionPropertyChanged
+    RProperty::iErrorCode = KErrNone;
+    iPropertyWatch->iPropertyKey = KStatus;
+    iPropertyWatch->Cancel();
+    iPropertyWatch->RunL();
+    EUNIT_ASSERT( iPropertyObserver->iCalledObserver ==
+                  CMusUiPropertyObserverAdapter::ESessionPropertyChanged );
+
+
+    RProperty::iErrorCode = KErrNone;
+    iPropertyWatch->iPropertyKey = KTelNumber;
+    iPropertyWatch->Cancel();
+    iPropertyWatch->RunL();
+    EUNIT_ASSERT( iPropertyObserver->iCalledObserver ==
+                  CMusUiPropertyObserverAdapter::EResourcePropertyChanged );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiPropertyWatch::UT_CMusUiPropertyWatch_RunErrorL()
+    {
+
+    // Allways returns KErrNone
+    RProperty::iErrorCode = KErrNone;
+    EUNIT_ASSERT( iPropertyWatch->RunError( KErrNotFound ) == KErrNone );
+
+    // is right observer called
+    RProperty::iErrorCode = KErrNone;
+    EUNIT_ASSERT( iPropertyObserver->iCalledObserver ==
+                  CMusUiPropertyObserverAdapter::EHandleError );
+    }
+
+
+
+//  TEST TABLE
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusUiPropertyWatch,
+    "UT_CMusUiPropertyWatch",
+    "UNIT" )
+
+EUNIT_TEST(
+    "ReadIntPropertyLL - test ",
+    "CMusUiPropertyWatch",
+    "ReadIntPropertyLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiPropertyWatch_ReadIntPropertyLL, Teardown)
+
+EUNIT_TEST(
+    "ReadDescPropertyLL - test ",
+    "CMusUiPropertyWatch",
+    "ReadDescPropertyLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiPropertyWatch_ReadDescPropertyLL, Teardown)
+
+EUNIT_TEST(
+    "DoCancelL - test ",
+    "CMusUiPropertyWatch",
+    "DoCancelL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiPropertyWatch_DoCancelL, Teardown)
+
+EUNIT_TEST(
+    "RunLL - test ",
+    "CMusUiPropertyWatch",
+    "RunLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiPropertyWatch_RunLL, Teardown)
+
+EUNIT_TEST(
+    "RunErrorL - test ",
+    "CMusUiPropertyWatch",
+    "RunErrorL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiPropertyWatch_RunErrorL, Teardown)
+
+
+EUNIT_END_TEST_TABLE
+
+//  END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/ut_musuireceivecontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,758 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+//  INTERNAL INCLUDES
+#include "ut_musuireceivecontroller.h"
+#include "musuireceivecontroller.h"
+#include "musuireceiveobserveradapter.h"
+//#include "musestubs.h"
+//#include "musengtestdefs.h"
+#include "musuieventobserveradapter.h"
+#include "musuidefinitions.h"
+#include <musengreceivesession.h>
+#include <stringloader.h>
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/eunitmacros.h>
+#include <e32property.h>
+#include <aknappui.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiReceiveController* UT_CMusUiReceiveController::NewL()
+    {
+    UT_CMusUiReceiveController* self = UT_CMusUiReceiveController::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiReceiveController* UT_CMusUiReceiveController::NewLC()
+    {
+    UT_CMusUiReceiveController* self = new( ELeave ) UT_CMusUiReceiveController();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiReceiveController::~UT_CMusUiReceiveController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Default constructor
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiReceiveController::UT_CMusUiReceiveController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase construct
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::ConstructL()
+    {
+    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
+    // It generates the test case table.
+    CEUnitTestSuiteClass::ConstructL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::SetupL()
+    {
+      
+    iEventObserver = new (ELeave) CMusUiEventObserverAdapter();
+    EUNIT_ASSERT( iEventObserver );
+
+    iReceiveObserverAdapter = new (ELeave) CMusUiReceiveObserverAdapter();
+    EUNIT_ASSERT( iReceiveObserverAdapter );
+
+
+    RProperty::iIntProperty = 0;
+    RProperty::iErrorCode = KErrNone;
+
+
+    iReceiveController = CMusUiReceiveController::NewL( *iReceiveObserverAdapter, TRect( 0,0,100,100));
+    iEventController = static_cast<CMusUiEventController*>
+                        ( iReceiveController );
+
+    EUNIT_ASSERT( iEventController );
+    iEventController->SetEventObserver( iEventObserver );
+    EUNIT_ASSERT( iEventController->iObserver == iEventObserver );  
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::Teardown()
+    {
+    delete iReceiveController;
+    iEventController = NULL;
+    delete iEventObserver;
+    delete iReceiveObserverAdapter;
+   }
+
+
+
+// TEST CASES
+
+    
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_HandleCommandLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_SizeChangedL()
+    {
+    
+    TRect rect = TRect( 0,0, 100, 100 );
+    
+    iReceiveController->iSession->iRect = rect;
+    iReceiveController->SizeChanged( rect );
+    EUNIT_ASSERT( iReceiveController->iSession->iRect == iReceiveController->CenteredRect( rect ) );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ShowErrorDialogLL()
+    {
+    _LIT( KRes, "res" );
+    //StringLoader::iReturnValue = KRes().AllocLC();
+    iReceiveController->ShowErrorDialogL( 1 );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EShowErrorDialog );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_HandleIncomingSessionLL()
+    {
+    _LIT( KRes, "originator" );
+
+    // Not initalized 
+    delete iReceiveController->iOriginator;
+    iReceiveController->iOriginator = NULL;
+    iReceiveController->HandleIncomingSessionL( KRes );
+    EUNIT_ASSERT( iReceiveController->iOriginator->Des().Compare( KRes ) == 0 );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EShowInvitationQueryL );
+
+
+    _LIT( KEmpty, "" );
+    // Initalized 
+    delete iReceiveController->iOriginator;
+    iReceiveController->iOriginator = KEmpty().AllocL();
+    iReceiveController->HandleIncomingSessionL( KRes );
+    EUNIT_ASSERT( iReceiveController->iOriginator->Des().Compare( KRes ) == 0 );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EShowInvitationQueryL );
+
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_CancelInvitationLL()
+    {
+    iReceiveController->CancelInvitationL();
+    EUNIT_ASSERT( !iReceiveController->iSession->iAccepInvitation );
+    }
+
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ContinueInvitationLL()
+    {
+    iReceiveController->ContinueInvitationL();
+    EUNIT_ASSERT( ETrue );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_HandleAsyncEventLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ConnectionEstablishedL()
+    {
+    iReceiveController->iConnectionEstablished = ETrue;
+    EUNIT_ASSERT( iReceiveController->ConnectionEstablished() );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_PlayLL()
+    {
+    iReceiveController->PlayL();
+    EUNIT_ASSERT( ETrue );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_PauseLL()
+    {
+    iReceiveController->PauseL();
+    EUNIT_ASSERT( ETrue );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_EnableDisplayLL()
+    {
+    iReceiveController->iSession->iDisplayEnabled = EFalse;
+    iReceiveController->EnableDisplayL( ETrue );
+    EUNIT_ASSERT( iReceiveController->iSession->iDisplayEnabled );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ShowNaviPaneIconLL()
+    {
+    iReceiveController->ShowNaviPaneIconL( EMusUiNaviIconPlay );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iIcon == EMusUiNaviIconPlay );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iVisible );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EShowNaviPaneIconL );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ChangeOrientationLL()
+    {
+
+    iReceiveController->ChangeOrientationL( CAknAppUiBase::EAppUiOrientationPortrait );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iOrientation == CAknAppUiBase::EAppUiOrientationPortrait );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EChangeOrientationL );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_CenteredRectL()
+    {
+    
+    
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ManualAddressTypedL()
+    {
+    EUNIT_ASSERT( !iReceiveController->ManualAddressTyped() );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ShowInformationDialogLL()
+    {
+    iReceiveController->ShowInformationDialogL( 12 );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iResourceId == 12 );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EShowInformationDialogL );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ShutdownLL()
+    {
+    iReceiveController->HandleExitL();
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EHandleExitL );
+    }
+    
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_IncomingSessionL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_StreamBufferingL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_SessionEstablishedL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_SessionTerminatedL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_SessionConnectionLostL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_SessionFailedL()
+    {
+    iReceiveController->SessionFailed();
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EDismissWaitDialogL );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_StreamIdleL()
+    {
+    iReceiveController->StreamIdle();
+    EUNIT_ASSERT( ETrue );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_StreamStreamingL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }	
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_SessionTimeChangedL()
+    {
+    iReceiveController->SessionTimeChanged( TTimeIntervalSeconds( 13  ) );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EUpdateSessionTime );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_InactivityTimeoutL()
+    {
+    iReceiveController->HandleExitL();
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EHandleExitL );
+    }
+	
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_InvitationAcceptedLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_InvitationRejectedLL()
+    {
+    iReceiveController->InvitationRejectedL();
+    EUNIT_ASSERT( !iReceiveController->iSession->iAccepInvitation );
+    EUNIT_ASSERT( iReceiveObserverAdapter->iCalledObserver == CMusUiReceiveObserverAdapter::EHandleExitL );
+    }
+	
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_UpdateStatusPaneLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_InspectVideoPlayerLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiReceiveController::UT_CMusUiReceiveController_ShowWaitDialogLL()
+    {
+    EUNIT_ASSERT( EFalse );
+    }
+    
+
+
+
+//  TEST TABLE
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusUiReceiveController,
+    "UT_CMusUiReceiveController",
+    "UNIT" )
+
+EUNIT_TEST(
+    "HandleCommandLL - test ",
+    "CMusUiReceiveController",
+    "HandleCommandLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_HandleCommandLL, Teardown)
+
+EUNIT_TEST(
+    "SizeChangedL - test ",
+    "CMusUiReceiveController",
+    "SizeChangedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_SizeChangedL, Teardown)
+
+EUNIT_TEST(
+    "ShowErrorDialogLL - test ",
+    "CMusUiReceiveController",
+    "ShowErrorDialogLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ShowErrorDialogLL, Teardown)
+
+EUNIT_TEST(
+    "HandleIncomingSessionLL - test ",
+    "CMusUiReceiveController",
+    "HandleIncomingSessionLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_HandleIncomingSessionLL, Teardown)
+
+EUNIT_TEST(
+    "CancelInvitationLL - test ",
+    "CMusUiReceiveController",
+    "CancelInvitationLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_CancelInvitationLL, Teardown)
+
+EUNIT_TEST(
+    "ContinueInvitationLL - test ",
+    "CMusUiReceiveController",
+    "ContinueInvitationLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ContinueInvitationLL, Teardown)
+
+EUNIT_TEST(
+    "HandleAsyncEventLL - test ",
+    "CMusUiReceiveController",
+    "HandleAsyncEventLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_HandleAsyncEventLL, Teardown)
+
+EUNIT_TEST(
+    "ConnectionEstablishedL - test ",
+    "CMusUiReceiveController",
+    "ConnectionEstablishedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ConnectionEstablishedL, Teardown)
+
+EUNIT_TEST(
+    "PlayLL - test ",
+    "CMusUiReceiveController",
+    "PlayLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_PlayLL, Teardown)
+
+EUNIT_TEST(
+    "PauseLL - test ",
+    "CMusUiReceiveController",
+    "PauseLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_PauseLL, Teardown)
+
+EUNIT_TEST(
+    "EnableDisplayLL - test ",
+    "CMusUiReceiveController",
+    "EnableDisplayLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_EnableDisplayLL, Teardown)
+
+EUNIT_TEST(
+    "ShowNaviPaneIconLL - test ",
+    "CMusUiReceiveController",
+    "ShowNaviPaneIconLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ShowNaviPaneIconLL, Teardown)
+
+EUNIT_TEST(
+    "ChangeOrientationLL - test ",
+    "CMusUiReceiveController",
+    "ChangeOrientationLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ChangeOrientationLL, Teardown)
+
+EUNIT_TEST(
+    "CenteredRectL - test ",
+    "CMusUiReceiveController",
+    "CenteredRectL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_CenteredRectL, Teardown)
+
+EUNIT_TEST(
+    "ManualAddressTypedL - test ",
+    "CMusUiReceiveController",
+    "ManualAddressTypedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ManualAddressTypedL, Teardown)
+
+EUNIT_TEST(
+    "ShowInformationDialogLL - test ",
+    "CMusUiReceiveController",
+    "ShowInformationDialogLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ShowInformationDialogLL, Teardown)
+
+EUNIT_TEST(
+    "ShowInformationDialogLL - test ",
+    "CMusUiReceiveController",
+    "ShowInformationDialogLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ShowInformationDialogLL, Teardown)
+
+EUNIT_TEST(
+    "ShutdownLL - test ",
+    "CMusUiReceiveController",
+    "ShutdownLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ShutdownLL, Teardown)
+
+EUNIT_TEST(
+    "IncomingSessionL - test ",
+    "CMusUiReceiveController",
+    "IncomingSessionL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_IncomingSessionL, Teardown)
+
+EUNIT_TEST(
+    "StreamBufferingL - test ",
+    "CMusUiReceiveController",
+    "StreamBufferingL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_StreamBufferingL, Teardown)
+
+EUNIT_TEST(
+    "SessionEstablishedL - test ",
+    "CMusUiReceiveController",
+    "SessionEstablishedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_SessionEstablishedL, Teardown)
+
+EUNIT_TEST(
+    "SessionTerminatedL - test ",
+    "CMusUiReceiveController",
+    "SessionTerminatedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_SessionTerminatedL, Teardown)
+
+EUNIT_TEST(
+    "SessionConnectionLostL - test ",
+    "CMusUiReceiveController",
+    "SessionConnectionLostL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_SessionConnectionLostL, Teardown)
+
+EUNIT_TEST(
+    "SessionFailedL - test ",
+    "CMusUiReceiveController",
+    "SessionFailedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_SessionFailedL, Teardown)
+
+EUNIT_TEST(
+    "StreamIdleL - test ",
+    "CMusUiReceiveController",
+    "StreamIdleL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_StreamIdleL, Teardown)
+
+EUNIT_TEST(
+    "StreamStreamingL - test ",
+    "CMusUiReceiveController",
+    "StreamStreamingL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_StreamStreamingL, Teardown)
+
+EUNIT_TEST(
+    "SessionTimeChangedL - test ",
+    "CMusUiReceiveController",
+    "SessionTimeChangedL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_SessionTimeChangedL, Teardown)
+
+EUNIT_TEST(
+    "InactivityTimeoutL - test ",
+    "CMusUiReceiveController",
+    "InactivityTimeoutL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_InactivityTimeoutL, Teardown)
+
+EUNIT_TEST(
+    "InvitationAcceptedLL - test ",
+    "CMusUiReceiveController",
+    "InvitationAcceptedLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_InvitationAcceptedLL, Teardown)
+
+EUNIT_TEST(
+    "InvitationRejectedLL - test ",
+    "CMusUiReceiveController",
+    "InvitationRejectedLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_InvitationRejectedLL, Teardown)
+
+EUNIT_TEST(
+    "UpdateStatusPaneLL - test ",
+    "CMusUiReceiveController",
+    "UpdateStatusPaneLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_UpdateStatusPaneLL, Teardown)
+
+EUNIT_TEST(
+    "InspectVideoPlayerLL - test ",
+    "CMusUiReceiveController",
+    "InspectVideoPlayerLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_InspectVideoPlayerLL, Teardown)
+
+EUNIT_TEST(
+    "ShowWaitDialogLL - test ",
+    "CMusUiReceiveController",
+    "ShowWaitDialogLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiReceiveController_ShowWaitDialogLL, Teardown)
+
+
+EUNIT_END_TEST_TABLE
+
+//  END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/mmshui/tsrc/ut_ui/src/ut_musuistartcontroller.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,231 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+//  INTERNAL INCLUDES
+#include "ut_musuistartcontroller.h"
+#include "musuistartcontroller.h"
+
+#include "musuidefinitions.h"
+#include "musmanagercommon.h"
+
+#include "musuieventobserveradapter.h"
+
+#include <e32Property.h>
+
+
+//  SYSTEM INCLUDES
+#include <digia/eunit/eunitmacros.h>
+//#include <centralrepository.h>
+//#include <mcedisplaysink.h>
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiStartController* UT_CMusUiStartController::NewL()
+    {
+    UT_CMusUiStartController* self = UT_CMusUiStartController::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiStartController* UT_CMusUiStartController::NewLC()
+    {
+    UT_CMusUiStartController* self = new( ELeave ) UT_CMusUiStartController();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiStartController::~UT_CMusUiStartController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Default constructor
+// -----------------------------------------------------------------------------
+//
+UT_CMusUiStartController::UT_CMusUiStartController()
+    {
+    // NOP
+    }
+
+
+// -----------------------------------------------------------------------------
+// Second phase construct
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiStartController::ConstructL()
+    {
+    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
+    // It generates the test case table.
+    CEUnitTestSuiteClass::ConstructL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiStartController::SetupL()
+    {
+    iEventObserver = new (ELeave) CMusUiEventObserverAdapter();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiStartController::Teardown()
+    {
+
+    delete iEventObserver;
+
+    // Tests are made in construction phase
+    // Because class implementation is constructor based
+
+    }
+
+
+
+// TEST CASES
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiStartController::UT_CMusUiStartController_UseCasePropertyLL()
+    {
+    EUNIT_ASSERT( iEventObserver );
+
+    // Testing leave
+    RProperty::iErrorCode = KErrNotFound;
+    TRAPD( err, CMusUiStartController::NewL( *iEventObserver ) );
+    EUNIT_ASSERT( err == KErrNotFound );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusUiStartController::UT_CMusUiStartController_SetStartViewLL()
+    {
+    EUNIT_ASSERT( iEventObserver );
+
+    // Testing leave
+    RProperty::iErrorCode = KErrNotFound;
+    RProperty::iIntProperty = -9999;
+    iEventObserver->iErrorCode = KErrNone;
+    TRAPD( err, CMusUiStartController::NewL( *iEventObserver ) );
+    EUNIT_ASSERT( err == KErrNotFound );
+
+    // Testing leave
+    RProperty::iErrorCode = KErrNone;
+    RProperty::iIntProperty = -9999;
+    iEventObserver->iErrorCode = KErrCancel;
+    TRAP( err, CMusUiStartController::NewL( *iEventObserver ) );
+    EUNIT_ASSERT( err == KErrCancel );
+
+    // case default
+
+    RProperty::iErrorCode = KErrNone;
+    RProperty::iIntProperty = -9999;
+    iEventObserver->iErrorCode = KErrNone;
+    CMusUiStartController* scdefault = CMusUiStartController::NewL( *iEventObserver );
+    EUNIT_ASSERT( iEventObserver->iCalledObserver == CMusUiEventObserverAdapter::EHandleExitL );
+
+    delete scdefault;
+
+    // case EMusLiveVideo
+
+    RProperty::iErrorCode = KErrNone;
+    RProperty::iIntProperty = EMusLiveVideo;
+    iEventObserver->iErrorCode = KErrNone;
+    CMusUiStartController* sclive = CMusUiStartController::NewL( *iEventObserver );
+    EUNIT_ASSERT( iEventObserver->iCalledObserver == CMusUiEventObserverAdapter::EActivateLocalMusViewL );
+    EUNIT_ASSERT( iEventObserver->iViewId == KMusUidLiveSharingView );
+
+    delete sclive;
+
+    // case EMusClipVideo
+
+    RProperty::iErrorCode = KErrNone;
+    RProperty::iIntProperty = EMusClipVideo;
+    iEventObserver->iErrorCode = KErrNone;
+    CMusUiStartController* scclip = CMusUiStartController::NewL( *iEventObserver );
+    EUNIT_ASSERT( iEventObserver->iCalledObserver == CMusUiEventObserverAdapter::EActivateLocalMusViewL );
+    EUNIT_ASSERT( iEventObserver->iViewId == KMusUidClipSharingView );
+
+    delete scclip;
+
+    // case EMusReceive
+
+    RProperty::iErrorCode = KErrNone;
+    RProperty::iIntProperty = EMusReceive;
+    iEventObserver->iErrorCode = KErrNone;
+    CMusUiStartController* screceive = CMusUiStartController::NewL( *iEventObserver );
+    EUNIT_ASSERT( iEventObserver->iCalledObserver == CMusUiEventObserverAdapter::EActivateLocalMusViewL );
+    EUNIT_ASSERT( iEventObserver->iViewId == KMusUidReceivingView );
+
+    delete screceive;
+
+    }
+
+
+
+
+//  TEST TABLE
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusUiStartController,
+    "UT_CMusUiStartController",
+    "UNIT" )
+
+EUNIT_TEST(
+    "UseCasePropertyLL - test ",
+    "CMusUiStartController",
+    "UseCasePropertyLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiStartController_UseCasePropertyLL, Teardown)
+
+EUNIT_TEST(
+    "SetStartViewLL - test ",
+    "CMusUiStartController",
+    "SetStartViewLL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusUiStartController_SetStartViewLL, Teardown)
+
+EUNIT_END_TEST_TABLE
+
+//  END OF FILE
--- a/mmsharinguis.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#                                                                    
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).   
-# All rights reserved.                                                
-# This component and the accompanying materials are made available    
-# under the terms of "Eclipse Public License v1.0"    
-# which accompanies this distribution, and is available               
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".   
-#                                                                     
-# Initial Contributors:                                               
-# Nokia Corporation - initial contribution.                           
-#                                                                     
-# Contributors:                                                       
-#                                                                     
-# Description:                                                        
-#                                                                     
-#
-
-TEMPLATE = subdirs
-CONFIG += ordered
-
-symbian: {
-    :BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
-    :BLD_INF_RULES.prj_exports += "rom/multimediasharing.iby CORE_APP_LAYER_IBY_EXPORT_PATH(multimediasharing.iby)"
-    :BLD_INF_RULES.prj_exports += "rom/multimediasharingresources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(multimediasharingresources.iby)"
-    :BLD_INF_RULES.prj_exports += "rom/multimediasharing_stub.SIS /epoc32/data/z/system/install/multimediasharing_stub.SIS"
-    
-    :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"mmsharinguis_plat/group/bld.inf\""
-    :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"mmshplugins/group/bld.inf\""   
-    :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"mmsharing/mmshapp/help/group/bld.inf\""
-}
-
-SUBDIRS += mmsharing/group
--- a/mmsharinguis_plat/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharinguis_plat/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -17,7 +17,7 @@
 */
 
 
-#include "../live_comms_plugin_api/group/bld.inf"
+
 #include "../multimedia_sharing_settings_api/group/bld.inf"
 #include "../multimedia_sharing_resource_api/group/bld.inf"
 #include "../multimedia_sharing_manager_api/group/bld.inf"
--- a/mmsharinguis_plat/live_comms_plugin_api/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The exported files for Live Comms plug-in API               
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/lcaudiocontrol.h APP_LAYER_PLATFORM_EXPORT_PATH(lcaudiocontrol.h)
-../inc/lcbrightnesscontrol.h APP_LAYER_PLATFORM_EXPORT_PATH(lcbrightnesscontrol.h)
-../inc/lccameracontrol.h APP_LAYER_PLATFORM_EXPORT_PATH(lccameracontrol.h)
-../inc/lcdestinationfilecontrol.h APP_LAYER_PLATFORM_EXPORT_PATH(lcdestinationfilecontrol.h)
-../inc/lcengine.h APP_LAYER_PLATFORM_EXPORT_PATH(lcengine.h)
-../inc/lcengine.inl APP_LAYER_PLATFORM_EXPORT_PATH(lcengine.inl)
-../inc/lcsession.h APP_LAYER_PLATFORM_EXPORT_PATH(lcsession.h)
-../inc/lcsessionobserver.h APP_LAYER_PLATFORM_EXPORT_PATH(lcsessionobserver.h)
-../inc/lcsourcefilecontrol.h APP_LAYER_PLATFORM_EXPORT_PATH(lcsourcefilecontrol.h)
-../inc/lcuiprovider.h APP_LAYER_PLATFORM_EXPORT_PATH(lcuiprovider.h)
-../inc/lcvideoplayer.h APP_LAYER_PLATFORM_EXPORT_PATH(lcvideoplayer.h)
-../inc/lcwindow.h APP_LAYER_PLATFORM_EXPORT_PATH(lcwindow.h)
-../inc/lczoomcontrol.h APP_LAYER_PLATFORM_EXPORT_PATH(lczoomcontrol.h)
-
-PRJ_TESTMMPFILES
\ No newline at end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcaudiocontrol.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCAUDIOCONTROL_H
-#define MLCAUDIOCONTROL_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-/**
-* Class for adjusting the audio related settings 
-* such as muting and unmuting the audio and changing its volume level.
-*/
-class MLcAudioControl
-    {
-    public:
-
-        /**
-        * Checks whether the local audio has been muted.
-        * @return ETrue if the local audio has been muted, otherwise EFalse.
-        */
-        virtual TBool IsLcAudioMutedL() = 0;
-
-        /**
-        * Mutes / unmutes the local audio.
-        * @param aMute ETrue mutes the audio, EFalse unmutes it.
-        */
-    	virtual void MuteLcAudioL( TBool aMute ) = 0;    	
-
-    	/**
-    	* Checks whether the microphone has been muted,
-    	* @return ETrue if the microphone has been muted, otherwise EFalse.
-    	*/
-        virtual TBool IsLcMicMutedL() = 0;    
-
-        /**
-        * Mutes / unmutes the microphone.
-        * @param aMute ETrue mutes the microphone, EFalse unmutes it.
-        */
-        virtual void MuteLcMicL( TBool aMute ) = 0;
-
-        /**
-        * Checks whether it is allowed 
-        * to enable the loudspeaker by calling EnableLcLoudspeakerL.
-        * @return ETrue if enabling the loudspeaker is allowed, otherwise EFalse. 
-        */
-        virtual TBool IsEnablingLcLoudspeakerAllowed() = 0;
-        
-        /**
-        * Enables / disables the loudspeaker.
-        * @pre IsEnablingLcLoudspeakerAllowed() == ETrue
-        * @param aEnabled ETrue enables the loudspeaker, EFalse disables it.
-        */
-        virtual void EnableLcLoudspeakerL( TBool aEnabled ) = 0;
-        
-        /**
-        * Checks whether the loudspeaker has been enabled.
-        * @return ETrue if the loudspeaker has been enabled, otherwise EFalse.
-        */
-        virtual TBool IsLcLoudspeakerEnabled() = 0;
-
-        /**
-        * Returns the current volume level.
-        * @return the current volume level
-        */
-        virtual TInt LcVolumeL() = 0;
-     
-        /**
-        * Sets the volume level.
-        * @param aValue the volume level
-        */
-        virtual void SetLcVolumeL( TInt aValue ) = 0;    
-    
-        /**
-        * Increases the volume level by one step.
-        */
-        virtual void IncreaseLcVolumeL() = 0;
-        
-        /**
-        * Decreases the volume level by one step.
-        */
-        virtual void DecreaseLcVolumeL() = 0;        
-    };
-
-#endif // MLCAUDIOCONTROL_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcbrightnesscontrol.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCBRIGHTNESSCONTROL_H
-#define MLCBRIGHTNESSCONTROL_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-/**
-* Class for adjusting the brightness of a video.
-*/
-class MLcBrightnessControl
-    {
-    public:
-
-        /**
-        * Returns the minimum brightness level.
-        * @return the minimum brightness level
-        */
-        virtual TInt MinLcBrightnessL() = 0;
-
-        /**
-        * Returns the maximum brightness level.
-        * @return the maximum brightness level
-        */
-        virtual TInt MaxLcBrightnessL() = 0;
-
-        /**
-        * Returns the current brightness level.
-        * @return the current brightness level
-        */
-        virtual TInt LcBrightnessL() = 0;
-
-        /**
-        * Sets the brightness level.
-        * @pre aValue >= MinLcBrightnessL && aValue <= MaxLcBrightnessL
-        * @param aValue the new brightness level
-        */
-        virtual void SetLcBrightnessL( TInt aValue ) = 0;
-        
-        /**
-        * Increments the brightness level by one step.
-        */
-        virtual void IncreaseLcBrightnessL() = 0;
-        
-        /**
-        * Decrements the brightness level by one step.
-        */
-        virtual void DecreaseLcBrightnessL() = 0; 
-    };
-
-#endif // MLCBRIGHTNESSCONTROL_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lccameracontrol.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCCAMERACONTROL_H
-#define MLCCAMERACONTROL_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-/**
-* Class for querying the device's camera capabilities 
-* and switching between the device's cameras. 
-*/
-class MLcCameraControl
-    {
-    public:
-
-        /**
-        * Returns the count of cameras available in the device.
-        * @return the count of cameras in the device
-        */
-        virtual TInt LcCameraCountL() = 0;
-
-        /**
-        * Return the index of the currently used camera.
-        * @return the camera index
-        */
-        virtual TInt CurrentLcCameraIndex() = 0;
-        
-        /**
-        * Switches to the next camera available in the device.
-        * For example, if there are three cameras in the device,
-        * the first call switches from camera 1 to camera 2, 
-        * the second call switches from camera 2 to camera 3 and
-        * the third call switches from camera 3 to camera 1. 
-        */
-        virtual void ToggleLcCameraL() = 0;
-    };
-
-#endif // MLCCAMERACONTROL_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcdestinationfilecontrol.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCDESTINATIONFILECONTROL_H
-#define MLCDESTINATIONFILECONTROL_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-/**
-* Class for controlling the usage of a destination file for a player.
-*/
-class MLcDestinationFileControl
-    {
-    public: 
-        
-        /**
-        * Sets the name of the destination file.
-        * @param aFileName the file name
-        */
-        virtual void SetLcFileNameL( const TFileName& aFileName ) = 0;
-        
-        /**
-        * Returns the name of the destination file.
-        * @return the file name
-        */
-        virtual TFileName& LcFileName() = 0;
-
-        /**
-        * Starts or pauses recording
-        */
-        virtual void LcRecordL( TBool aRecord ) = 0;
-
-        /**
-        * Checks whether recording is paused or not
-        */
-        virtual TBool LcIsRecording() = 0;    
-    };
-
-#endif // MLCDESTINATIONFILECONTROL_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcengine.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef CLCENGINE_H
-#define CLCENGINE_H
-
-// INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class MLcSession;
-
-// CONSTANTS
-/** Interface UID of this ECOM interface */
-const TUid KLcEngineInterfaceUid = { 0x20021340 };
-
-// CLASS DECLARATION
-/**
-* A base class for ECom plug-ins implementing
-* the Live Comms engine plug-in API. 
-*/
-class CLcEngine : public CBase
-    {
-    public: // Enumerations
-
-        /**
-        * The list of plug-in configurable features.
-        */
-        enum TLcFeature
-            {
-            ELcShowInvitingNote,
-            ELcShowWaitingNote,
-            ELcShowAcceptQuery,
-            ELcSendVideoQuery
-            };
-
-    public: // Constructors and destructor
-    
-        /**
-        * Loads and creats an instance of the plug-in.
-        * @param aEngineName used in finding the correct implementation.
-        * Matched to the IMPLEMENTATION_INFO / default_data of the plug-in.
-        * @return a new instance of CLcEngine, the ownership is transferred
-        */
-        inline static CLcEngine* NewL( const TDesC8& aEngineName );
-    
-        /**
-        * Destructor
-        */
-        inline ~CLcEngine();
-
-    public: // New pure virtual functions
-    
-        /**
-        * Returns a reference to the session created by the plug-in.
-        * @return the session
-        */
-        virtual MLcSession& Session() = 0;
-
-    public: // New virtual functions    
-        
-        /**
-        * Checks if a feature should be used with the particular engine.
-        * @param aLcFeature the identifier of the feature
-        * @return ETrue if the feature is supported, otherwise EFalse.
-        */
-        inline virtual TBool IsFeatureSupported( TLcFeature aLcFeature );
-
-    protected: // Constructors
-
-        inline CLcEngine();
-    
-    public: // Data
-
-        TUid iInstanceKey;
-    };
-
-#include "lcengine.inl"    
-    
-#endif // CLCENGINE_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcengine.inl	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef CLCENGINE_INL
-#define CLCENGINE_INL
-
-// INCLUDES
-#include <ecom/ecom.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcEngine* CLcEngine::NewL( const TDesC8& aEngineName )
-    {
-    TEComResolverParams resolverParams;
-    resolverParams.SetDataType( aEngineName );      
-    return reinterpret_cast< CLcEngine* >(
-        REComSession::CreateImplementationL(
-            KLcEngineInterfaceUid,
-            _FOFF( CLcEngine, iInstanceKey ),
-            resolverParams ) );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcEngine::CLcEngine()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CLcEngine::~CLcEngine()
-    {
-    REComSession::DestroyedImplementation( iInstanceKey );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//    
-TBool CLcEngine::IsFeatureSupported( TLcFeature /*aLcFeature*/ )
-    {
-    return EFalse;
-    }
-
-#endif // CLCENGINE_INL
-
-// End of File
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCSESSION_H
-#define MLCSESSION_H
-
-// INCLUDES
-#include <e32std.h>
-
-// FORWARD DECLARATIONS
-class MLcSessionObserver;
-class MLcUiProvider;
-class MLcVideoPlayer;
-
-// CLASS DECLARATION
-/**
-* A class representing a Live Comms session. 
-*/
-class MLcSession
-    {
-    public:
-
-        /**
-        * The list of possible session states.
-        */
-        enum TLcSessionState
-            {
-            EUninitialized,
-            EInitialized,
-            EReceived,
-            EOpening,
-            EOpen,
-            EClosing,
-            EClosed
-            };
-
-        /**
-        * The possible failure reasons for a session.
-        */
-        enum TLcSessionFailure
-            {
-            ENoAnswer = 1,
-            ERecipientNotFound,
-            ESessionCancelled,
-            ESessionRejected,
-            ERecipientBusy,
-            ERecipientTemporarilyNotAvailable,
-            EDiskFull,
-            EConnectionLost,
-            EMediaInactivityTimeout,
-            };
-        
-        /**
-        * Returns the current session state.
-        * @return the session state
-        */
-        virtual TLcSessionState LcSessionState() const = 0;
-
-        /**
-        * Sets the observer for the session related events.
-        * @param aObserver the observer
-        */
-        virtual void SetLcSessionObserver( MLcSessionObserver* aObserver ) = 0;
-
-        /**
-        * Sets the callback for the UI prompts.
-        * @param aUiProvider callback for UI prompts
-        */
-        virtual void SetLcUiProvider( MLcUiProvider* aUiProvider ) = 0;        
-        
-        /**
-        * Establishes the session.
-        * In case of a MO session initiates the session negotiation.
-        * In case of a MT session accepts the incoming session. 
-        */
-        virtual void EstablishLcSessionL() = 0;
-    
-        /**
-        * Terminates the session.
-        * Can be used for terminating an existing session as well as 
-        * cancelling a MO session that has not yet been established.
-        * Can also be used for rejecting an incoming session.  
-        */
-        virtual void TerminateLcSessionL() = 0;
-       
-        /**
-        * Returns the video player for the received media.
-        * Is present if the session contains video 
-        * received from the remote participant.
-        * @return the remote video player or NULL if not present
-        */
-        virtual MLcVideoPlayer* RemoteVideoPlayer() = 0;
-    
-        /**
-        * Returns the video player for the media that is being sent.
-        * Is present if the session contains outgoing video.
-        * @return the local video player or NULL if not present
-        */
-        virtual MLcVideoPlayer* LocalVideoPlayer() = 0;
-       
-        /**
-        * Returns the own display name for the session.
-        * @return the local display name or KNullDesC if local
-        * display name is not known
-        */
-        virtual const TDesC& LocalDisplayName() = 0;
-    
-        /**
-        * Returns the remote party's display name for the session.
-        * @return the remote display name or KNullDesC if remote 
-        * display name is not known
-        */
-        virtual const TDesC& RemoteDisplayName() = 0;
-
-        /**
-        * Sets a parameter for the session.
-        * The parameters can be plug-in specific.
-        * @param aId the identifier for the parameter
-        * @param aValue the value for the parameter
-        */
-        virtual TInt SetParameter( TInt aId, TInt aValue ) = 0;
-
-        /**
-        * Returns a value for a session parameter.
-        * @param aId the identifier for the parameter
-        * @return the value for the parameter or an error if not present
-        */
-        virtual TInt ParameterValue( TInt aId ) = 0;        
-        
-        /**
-        * Checks whether application should be started in background mode. 
-        * In background mode session will be pre-set up without user   
-        * interaction and will be in paused state.
-        * @return ETrue if background mode should be used
-        */
-        virtual TBool IsBackgroundStartup() = 0;
-        
-        /**
-        * Engine can be informed about application foreground status via
-        * this method.
-        * @param aIsForeground ETrue if application is at foreground, EFalse
-        *   if at background
-        * @return KErrNone if succesfully handled
-        */
-        virtual TInt SetForegroundStatus( TBool aIsForeground ) = 0;
-        
-        /**
-        * Returns remote party details for the session
-        * @return remote party details or KNullDesC if those are not known
-        */
-        virtual const TDesC& RemoteDetails() = 0;
-        
-        /**
-        * Updates established session. 
-        * All the changes, if they are not yet delivered, to players, windows 
-        * and session parameters has been commited after the call.
-        */
-        virtual void UpdateLcSessionL() = 0;
-        
-        /**
-        * Send DTMF signals. 
-        * @param aKey Key pressed from dialpad. Key can be  [0-9],*,#,A,B,C,D.
-        * which is 16 key combination of DTMF.
-        * Send DTMF signals to remote party.
-        * @return ETrue upon success else EFalse.
-        */
-        virtual TBool SendDialTone( TChar aKey) = 0;
-    };
-    
-#endif // MLCSESSION_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcsessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCSESSIONOBSERVER_H
-#define MLCSESSIONOBSERVER_H
-
-// INCLUDES
-#include <e32std.h>
-
-// FORWARD DECLARATIONS
-class MLcSession;
-class MLcVideoPlayer;
-
-// CLASS DECLARATION
-/**
-* A callback for a Live Comms session related events. 
-*/
-class MLcSessionObserver
-    {
-    public:
-
-        /**
-        * The state of the session has changed.
-        * The new state can be obtained from the session.
-        * @param aSession the session
-        */
-        virtual void StateChanged( MLcSession& aSession ) = 0;
-    
-        /**
-        * The state of the player has changed.
-        * The new state can be obtained from the player.
-        * @param aPlayer the player
-        */
-        virtual void StateChanged( MLcVideoPlayer& aPlayer ) = 0;
-    
-        /**
-        * The session has been updated.
-        * For example a new player has been added.
-        * @param aSession the updated session
-        */
-        virtual void Updated( MLcSession& aSession ) = 0;
-
-        /**
-        * The session has been updated.
-        * For example a new control has been added or 
-        * an existing control has been updated.
-        * @param aPlayer the updated player
-        */
-        virtual void Updated( MLcVideoPlayer& aPlayer ) = 0;
-    
-        /**
-        * The session has failed.
-        * @param aSession the failed session
-        * @param aError the reason for the failure 
-        */
-    	virtual void Failed( 
-            MLcSession& aSession,
-            TInt aError ) = 0;
-    
-    	/**
-    	* The player has failed.
-    	* @param aPlayer the failed player
-    	* @param aError the reason for the failure 
-    	*/
-        virtual void Failed( 
-            MLcVideoPlayer& aPlayer, 
-            TInt aError ) = 0;
-    
-        /**
-        * The session duration time has changed.
-        * @param aSession the session
-        * @param aSeconds the current session duration.
-        */
-        virtual void SessionTimeChanged( 
-            MLcSession& aSession,
-            const TTimeIntervalSeconds& aSeconds ) = 0;
-    };   
-    
-#endif // MLCSESSIONOBSERVER_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcsourcefilecontrol.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCSOURCEFILECONTROL_H
-#define MLCSOURCEFILECONTROL_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-/**
-* Class for controlling the usage of a source file for a player.
-*/
-class MLcSourceFileControl
-    {
-    public: 
-        
-        /**
-        * Sets the name of the source file.
-        * @param aFileName the file name
-        */
-        virtual void SetLcFileNameL( const TFileName& aFileName ) = 0;
-        
-        /**
-        * Returns the name of the source file.
-        * @return the file name
-        */
-        virtual TFileName& LcFileName() = 0;
- 
-        /**
-        * Starts or stops fast forwarding the file. 
-        * The file is left paused after stopping the fast forwarding.
-        * @param aUseFFWD ETrue to start FFWD, EFalse to stop it.
-        */       
-        virtual void LcFastForwardL( TBool aUseFFWD ) = 0;
-
-        /**
-        * Starts or stops fast rewinding the file. 
-        * The file is left paused after stopping the fast rewinding.
-        * @param aUseFRWD ETrue to start FRWD, EFalse to stop it.
-        */        
-        virtual void LcFastRewindL( TBool aUseFRWD ) = 0;
-
-        /**
-        * Returns duration of the file as time interval.
-        * @return the duration of the file
-        */        
-        virtual TTimeIntervalSeconds LcFileDurationL() = 0;
-        
-        /**
-        * Returns current file position as time interval.
-        * @return the current position
-        */        
-        virtual TTimeIntervalSeconds LcFilePositionL() = 0;
-
-        /**
-        * Sets the file position as time interval.
-        * @param aPosition the new position
-        */ 
-        virtual void SetLcFilePositionL( 
-            const TTimeIntervalSeconds& aPosition ) = 0;       
-    };
-
-#endif // MLCSOURCEFILECONTROL_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcuiprovider.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCUIPROVIDER_H
-#define MLCUIPROVIDER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <bamdesca.h> 
-
-// CLASS DECLARATION
-/**
-* A callback for fetching session related information from the end user.
-*/
-class MLcUiProvider
-    {
-    public:
-
-        /**
-        * Asks to select the recipient for the session from 
-        * a predefined list of recipients.
-        * @param aRecipientAddresses the list of possible recipients
-        * @param aSelectedRecipientAddress on return contains 
-        * the selected recipient
-        * @return ETrue if the recipient was selected, otherwise EFalse
-        */
-        virtual TBool SelectRecipient( 
-            MDesCArray& aRecipientAddresses, 
-            TDes& aSelectedRecipientAddress ) = 0;        
-        
-        /**
-        * Asks to input the recipient for the session.
-        * @param aRecipientAddress on return contains the recipient address
-        * @return ETrue if the recipient was inserted, otherwise EFalse
-        */
-        virtual TBool InputRecipient( TDes& aRecipientAddress ) = 0;
-        
-        /**
-        * The application foreground status has to be changed. 
-        * @param aForeground ETrue if application should be brought to 
-        * foreground.
-        */
-        virtual void HandleForegroundStatus( TBool aForeground ) = 0;
-        
-        /**
-        * UI needs to be blocked/unblocked. If engine is processing
-        * asynchronous operation and cannot handle other actions meanwhile,
-        * it can ask UI to block user controls until asynchronous operation
-        * completes. NOTE: session termination is allowed even if blocking 
-        * is active.
-        * @param aBlocked, ETrue is UI should be blocked, EFalse
-        *   if UI can be unblocked.
-        */
-        virtual void BlockUi( TBool aBlocked ) = 0;
-    };
-   
-    
-#endif // MLCUIPROVIDER_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcvideoplayer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCVIDEOPLAYER_H
-#define MLCVIDEOPLAYER_H
-
-// INCLUDES
-#include <e32std.h>
-
-// FORWARD DECLARATIONS
-class MLcWindow;
-class MLcCameraControl;
-class MLcCamera;
-class MLcSourceFileControl;
-class MLcDestinationFileControl;
-class MLcAudioControl;
-class MLcZoomControl;
-class MLcBrightnessControl;
-
-// CLASS DECLARATION
-/**
-* A class representing a video player and its controls.
-*/
-class MLcVideoPlayer
-    {
-    public:
-
-
-        /**
-        * The list of possible video player sources.
-        */
-        enum TLcVideoPlayerSource
-            {
-            ECameraSource,
-            EFileSource
-            };
-
-        /**
-        * The list of possible video player states.
-        */
-        enum TLcVideoPlayerState
-            {
-            EInit,
-            EPreparing,
-            EBuffering,
-            EPlaying,
-            EPaused,
-            EUnavailable
-            };
-
-        /**
-        * Returns the current video player state.
-        * @return the video player state
-        */
-        virtual TLcVideoPlayerState LcVideoPlayerState() const = 0;
-        
-        /**
-        * Checks whether the video is currently being played.
-        * @return ETrue if the video is being played, otherwise EFalse.
-        */
-        virtual TBool LcIsPlayingL() = 0;
-        
-        /**
-        * Returns the current video player source.
-        * @return the video player source.
-        */
-        virtual TLcVideoPlayerSource LcVideoPlayerSourceL() { return ECameraSource; };
-
-        /**
-        * Starts to play the source mentioned in the argument
-        * @aSource : One of the sources in TLcVideoPlayerSource enum.
-        * default  : Play from camera.
-        */
-        virtual void LcPlayL( TLcVideoPlayerSource aSource=ECameraSource ) = 0;
-        
-        /**
-        * Pauses the playing of the video. 
-        */
-        virtual void LcPauseL() = 0;
-    
-        /**
-        * Returns the window for the player, if present.
-        * @return the window for the player or NULL if not present
-        */
-        virtual MLcWindow* LcWindow() = 0;
-
-        /**
-        * Returns the camera control, 
-        * if the video player uses the device's camera 
-        * as the source of the played video.
-        * @return the camera control or NULL if not present
-        */
-        virtual MLcCameraControl* LcCameraControl() = 0;
-        
-        /**
-        * Returns the source file control for the video player,
-        * if the video is played from a local video file.
-        * @return the source file control or NULL if not present
-        */
-        virtual MLcSourceFileControl* LcSourceFileControl() = 0;
-        
-        /**
-        * Returns the destination file control for the video player,
-        * if the video is being recorded to a local video file.
-        * @return the destination file control or NULL if not present
-        */
-        virtual MLcDestinationFileControl* LcDestinationFileControl() = 0;
-        
-        /**
-        * Returns the audio control for the player, if present.
-        * @return the audio control for the player or NULL if not present
-        */
-        virtual MLcAudioControl* LcAudioControl() = 0;
-    
-        /**
-        * Returns the zoom control for the player, if present.
-        * @return the zoom control for the player or NULL if not present
-        */
-        virtual MLcZoomControl* LcZoomControl() = 0;
-    
-        /**
-        * Returns the brightness control for the player, if present.
-        * @return the brightness control for the player or NULL if not present
-        */
-        virtual MLcBrightnessControl* LcBrightnessControl() = 0;
-    };
-
-#endif // MLCVIDEOPLAYER_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lcwindow.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCWINDOW_H
-#define MLCWINDOW_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-/**
-* Class representing a window for a video player.
-*/
-class MLcWindow
-    {
-    public:
-
-        /**
-        * The possible window orientations.
-        */
-        enum TLcWindowOrientation
-            {
-            EPortrait, // Normal
-            ELandscape // 90 degree's clockwise rotation
-            };
-
-        /**
-        * Enables / disables the window into use 
-        * and start / stops to show the video in it.
-        * @param aEnabled ETrue enables the window, EFalse disables it.
-        */
-        virtual void EnableLcWindowL( TBool aEnable ) = 0;
-        
-        /**
-        * Checks whether the window has been enabled.
-        * @return ETrue if the window has been enabled, otherwise EFalse.
-        */
-        virtual TBool IsLcWindowEnabled() = 0;
-        
-        /**
-        * Sets the rectangle for the window.
-        * @param aRect the rectangle for the window
-        */
-        virtual void SetLcWindowRectL( TRect aRect ) = 0;
-        
-        /**
-        * Returns the current rectangle for the window.
-        * @return the current rectangle for the window
-        */
-        virtual TRect LcWindowRect() = 0;
-        
-        /**
-        * Sets the window orientation.
-        * @param aOrientation the current window orientation
-        */
-        virtual void SetLcWindowOrientationL( 
-            TLcWindowOrientation aOrientation ) = 0;
-        
-        /**
-        * Returns the current window orientation.
-        * @return the current window orientation
-        */
-        virtual TLcWindowOrientation LcWindowOrientationL() = 0;
-    };
-
-#endif // MLCWINDOW_H
-
-// end of file
--- a/mmsharinguis_plat/live_comms_plugin_api/inc/lczoomcontrol.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef MLCZOOMCONTROL_H
-#define MLCZOOMCONTROL_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-/**
-* Class for controlling the zoom level of a video player.
-*/
-class MLcZoomControl
-    {
-    public:
-
-        /**
-        * Returns the minimum zoom value.
-        * @return the minimum zoom value
-        */
-        virtual TInt MinLcZoomL() = 0;
-
-        /**
-        * Returns the maximum zoom value.
-        * @return the maximum zoom value
-        */
-        virtual TInt MaxLcZoomL() = 0;
-
-        /**
-        * Returns the current value for the zoom.
-        * @return the current zoom value
-        */
-        virtual TInt LcZoomValueL() = 0;
-
-        /**
-        * Sets the current zoom level.
-        * @pre aValue >= MinLcZoomL && aValue <= MaxLcZoomL
-        * @param aValue the new zoom level
-        */
-        virtual void SetLcZoomValueL( TInt aValue ) = 0;
-        
-        /**
-        * Zooms in by one step.
-        */
-        virtual void LcZoomInL() = 0;
-        
-        /**
-        * Zooms out by one step.
-        */
-        virtual void LcZoomOutL() = 0; 
-    };
-
-#endif // MLCZOOMCONTROL_H
-
-// end of file
--- a/mmsharinguis_plat/multimedia_sharing_manager_api/inc/musmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharinguis_plat/multimedia_sharing_manager_api/inc/musmanager.h	Wed Sep 01 12:31:01 2010 +0100
@@ -52,7 +52,6 @@
         {
         ESipOptions = 0x1028238D,
         ESipInviteDesired = 0x10282391,
-        ESipInviteDesired2WayVideo = 0x10282392,
         ESipInviteNotDesired = 0x1028238D
         };
        
--- a/mmsharinguis_plat/multimedia_sharing_manager_api/inc/musmanagercommon.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharinguis_plat/multimedia_sharing_manager_api/inc/musmanagercommon.h	Wed Sep 01 12:31:01 2010 +0100
@@ -61,9 +61,7 @@
         EMusClipVideo,           // video clip sharing
         EMusStillImage,          // still image sharing
         EMusReceive,             // receive video
-        EMusContinue,            // continue running the existing application
-        EMusTwoWayVideo,         // two-way sharing
-        EMusReceiveTwoWayVideo   // two-way receive video
+        EMusContinue             // continue running the existing application
         };
    /**  Contains the possible commands of MultimediaSharing. */    
    enum TCommandType
--- a/mmsharinguis_plat/multimedia_sharing_settings_api/inc/mussettingskeys.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharinguis_plat/multimedia_sharing_settings_api/inc/mussettingskeys.h	Wed Sep 01 12:31:01 2010 +0100
@@ -202,84 +202,19 @@
       * Contains UID of the encoding device meant to be used. Read by MuS Engine
       */
     const TInt KEncodingDevice( 0x0F );
-
-    /**
-      * Defines whether multimediasharing is restricted to CS call type only.
-      * Default value will be 0 ( EFalse ) means it is allowed in all call types
-      * for example VOIP and Skype calls.
-      */
-    const TInt KAllowOnlyWithActiveCSCall( 0x10 );
-    /** Contains the possible values of KAllowedCSOnly key. */
-    enum TAllowedCSOnly
-        {
-        EAllowedAllCalls,
-        EAllowedCSOnly        
-        };
-
-    /**
-      * Defines whether multimediasharing is restricted to 3G bearer only.
-      * Default value will be 0 ( EFalse ) means it is allowed in all bearer types
-      * for example 3G,WLAN etc.
-      */
-    const TInt KAllowOnlyIn3GNetwork( 0x11 );
-    /** Contains the possible values of KAllowed3GOnly key. */
-    enum TAllowed3GOnly
-        {
-        EAllowedAllBearers,
-        EAllowed3GOnly        
-        };
-
-    /**
-     * Defines which and how cameras are used. The default value
-     * is EUseCameraSwapping. To disable camera swapping and roll back
-     * old behaviuor, value must be set to EUseOnlyMainCamera.
-     * to the menu or to the toolbar.
-     */
-    const TInt KCameraUsage( 0x12 );
-
-    /** Contains the possible values of KCameraUsage key. */
-    enum TUseCamera
+    
+    /** Defines the type of privcy exchange. 
+     Defines that how are SIP PRIVACY id handled */
+    const TInt KPrivacyExchange( 0x10 );
+   
+    enum TPrivacyExchange
         {
-        EUseOnlyMainCamera,
-        EUseOnlySecondaryCamera,
-        EUseCameraSwapping
-        };
-
-    /**
-     * Defines whether multimediasharing is supporting 2-way video. The
-     * default value is EOneWayVideo. 
-     */
-    const TInt KVideoDirection( 0x13 );
-    
-    /** Contains the possible values of KVideoDirection key. */
-    enum TVideoDirection
-        {
-        EOneWayVideo,
-        ETwoWayVideo
+        EPrivacy = 1,
+        ENoPrivacy
         };
-    
-    /**
-     * Defines whether b=AS and b=TIAS SDP attributes are used. Zero value 
-     * means that usage of TIAS is disabled, only AS will be used (hard coded
-     * value). Positive value means AS in KBits per second. TIAS value will 
-     * be set to AS multiplied by 1000.
-     */
-    const TInt KVideoBandwidth( 0x14 );
-    
-    /**
-     * Defines whether multimediasharing is supporting fast startup mode
-     */
-    const TInt KFastStartupMode( 0x15 );
-    
-    /** Contains the possible values of KFastStartupMode key. */
-    enum TFastMode
-        {
-        EFastModeOn,
-        EFastModeOff,
-        EFastModeDisabled
-        };    
+        
     }
 
-    
+
 #endif // MUSSETTINGSKEYS_H
   
--- a/mmshplugins/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -23,6 +23,6 @@
 #include "../mmshaoplugin/group/bld.inf"
 #include "../mmshaiwplugin/group/bld.inf"
 #include "../mmshsipcrplugin/group/bld.inf"
-//#include "../mmshsettingsuiplugin/group/bld.inf"
+#include "../mmshsettingsuiplugin/group/bld.inf"
 #include "../mmshwpadapterplugin/group/bld.inf"
 //#include "../mmcctranscoder/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmcctranscoder/tsrc/stubs/group/ABLD.BAT	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,15 @@
+@ECHO OFF
+
+REM Bldmake-generated batch file - ABLD.BAT
+REM ** DO NOT EDIT **
+
+perl -S ABLD.PL "\IPAS_Domain\IPAS_Domain\ipappsrv\multimediacommscontroller\mmcctranscoder\tsrc\stubs\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9
+if errorlevel==1 goto CheckPerl
+goto End
+
+:CheckPerl
+perl -v >NUL
+if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed?
+goto End
+
+:End
--- a/mmshplugins/mmcctranscoder/tsrc/ut_transcoder/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmcctranscoder/tsrc/ut_transcoder/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -24,5 +24,5 @@
 PRJ_EXPORTS
 
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
 ut_transcoder.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmcctranscoder/tsrc/ut_transcoder/group/ut_transcoder.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHMTRANSC"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_transcoder.dll"-"c:\sys\bin\ut_transcoder.dll"
--- a/mmshplugins/mmshaiwplugin/data/10282389.rss	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaiwplugin/data/10282389.rss	Wed Sep 01 12:31:01 2010 +0100
@@ -57,8 +57,3 @@
             }
         };
     }
-    
-// end of file
-
-
-    
--- a/mmshplugins/mmshaiwplugin/group/musaiwprovider.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaiwplugin/group/musaiwprovider.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -52,7 +52,6 @@
 
 // MultimediaSharing libraries
 LIBRARY                 musmanagerclient.lib
-LIBRARY                 musindicator.lib
 
 // SymbianOS/Series60 libraries
 LIBRARY                 aknnotify.lib 
--- a/mmshplugins/mmshaiwplugin/inc/musaiwprovider.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaiwplugin/inc/musaiwprovider.h	Wed Sep 01 12:31:01 2010 +0100
@@ -144,9 +144,6 @@
     void OperatorVariantStartUpL( TFileName&    aFileName,
     							 CAiwMenuPane& aMenuPane,
                                  TInt          aIndex );
-    
-    void FastModeStartUpL( 
-        TFileName& aFileName, CAiwMenuPane& aMenuPane, TInt aIndex );
 
     void ShowErrorNoteL( TInt aError );
 
@@ -155,16 +152,9 @@
     HBufC8* ErrorNoteText8L( TInt aError, RResourceFile& aResourceFile );
 
     void DoInitialiseL();
+	
+    void DoInitializeMenuPaneL( CAiwMenuPane& aMenuPane, TInt aIndex );
 
-    TBool AvailabilityOk( 
-        MultimediaSharing::TMusAvailabilityStatus aAvailability ) const;
-    
-    TBool HiddenFromFastSwapL();
-    
-    TBool IsFastStartupModeL();
-    
-    void StartApplicationL( 
-        CMusManager& aManager, MultimediaSharing::TMusUseCase aUseCase );
     
 private: // data
 
@@ -176,8 +166,6 @@
     
     /** To Differentiate Error and Warning Notes */
 	TBool iIsWarning ;
-	
-	CMusIndicatorApi* iIndicator;
     };
 
 
--- a/mmshplugins/mmshaiwplugin/src/musaiwprovider.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaiwplugin/src/musaiwprovider.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -27,8 +27,6 @@
 #include "musresourcefinderutil.h"
 #include "mussettings.h"
 #include "mussesseioninformationapi.h"
-#include "musindicatorapi.h"
-#include "mussessionproperties.h"
 
 #include <musresourceproperties.h>
 
@@ -50,7 +48,6 @@
 #include <utf.h>
 #include <features.hrh>
 #include <aknenv.h>
-#include <UikonInternalPSKeys.h>
 
 ////////  public -- constructor and destructor  ////////
 
@@ -80,9 +77,8 @@
     {
     MUS_LOG( "mus: [AIWPRO]  -> CMusAiwProvider::~CMusAiwProvider" )
     delete iResourceFileName ;
-    iResourceFileName = NULL ;    
-    delete iIndicator;
-    iIndicator = NULL ;    
+    iResourceFileName = NULL ;  
+
     MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::~CMusAiwProvider" )
     }
 
@@ -147,7 +143,25 @@
         TInt                        /* aCascadeId */,
         const CAiwGenericParamList& /* aInParamList */ )
     {
-    MUS_LOG1( "mus: [AIWPRO]  -> CMusAiwProvider::InitializeMenuPaneL( %d )",
+	FeatureManager::InitializeLibL();
+    TBool support = FeatureManager::FeatureSupported( KFeatureIdMultimediaSharing );
+	FeatureManager::UnInitializeLib();
+	if( support )
+		{
+	    DoInitializeMenuPaneL( aMenuPane, aIndex );
+		}
+	}
+	
+	
+// -----------------------------------------------------------------------------
+// Initializes menu pane by adding provider-specific menu items.
+// -----------------------------------------------------------------------------
+//
+void CMusAiwProvider::DoInitializeMenuPaneL(
+        CAiwMenuPane&               aMenuPane,
+        TInt                        aIndex)
+    {
+    MUS_LOG1( "mus: [AIWPRO]  -> CMusAiwProvider::DoInitializeMenuPaneL( %d )",
               aIndex )
     
     if( iResourceFileName == NULL )
@@ -158,10 +172,7 @@
     TFileName filename ( *iResourceFileName );
     MUS_LOG_TDESC( "mus: [AIWPRO]     Resource filename: ", filename ) 
     
-    // If app running but hidden from fast swap it means that application
-    // is hidden from user and options menu should look same as 
-    // when application is not yet started
-    if( ApplicationRunningL() && !HiddenFromFastSwapL() )
+    if( ApplicationRunningL() )
     	{
         MUS_LOG( "mus: [AIWPRO]     Application already running:\
                  giving _continue sharing_ menu command" )
@@ -180,10 +191,6 @@
 	        {
 	       	OperatorVariantStartUpL( filename, aMenuPane, aIndex );
 	        }
-	    else if ( IsFastStartupModeL() )
-	        {
-	        FastModeStartUpL( filename, aMenuPane, aIndex );
-	        }
 		else
 			{
 	        NoVariationStartUpL( filename, aMenuPane, aIndex );
@@ -191,7 +198,7 @@
 		}   
 
     
-    MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::InitializeMenuPaneL" )
+    MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::DoInitializeMenuPaneL" )
     }
 
 // -----------------------------------------------------------------------------
@@ -202,12 +209,7 @@
 void CMusAiwProvider::DoInitialiseL()
     {
     MUS_LOG( "mus: [AIWPRO]  -> CMusAiwProvider::DoInitialiseL")
-    
-    if ( !iIndicator )
-        {
-        MUS_LOG( "mus: [AIWPRO]  :  creating indicator")
-        iIndicator = CMusIndicatorApi::NewL();
-        }
+
     MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::DoInitialiseL")
     }
 
@@ -250,10 +252,19 @@
        3.When iAvailability plugin says OK ( Based on call,network,settingui item)
        4.Also in confrence and hold cases
     */        
-    if ( AvailabilityOk( iAvailability ) )           
+    if ( iAvailability == MultimediaSharing::ESipRegistrationPending || 
+         iAvailability == MultimediaSharing::ESipOptionsSent ||
+         iAvailability == MultimediaSharing::EMultimediaSharingAvailable ||
+         iAvailability == MultimediaSharing::EErrCallOnHold ||
+         iAvailability == MultimediaSharing::EErrConferenceCall ||             
+         iAvailability == MultimediaSharing::ESipOptionsNotCapable ||
+         iAvailability == MultimediaSharing::ESipOptionsNotSent ||
+         iAvailability == MultimediaSharing::EErrNetwork ||
+         iAvailability == MultimediaSharing::EManualActivation ||
+         iAvailability == MultimediaSharing::EErrConnection ||
+         iAvailability == MultimediaSharing::EErrSipRegistration )           
         {
-        MUS_LOG1( "mus: [AIWPRO]  Showing AIW Menu -> iAvailability = %d ",
-                  iAvailability )
+        MUS_LOG1( "mus: [AIWPRO]  Showing AIW Menu -> iAvailability = %d ",iAvailability )
         TInt resourceID =  R_MUSAIWPROVIDER_BASIC_CASCADED_SUBMENU ;           
         if ( !FeatureManager::FeatureSupported( KFeatureIdCamera ) )
             {
@@ -267,8 +278,7 @@
         }
     else
         {
-        MUS_LOG1( "mus: [AIWPRO] Not Showing AIW Menu -> iAvailability = %d ",
-                  iAvailability )
+        MUS_LOG1( "mus: [AIWPRO] Not Showing AIW Menu -> iAvailability = %d ",iAvailability )
         }
     CleanupStack::PopAndDestroy( manager );	
     MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::NoVariationStartUpL" )   
@@ -290,8 +300,7 @@
     // should be shown in call menu only if iAvailability plugin returns OK 
     if ( iAvailability == MultimediaSharing::EMultimediaSharingAvailable )           
         {
-        MUS_LOG1( "mus: [AIWPRO]  Showing AIW Menu -> iAvailability = %d ", 
-                  iAvailability )
+        MUS_LOG1( "mus: [AIWPRO]  Showing AIW Menu -> iAvailability = %d ", iAvailability )
         TInt resourceID =  R_MUSAIWPROVIDER_BASIC_CASCADED_SUBMENU ;           
         if ( !FeatureManager::FeatureSupported( KFeatureIdCamera ) )
             {
@@ -305,8 +314,7 @@
         }
     else
         {
-        MUS_LOG1( "mus: [AIWPRO] Not Showing AIW Menu -> iAvailability = %d ",
-                  iAvailability )
+        MUS_LOG1( "mus: [AIWPRO] Not Showing AIW Menu -> iAvailability = %d ",iAvailability )
         }
         
     CleanupStack::PopAndDestroy( manager );	
@@ -315,60 +323,6 @@
 	}
 	
 // -----------------------------------------------------------------------------
-// In fast mode, Multimediasharing Menu items 
-// should not be shown before options queries have completed. Outcome
-// of queries does not matter.
-// -----------------------------------------------------------------------------
-//
-void CMusAiwProvider::FastModeStartUpL( 
-    TFileName& aFileName, CAiwMenuPane& aMenuPane, TInt aIndex )
-    {
-    MUS_LOG( "mus: [AIWPRO]  -> CMusAiwProvider::FastModeStartUpL" )   
-    
-    if ( MultimediaSharingSettings::CapabilityQuerySettingL() != 
-            MusSettingsKeys::EParallel )
-        {
-        // If parallel capability query is not enabled, use normal startup as
-        // capability query is essential for fast session setup
-        NoVariationStartUpL( aFileName, aMenuPane, aIndex );
-        }
-    else
-        {
-        CMusManager* manager = CMusManager::NewLC();
-        iAvailability = manager->AvailabilityL();
-    
-        if ( iAvailability == MultimediaSharing::ESipRegistrationPending ||
-             iAvailability == MultimediaSharing::ESipOptionsSent ||
-             !AvailabilityOk( iAvailability ) )
-            {
-            // Need to wait for options to complete
-            MUS_LOG1( "mus: [AIWPRO] Not Showing AIW Menu -> iAvailability = %d ",
-                      iAvailability )
-            }
-        else
-            {
-            // It does not matter what was result of query
-            MUS_LOG1( "mus: [AIWPRO]  Showing AIW Menu -> iAvailability = %d ", 
-                      iAvailability )
-            TInt resourceID =  R_MUSAIWPROVIDER_BASIC_CASCADED_SUBMENU ;           
-            if ( !FeatureManager::FeatureSupported( KFeatureIdCamera ) )
-                {
-                MUS_LOG( "mus: [AIWPRO]  Camera Not Available" )
-                resourceID =  R_MUSAIWPROVIDER_NOCAMERA_CASCADED_SUBMENU ;                 
-                }            
-                aMenuPane.AddMenuItemsL( aFileName,
-                                         resourceID,
-                                         KMusAiwProviderUid,
-                                         aIndex );
-            }
-            
-        CleanupStack::PopAndDestroy( manager ); 
-        }
-
-    MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::FastModeStartUpL" )  
-    }
-
-// -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
 //
@@ -547,29 +501,32 @@
             {
             MUS_LOG( "mus: [AIWPRO]     \
                     EMusCommandLiveShare: Will now attempt to start Mus." )
-            TRAP( error, StartApplicationL( *manager, MultimediaSharing::EMusLiveVideo ) );
+            TRAP( error, manager->StartApplicationL( 
+                                        MultimediaSharing::EMusLiveVideo ) );
             break;
             }
         case EMusCommandClipShare:
             {
             MUS_LOG( "mus: [AIWPRO]     \
-                    EMusCommandClipShare: Will now attempt to start Mus." )            
-            TRAP( error, StartApplicationL( *manager, MultimediaSharing::EMusClipVideo ) );
-            
+                    EMusCommandClipShare: Will now attempt to start Mus." )
+            TRAP( error, manager->StartApplicationL(
+                                        MultimediaSharing::EMusClipVideo ) );
             break;
             }
         case EMusCommandImageShare:
             {
             MUS_LOG( "mus: [AIWPRO]     \
                     EMusCommandImageShare: Will now attempt to start Mus." )
-            TRAP( error, StartApplicationL( *manager, MultimediaSharing::EMusStillImage ) );
+            TRAP( error, manager->StartApplicationL(
+                                        MultimediaSharing::EMusStillImage ) );
             break;
             }
         case EMusCommandContinue:
             {
             MUS_LOG( "mus: [AIWPRO]     \
                     EMusCommandContinue: Will now attempt to start/continue Mus." )
-            TRAP( error, StartApplicationL( *manager, MultimediaSharing::EMusContinue ) ); 
+            TRAP( error, manager->StartApplicationL( 
+                                        MultimediaSharing::EMusContinue ) ); 
             break;
             }
         default:
@@ -591,129 +548,4 @@
     MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::HandleMenuCmdL" )
     }
 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CMusAiwProvider::AvailabilityOk( 
-    MultimediaSharing::TMusAvailabilityStatus aAvailability ) const
-    {
-    return (
-        aAvailability == MultimediaSharing::ESipRegistrationPending || 
-        aAvailability == MultimediaSharing::ESipOptionsSent ||
-        aAvailability == MultimediaSharing::EMultimediaSharingAvailable ||
-        aAvailability == MultimediaSharing::EErrCallOnHold ||
-        aAvailability == MultimediaSharing::EErrConferenceCall ||             
-        aAvailability == MultimediaSharing::ESipOptionsNotCapable ||
-        aAvailability == MultimediaSharing::ESipOptionsNotSent ||
-        aAvailability == MultimediaSharing::EErrNetwork ||
-        aAvailability == MultimediaSharing::EManualActivation ||
-        aAvailability == MultimediaSharing::EErrConnection ||
-        aAvailability == MultimediaSharing::EErrSipRegistration );
-    }
-
-// -----------------------------------------------------------------------------
-// App's fastswap visibility status is interesting only in fast mode.
-// -----------------------------------------------------------------------------
-//
-TBool CMusAiwProvider::HiddenFromFastSwapL()
-    {
-    MUS_LOG( "mus: [AIWPRO]  -> CMusAiwProvider::HiddenFromFastSwapL" )
-    
-    TBool hidden( EFalse );
-    if ( !IsFastStartupModeL() )
-        {
-        MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::HiddenFromFastSwapL" )
-        return hidden;
-        }
-    
-    const TInt KMusAiwMaxHiddenAppSizeMod = 4;
-    TBuf16 <KMusAiwMaxHiddenAppSizeMod*KMaxHiddenApps> hiddenList;
-    TInt err = RProperty::Get( KPSUidUikon, KUikAppHiddenList, hiddenList );
-    MUS_LOG1( "mus: [AIWPRO] Hidden list read:%d", err )
-    
-    if ( err == KErrNone )
-        {
-        TBool continueFinding( ETrue );
-        MUS_LOG1( "mus: [AIWPRO] Hidden list len:%d", hiddenList.Length() )
-        for ( TInt i = 0; i < KMaxHiddenApps && continueFinding; i++ )
-            {
-            // 32-bit uid values are retrieved in two 16-bit parts
-            __ASSERT_ALWAYS( hiddenList.Length() > i + 1, User::Leave( KErrEof ) );
-            TUint32 listValue = hiddenList[ i ] << 16;
-            listValue += hiddenList[ ++i ];
-            // the value NULL marks the end of array -> leave the loop
-            if ( listValue )
-                {
-                MUS_LOG1( "mus: [AIWPRO]     Hidden uid:%d", listValue )
-                if ( listValue == KMusUiUid )
-                    {
-                    hidden = ETrue;
-                    continueFinding = EFalse;
-                    }
-                }
-            else
-                {
-                // Zero value means ending of list
-                continueFinding = EFalse;
-                }
-            }
-        }
-    
-    MUS_LOG1( "mus: [AIWPRO]  <- CMusAiwProvider::HiddenFromFastSwapL:%d", hidden )
-    
-    return hidden;
-    }
-
-// -----------------------------------------------------------------------------
-// Check whether fast mode is enabled, take in count that key
-// might not be present.
-// -----------------------------------------------------------------------------
-//
-TBool CMusAiwProvider::IsFastStartupModeL()
-    {
-    TBool fastModeEnabled( EFalse );
-    MusSettingsKeys::TFastMode fastMode( MusSettingsKeys::EFastModeOff );
-    TRAPD( err, fastMode = MultimediaSharingSettings::FastStartupModeL() );
-    if ( err == KErrNoMemory )
-        {
-        User::Leave( err );
-        }
-    if ( err == KErrNone )
-        {
-        fastModeEnabled = ( fastMode == MusSettingsKeys::EFastModeOn );
-        }
-    return fastModeEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// If fast mode is enabled and app is running and hidden, it has been started
-// with live use-case but user does not know that. If user tries to do
-// clip usecase in such situation, use case is just updated and engine
-// takes case of bringing hidden application to foreground.
-// -----------------------------------------------------------------------------
-//
-void CMusAiwProvider::StartApplicationL( 
-    CMusManager& aManager, MultimediaSharing::TMusUseCase aUseCase )
-    {
-    MUS_LOG( "mus: [AIWPRO]  -> CMusAiwProvider::StartApplicationL" )
-    
-    TBool startApp( ETrue );
-    if ( IsFastStartupModeL() && aUseCase == MultimediaSharing::EMusClipVideo && 
-         ApplicationRunningL() && HiddenFromFastSwapL() )
-        {
-        MUS_LOG( "mus: [AIWPRO]     App already running hidden, change only usecase!" )
-        User::LeaveIfError( RProperty::Set( 
-                NMusSessionApi::KCategoryUid, NMusSessionApi::KUseCase, aUseCase ) );
-        startApp = EFalse;
-        }
-    
-    if ( startApp )
-        {
-        aManager.StartApplicationL( aUseCase );
-        }
-    
-    MUS_LOG( "mus: [AIWPRO]  <- CMusAiwProvider::StartApplicationL" )
-    }
-
 // end of file
--- a/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -15,6 +15,6 @@
 *
 */
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
 ut_musaiwprovider.mmp
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group/ut_aiwprovider.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHAIWPr"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_musaiwprovider.dll"-"c:\sys\bin\ut_musaiwprovider.dll"
--- a/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group/ut_musaiwprovider.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group/ut_musaiwprovider.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -17,7 +17,7 @@
 
 // To get the APP_LAYER_SYSTEMINCLUDE-definition
 #include <platform_paths.hrh>
-#include <eunitcaps.h>
+#include<eunitcaps.h>
 
 TARGET                  ut_musaiwprovider.dll
 TARGETTYPE              dll
@@ -25,7 +25,7 @@
 TARGETPATH              /z/sys/bin
 UID                     0x1000af5a 0x01700a22
 
-CAPABILITY              EUNIT_CAPS
+CAPABILITY      EUNIT_CAPS
 VENDORID                VID_DEFAULT
 
 MACRO                   UNIT_TESTING
@@ -47,11 +47,8 @@
 SOURCEPATH              ../../../../../tsrc/featmgrstub/src
 SOURCE                  FeatMgr.cpp
 
-SOURCEPATH              ../../../../../tsrc/propertystub/src
-SOURCE		            e32property.cpp
-
 SOURCEPATH              ../../../../../tsrc/musmanagerstub/src
-SOURCE    				musmanagerstub.cpp
+SOURCE    		musmanagerstub.cpp
 // Test classes
 SOURCEPATH              ../src
 SOURCE                  ut_musaiwproviderdllmain.cpp
@@ -63,27 +60,13 @@
 SOURCE                  musaiwprovider.cpp
 
 
-// Centrep Stub
-SOURCEPATH              ../../../../../tsrc/centralrepositorystub/src
-SOURCE                  centralrepositorystub.cpp
-
-
-// Stup User Includes
-USERINCLUDE             ../../../../../tsrc/resourcefilestub/inc
-USERINCLUDE             ../../../../../tsrc/propertystub/inc
-USERINCLUDE             ../../../../../tsrc/centralrepositorystub/inc
-
-// Actual User Includes
 USERINCLUDE             ../inc
-USERINCLUDE				../../../inc
-
-// Test Includes.
+USERINCLUDE				      ../../../inc
 USERINCLUDE             ../../../../../tsrc/musmanagerstub/inc
 USERINCLUDE             ../../../../../tsrc/ututils/inc
 USERINCLUDE             ../../../../../inc
 USERINCLUDE             ../../../../../tsrc/Apastub/inc
-USERINCLUDE             ../../../../../tsrc/featmgrstub/inc
-
+USERINCLUDE             ../../../../../tsrc/resourcefilestub/inc
 
 
 // to replace FeatMgr.h with a stub
@@ -95,12 +78,6 @@
 // to replace barsc.h with a stub
 SYSTEMINCLUDE           ../../../../../tsrc/resourcefilestub/inc
 
-// to replace RProperty with a stub
-SYSTEMINCLUDE           ../../../../../tsrc/propertystub/inc
-
-// Centrep stub
-SYSTEMINCLUDE             ../../../../../tsrc/centralrepositorystub/inc
-
 // Default system include paths for application layer modules.
 APP_LAYER_SYSTEMINCLUDE
 
@@ -116,7 +93,8 @@
 LIBRARY                 eikcore.lib
 LIBRARY                 eunit.lib
 LIBRARY                 charconv.lib
-//LIBRARY                 centralrepository.lib
+LIBRARY                 centralrepository.lib
+
 LIBRARY                 flogger.lib
 LIBRARY                 servicehandler.lib // AIW Consumer API
 
--- a/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/inc/ut_musaiwprovider.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/inc/ut_musaiwprovider.h	Wed Sep 01 12:31:01 2010 +0100
@@ -25,8 +25,6 @@
 #include <eikmobs.h>
 
 class CMusAiwProvider;
-class CAiwMenuPane;
-class CEikMenuPane;
 
 /**
  * Main plugin class
@@ -98,23 +96,17 @@
         void UT_CMusAiwProvider_InitializeMenuPaneL4L();
         void UT_CMusAiwProvider_InitializeMenuPaneL5L();
         void UT_CMusAiwProvider_InitializeMenuPaneL6L();
-        void UT_CMusAiwProvider_InitializeMenuPaneLFastModeL();
-        void UT_CMusAiwProvider_InitializeMenuPaneLFastMode2L();
+        void UT_CMusAiwProvider_InitializeMenuPaneL7L();
         
+		
         void UT_CMusAiwProvider_HandleMenuCmdLL();
-        void UT_CMusAiwProvider_HandleMenuCmdLFastModeL();
         void UT_CMusAiwProvider_ApplicationRunningLL();
         void UT_CMusAiwProvider_ShowErrorNoteLL();
         void UT_CMusAiwProvider_ErrorNoteTextLCL();
         void UT_CMusAiwProvider_ErrorNoteText8LL();
-        void UT_ImplementationGroupProxyL(); 
-        void UT_HiddenFromFastSwapL();
+        void UT_ImplementationGroupProxyL();    
 
 
-    public: // Helpers
-        
-        CAiwMenuPane* CreateAiwMenuPaneLC( CEikMenuPane** aEikPane );
-        
     private: // data
 
         CMusAiwProvider* iProvider;
--- a/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/src/ut_musaiwprovider.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/src/ut_musaiwprovider.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -15,7 +15,7 @@
 *
 */
 
-
+#include <eikmenup.h>
 #include "ut_musaiwprovider.h"
 #include "musaiwprovider.h"
 #include "musaiwprovider.hrh"
@@ -27,7 +27,6 @@
 #include "mussesseioninformationapi.h"
 #include "mussettings.h"
 #include "mustesthelp.h"
-#include "mussessionproperties.h"
 #define MUS_MEMORY_LEAVE_CHECKING_ON
 
 #include <e32property.h>
@@ -39,8 +38,6 @@
 #include <digia/eunit/eunitmacros.h>
 #include <aknglobalnote.h>
 #include <apgtask.h>
-#include <eikmenup.h>
-#include <uikoninternalpskeys.h>
 
 
 // Next row is to disable warning emerging from EUnit code.
@@ -52,8 +49,6 @@
 _LIT( KMusAiwProviderResource, "c:\\sys\\bin\\musaiwproviderui.rsc" );
 _LIT( KResourceFilenameRom,"z:\\sys\\bin\\musaiwproviderui.rsc" );
 
-_LIT( KMusOnHold, "On hold" );
-
 _LIT8( KMusOnHold8, "On hold" );
 _LIT8( KMusNetworkIncompatible8, "Network incompatible" );
 _LIT8( KMusConferenceCall8, "Conference call" );
@@ -164,8 +159,6 @@
     CMusManager::SetUseCase( MultimediaSharing::EMusContinue );
     CMusManager::SetStartError( KErrNone );
     CMusManager::SetAvailability( KErrNone );
-    MultimediaSharingSettings::SetPropertyValueL( 
-                  MusSettingsKeys::KFastStartupMode, MusSettingsKeys::EFastModeOff );
     
     }
 
@@ -177,7 +170,6 @@
 void UT_CMusAiwProvider::Teardown(  )
     {
     delete iProvider;
-    PropertyHelper::Close();
     }
 
 
@@ -281,17 +273,28 @@
 //
 void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneLL()
     {    
+
+    
     RFs fs;
     User::LeaveIfError( fs.Connect() );
+
     CleanupClosePushL( fs );
-    
+
     BaflUtils::CopyFile( fs, KMusAiwProviderResource(),
                          KResourceFilenameRom() );
 
     CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
 
-    CEikMenuPane* eikPane = NULL;
-    CAiwMenuPane* aiwPane = CreateAiwMenuPaneLC( &eikPane );
+    CEikMenuPane* eikPane = new( ELeave ) CEikMenuPane( this );
+    CleanupStack::PushL( eikPane );
+
+    // Constructing eikPane is not compulsory for testing and leads to a memory
+    // leak.
+    //eikPane->ConstructL( NULL, this );
+
+    CAiwMenuPane* aiwPane = new( ELeave ) CAiwMenuPane( *eikPane, 0 ); //Takes ownership
+    CleanupStack::Pop( eikPane );
+    CleanupStack::PushL( aiwPane );
 
     // ResourceFile is empty 
     delete iProvider->iResourceFileName;
@@ -369,18 +372,28 @@
 
 void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneL2L()
     {    
+
     RFs fs;
     User::LeaveIfError( fs.Connect() );
+
     CleanupClosePushL( fs );
-    
+
     BaflUtils::CopyFile( fs, KMusAiwProviderResource(),
                          KResourceFilenameRom() );
 
     CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
 
-    CEikMenuPane* eikPane = NULL;
-    CAiwMenuPane* aiwPane = CreateAiwMenuPaneLC( &eikPane );
-    
+    CEikMenuPane* eikPane = new( ELeave ) CEikMenuPane( this );
+    CleanupStack::PushL( eikPane );
+
+    // Constructing eikPane is not compulsory for testing and leads to a memory
+    // leak.
+    //eikPane->ConstructL( NULL, this );
+
+    CAiwMenuPane* aiwPane = new( ELeave ) CAiwMenuPane( *eikPane, 0 ); //Takes ownership
+    CleanupStack::Pop( eikPane );
+    CleanupStack::PushL( aiwPane );
+
     // ResourceFile is empty 
     delete iProvider->iResourceFileName;
     
@@ -428,17 +441,27 @@
 
 void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneL3L()
     {    
+
     RFs fs;
     User::LeaveIfError( fs.Connect() );
+
     CleanupClosePushL( fs );
-    
+
     BaflUtils::CopyFile( fs, KMusAiwProviderResource(),
                          KResourceFilenameRom() );
 
     CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
 
-    CEikMenuPane* eikPane = NULL;
-    CAiwMenuPane* aiwPane = CreateAiwMenuPaneLC( &eikPane );
+    CEikMenuPane* eikPane = new( ELeave ) CEikMenuPane( this );
+    CleanupStack::PushL( eikPane );
+
+    // Constructing eikPane is not compulsory for testing and leads to a memory
+    // leak.
+    //eikPane->ConstructL( NULL, this );
+
+    CAiwMenuPane* aiwPane = new( ELeave ) CAiwMenuPane( *eikPane, 0 ); //Takes ownership
+    CleanupStack::Pop( eikPane );
+    CleanupStack::PushL( aiwPane );
 
     // ResourceFile is empty 
     delete iProvider->iResourceFileName;
@@ -485,17 +508,27 @@
 
 void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneL4L()
     {    
+
     RFs fs;
     User::LeaveIfError( fs.Connect() );
+
     CleanupClosePushL( fs );
-    
+
     BaflUtils::CopyFile( fs, KMusAiwProviderResource(),
                          KResourceFilenameRom() );
 
     CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
 
-    CEikMenuPane* eikPane = NULL;
-    CAiwMenuPane* aiwPane = CreateAiwMenuPaneLC( &eikPane );
+    CEikMenuPane* eikPane = new( ELeave ) CEikMenuPane( this );
+    CleanupStack::PushL( eikPane );
+
+    // Constructing eikPane is not compulsory for testing and leads to a memory
+    // leak.
+    //eikPane->ConstructL( NULL, this );
+
+    CAiwMenuPane* aiwPane = new( ELeave ) CAiwMenuPane( *eikPane, 0 ); //Takes ownership
+    CleanupStack::Pop( eikPane );
+    CleanupStack::PushL( aiwPane );
 
     // ResourceFile is empty 
     delete iProvider->iResourceFileName;
@@ -542,17 +575,27 @@
 
 void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneL5L()
     {    
+
     RFs fs;
     User::LeaveIfError( fs.Connect() );
+
     CleanupClosePushL( fs );
-    
+
     BaflUtils::CopyFile( fs, KMusAiwProviderResource(),
                          KResourceFilenameRom() );
 
     CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
 
-    CEikMenuPane* eikPane = NULL;
-    CAiwMenuPane* aiwPane = CreateAiwMenuPaneLC( &eikPane );
+    CEikMenuPane* eikPane = new( ELeave ) CEikMenuPane( this );
+    CleanupStack::PushL( eikPane );
+
+    // Constructing eikPane is not compulsory for testing and leads to a memory
+    // leak.
+    //eikPane->ConstructL( NULL, this );
+
+    CAiwMenuPane* aiwPane = new( ELeave ) CAiwMenuPane( *eikPane, 0 ); //Takes ownership
+    CleanupStack::Pop( eikPane );
+    CleanupStack::PushL( aiwPane );
 
     // ResourceFile is empty 
     delete iProvider->iResourceFileName;
@@ -601,17 +644,27 @@
 
 void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneL6L()
     {    
+
     RFs fs;
     User::LeaveIfError( fs.Connect() );
+
     CleanupClosePushL( fs );
-    
+
     BaflUtils::CopyFile( fs, KMusAiwProviderResource(),
                          KResourceFilenameRom() );
 
     CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
 
-    CEikMenuPane* eikPane = NULL;
-    CAiwMenuPane* aiwPane = CreateAiwMenuPaneLC( &eikPane );
+    CEikMenuPane* eikPane = new( ELeave ) CEikMenuPane( this );
+    CleanupStack::PushL( eikPane );
+
+    // Constructing eikPane is not compulsory for testing and leads to a memory
+    // leak.
+    //eikPane->ConstructL( NULL, this );
+
+    CAiwMenuPane* aiwPane = new( ELeave ) CAiwMenuPane( *eikPane, 0 ); //Takes ownership
+    CleanupStack::Pop( eikPane );
+    CleanupStack::PushL( aiwPane );
 
     // ResourceFile is empty 
     delete iProvider->iResourceFileName;
@@ -657,19 +710,30 @@
     
     }
 
-void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneLFastModeL()
+
+void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneL7L()
     {    
+
     RFs fs;
     User::LeaveIfError( fs.Connect() );
+
     CleanupClosePushL( fs );
-    
+
     BaflUtils::CopyFile( fs, KMusAiwProviderResource(),
                          KResourceFilenameRom() );
 
     CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
 
-    CEikMenuPane* eikPane = NULL;
-    CAiwMenuPane* aiwPane = CreateAiwMenuPaneLC( &eikPane );
+    CEikMenuPane* eikPane = new( ELeave ) CEikMenuPane( this );
+    CleanupStack::PushL( eikPane );
+
+    // Constructing eikPane is not compulsory for testing and leads to a memory
+    // leak.
+    //eikPane->ConstructL( NULL, this );
+
+    CAiwMenuPane* aiwPane = new( ELeave ) CAiwMenuPane( *eikPane, 0 ); //Takes ownership
+    CleanupStack::Pop( eikPane );
+    CleanupStack::PushL( aiwPane );
 
     // ResourceFile is empty 
     delete iProvider->iResourceFileName;
@@ -680,35 +744,31 @@
     // Menu item counter
     TInt menuPaneCount = eikPane->NumberOfItemsInPane();
 
+    // test "forbidden" feature: mus NOT allowed, operator variant set to operator
+    MultimediaSharingSettings::SetOperatorVariantSettingL(
+                     MusSettingsKeys::EOperatorSpecific );
+    RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                    NMusSessionInformationApi::KMUSForbidden,
+                    NMusSessionInformationApi::EMUSForbidden );    
+    EUNIT_ASSERT( eikPane->NumberOfItemsInPane() == menuPaneCount )
+
     // set operator back to standard and allow mus
     RProperty::Set( NMusSessionInformationApi::KCategoryUid ,
                     NMusSessionInformationApi::KMUSForbidden ,
                     NMusSessionInformationApi::EMUSAllowed );
     MultimediaSharingSettings::SetOperatorVariantSettingL(
                      MusSettingsKeys::EStandard );
-    MultimediaSharingSettings::SetPropertyValueL( 
-              MusSettingsKeys::KFastStartupMode, MusSettingsKeys::EFastModeOn );
- 
-    // Options not enabled, mus shown in menu
-    //
-    MultimediaSharingSettings::SetCapabilityQuerySettingL(
-              MusSettingsKeys::ENoOptions );
-    CMusManager::SetAvailability(MultimediaSharing::EMultimediaSharingAvailable);
+
+    // Cases for "Mush not supported"
+    FeatureManager::MultimediaSharingNotSupported();
+    CMusManager::SetAvailability( MultimediaSharing::EMultimediaSharingAvailable );
     menuPaneCount = eikPane->NumberOfItemsInPane();
     iProvider->InitializeMenuPaneL( *aiwPane, 0, 0, *list );
-    
-    MUS_CHECK_MEMORY_LEAVE( eikPane->NumberOfItemsInPane() == menuPaneCount + 3 )
+    MUS_CHECK_MEMORY_LEAVE( eikPane->NumberOfItemsInPane() == menuPaneCount )
+    FeatureManager::MultimediaSharingSupported();
 
-    // Options supported, not yet available, mus not shown in menu
-    //
-    MultimediaSharingSettings::SetCapabilityQuerySettingL(
-                  MusSettingsKeys::EParallel );
-    CMusManager::SetAvailability(MultimediaSharing::ESipOptionsSent);
-    menuPaneCount = eikPane->NumberOfItemsInPane();
-    iProvider->InitializeMenuPaneL( *aiwPane, 0, 0, *list );
-   
-    MUS_CHECK_MEMORY_LEAVE( eikPane->NumberOfItemsInPane() == menuPaneCount )
-    
+    // set camera support on
+    FeatureManager::CameraSupported();
     CleanupStack::PopAndDestroy( aiwPane );
     CleanupStack::PopAndDestroy( list );
     BaflUtils::DeleteFile( fs, KResourceFilenameRom() );
@@ -716,53 +776,8 @@
     CleanupStack::PopAndDestroy(); // fs
     
     }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusAiwProvider::UT_CMusAiwProvider_InitializeMenuPaneLFastMode2L()
-    {
-    RFs fs;
-    User::LeaveIfError( fs.Connect() );
-    CleanupClosePushL( fs );
-    
-    BaflUtils::CopyFile( fs, KMusAiwProviderResource(),
-                         KResourceFilenameRom() );
-
-    CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
-
-    CEikMenuPane* eikPane = NULL;
-    CAiwMenuPane* aiwPane = CreateAiwMenuPaneLC( &eikPane );
-   
-    // ResourceFile is empty 
-    delete iProvider->iResourceFileName;
-    
-    iProvider->iResourceFileName = NULL ;
-    iProvider->InitializeMenuPaneL( *aiwPane, 0, 0, *list );
-    EUNIT_ASSERT( iProvider->iResourceFileName != NULL )
-
-    // Options supported, available, mus shown in menu
-    //
-    MultimediaSharingSettings::SetPropertyValueL( 
-              MusSettingsKeys::KFastStartupMode, MusSettingsKeys::EFastModeOn );
-
-    MultimediaSharingSettings::SetCapabilityQuerySettingL(
-                  MusSettingsKeys::EParallel );
-
-    CMusManager::SetAvailability(MultimediaSharing::EMultimediaSharingAvailable);
-    TInt menuPaneCount = eikPane->NumberOfItemsInPane();
-    iProvider->InitializeMenuPaneL( *aiwPane, 0, 0, *list );
-
-    MUS_CHECK_MEMORY_LEAVE( eikPane->NumberOfItemsInPane() == menuPaneCount + 3 )
-    
-    CleanupStack::PopAndDestroy( aiwPane );
-    CleanupStack::PopAndDestroy( list );
-    BaflUtils::DeleteFile( fs, KResourceFilenameRom() );
-
-    CleanupStack::PopAndDestroy(); // fs
-    }
-
+	
+	
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -777,15 +792,12 @@
     EUNIT_ASSERT( CMusManager::UseCase() == MultimediaSharing::EMusLiveVideo )
 
     iProvider->HandleMenuCmdL( EMusCommandClipShare, *pl, *pl, 0, this );
-    MUS_CHECK_MEMORY_LEAVE( CMusManager::UseCase() == MultimediaSharing::EMusClipVideo  )
     EUNIT_ASSERT( CMusManager::UseCase() == MultimediaSharing::EMusClipVideo )
 
     iProvider->HandleMenuCmdL( EMusCommandImageShare, *pl, *pl, 0, this );
-    MUS_CHECK_MEMORY_LEAVE( CMusManager::UseCase() == MultimediaSharing::EMusStillImage  )
     EUNIT_ASSERT( CMusManager::UseCase() == MultimediaSharing::EMusStillImage )
 
     iProvider->HandleMenuCmdL( EMusCommandContinue, *pl, *pl, 0, this );
-    MUS_CHECK_MEMORY_LEAVE( CMusManager::UseCase() == MultimediaSharing::EMusContinue  )
     EUNIT_ASSERT( CMusManager::UseCase() == MultimediaSharing::EMusContinue )
 
     CMusManager::SetStartError(
@@ -826,59 +838,9 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusAiwProvider::UT_CMusAiwProvider_HandleMenuCmdLFastModeL()
-    {
-    CAiwGenericParamList* pl = CAiwGenericParamList::NewLC();
-    
-    MultimediaSharingSettings::SetPropertyValueL( 
-               MusSettingsKeys::KFastStartupMode, MusSettingsKeys::EFastModeOn );
-    
-    // Fast mode, start live sharing (handle normally)
-    CMusManager::SetUseCase( MultimediaSharing::EMusContinue );
-    iProvider->HandleMenuCmdL( EMusCommandLiveShare, *pl, *pl, 0, this );
-    MUS_CHECK_MEMORY_LEAVE( CMusManager::UseCase() == MultimediaSharing::EMusLiveVideo  )
-    EUNIT_ASSERT( CMusManager::UseCase() == MultimediaSharing::EMusLiveVideo )
-
-    // Fast mode, start clip sharing, app not running nor hidden (handle normally)
-    CMusManager::SetUseCase( MultimediaSharing::EMusContinue );
-    iProvider->HandleMenuCmdL( EMusCommandClipShare, *pl, *pl, 0, this );
-    MUS_CHECK_MEMORY_LEAVE( CMusManager::UseCase() == MultimediaSharing::EMusClipVideo  )
-    EUNIT_ASSERT( CMusManager::UseCase() == MultimediaSharing::EMusClipVideo )
-        
-    // Fast mode, start clip sharing, app running and hidden (mus mgr is not
-    // used for starting application, only usecase P&S value is changed)
-    CMusManager::SetUseCase( MultimediaSharing::EMusContinue );
-    
-    TApaTask::iApplicationExist = ETrue;
-    
-    TBuf16< 10 > listOkMus; 
-    TUint16 upperBits = KMusUiUid >> 16;  
-    listOkMus.Append( upperBits );
-    listOkMus.Append( KMusUiUid );
-    listOkMus.Append( 0 );
-    listOkMus.Append( 0 );
-    RProperty::Set( KPSUidUikon, KUikAppHiddenList, listOkMus );  
-    
-    RProperty::Set( NMusSessionApi::KCategoryUid, NMusSessionApi::KUseCase, MultimediaSharing::EMusContinue );
-    
-    iProvider->HandleMenuCmdL( EMusCommandClipShare, *pl, *pl, 0, this );
-    EUNIT_ASSERT( CMusManager::UseCase() == MultimediaSharing::EMusContinue )
-    
-    TInt usecaseAfterFakeStart( 0 );
-    RProperty::Get( NMusSessionApi::KCategoryUid, NMusSessionApi::KUseCase, usecaseAfterFakeStart );
-    EUNIT_ASSERT( usecaseAfterFakeStart == MultimediaSharing::EMusClipVideo );
-    
-    CleanupStack::PopAndDestroy( pl );
-
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
 void UT_CMusAiwProvider::UT_CMusAiwProvider_ApplicationRunningLL()
     {
-    TApaTask::iApplicationExist = EFalse;
+    // Stub returns EFalse as default
     EUNIT_ASSERT( !iProvider->ApplicationRunningL() )
 
     // Use stub to mimic the existence of application
@@ -1009,90 +971,8 @@
     ImplementationGroupProxy( tableCount );
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusAiwProvider::UT_HiddenFromFastSwapL()
-    {
-    // Normal mode
-    MultimediaSharingSettings::SetPropertyValueL( 
-                MusSettingsKeys::KFastStartupMode, MusSettingsKeys::EFastModeOff );
-    EUNIT_ASSERT( !iProvider->HiddenFromFastSwapL() )
-    
-    // Fast mode
-    //
-    MultimediaSharingSettings::SetPropertyValueL( 
-               MusSettingsKeys::KFastStartupMode, MusSettingsKeys::EFastModeOn );
-    
-    // Key not found
-    PropertyHelper::SetErrorCode( KErrNotFound );
-    EUNIT_ASSERT( !iProvider->HiddenFromFastSwapL() )
-    
-    // Malformed key value
-    PropertyHelper::SetErrorCode( KErrNone );
-    TBuf16< 5 > listMalformed;
-    listMalformed.Copy( _L("05645") );
-    RProperty::Set( KPSUidUikon, KUikAppHiddenList, listMalformed );   
-    MUS_EUNIT_ASSERT_SPECIFIC_LEAVE( iProvider->HiddenFromFastSwapL(), KErrEof );
-    
-    // No musuid in value list
-    TBuf16< 6 > listOkNoMus;
-    TUint32 uid1 = 10002000;
-    TUint32 uid2 = 20003000;
-    // avkoncapserver publishes values in following manner
-    TUint16 upperBits = uid1 >> 16;
-    listOkNoMus.Append( upperBits );
-    listOkNoMus.Append( uid1 );
-    upperBits = uid2 >> 16;
-    listOkNoMus.Append( upperBits );
-    listOkNoMus.Append( uid2 );
-    listOkNoMus.Append( 0 );
-    listOkNoMus.Append( 0 );
-    RProperty::Set( KPSUidUikon, KUikAppHiddenList, listOkNoMus );  
-    EUNIT_ASSERT( !iProvider->HiddenFromFastSwapL() )
-    
-    // Musuid in value list
-    TBuf16< 10 > listOkMus;
-    TUint32 uid3 = 30005000;
-    upperBits = uid1 >> 16;
-    listOkMus.Append( upperBits );
-    listOkMus.Append( uid1 );
-    upperBits = uid2 >> 16;
-    listOkMus.Append( upperBits );
-    listOkMus.Append( uid2 );
-    
-    upperBits = KMusUiUid >> 16;  
-    listOkMus.Append( upperBits );
-    listOkMus.Append( KMusUiUid );
-    
-    upperBits = uid3 >> 16;
-    listOkMus.Append( upperBits );
-    listOkMus.Append( uid3 );
-    
-    listOkMus.Append( 0 );
-    listOkMus.Append( 0 );
-    RProperty::Set( KPSUidUikon, KUikAppHiddenList, listOkMus );  
-    EUNIT_ASSERT( iProvider->HiddenFromFastSwapL() )
-    }
 
-// HELPERS
 
-CAiwMenuPane* UT_CMusAiwProvider::CreateAiwMenuPaneLC( CEikMenuPane** aEikPane )
-    {
-    CEikMenuPane* eikPane = new( ELeave ) CEikMenuPane( this );
-    CleanupStack::PushL( eikPane );
-
-    // Constructing eikPane is not compulsory for testing and leads to a memory
-    // leak.
-    //eikPane->ConstructL( NULL, this );
-
-    CAiwMenuPane* aiwPane = new( ELeave ) CAiwMenuPane( *eikPane, 0 ); //Takes ownership
-    CleanupStack::Pop( eikPane );
-    CleanupStack::PushL( aiwPane );
-    *aEikPane = eikPane;
-    return aiwPane;
-    }
 
 //  TEST TABLE
 
@@ -1153,21 +1033,14 @@
     "InitializeMenuPaneL",
     "FUNCTIONALITY",
     SetupL, UT_CMusAiwProvider_InitializeMenuPaneL6L, Teardown)
-
+    
 EUNIT_TEST(
-    "InitializeMenuPaneL - fast mode",
+    "InitializeMenuPaneL - test7",
     "CMusAiwProvider",
     "InitializeMenuPaneL",
     "FUNCTIONALITY",
-    SetupL, UT_CMusAiwProvider_InitializeMenuPaneLFastModeL, Teardown)
-
-EUNIT_TEST(
-    "InitializeMenuPaneL - fast mode 2",
-    "CMusAiwProvider",
-    "InitializeMenuPaneL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAiwProvider_InitializeMenuPaneLFastMode2L, Teardown)
-
+    SetupL, UT_CMusAiwProvider_InitializeMenuPaneL7L, Teardown)
+	     
 EUNIT_TEST(
     "HandleMenuCmdL - test",
     "CMusAiwProvider",
@@ -1176,13 +1049,6 @@
     SetupL, UT_CMusAiwProvider_HandleMenuCmdLL, Teardown)
 
 EUNIT_TEST(
-    "HandleMenuCmdL - fastmode test",
-    "CMusAiwProvider",
-    "HandleMenuCmdL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusAiwProvider_HandleMenuCmdLFastModeL, Teardown)   
-
-EUNIT_TEST(
     "ApplicationRunningL - test",
     "CMusAiwProvider",
     "ApplicationRunningL",
@@ -1216,13 +1082,6 @@
     "ImplementationGroupProxy",
     "FUNCTIONALITY",
     SetupL, UT_ImplementationGroupProxyL, Teardown)
-    
-EUNIT_TEST(
-    "HiddenFromFastSwapL",
-    "CMusAiwProvider",
-    "HiddenFromFastSwapL",
-    "FUNCTIONALITY",
-    SetupL, UT_HiddenFromFastSwapL, Teardown)
 
 EUNIT_END_TEST_TABLE
 
--- a/mmshplugins/mmshaoplugin/group/musaoplugin.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/group/musaoplugin.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -42,8 +42,7 @@
 SOURCE                  muscallstatusmonitor.cpp
 SOURCE                  muscallconferencemonitor.cpp
 SOURCE                  muscallconferenceeventmonitor.cpp
-SOURCE					musvoipcallmonitor.cpp
-
+SOURCE                  musclirmonitor.cpp
 
 USERINCLUDE             ../inc
 USERINCLUDE             ../../../inc
@@ -56,8 +55,8 @@
 LIBRARY                 etel.lib
 LIBRARY                 etelmm.lib
 LIBRARY                 centralrepository.lib
-LIBRARY                 telephonyservice.lib
-LIBRARY                 serviceprovidersettings.lib
+LIBRARY                 etel3rdparty.lib
+
 // MultimediaSharing libraries:
 LIBRARY                 musmanagerclient.lib
 LIBRARY                 featmgr.lib
--- a/mmshplugins/mmshaoplugin/inc/mmuscallstateobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The observer class to monitor MuSh call state change
-*
-*/
-
-
-#ifndef MMUSCALLSTATEOBSERVER_H_
-#define MMUSCALLSTATEOBSERVER_H_
-
-
-/**
- * The observer class for call state monitor 
- */
-
-class MMusCallStateObserver
-    {
-public:
-    /**
-     * Notify Mush call state changed
-     */
-    virtual void MusCallStateChanged() = 0;
-    };
-
-#endif /*MMUSCALLSTATEOBSERVER_H_*/
-
-
-// End of File.
--- a/mmshplugins/mmshaoplugin/inc/musaoplugin.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/inc/musaoplugin.h	Wed Sep 01 12:31:01 2010 +0100
@@ -28,8 +28,6 @@
 #include <e32property.h>
 
 #include "musunittesting.h"
-#include "mmuscallstateobserver.h"
-#include "musmanager.h"
 
 // Enable the below line if Kodiak Ptt has to be monitered
 //class CMusPttCallMonitor;
@@ -43,8 +41,7 @@
  *
  * @lib musaoplugin.dll
  */
-class CMusAoPlugin : public CAlwaysOnlineEComInterface,
-                     public MMusCallStateObserver
+class CMusAoPlugin : public CAlwaysOnlineEComInterface                      
     {
 public:
 
@@ -78,12 +75,6 @@
      */
 
     void DeleteProperties();
-    
-    
-public: // from MMusCallStateObserver
-
-    void MusCallStateChanged();
-    
 
 private: // constructors
 
@@ -107,22 +98,10 @@
      */
 	void DefinePropertyL(TInt aKey,RProperty::TType aType,const TDesC& aVal);
 
-	/**
+    /**
      * Utility function to delete keys.
      */
 	void DeleteProperty(TInt aKey);
-
-	/**
-     * Starts Mus Manager Client.In turn it will start Mus Manager
-     * Server and Availability Plugin.
-     */
-    void StartMusClientL();
-
-    /*
-     * Stops Mus Manager Client.
-     */ 
-    void StopMusClient();
-
 	
 public: // from base class CAlwaysOnlineEComInterface
 
@@ -139,12 +118,6 @@
 
 private: // data
    
-    /**
-     * Instance of MusManager Client. Owned.
-     */
-    CMusManager* iManager;
-    
-
     /* Property Monitor  */
     CMusPropertyMonitor*      iPropertyMonitor;
 
@@ -174,6 +147,7 @@
     TInt iError;
    
     MUS_UNITTEST( UT_CMusAoPlugin )
+
     };
 
 #endif // MUSAOPLUGIN_H
--- a/mmshplugins/mmshaoplugin/inc/muscallconferencemonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/inc/muscallconferencemonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -58,12 +58,6 @@
           */
         void SetStateL();  
 
-         /**
-          * Get Conference Call Status
-          */
-        
-        RMobileConferenceCall::TMobileConferenceStatus GetConfStatus();
-
     private:
 
         /**
@@ -140,8 +134,8 @@
          */
         CMusCallConferenceEventMonitor* iConfCallEvent;
       
-        MUS_UNITTEST( UT_CMusCallConferenceMonitor )   
-        MUS_UNITTEST( UT_CMusTsyPropertyMonitor )
+        MUS_UNITTEST( UT_CMusCallConferenceMonitor )        
+        
     };
 
 #endif // MUSCALLCONFERENCEMONITOR_H
--- a/mmshplugins/mmshaoplugin/inc/muscalleventmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/inc/muscalleventmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -22,7 +22,6 @@
 
 #include "musunittesting.h"
 #include "muscallmonitorbase.h"
-#include "mmuscallstateobserver.h"
 
 #include <etelmm.h>
 #include <e32base.h>
@@ -41,9 +40,7 @@
          * aCall is not owned.
          * @return CMusCallEventMonitor object.
          */
-        static CMusCallEventMonitor* NewL(const RMobileCall& aCall, 
-                                            MMusTsyPropertyObserver& aObserver,
-                                            MMusCallStateObserver& aCallStateObserver );
+        static CMusCallEventMonitor* NewL(const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver );
                                 
         /**
          * Destructor.
@@ -55,8 +52,7 @@
         /**
          * C++ constructor.
          */
-        CMusCallEventMonitor( const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver, 
-                                MMusCallStateObserver& aCallStateObserver );
+        CMusCallEventMonitor( const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver );
 
         /**
          * Symbian 2nd-phase constructor.
--- a/mmshplugins/mmshaoplugin/inc/muscallmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/inc/muscallmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -22,7 +22,6 @@
 
 #include "musunittesting.h"
 #include "mustsypropertymonitor.h"
-#include "mmuscallstateobserver.h"
 #include <etelmm.h>
 #include <e32base.h>
 
@@ -55,8 +54,7 @@
         /**
          * Starts to monitor call status,event and conference.
          */
-        void StartMonitorL( RMobileLine& aLine, MMusTsyPropertyObserver& aObserver,
-                            MMusCallStateObserver& aCallStateObserver );
+        void StartMonitorL( RMobileLine& aLine, MMusTsyPropertyObserver& aObserver );
 
         /**
          * Stops monitoring call status,event and conference.
@@ -90,11 +88,6 @@
          */
         void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal);
         
-       /**
-        * Checks from CS call f required data is ready.
-        */
-        TBool IsDataReadyL();
-
         
     private:
 
@@ -113,7 +106,6 @@
          * ETrue to increase. EFalse to decrease. 
          */        
         void SetCallCountL(TBool aIncrease);
-        
 
     private:            
 
--- a/mmshplugins/mmshaoplugin/inc/muscallmonitorbase.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/inc/muscallmonitorbase.h	Wed Sep 01 12:31:01 2010 +0100
@@ -23,7 +23,6 @@
 #include "musunittesting.h"
 #include "mussesseioninformationapi.h"
 #include "mmustsypropertyobserver.h"
-#include "mmuscallstateobserver.h"
 #include <etelmm.h>
 #include <e32base.h>
 
@@ -58,11 +57,6 @@
          * CActive Implentation
          */
         TInt RunError( TInt aError ); 
-        
-        /**
-         * Checks if it the data is ready for the CS Call
-         */
-        TBool IsDataReadyL();
 
         
     protected:
@@ -70,15 +64,30 @@
         /**
          * C++ constructor.
          */
-        CMusCallMonitorBase( const RMobileCall& aCall,   
-                                MMusTsyPropertyObserver& aObserver, 
-                                MMusCallStateObserver& aCallStateObserver );
+        CMusCallMonitorBase( const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver );
         
         /**
          * Notify observer that our state changed
          */
         virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal );
         
+        /**
+         * Inspect the dialled number and set the PS key controlling whether
+         * to add Privacy-header accordingly.
+         */        
+        void SetClirSetting( const TDesC& aDialledNumber ) const;
+
+         /**
+         * Should set the privacy ps key to on off based on incoming cs call privacy settings.
+         * aCallInfo : Callinfo package read from current cs call.     
+         */
+        void SetTerminatingPrivacy( const RMobileCall& aCall ) const;
+        
+        /**
+        * Removes privacy prefix away from phone number
+        * @return returns dialed number witout prefix.  
+        */
+        HBufC* RemovePrefix( const TDesC& aOriginator ) const;
         
     protected:            
        
@@ -103,17 +112,11 @@
          *  Observer to get nofitied when RCall status changed 
          */
         MMusTsyPropertyObserver& iTsyObserver;
-        
-        
-        /*
-         * Reference of callstate observer not owned
-         */
-        MMusCallStateObserver& iCallStateObserver;
-
 
         MUS_UNITTEST( UT_CMusCallMonitor )
- 		MUS_UNITTEST( UT_CMusCallEventMonitor )
- 		MUS_UNITTEST( UT_CMusCallStatusMonitor )
+        MUS_UNITTEST( UT_CMusCallEventMonitor ) 
+        MUS_UNITTEST( UT_CMusCallStatusMonitor )
+        MUS_UNITTEST( UT_CMusCallMonitorBase )
     };
 
 #endif // MUSAOCALLMONITORBASE_H
--- a/mmshplugins/mmshaoplugin/inc/muscallstatusmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/inc/muscallstatusmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -23,7 +23,6 @@
 #include "mussesseioninformationapi.h"
 #include "muscallmonitorbase.h"
 #include "musunittesting.h"
-#include "mmuscallstateobserver.h"
 
 #include <etelmm.h>
 #include <e32base.h>
@@ -43,9 +42,7 @@
          * aCall is not owned.
          * @return CMusCallStatusMonitor object.
          */
-        static CMusCallStatusMonitor* NewL( const RMobileCall& aCall, 
-                                               MMusTsyPropertyObserver& aObserver,
-                                               MMusCallStateObserver& aCallStateObserver );
+        static CMusCallStatusMonitor* NewL( const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver );
                                 
         /**
          * Destructor.
@@ -57,8 +54,7 @@
         /**
          * C++ constructor.
          */
-        CMusCallStatusMonitor(const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver,
-                                  MMusCallStateObserver& aCallStateObserver );
+        CMusCallStatusMonitor(const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver );
 
         /**
          * Symbian 2nd-phase constructor.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmshaoplugin/inc/musclirmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Monitor that observes the calling line identity restriction
+*                setting
+*
+*/
+
+
+
+#ifndef MUSCLIRMONITOR_H
+#define MUSCLIRMONITOR_H
+
+#include "musunittesting.h"
+
+#include <etelmm.h>
+#include <e32base.h>
+#include <etel3rdparty.h>
+
+
+/**
+ * Monitor, which observes status of CLIR setting that controls whether the
+ * caller's phone number/id is shown to the called party.
+ *
+ * @lib musaoplugin.dll
+ */
+class CMusClirMonitor : public CActive
+    {
+
+    public: // constructors and destructor
+
+        /**
+         * Two-phased constructor. Leaves on failure.
+         */
+        static CMusClirMonitor* NewL();
+
+        /**
+         * Destructor.
+         */
+        ~CMusClirMonitor();
+
+
+    public: // API
+
+         /**
+          * Starts the asynchronous reading of CLIR setting. When reading 
+          * completes, the PS key is updated.
+          */
+         void ReadClir();
+
+    private:
+
+        /**
+         * C++ constructor.
+         */
+        CMusClirMonitor();
+
+    private: // functions from base class CActive
+
+        void ConstructL();
+
+        void RunL();
+
+        void DoCancel();
+
+        TInt RunError( TInt aError );
+
+        void TranslateResult( CTelephony::TIdentityServiceStatus aResult );
+        
+    private: // Data
+
+        CTelephony* iTelephony; //owned
+        CTelephony::TIdentityServiceV1 iTIdentityServiceV1;
+        CTelephony::TIdentityServiceV1Pckg iTIdentityServiceV1Pckg;
+        
+        // Tells if phone's number/id is allowed to be sent to the remove party
+        TBool iAllowed;
+
+		// How many times RunL has been completed with an error in a row
+		TInt iErrorCount;
+		
+        MUS_UNITTEST( UT_CMusClirMonitor )
+
+    };
+
+#endif // MUSCLIRMONITOR_H
--- a/mmshplugins/mmshaoplugin/inc/muspropertymonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/inc/muspropertymonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -21,7 +21,6 @@
 #define MUSPROPERTYMONITOR_H
 
 #include "musunittesting.h"
-#include "mmuscallstateobserver.h"
 #include <etelmm.h>
 #include <e32base.h>
 #include <e32property.h>
@@ -41,35 +40,36 @@
         /**
          * Two-phased constructor. Leaves on failure.
          */
-        static CMusPropertyMonitor* NewL( MMusCallStateObserver& aCallStateObserver );
+        static CMusPropertyMonitor* NewL();
 
         /**
          * Destructor.
          */
         ~CMusPropertyMonitor();
-        
-        
-    public: // other public functions
-        
-        /*
-         * Checks from P/S Keys about call state
-         * @return EFalse if call state is ENoCall otherwise ETrue  
-         */
-        TBool IsCallConnected();
-
 
     private:
 
         /**
          * C++ constructor.
          */
-        CMusPropertyMonitor( MMusCallStateObserver& aCallStateObserve );
+        CMusPropertyMonitor();
 
         /**
          * Symbian 2nd-phase constructor.
          */
         void ConstructL();
 
+         /**
+         * Starts Mus Manager Client.In turn it will start Mus Manager
+         * Server and Availability Plugin.
+         */
+        void StartMusClientL();
+
+        /*
+         * Stops Mus Manager Client.
+         */ 
+        void StopMusClient();
+    
 
     private:
 
@@ -98,12 +98,12 @@
         /**
          * Instance of RProperty.
          */
-        RProperty iPropertyEvent;    
-     
-        /*
-         * Reference of callstate observer not owned
+        RProperty iPropertyEvent;        
+
+        /**
+         * Instance of MusManager Client. Owned.
          */
-        MMusCallStateObserver& iCallStateObserver;
+        CMusManager* iManager;
 
         MUS_UNITTEST( UT_CMusPropertyMonitor )
 
--- a/mmshplugins/mmshaoplugin/inc/mustsypropertymonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/inc/mustsypropertymonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,26 +16,23 @@
 */
 
 
+
 #ifndef MUSTSYPROPERTYMONITOR_H
 #define MUSTSYPROPERTYMONITOR_H
 
-// Enable the below line if Kodiak Ptt has to be monitered
-// #include "mmusptteventobserver.h"
-#include <etel.h>
-#include <etelmm.h>
-#include <e32base.h>
-#include <e32property.h>
-#include <ctsydomainpskeys.h>
-
 #include "musunittesting.h"
 #include "mussesseioninformationapi.h"
 #include "mmustsypropertyobserver.h"
-#include "mmuscallstateobserver.h"
+// Enable the below line if Kodiak Ptt has to be monitered
+// #include "mmusptteventobserver.h"
+#include <etelmm.h>
+#include <e32base.h>
+#include <e32property.h>
 
 class CMusCallMonitor;
-class CMusVoipCallMonitor;
 class CMusPTTCallMonitor;
 class CMusCallConferenceMonitor;
+class CMusClirMonitor;
 
 /**
  * This class monitors the line event,if call is connected
@@ -56,8 +53,7 @@
         /**
          * Two-phased constructor.
          */
-        static CMusTsyPropertyMonitor* NewL( RMobilePhone& aPhone, 
-                                             MMusCallStateObserver& aCallStateObserver );
+        static CMusTsyPropertyMonitor* NewL( RMobilePhone& aPhone );
 
         /**
          * Destructor.
@@ -74,24 +70,19 @@
          * Function from MMusTsyPropertyObserver
          */
         void NotifyCallStateChanged(NMusSessionInformationApi::TMusCallEvent aVal, TName& aCallName);
-        
-        /**
-         * Checks from the corresponding monitors if the data is ready.
-         */
-        TBool IsDataReadyL();
 
     private:
 
         /**
          * C++ constructor.
          */
-        CMusTsyPropertyMonitor( RMobilePhone& aPhone, MMusCallStateObserver& aCallStateObserve );
+        CMusTsyPropertyMonitor( RMobilePhone& aPhone );
 
         /**
          * Symbian 2nd-phase constructor.
          */
         void ConstructL();
-        
+
 
     private: // functions from base class CActive
 
@@ -144,44 +135,7 @@
         /**
           * Add / Remove Call Monitors based on Mus criteria          
           */
-        void MonitorCallL(const TPSCTsyCallState& aCallState,
-                const TPSCTsyCallType& aCallType);
-        
-        /**
-          * Add / Remove Call Monitors based on Mus criteria          
-          */
-        void MonitorCSCallL();
-        
-    private: // Voip related 
-        /*
-         * If the call Monitor doesnt exist then it creats one new
-         * CMusCallMonitor class and add into array. 
-         * Leavs if objects creation fails.
-         */
-        void AddVoipCallMonitorL( TName& aCallName );
-
-        /*
-         * It removs the CMusCallMonitor object from array
-         * based on the call name.         
-         */
-
-        void RemoveVoipCallMonitor( TName& aCallName );
-        
-        /**
-         * Add / Remove Call Monitors based on Mus criteria          
-         */
-       void MonitorVoipCallL(const TPSCTsyCallState& aCallState);
-
-        /**
-         * Removes and reset the voip call monitor array
-         */
-       void RemoveAllVoipCallMonitors( );
-       
-        /**
-         * Checks multimediasharing call criteria's
-         */
-       void CheckCallCriteriaL();
-
+        void MonitorCallL();
 
          /**
           * Delete all call monitor        
@@ -230,11 +184,6 @@
         RPointerArray<CMusCallMonitor> iCallMonitorArray;
 
         /**
-         * Array of voip Call Monitors.
-         */
-        RPointerArray<CMusVoipCallMonitor> iVoipCallMonitorArray;
-        
-        /**
          * Conference call monitor, owned.
          */
         CMusCallConferenceMonitor* iConferenceMonitor;
@@ -242,16 +191,13 @@
         /**
          * Instance of RProperty.
          */
-        RProperty iPropertyEvent;  
+        RProperty iPropertyEvent;
         
-        /*
-         * Reference of callstate observer not owned
-         */
-        MMusCallStateObserver& iCallStateObserver;
+        CMusClirMonitor* iClirMonitor;
+        
 
         MUS_UNITTEST( UT_CMusTsyPropertyMonitor )
-        MUS_UNITTEST( UT_CMusAoPlugin )
-        
+
     };
 
 #endif // MUSTSYPROPERTYMONITOR_H
--- a/mmshplugins/mmshaoplugin/inc/musvoipcallmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Monitors the VOIP calls.
-*
-*/
-
-
-#ifndef MUSVOIPCALLMONITOR_H_
-#define MUSVOIPCALLMONITOR_H_
-
-#include <e32base.h>
-
-#include <ccallinformation.h>
-#include <mcall.h>
-#include <ccallinfoiter.h>
-
-#include "mussesseioninformationapi.h"
-#include "musunittesting.h"
-#include "mmuscallstateobserver.h"
-
-/**
- * Monitors the Internet telephony calls ( VOIP )  
- * Same condition of CS call criteria applies here to
- * for Mush. 
- * @lib musaoplugin.dll
- */
-class CMusVoipCallMonitor : public CActive
-    {
-
-    public: // constructors and destructor
-        /**
-         * Symbian two-phased constructor.
-         */
-        static CMusVoipCallMonitor* NewL( TName& aCallName, 
-											MMusCallStateObserver& aCallStateObserver );
-        
-        /**
-         * Symbian two-phased constructor.
-         */
-        static CMusVoipCallMonitor* NewLC( TName& aCallName );
-
-        /**
-         * Destructor.
-         */
-        ~CMusVoipCallMonitor();
-        
-    private: // functions from base class CActive
-        
-        void RunL();
-
-        void DoCancel();
-
-        TInt RunError( TInt aError );
-        
-    private:
-
-        /**
-         * C++ constructor.
-         */
-        CMusVoipCallMonitor( TName& aCallName, MMusCallStateObserver& aCallStateObserver );
-
-        /**
-         * Symbian 2nd-phase constructor.
-         */
-        void ConstructL( );
-    
-    public:
-        
-        /**
-         * Compares the call names (aName == iCallName) 
-         * 
-         * @return ETrue if matches else EFalse
-         */
-        TBool IsEqual(TName& aName);
-
-        /**
-         * Sets the call state PS Key value.
-         * 
-         * @aVal one of the call event types
-         */
-        void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal);        
-        
-        /**
-         * Checks from voip call monitor if required data is ready.
-         */
-         TBool IsDataReadyL();
-
-    private:
-        
-        /**
-         * Sets the call Information like call direction and remote address
-         */
-        void SetCallInfoL();   
-
-        /**
-         * Sets the call Provider Information (CallProvider Name is PS Key)
-         */
-        void SetCallProviderInfoL( TUint32 aServiceId );   
-        
-        TBool RemoteInfoExistsL();
-        
-        void MonitorForRemoteInfoL();
-        
-        void StopRemoteInfoMonitoring();
-        
-        void ReportStateChangeL( NMusSessionInformationApi::TMusCallEvent aVal );
-        
-        static TInt GuardTimerExpired( TAny* aPtr );
-        
-        /**
-         * Returns current connected call Service ID.
-         * @return Current connected call service ID, if there is at least one
-         * call in connected state, otherwise KErrNotFound
-         */
-        TUint32 CallServiceIdL(); 
-        
-        void AddDomainFromOwnUsernameL( TUint32 aServiceId, TDes16& aUri );
-        
-        // Resets the Call Provider Information.
-        void ResetCallProviderName();
-        
-        
-    private:
-        /*
-         * Name of the call.
-         */
-        TName& iCallName ; 
-        
-        RProperty iPropertyEvent;
-        
-        /*
-         * Reference of callstate observer not owned
-         */
-        MMusCallStateObserver& iCallStateObserver;
-        
-        CDeltaTimer* iGuardTimer;
-        TCallBack iGuardTimerCallBack;
-        TDeltaTimerEntry iGuardTimerEntry;
-        
-        MUS_UNITTEST( UT_CMusVoipCallMonitor )
-
-    };
-
-#endif /* MUSVOIPCALLMONITOR_H_ */
--- a/mmshplugins/mmshaoplugin/src/musaoplugin.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/musaoplugin.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -16,7 +16,6 @@
 */
 
 
-#include "musmanager.h"
 #include "musresourceproperties.h"
 #include "mussesseioninformationapi.h"
 #include "mussettingskeys.h"
@@ -33,6 +32,9 @@
 #include <AlwaysOnlineManagerCommon.h>
 #include <AlwaysOnlineManagerClient.h>
 #include <mmtsy_names.h>
+#include <featmgr.h>
+
+using namespace NMusSessionInformationApi;
 
 // -----------------------------------------------------------------------------
 // Symbian two-phase constructor.
@@ -65,14 +67,19 @@
 void CMusAoPlugin::ConstructL()
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusAoPlugin::ConstructL" )
-    DefinePropertiesL();
-    User::LeaveIfError( iServer.Connect() );
-    User::LeaveIfError( iPhone.Open( iServer, KMmTsyPhoneName() ) );        
-    iTsyPropertyMonitor = CMusTsyPropertyMonitor::NewL(iPhone, *this );    
-    iPropertyMonitor = CMusPropertyMonitor::NewL(*this);    
-    // Enable the below line if Kodiak Ptt has to be monitered
-    // iPttCallMonitor = CMusPttCallMonitor::NewL(*iLineMonitor);    
-    
+	FeatureManager::InitializeLibL();
+    TBool support = FeatureManager::FeatureSupported( KFeatureIdMultimediaSharing );
+	FeatureManager::UnInitializeLib();
+	if ( support )
+		{
+        DefinePropertiesL();
+        User::LeaveIfError( iServer.Connect() );
+        User::LeaveIfError( iPhone.Open( iServer, KMmTsyPhoneName() ) );        
+        iTsyPropertyMonitor = CMusTsyPropertyMonitor::NewL(iPhone);    
+        iPropertyMonitor = CMusPropertyMonitor::NewL();    
+        // Enable the below line if Kodiak Ptt has to be monitered
+        // iPttCallMonitor = CMusPttCallMonitor::NewL(*iLineMonitor); 
+		}
     MUS_LOG( "mus: [MUSAO]  <- CMusAoPlugin::ConstructL" )
     }
 
@@ -84,7 +91,6 @@
     {
     MUS_LOG( "-> CMusAoPlugin::~CMusAoPlugin" )
     // should never come here, because service should always be on
-    delete iManager;
     delete iPropertyMonitor;
     delete iTsyPropertyMonitor;
     // Enable the below line if Kodiak Ptt has to be monitered
@@ -136,10 +142,12 @@
                  RProperty::EInt,( TInt ) NMusSessionInformationApi::EMUSAllowed); 
     DefinePropertyL(NMusSessionInformationApi::KMusCallDirection,
                 RProperty::EInt,( TInt ) NMusSessionInformationApi::ENoDirection);  
-    _LIT( KEmptyCallProvider,"" );
-    DefinePropertyL(NMusSessionInformationApi::KMUSCallProvider,
-                        RProperty::EText,KEmptyCallProvider);
-
+    DefinePropertyL(NMusSessionInformationApi::KMUSPrivacy,
+                RProperty::EInt,( TInt ) NMusSessionInformationApi::EPrivacyOff);  
+    DefinePropertyL(KMusClirSetting,
+                RProperty::EInt,( TInt ) ESendOwnNumber);  
+                              
+ 
     MUS_LOG( "mus: [MUSAO]  <- CMusAoPlugin::DefineResourceProperties" )
     }
 
@@ -220,9 +228,10 @@
     DeleteProperty(NMusSessionInformationApi::KMusCallEvent);
     DeleteProperty(NMusSessionInformationApi::KMusCallCount);
     DeleteProperty(NMusSessionInformationApi::KMusTelNumber);
-    DeleteProperty(NMusSessionInformationApi::KMUSCallProvider);
     DeleteProperty(NMusSessionInformationApi::KMUSForbidden);
     DeleteProperty(NMusSessionInformationApi::KMusCallDirection);
+    DeleteProperty(NMusSessionInformationApi::KMUSPrivacy);
+    DeleteProperty(KMusClirSetting);
     MUS_LOG( "mus: [MUSAO]  <- CMusAoPlugin::DeleteResourcePropertiesL" )
     }
 
@@ -250,72 +259,5 @@
     return &iError;;
     }
 
-// -----------------------------------------------------------------------------
-// CMusAoPlugin::StartMusClient()
-// This will start the MusManager Client which inturn should start
-// MusManager Server and Availability Plugin.
-// -----------------------------------------------------------------------------
-//
-void CMusAoPlugin::StartMusClientL()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusAoPlugin::StartMusClient" )
-    if( !iManager )
-        {
-        iManager = CMusManager::NewL();
-        }
-    iManager->ExamineAvailabilityL();   
-    MUS_LOG( "mus: [MUSAO]  <- CMusAoPlugin::StartMusClient" ) 
-    }
-
-// -----------------------------------------------------------------------------
-// CMusAoPlugin::StopMusClient()
-// This will stop the MusManager Client which inturn should stop
-// MusManager Server and Availability Plugin.
-// -----------------------------------------------------------------------------
-//
-void CMusAoPlugin::StopMusClient()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusAoPlugin::StopMusClient" )
-    if( iManager )
-        {
-        delete iManager;
-        iManager = NULL;
-        }
-    MUS_LOG( "mus: [MUSAO]  <- CMusAoPlugin::StopMusClient" )
-    }
-
-// -----------------------------------------------------------------------------
-// From MMusCallStateObserver
-// CMusAoPlugin::MusCallStateChanged()
-// -----------------------------------------------------------------------------
-//
-void CMusAoPlugin::MusCallStateChanged( )
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusAoPlugin::MusCallStateChanged" )
-
-    TBool dataReady = EFalse;
-    TRAPD( error, dataReady = iTsyPropertyMonitor->IsDataReadyL() )
-    
-    if ( error == KErrNone &&
-            dataReady &&
-            iPropertyMonitor->IsCallConnected() )
-        {
-        MUS_LOG( "mus: [MUSAO]  Starting Mush Client" )
-        TRAP( error, StartMusClientL() )
-        
-        MUS_LOG1("mus: [MUSAO]  Error Ocurred = %d",error )
-        
-        if ( error != KErrNone )
-            {
-            StopMusClient();
-            }
-        }
-    else
-        {
-        MUS_LOG( "mus: [MUSAO]  Stopping Mush Client" )
-        StopMusClient();
-        }
-    MUS_LOG( "mus: [MUSAO]  <- CMusAoPlugin::MusCallStateChanged" )
-    }
 
 // End of file
--- a/mmshplugins/mmshaoplugin/src/muscallconferenceeventmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/muscallconferenceeventmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -113,6 +113,7 @@
                  SetStateL( NMusSessionInformationApi::EConferenceCall ); 
                  break;
             case RMobileConferenceCall::EConferenceTerminated:
+                 SetStateL( NMusSessionInformationApi::EConferenceTerminated );
                  MonitorCallL();
                  break;
             case RMobileConferenceCall::EConferenceSwapped:
@@ -179,6 +180,14 @@
     else
         {
          // No point of reporting it .
+         //EConferenceTerminated must be set every time to notify avaeventmonitor
+        if ( aVal == NMusSessionInformationApi::EConferenceTerminated )
+        	{
+			User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+						 NMusSessionInformationApi::KMusCallEvent,
+						 aVal ));  
+        	}
+    
         }    
     MUS_LOG( "mus: [MUSAO]  <- CMusCallConferenceEventMonitor::SetStateL" )    
     }
--- a/mmshplugins/mmshaoplugin/src/muscallconferencemonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/muscallconferencemonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -245,19 +245,6 @@
     MUS_LOG( "mus: [MUSAO]  -> CMusCallConferenceMonitor::CheckCallStatus")
     }
 
-
-// --------------------------------------------------------------------------------
-// TMobileConferenceStatus GetCconfStatus()
-// Get the Conference Call Status
-// --------------------------------------------------------------------------------
-//
-RMobileConferenceCall::TMobileConferenceStatus CMusCallConferenceMonitor::GetConfStatus()
-    {
-    return iConfStatus;
-    }
-
-
-
 // End of file
 
 
--- a/mmshplugins/mmshaoplugin/src/muscalleventmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/muscalleventmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -30,12 +30,10 @@
 // Symbian two-phase constructor.
 // ------------------------------------------------------------------------------
 //
-CMusCallEventMonitor* CMusCallEventMonitor::NewL( const RMobileCall& aCall, 
-                                                    MMusTsyPropertyObserver& aObserver,
-                                                    MMusCallStateObserver& aCallStateObserver )
+CMusCallEventMonitor* CMusCallEventMonitor::NewL( const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver )
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusCallEventMonitor::NewL" )
-    CMusCallEventMonitor* self = new (ELeave) CMusCallEventMonitor(aCall, aObserver, aCallStateObserver );
+    CMusCallEventMonitor* self = new (ELeave) CMusCallEventMonitor(aCall, aObserver);
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -73,13 +71,11 @@
 // C++ constructor.
 // ------------------------------------------------------------------------------
 //
-CMusCallEventMonitor::CMusCallEventMonitor( const RMobileCall& aCall, 
-                                            MMusTsyPropertyObserver& aObserver,
-                                            MMusCallStateObserver& aCallStateObserver ) 
-        : CMusCallMonitorBase(aCall, aObserver, aCallStateObserver)     
+CMusCallEventMonitor::CMusCallEventMonitor( const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver ) 
+        : CMusCallMonitorBase(aCall, aObserver)     
         
     { 
-    
+      
     }
 
 
--- a/mmshplugins/mmshaoplugin/src/muscallmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/muscallmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -89,15 +89,14 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CMusCallMonitor::StartMonitorL(RMobileLine& aLine, 
-                                    MMusTsyPropertyObserver& aObserver,
-                                    MMusCallStateObserver& aCallStateObserver)
+void CMusCallMonitor::StartMonitorL(RMobileLine& aLine, MMusTsyPropertyObserver& aObserver)
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusCallMonitor::StartMonitorL" )
     if(IsMonitored())User::Leave(KErrAlreadyExists);    
     User::LeaveIfError( iCall.OpenExistingCall( aLine, iCallName ) );        
-    iCallStatusMonitor = CMusCallStatusMonitor::NewL( iCall, aObserver, aCallStateObserver );
-    iCallEventMonitor = CMusCallEventMonitor::NewL( iCall, aObserver, aCallStateObserver );    
+    iCallStatusMonitor = CMusCallStatusMonitor::NewL( iCall, aObserver );
+    iCallEventMonitor = CMusCallEventMonitor::NewL( iCall, aObserver );
+    
     MUS_LOG( "mus: [MUSAO]  <- CMusCallMonitor::StartMonitorL" )
     }
 
@@ -188,16 +187,4 @@
     }
 
 
-// --------------------------------------------------------------------------------
-// CMusCallMonitor::IsDataReadyL()
-// Checks if Data is ready CS Call.
-// --------------------------------------------------------------------------------
-
-TBool CMusCallMonitor::IsDataReadyL()
-    {
-    // Wrapper Function for Monitoring CS Call Data
-    return iCallStatusMonitor->IsDataReadyL();
-    }
-
 // End of file
-
--- a/mmshplugins/mmshaoplugin/src/muscallmonitorbase.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/muscallmonitorbase.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -19,6 +19,7 @@
 #include "mussesseioninformationapi.h"
 #include "muscallmonitorbase.h"
 #include "muslogger.h"
+#include "mussettings.h"
 
 #include <etel.h>
 #include <etelmm.h>
@@ -26,6 +27,9 @@
 #include <mmtsy_names.h>
 #include <e32property.h>
 
+_LIT( KDoNotSendOwnNumber, "#31#" );
+_LIT( KDoSendOwnNumber, "*31#" );
+
 
 // -----------------------------------------------------------------------------
 // C++ destructor.
@@ -41,12 +45,8 @@
 // C++ constructor.
 // -----------------------------------------------------------------------------
 //
-CMusCallMonitorBase::CMusCallMonitorBase(const RMobileCall& aCall, 
-        MMusTsyPropertyObserver& aObserver, 
-        MMusCallStateObserver& aCallStateObserver ) 
-        : CActive( EPriorityNormal ),iCall(aCall),iTsyObserver( aObserver ), 
-        iCallStateObserver( aCallStateObserver )
-        
+CMusCallMonitorBase::CMusCallMonitorBase(const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver ) 
+        : CActive( EPriorityNormal ),iCall(aCall),iTsyObserver( aObserver )
         
     {   
 	// Intialize the remote call event state to Resume , means connected.
@@ -67,16 +67,6 @@
     User::LeaveIfError(RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                             NMusSessionInformationApi::KMusCallCount,callCount));
     MUS_LOG1( "mus: [MUSAO]  - CallCount = %d",callCount )
-    
-    RMobileCall::TMobileCallInfoV3 callInfo;
-    RMobileCall::TMobileCallInfoV3Pckg pckg( callInfo );
-    iCall.GetMobileCallInfo( pckg );
-    if( callInfo.iEmergency )
-    	{
-    	User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-    				 NMusSessionInformationApi::KMusCallEvent,
-    				 ( TInt ) NMusSessionInformationApi::ENoCall ));
-    	}
     /*
     * CountOfCallMonitors is number of CallMonitor Objects.Static Reference Count.
     * = No of active calls . 
@@ -84,12 +74,22 @@
     * if call count is more than one , should be taken care by conference call or
     * multicall criteria.
     */
-    else if( callCount == 1 ) 
+     if( callCount == 1) 
         {
         TInt currentVal;
         User::LeaveIfError(RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                             NMusSessionInformationApi::KMusCallEvent,currentVal));
         MUS_LOG1( "mus: [MUSAO]  - Remote State = %d",iRemoteCallEvent )
+        
+        
+        /*
+         If Call is Connected then set the Call info.
+         */
+        if( aVal==NMusSessionInformationApi::ECallConnected ) 
+            {
+            SetCallInfoL();
+            }
+        
         /* If current event is callconnected and remote is not in hold set the
            property value to CallConnected.Else set it to CallHold.
            Note : We can be sure about Local is connected when it goes to
@@ -109,37 +109,33 @@
                                                  NMusSessionInformationApi::KMusCallEvent,
                                                  aVal ));    
                 }
-            } 
+            }
+    	else if( aVal==NMusSessionInformationApi::EConferenceCall)
+    			{
+                User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                                                   NMusSessionInformationApi::KMusCallEvent,
+                                                   NMusSessionInformationApi::EConferenceCall   ));  
+    			}
         else if( aVal==NMusSessionInformationApi::ECallHold || iRemoteCallEvent==RMobileCall::ERemoteHold )
             {            
             User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
                                                NMusSessionInformationApi::KMusCallEvent,
                                                NMusSessionInformationApi::ECallHold   ));  
             }          
-         else if( aVal==NMusSessionInformationApi::ENoCall )
-            {            
-            User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                               NMusSessionInformationApi::KMusCallEvent,
-                                               NMusSessionInformationApi::ENoCall ));  
-            }  
-          else if( aVal==NMusSessionInformationApi::EConferenceCall )
-            {            
-            User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                               NMusSessionInformationApi::KMusCallEvent,
-                                               NMusSessionInformationApi::EConferenceCall ));  
-            }  
-         	  
-        /*
-         If Call is Connected then set the Call info.
-         */
-        if( aVal==NMusSessionInformationApi::ECallConnected ) 
+        if( aVal != NMusSessionInformationApi::ENoCall)
             {
-            SetCallInfoL();
+            RMobileCall::TMobileCallInfoV3 callInfo;
+            RMobileCall::TMobileCallInfoV3Pckg pckg( callInfo );
+    
+            User::LeaveIfError(iCall.GetMobileCallInfo( pckg ));  
+            if( callInfo.iEmergency )
+                    {
+                    User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                                             NMusSessionInformationApi::KMusCallEvent,
+                                             ( TInt ) NMusSessionInformationApi::ENoCall ));
+                    }
             }
 
-        // All P/S Keys are Set
-        //Check if preconditions are met to start or stop the MushClient.
-        iCallStateObserver.MusCallStateChanged();
         }   
  
     MUS_LOG( "mus: [MUSAO]  <- CMusCallMonitorBase::SetStateL" )    
@@ -159,6 +155,7 @@
                                            callInfo.iRemoteParty.iRemoteNumber;
      // Set telephone number
     HBufC* telNo( NULL );
+    HBufC* cleanTelNo( NULL );
     if( remoteNumber.iTelNumber.Length() > 0 )
         {
         MUS_LOG( "mus: [MUSAO]     remoteNumber.iTelNumber.Lenght > 0" )
@@ -166,18 +163,27 @@
         }
     else
         {
-        MUS_LOG( "mus: [CALLMN]     remoteNumber.iTelNumber.Lenght =< 0" )
+        MUS_LOG( "mus: [MUSAO]     remoteNumber.iTelNumber.Lenght =< 0" )
         RMobilePhone::TMobileAddress dialledParty = callInfo.iDialledParty;
         telNo = dialledParty.iTelNumber.AllocLC();
+        
         }
+    if ( MultimediaSharingSettings::PrivacySetting() )
+        {
+        SetClirSetting( *telNo );
+        }
+    cleanTelNo = RemovePrefix( *telNo );
+    CleanupStack::PushL( cleanTelNo );  
+    
     User::LeaveIfError(RProperty::Set( 
                                       NMusSessionInformationApi::KCategoryUid,
                                       NMusSessionInformationApi::KMusTelNumber,
-                                      *telNo ));  
-    MUS_LOG_TDESC("mus: [MUSAO]     telNo = ", (*telNo))
+                                      *cleanTelNo ));  
+    MUS_LOG_TDESC("mus: [MUSAO]     telNo = ", (*cleanTelNo))
+    CleanupStack::PopAndDestroy(cleanTelNo);
     CleanupStack::PopAndDestroy(telNo);
     
-    // Set call direction.     
+    // Set call direction.
     RMobileCall::TMobileCallDirection direction =
                                             callInfo.iRemoteParty.iDirection;
     MUS_LOG1( "mus: [MUSAO]  Call Direction = %d",direction )
@@ -190,6 +196,7 @@
         }
     else if ( direction  == RMobileCall::EMobileTerminated )
         {
+        SetTerminatingPrivacy( iCall );
         User::LeaveIfError(RProperty::Set( 
                         NMusSessionInformationApi::KCategoryUid,
                         NMusSessionInformationApi::KMusCallDirection,
@@ -201,14 +208,8 @@
                         NMusSessionInformationApi::KCategoryUid,
                         NMusSessionInformationApi::KMusCallDirection,
                         ( TInt ) NMusSessionInformationApi::ENoDirection ));
-        } 
-    
+        }
     
-    /* Set the call provider information to some dummy Value */
-    User::LeaveIfError(RProperty::Set( 
-                            NMusSessionInformationApi::KCategoryUid,
-                            NMusSessionInformationApi::KMUSCallProvider,
-                            KNullDesC));
     
     MUS_LOG( "mus: [MUSAO]  <- CMusCallMonitorBase::SetCallInfoL" )  
     }
@@ -241,42 +242,90 @@
     iTsyObserver.NotifyCallStateChanged( aVal, callInfo.iCallName );
     }
 
+// --------------------------------------------------------------------------
+// void CMusCallMonitorBase::SetClirSetting()
+// Determine CLIR setting from dialled digits
+// --------------------------------------------------------------------------
+//
+void CMusCallMonitorBase::SetClirSetting( const TDesC& aDialledNumber ) const
+    {
+    MUS_LOG( "mus: [MUSAO]  -> CMusCallMonitorBase::SetClirSetting" );
 
-// --------------------------------------------------------------------------------
-// CMusCallConferenceMonitor::IsDataReadyL()
-// Checks if Data is ready CS Call.
-// --------------------------------------------------------------------------------
+    NMusSessionInformationApi::TMusClirSetting 
+        sendNumber( NMusSessionInformationApi::ESendOwnNumber );
 
-TBool CMusCallMonitorBase::IsDataReadyL()
+    TPtrC prefix = aDialledNumber.Left( KDoNotSendOwnNumber().Length() );
+    if ( prefix == KDoNotSendOwnNumber() )
+        {
+        sendNumber = NMusSessionInformationApi::EDoNotSendOwnNumber;
+        }
+    RProperty::Set( NMusSessionInformationApi::KCategoryUid, 
+                    NMusSessionInformationApi::KMusClirSetting, sendNumber );
+    MUS_LOG1( "mus: [MUSAO]  <- CMusCallMonitorBase::SetClirSetting send nbr=%d",
+    sendNumber == NMusSessionInformationApi::ESendOwnNumber );
+    }
+
+
+// --------------------------------------------------------------------------
+// void CMusCallMonitorBase::RemovePrefix()
+// --------------------------------------------------------------------------
+//
+HBufC* CMusCallMonitorBase::RemovePrefix( const TDesC& aOriginator ) const
     {
-    // This function need to be updated when new 
-    // P/S key is published in Call monitor 
+    MUS_LOG( "mus: [MUSAO]  -> CMusCallMonitorBase::removePrefix" );
 
-    MUS_LOG( "mus: [MUSAO]  -> CMusCallMonitorBase::IsDataReadyL" )
+    HBufC * withoutPrefix(NULL);
     
-    // Ensure there is tel Number.
-    HBufC* telNumInfo = HBufC::NewLC( RProperty::KMaxPropertySize );
-    TPtr ptelInfo = telNumInfo->Des();
-    TInt err  = KErrNone;
-       
-    err = RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                            NMusSessionInformationApi::KMusTelNumber,
-                            ptelInfo );
-
-    TBool telInfoExisit ( err == KErrNone && telNumInfo->Des().Length() > 0 );
-    CleanupStack::PopAndDestroy( telNumInfo );
+    TPtrC prefix = aOriginator.Left( KDoNotSendOwnNumber().Length() );
+    if ( prefix == KDoNotSendOwnNumber()|| prefix == KDoSendOwnNumber() )
+        {
+        MUS_LOG( "Number have a prefix" );
+        withoutPrefix = aOriginator.AllocL();
+        *withoutPrefix = aOriginator;
+        TPtr ptr = withoutPrefix->Des();
+        ptr.Delete(0,KDoNotSendOwnNumber().Length());
+        }
+    else
+        {
+        withoutPrefix = aOriginator.AllocL();
+        }
     
-    // Ensure Call direction info is there
-    TInt callDirection = NMusSessionInformationApi::ENoDirection;
-    err = RProperty::Get( 
-                    NMusSessionInformationApi::KCategoryUid,
-                    NMusSessionInformationApi::KMusCallDirection,
-                    callDirection );
-    
-    TBool callInfoExisit ( err == KErrNone && callDirection != NMusSessionInformationApi::ENoDirection );
-    
-    MUS_LOG( "mus: [MUSAO]  <- CMusCallMonitorBase::IsDataReadyL" )
-    return telInfoExisit && callInfoExisit;
+    MUS_LOG( "mus: [MUSAO]  <- CMusCallMonitorBase::RemovePrefix" );
+    return withoutPrefix;
+    }
+
+
+// --------------------------------------------------------------------------
+// void CMusCallMonitorBase::SetTerminatingPrivacy()
+// --------------------------------------------------------------------------
+//
+void CMusCallMonitorBase::SetTerminatingPrivacy( const RMobileCall& aCall ) const
+    {
+    MUS_LOG( "mus: [MUSAO]  -> CMusCallMonitorBase::SetTerminatingPrivacy" )
+    RMobileCall::TMobileCallInfoV3 callInfo;
+    RMobileCall::TMobileCallInfoV3Pckg callInfoPckg( callInfo );
+    if( aCall.GetMobileCallInfo( callInfoPckg ) != KErrNone )
+        {
+        return; // error cannot do
+        }
+    MUS_LOG( "mus: [MUSAO] Get remote status" )
+    RMobileCall::TMobileCallRemoteIdentityStatus remoteStatus = 
+                    callInfo.iRemoteParty.iRemoteIdStatus;
+            
+    if( remoteStatus == RMobileCall::ERemoteIdentitySuppressed )
+        {
+         RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                        NMusSessionInformationApi::KMUSPrivacy,
+                        ( TInt ) NMusSessionInformationApi::EPrivacyOn );
+        }
+    else
+        {
+        RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                        NMusSessionInformationApi::KMUSPrivacy,
+                        ( TInt ) NMusSessionInformationApi::EPrivacyOff );
+        }
+    MUS_LOG1( "mus: [MUSAO] Remote status = %d",remoteStatus )
+    MUS_LOG( "mus: [MUSAO]  <- CMusCallMonitorBase::SetTerminatingPrivacy" )
     }
 
 // End of file
--- a/mmshplugins/mmshaoplugin/src/muscallstatusmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/muscallstatusmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -30,12 +30,11 @@
 //
 CMusCallStatusMonitor* CMusCallStatusMonitor::NewL( 
     const RMobileCall& aCall, 
-    MMusTsyPropertyObserver& aObserver,
-    MMusCallStateObserver& aCallStateObserver )
+    MMusTsyPropertyObserver& aObserver )
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusCallStatusMonitor::NewL" )
     CMusCallStatusMonitor* self = 
-        new( ELeave )CMusCallStatusMonitor( aCall, aObserver, aCallStateObserver );
+        new( ELeave )CMusCallStatusMonitor( aCall, aObserver );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -76,9 +75,8 @@
 //
 CMusCallStatusMonitor::CMusCallStatusMonitor(
     const RMobileCall& aCall, 
-    MMusTsyPropertyObserver& aObserver,
-    MMusCallStateObserver& aCallStateObserver ) 
-    : CMusCallMonitorBase( aCall, aObserver, aCallStateObserver )  
+    MMusTsyPropertyObserver& aObserver ) 
+    : CMusCallMonitorBase( aCall, aObserver )  
     {    
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmshaoplugin/src/musclirmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,209 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Monitor that observes the calling line identity restriction
+*                setting
+*
+*/
+
+
+#include "musclirmonitor.h"
+#include "muslogger.h"
+#include "mussesseioninformationapi.h"
+#include <mmtsy_names.h>
+#include <e32property.h>
+
+const TInt KMaxErrorsBeforeStop = 5;
+
+using namespace NMusSessionInformationApi;
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::NewL
+// -----------------------------------------------------------------------------
+//
+CMusClirMonitor* CMusClirMonitor::NewL()
+    {
+    MUS_LOG( "mus: [CALLMN]  -> CMusClirMonitor::NewL" )
+    
+    CMusClirMonitor* self = new (ELeave) CMusClirMonitor;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    MUS_LOG( "mus: [CALLMN]  <- CMusClirMonitor::NewL" )
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::~CMusClirMonitor
+// -----------------------------------------------------------------------------
+//
+CMusClirMonitor::~CMusClirMonitor()
+    {
+    MUS_LOG( "mus: [CALLMN]  -> CMusClirMonitor::~CMusClirMonitor" )
+
+    Cancel();
+    delete iTelephony;
+    
+    MUS_LOG( "mus: [CALLMN]  <- CMusClirMonitor::~CMusClirMonitor" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::CMusClirMonitor
+// Read the parameter's current value
+// -----------------------------------------------------------------------------
+//
+CMusClirMonitor::CMusClirMonitor() :
+    CActive( EPriorityNormal ),
+    iTIdentityServiceV1Pckg( iTIdentityServiceV1 ),
+    iAllowed( ETrue ),
+    iErrorCount( 0 )
+    {
+    MUS_LOG( "mus: [CALLMN]  -> CMusClirMonitor::CMusClirMonitor" )
+
+    CActiveScheduler::Add( this );
+
+    MUS_LOG( "mus: [CALLMN]  <- CMusClirMonitor::CMusClirMonitor" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMusClirMonitor::ConstructL()
+    {
+    iTelephony = CTelephony::NewL();
+    ReadClir(); // Read the initial value
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::RunL
+// -----------------------------------------------------------------------------
+//
+void CMusClirMonitor::RunL()
+    {
+    MUS_LOG1( "mus: [CALLMN] -> CMusClirMonitor::RunL iStatus=%d",
+              iStatus.Int() )
+
+    if ( iStatus == KErrNone )
+        {
+        TranslateResult( iTIdentityServiceV1.iIdentityStatus );
+        iErrorCount = 0;
+        }
+    else
+        {
+        ++iErrorCount;
+        MUS_LOG1( "mus: [CALLMN]  Failed, error count(%d)", iErrorCount )
+
+        // If reading fails, retry few times
+        if ( iErrorCount <= KMaxErrorsBeforeStop )
+            {
+            ReadClir();
+            }
+        }
+
+    MUS_LOG( "mus: [CALLMN] <- CMusClirMonitor::RunL" )    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CMusClirMonitor::DoCancel()
+    {
+    MUS_LOG( "mus: [CALLMN]  -> CMusClirMonitor::DoCancel" )
+
+    iTelephony->CancelAsync( CTelephony::EGetIdentityServiceStatusCancel );
+
+    MUS_LOG( "mus: [CALLMN]  <- CMusClirMonitor::DoCancel" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::RunError
+// Ignore errors and continue
+// -----------------------------------------------------------------------------
+//
+TInt CMusClirMonitor::RunError( TInt aError )
+    {
+    MUS_LOG1( "mus: [CALLMN]  <-> CMusClirMonitor::RunError aError %d", aError )
+    aError = KErrNone; // Get rid of "aError is not used" warning in UREL
+    return aError;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::ReadClir
+// -----------------------------------------------------------------------------
+//
+void CMusClirMonitor::ReadClir()
+    {
+    MUS_LOG( "mus: [CALLMN]  -> CMusClirMonitor::ReadClir" )
+
+    if ( !IsActive( ))
+        {
+        CTelephony::TIdentityService condition =
+            CTelephony::EIdServiceCallerRestriction;
+        iTelephony->GetIdentityServiceStatus( iStatus,
+                                              condition,
+                                              iTIdentityServiceV1Pckg );
+        SetActive();
+        }
+    
+    MUS_LOG( "mus: [CALLMN]  <- CMusClirMonitor::ReadClir" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMusClirMonitor::TranslateResult
+// -----------------------------------------------------------------------------
+//
+void
+CMusClirMonitor::TranslateResult( CTelephony::TIdentityServiceStatus aResult )
+    {
+    MUS_LOG1( "mus: [CALLMN]  -> CMusClirMonitor::TranslateResult aResult=%d",
+              aResult )
+
+    switch ( aResult )
+        {
+        case CTelephony::EIdServiceActivePermanent:
+        case CTelephony::EIdServiceActiveDefaultRestricted:
+            iAllowed = EFalse;
+            break;
+
+        case CTelephony::EIdServiceActiveDefaultAllowed:
+        case CTelephony::EIdServiceNotProvisioned:
+            iAllowed = ETrue;
+            break;
+
+        case CTelephony::EIdServiceUnknown:
+        default:
+            ; // retain current value
+        }
+
+    TMusClirSetting sendNumber( EDoNotSendOwnNumber );
+    if ( iAllowed )
+        {
+        sendNumber = ESendOwnNumber;
+        }
+    RProperty::Set( KCategoryUid, KMusClirSetting, sendNumber );
+            
+    MUS_LOG1( "mus: [CALLMN]  <- CMusClirMonitor::TranslateResult allowed=%d",
+              iAllowed )
+    }
+
+// end of file
--- a/mmshplugins/mmshaoplugin/src/muspropertymonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/muspropertymonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -17,6 +17,7 @@
 
 
 #include "muspropertymonitor.h"
+#include "musmanager.h"
 #include "mussesseioninformationapi.h"
 #include "muslogger.h"
 
@@ -25,10 +26,10 @@
 // Symbian two-phase constructor.
 // -----------------------------------------------------------------------------
 //
-CMusPropertyMonitor* CMusPropertyMonitor::NewL( MMusCallStateObserver& aCallStateObserver )  
+CMusPropertyMonitor* CMusPropertyMonitor::NewL()
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusPropertyMonitor::NewL" )
-    CMusPropertyMonitor* self = new (ELeave) CMusPropertyMonitor( aCallStateObserver );
+    CMusPropertyMonitor* self = new (ELeave) CMusPropertyMonitor();
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -40,8 +41,8 @@
 // C++ constructor.
 // -----------------------------------------------------------------------------
 //
-CMusPropertyMonitor::CMusPropertyMonitor( MMusCallStateObserver& aCallStateObserver )
-    :CActive( EPriorityNormal ), iCallStateObserver ( aCallStateObserver )
+CMusPropertyMonitor::CMusPropertyMonitor()
+    :CActive( EPriorityNormal )
     {
     }
 
@@ -72,6 +73,7 @@
     MUS_LOG( "mus: [MUSAO]  -> CMusPropertyMonitor::~CMusPropertyMonitor" )
     Cancel();
     iPropertyEvent.Close(); 
+    delete iManager;        
     MUS_LOG( "mus: [MUSAO]  -> <- CMusPropertyMonitor::~CMusPropertyMonitor" )
     }
 
@@ -84,14 +86,40 @@
 void CMusPropertyMonitor::RunL()
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusPropertyMonitor::RunL" )
-
     // resubscribe before processing new value to prevent missing updates
     iPropertyEvent.Subscribe( iStatus );
     SetActive();    
-
-    //Check if preconditions are met to start or stop the MushClient.
-    iCallStateObserver.MusCallStateChanged();
-
+    TInt value = NMusSessionInformationApi::ENoCall;
+    User::LeaveIfError(iPropertyEvent.Get( value ));     
+    switch(value)
+        {      
+        /* CallHold and ConferenceCall are Error Cases.Will be handled by
+           Availability Plugin and Inform to AIW.
+         */           
+        case NMusSessionInformationApi::ECallHold:
+             MUS_LOG( "mus: [MUSAO]  CallEvent  = ECallHold" )                 
+             break;
+        case NMusSessionInformationApi::EConferenceCall:
+             MUS_LOG( "mus: [MUSAO]  CallEvent  = EConferenceCall" )                 
+             break;
+        /* When Call is connected , start the MusClient */
+        case NMusSessionInformationApi::ECallConnected:
+             MUS_LOG( "mus: [MUSAO]  CallEvent  = ECallConnected" )
+             StartMusClientL();
+             break;
+        /* When Call is disconnected , stop the MusClient */
+        case NMusSessionInformationApi::ENoCall:
+             MUS_LOG( "mus: [MUSAO]  CallEvent  = ENoCall" )
+             StopMusClient();
+             break;     
+        case NMusSessionInformationApi::EConferenceTerminated:
+             MUS_LOG( "mus: [MUSAO]  CallEvent  = EConferenceTerminated" ) 
+             break;
+        
+        default:
+             MUS_LOG( "mus: [MUSAO]  CallEvent  = default. Treated ENoCall" )
+             StopMusClient();
+        }
     MUS_LOG( "mus: [MUSAO]  <- CMusPropertyMonitor::RunL" )
     }
 
@@ -109,6 +137,41 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMusPropertyMonitor::StartMusClient()
+// This will start the MusManager Client which inturn should start
+// MusManager Server and Availability Plugin.
+// -----------------------------------------------------------------------------
+//
+void CMusPropertyMonitor::StartMusClientL()
+    {
+    MUS_LOG( "mus: [MUSAO]  -> CMusPropertyMonitor::StartMusClient" )
+    if( !iManager )
+        {
+        iManager = CMusManager::NewL();
+        }
+    iManager->ExamineAvailabilityL();   
+    MUS_LOG( "mus: [MUSAO]  <- CMusPropertyMonitor::StartMusClient" ) 
+    }
+
+// -----------------------------------------------------------------------------
+// CMusPropertyMonitor::StopMusClient()
+// This will stop the MusManager Client which inturn should stop
+// MusManager Server and Availability Plugin.
+// -----------------------------------------------------------------------------
+//
+void CMusPropertyMonitor::StopMusClient()
+    {
+    MUS_LOG( "mus: [MUSAO]  -> CMusPropertyMonitor::StopMusClient" )
+    if( iManager )
+        {
+        delete iManager;
+        iManager = NULL;
+        }
+    MUS_LOG( "mus: [MUSAO]  <- CMusPropertyMonitor::StopMusClient" )
+    
+    }
+
+// -----------------------------------------------------------------------------
 // CMusPropertyMonitor::RunError()
 // Implemented for CActive.It will be called automatically
 // when a leave occurs in RunL()
@@ -117,37 +180,14 @@
 TInt CMusPropertyMonitor::RunError(TInt aError)
     {
     MUS_LOG1( "mus: [MUSAO]  -> CMusPropertyMonitor::RunError = %d",aError )
-    
-    // Monitoring Error Occurred, Terminate the MushSession.
-    TInt err = RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                          NMusSessionInformationApi::KMusCallEvent,
-                          NMusSessionInformationApi::ENoCall);
-
-    iCallStateObserver.MusCallStateChanged();
-
+    if( iManager )
+        {
+        delete iManager;
+        iManager = NULL;
+        }    
     aError = KErrNone; // We handled this error already. So return KErrNone.
     MUS_LOG( "mus: [MUSAO]  <- CMusPropertyMonitor::RunError " )    
     return aError;
     }
 
-// -----------------------------------------------------------------------------
-// CMusPropertyMonitor::IsCallConnected()
-// Checks if the call is connected: 
-// -----------------------------------------------------------------------------
-//
-TBool CMusPropertyMonitor::IsCallConnected()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusPropertyMonitor::IsCallConnected" )
-    TInt callState = ( TInt ) NMusSessionInformationApi::ENoCall;
-    TInt err = KErrNone;
-    
-    err = RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                          NMusSessionInformationApi::KMusCallEvent,
-                          callState );
-    
-    MUS_LOG( "mus: [MUSAO]  <- CMusPropertyMonitor::IsCallConnected" )
-    
-    return ( err == KErrNone && callState != NMusSessionInformationApi::ENoCall );
-    }
-
 // End of file
--- a/mmshplugins/mmshaoplugin/src/mustsypropertymonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/mustsypropertymonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -19,11 +19,11 @@
 #include "mustsypropertymonitor.h"
 #include "muscallconferencemonitor.h"
 #include "muscallmonitor.h"
-#include "musvoipcallmonitor.h"
 #include "muslogger.h"
-#include "musfactorysettings.h"
+#include "mussettings.h"
+#include "musclirmonitor.h"
 
-
+#include <etel.h>
 #include <e32property.h>
 #include <mmtsy_names.h>
 #include <ctsydomainpskeys.h>
@@ -33,11 +33,10 @@
 // Symbian two-phase constructor.
 // -----------------------------------------------------------------------------
 //
-CMusTsyPropertyMonitor* CMusTsyPropertyMonitor::NewL( RMobilePhone& aPhone, 
-                                    MMusCallStateObserver& aCallStateObserver )
+CMusTsyPropertyMonitor* CMusTsyPropertyMonitor::NewL( RMobilePhone& aPhone )
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusTsyPropertyMonitor::NewL" )
-    CMusTsyPropertyMonitor* self = new (ELeave) CMusTsyPropertyMonitor( aPhone, aCallStateObserver );
+    CMusTsyPropertyMonitor* self = new (ELeave) CMusTsyPropertyMonitor(aPhone);
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -54,10 +53,9 @@
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusTsyPropertyMonitor::~CMusTsyPropertyMonitor" )    
     Cancel();
-    delete iConferenceMonitor;    
-    iCallMonitorArray.ResetAndDestroy(); 
-    iCallMonitorArray.Close();
-    RemoveAllVoipCallMonitors();
+    delete iConferenceMonitor;
+    delete iClirMonitor;
+    iCallMonitorArray.ResetAndDestroy();
     iLine.Close();
     MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::~CMusTsyPropertyMonitor" )
     }
@@ -72,7 +70,13 @@
     CActiveScheduler::Add(this);
     User::LeaveIfError( iLine.Open( iPhone, KMmTsyVoice1LineName() ) );
     iConferenceMonitor = CMusCallConferenceMonitor::NewL(
-                                                iPhone,iLine,iCallMonitorArray);    
+                                                iPhone,iLine,iCallMonitorArray);
+    
+    if (MultimediaSharingSettings::PrivacySetting())
+        {
+        iClirMonitor = CMusClirMonitor::NewL();
+        }
+    
     User::LeaveIfError( iPropertyEvent.Attach(
                                 KPSUidCtsyCallInformation,
                                 KCTsyCallState ) );
@@ -85,8 +89,8 @@
 // C++ constructor.
 // -----------------------------------------------------------------------------
 //
-CMusTsyPropertyMonitor::CMusTsyPropertyMonitor(RMobilePhone& aPhone, MMusCallStateObserver& aCallStateObserver )
-    : CActive( EPriorityNormal ),iPhone(aPhone), iCallStateObserver ( aCallStateObserver )
+CMusTsyPropertyMonitor::CMusTsyPropertyMonitor(RMobilePhone& aPhone)
+    : CActive( EPriorityNormal ),iPhone(aPhone)
     {
     }
 
@@ -102,36 +106,24 @@
     // subscribe , so that we dont miss any events.
     iPropertyEvent.Subscribe( iStatus );    
     SetActive();
-    TPSCTsyCallState callState = EPSCTsyCallStateUninitialized;
-    User::LeaveIfError(iPropertyEvent.Get( (TInt&)callState ));
-    TPSCTsyCallType callType = EPSCTsyCallTypeUninitialized;
-    User::LeaveIfError(RProperty::Get(KPSUidCtsyCallInformation,KCTsyCallType,
-                                     (TInt&)callType));
-    MUS_LOG1( "mus: [MUSAO]  iTsyCallMonitor->CallState = %d",callState )        
-    switch(callState)
+    TInt value = EPSCTsyCallStateUninitialized;
+    User::LeaveIfError(iPropertyEvent.Get( value )); 
+    MUS_LOG1( "mus: [MUSAO]  iTsyCallMonitor->CallState = %d",value )        
+    switch(value)
         {   
-            case EPSCTsyCallStateNone:
-                 MUS_LOG( "mus: [MUSAO] EPSCTsyCallStateNone" )
+            case EPSCTsyCallStateNone:                 
                  SetStateL(NMusSessionInformationApi::ENoCall);
                  // Sometimes disconnected call goes stright to this state
                  // so we have to call this function to remove call monitors.
-                 MonitorCallL( callState,callType); 
-                 break;
-            case EPSCTsyCallStateDisconnecting:
-                 MUS_LOG( "mus: [MUSAO] EPSCTsyCallStateDisconnecting" )                                
-                 MonitorCallL( callState,callType);                        
-                 break;
-            case EPSCTsyCallStateAnswering:
-                 MUS_LOG( "mus: [MUSAO] EPSCTsyCallStateAnswering" )
-                 MonitorCallL( callState,callType);                      
-                 break;
-            case EPSCTsyCallStateConnected:                                 
-                 MUS_LOG( "mus: [MUSAO] EPSCTsyCallStateConnected" )
-                 MonitorCallL( callState,callType);                       
-                 break;
-            case EPSCTsyCallStateHold:
-                 MUS_LOG( "mus: [MUSAO]  EPSCTsyCallStateHold" )
-                 SetStateL(NMusSessionInformationApi::ECallHold);
+                 RemoveAllCallMonitor();
+                 break;                
+            case EPSCTsyCallStateDisconnecting:                 
+            case EPSCTsyCallStateAnswering:                 
+            case EPSCTsyCallStateConnected:                                             
+            case EPSCTsyCallStateHold:                                    
+                  // in all above states if multible call exist then 
+                 // we have to find all the calls state and do accordingly.
+                 MonitorCallL(); 
                  break;
             default:
                  MUS_LOG( "mus: [MUSAO]  Undesired CallState " )   
@@ -187,13 +179,19 @@
         }
     MUS_LOG1( "mus: [MUSAO]  Call Exist = %d ",isCallExist )
     if( !isCallExist ) 
-        {                
+        {
+        if ( iClirMonitor )
+            {
+            //Start async reading of CLIR from phone settings
+            iClirMonitor->ReadClir();
+            }
+        
         CMusCallMonitor* callMonitor = CMusCallMonitor::NewL( aCallName,
                                                               IsPttCallExist() );   
         CleanupStack::PushL( callMonitor );
         iCallMonitorArray.AppendL( callMonitor );
         CleanupStack::Pop( callMonitor );
-        callMonitor->StartMonitorL(iLine, *this, iCallStateObserver );       
+             callMonitor->StartMonitorL(iLine, *this);       
         }
     MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::AddCallMonitorL" )
     }
@@ -322,52 +320,13 @@
     MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::SetStateL" )    
     }
 
+
 // -----------------------------------------------------------------------------
 // CMusTsyPropertyMonitor::MonitorCallL() 
-// Decides which call monitor (CS,VOIP etc ) has to be called.
+// Monitors the call and if needed adds/removes  call monitor.
 // -----------------------------------------------------------------------------
 //
-void CMusTsyPropertyMonitor::MonitorCallL( const TPSCTsyCallState& aCallState,
-                                           const TPSCTsyCallType& aCallType)
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CCMusTsyPropertyMonitor::MonitorCallL" )
-    switch( aCallType )
-        {
-        case EPSCTsyCallTypeUninitialized:
-        case EPSCTsyCallTypeNone:
-        case EPSCTsyCallTypeFax:            
-        case EPSCTsyCallTypeData:
-        case EPSCTsyCallTypeHSCSD:
-        case EPSCTsyCallTypeH324Multimedia:
-            break;// dont care
-        case EPSCTsyCallTypeCSVoice:           
-            MonitorCSCallL();
-            break;
-        case EPSCTsyCallTypeVoIP:
-            {
-            // if error occured when reading factory setting key 
-            // behave default ie all calls supported.
-            TBool supported = ETrue;
-            TRAP_IGNORE( supported = MusFactorySettings::IsSupportedL( aCallType ) )
-            if( supported)
-                {
-                MonitorVoipCallL( aCallState );                                   
-                }      
-            break;           
-            }
-        default:
-            break;
-        }
-    // Check now for multimediasharing call criteria.
-    CheckCallCriteriaL();
-    MUS_LOG( "mus: [MUSAO]  <- CCMusTsyPropertyMonitor::MonitorCallL" )
-    }
-// -----------------------------------------------------------------------------
-// CMusTsyPropertyMonitor::MonitorCSCallL() 
-// Monitors the CS call and if needed adds/removes  call monitor.
-// -----------------------------------------------------------------------------
-//
-void CMusTsyPropertyMonitor::MonitorCSCallL()
+void CMusTsyPropertyMonitor::MonitorCallL()
     {
     MUS_LOG( "mus: [MUSAO]  -> CMusTsyPropertyMonitor::MonitorCallL")
     TInt callCount;
@@ -390,173 +349,22 @@
             {
             AddCallMonitorL(callInfo.iCallName); 
             }                                  
-        }    
-    MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::MonitorCallL")
-    }
-
-// -----------------------------------------------------------------------------
-// CMusTsyPropertyMonitor::MonitorVoipCallL() 
-// Monitors the voip call and if needed adds/removes  call monitor.
-// -----------------------------------------------------------------------------
-//
-void CMusTsyPropertyMonitor::MonitorVoipCallL( const TPSCTsyCallState& aCallState)
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusTsyPropertyMonitor::MonitorVoipCallL")
-    // TODO : Call Name should be read from covergence api [CCE/CCH]
-    //        which is not available as of now 22-Dec-2008
-    TName callName(_L("Voip 1"));
-    switch(aCallState)
-       {   
-       case EPSCTsyCallStateDisconnecting:
-            MUS_LOG( "mus: [MUSAO] EPSCTsyCallStateDisconnecting" )                                
-            RemoveVoipCallMonitor(callName);                       
-            break;
-       case EPSCTsyCallStateAnswering:
-       case EPSCTsyCallStateConnected:
-            MUS_LOG( "mus: [MUSAO] EPSCTsyCallStateAnswering/EPSCTsyCallStateConnected" )
-            AddVoipCallMonitorL(callName);                       
-            break;          
-       default:
-            break;              
-       }
-    MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::MonitorVoipCallL")
-    }
-
-// -----------------------------------------------------------------------------
-// CMusTsyPropertyMonitor::AddVoipCallMonitorL( TName aCallName )
-// Adds new voip call monitor if the call is not monitored already.
-// -----------------------------------------------------------------------------
-//
-void CMusTsyPropertyMonitor::AddVoipCallMonitorL(TName& aCallName) 
-    {
-    MUS_LOG_TDESC( "mus: [MUSAO]  -> CMusTsyPropertyMonitor::AddCallMonitorL"\
-                                                                   ,aCallName )
-    TBool isCallExist =  EFalse;  
-    for ( TInt i = 0; i < iVoipCallMonitorArray.Count() && !isCallExist; i++ )
-        {             
-        if( iVoipCallMonitorArray[i]->IsEqual( aCallName ) )
-            {
-            isCallExist = ETrue;
-            }
-        }    
-    MUS_LOG1( "mus: [MUSAO]  Call Exist = %d ",isCallExist )
-    if( !isCallExist ) 
-        {                
-        CMusVoipCallMonitor* callMonitor = 
-                    CMusVoipCallMonitor::NewL( aCallName, iCallStateObserver );   
-        CleanupStack::PushL( callMonitor );
-        iVoipCallMonitorArray.AppendL( callMonitor );
-        CleanupStack::Pop( callMonitor );
         }
-    MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::AddCallMonitorL" )
-    }
-    
-    
-// -----------------------------------------------------------------------------
-// CMusTsyPropertyMonitor::RemoveCallEventMonitorL( TName aCallName ) 
-// Remove the Call Monitor if it exist in array.
-// -----------------------------------------------------------------------------
-//
-void CMusTsyPropertyMonitor::RemoveVoipCallMonitor( TName& aCallName ) 
-    {
-    MUS_LOG_TDESC( "mus: [MUSAO]  -> CMusTsyPropertyMonitor::RemoveCallMonitor "
-                                                                 ,aCallName )
-    for ( TInt i = 0; i < iVoipCallMonitorArray.Count(); i++ )
-        {
-        if( iVoipCallMonitorArray[i]->IsEqual( aCallName ) )
-            {
-            delete iVoipCallMonitorArray[i];
-            iVoipCallMonitorArray.Remove(i);
-            break;
-           }
-        }
-    MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::RemoveCallMonitor" )
-    }
+    // Sometimes when call get disconnected then call object disappears.So
+    // check the call state or open the call , if there is an error or undesired
+    // call state , remove that callmonitor from array. 
+    RemoveUnUsedCallMonitors();    
 
-// -----------------------------------------------------------------------------
-// CMusTsyPropertyMonitor::RemoveAllVoipCallMonitors 
-// Remove all voip call monitors
-// -----------------------------------------------------------------------------
-//
-void CMusTsyPropertyMonitor::RemoveAllVoipCallMonitors( ) 
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusTsyPropertyMonitor::RemoveAllVoipCallMonitors ")
-    iVoipCallMonitorArray.ResetAndDestroy();
-    iVoipCallMonitorArray.Close();
-    MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::RemoveAllVoipCallMonitors" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMusTsyPropertyMonitor::CheckCallCriteria 
-// Checks the Multimediasharing call criterias
-// -----------------------------------------------------------------------------
-//
-void CMusTsyPropertyMonitor::CheckCallCriteriaL()
-    {
-    TInt csCall = iCallMonitorArray.Count();
-    TInt voipCall = iVoipCallMonitorArray.Count();
-    switch( csCall )
-        {
-        case 0 : 
-            {
-            switch( voipCall )
-                {
-                /* No cs call or voip call */
-                case 0 : 
-                        {
-                        User::LeaveIfError(
-                         RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                        NMusSessionInformationApi::KMusCallEvent,
-                                        0 ));   
-                        SetStateL(NMusSessionInformationApi::ENoCall);
-                        break;
-                        }                    
-                /* No cs call but one voip call */
-                case 1 : 
-                        {
-                        iVoipCallMonitorArray[0]->
-                            SetStateL(NMusSessionInformationApi::ECallConnected);
-                        break;
-                        }
-                /* No cs call but more than one voip call */    
-                default: SetStateL(NMusSessionInformationApi::ECallHold);
-                         break;
-                }
-            break;
-            }
-        case 1 : 
-            {
-            switch( voipCall )
-                {
-                /* One cs call but no voip call */
-                case 0  : break;// Will be handled by cs call monitors.
-                /* One cs call and one or more voip calls */
-                default : SetStateL(NMusSessionInformationApi::ECallHold);
-                         break;                
-                }
-            break;
-            }
-        default: // 2 or more CS calls
-            {
-            /* Sometimes when call get disconnected then call object disappears.So
-             * check the call state or open the call , if there is an error or undesired
-             * call state , remove that callmonitor from array.
-             */
-            RemoveUnUsedCallMonitors();    
-
-            /* It is already multicall so atleast one should be under hold.
-             * so set the state first to hold and then let the conference 
-             * monitor decide the conference state.
-             */
-            SetStateL(NMusSessionInformationApi::ECallHold);  
-            
-            /* Still we dont know here about conference state so 
-             * let the conference call monitor decide .
-             */
-            iConferenceMonitor->SetStateL();         
-            break;
-            }
+    if(iCallMonitorArray.Count() > 1)
+        {                
+        // it is already multicall so atleast one should be hold.
+        // so set the state first to hold
+        SetStateL(NMusSessionInformationApi::ECallHold);               
+        // still we dont know here about conference state so 
+        // let the conference call monitor decide .
+        iConferenceMonitor->SetStateL(); 
         }
+    MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::MonitorCallL")
     }
 
 
@@ -641,41 +449,4 @@
     
     MUS_LOG( "mus: [MUSAO]  <- CMusTsyPropertyMonitor::NotifyCallStateChanged" )
     }
-
-
-
-// -----------------------------------------------------------------------------
-// CMusTsyPropertyMonitor::IsDataReadyL 
-// -----------------------------------------------------------------------------
-//
-TBool CMusTsyPropertyMonitor::IsDataReadyL()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusTsyPropertyMonitor::IsDataReadyL" )
-
-    TBool dataReady = EFalse;
-    TInt csCall = iCallMonitorArray.Count();
-    TInt voipCall = iVoipCallMonitorArray.Count();
-    
-    // In case of Conference Notify that data is ready.
-    if ( iConferenceMonitor->GetConfStatus() !=  RMobileConferenceCall::EConferenceIdle )
-        {
-        MUS_LOG( "mus: [MUSAO]  Conference CASE" )
-        dataReady = ETrue;
-        }
-    else if ( csCall == 1 && !voipCall  )
-        {
-        MUS_LOG( "mus: [MUSAO]  CS CALL" )
-        dataReady = iCallMonitorArray[0]->IsDataReadyL();
-        }
-    else if ( voipCall == 1 && !csCall )
-        {
-        MUS_LOG( "mus: [MUSAO]  VOIP CALL" )
-        dataReady = iVoipCallMonitorArray[0]->IsDataReadyL();
-        }
-
-    MUS_LOG1( "mus: [MUSAO] <- CMusTsyPropertyMonitor::IsDataReadyL = %d",dataReady)
-    return dataReady;
-    }
-
 // End of file
-
--- a/mmshplugins/mmshaoplugin/src/musvoipcallmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,502 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Monitors the VOIP calls.
-*
-*/
-
-
-#include <e32property.h>
-#include <telephonydomainpskeys.h>
-
-// Call Information API
-#include <ccallinformation.h>
-
-// SP Settings
-#include <spdefinitions.h>
-#include <spentry.h>
-#include <spproperty.h>
-#include <spsettings.h>
-
-#include "musvoipcallmonitor.h"
-#include "mussesseioninformationapi.h"
-#include "muslogger.h"
-
-const TUint KMusAoRemoteInfoMonitoringTimeout = 2000000; // 2 seconds
-_LIT( KSipAt, "@" );
-
-// -----------------------------------------------------------------------------
-// Symbian two-phase constructor.
-// -----------------------------------------------------------------------------
-//
-CMusVoipCallMonitor* CMusVoipCallMonitor::NewL( TName& aCallName, 
-                                        MMusCallStateObserver& aCallStateObserver )
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::NewL" )
-    CMusVoipCallMonitor* self = 
-                new (ELeave) CMusVoipCallMonitor( aCallName, aCallStateObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL( );
-    CleanupStack::Pop( self );
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::NewL" )
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// C++ destructor.
-// -----------------------------------------------------------------------------
-//
-CMusVoipCallMonitor::~CMusVoipCallMonitor()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::~CMusVoipCallMonitor" )    
-    
-    ResetCallProviderName();
-    
-    StopRemoteInfoMonitoring();
-    
-    iPropertyEvent.Close();
-    
-    delete iGuardTimer;
-    
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::~CMusVoipCallMonitor" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// C++ constructor.
-// -----------------------------------------------------------------------------
-//
-CMusVoipCallMonitor::CMusVoipCallMonitor( TName& aCallName, 
-                                        MMusCallStateObserver& aCallStateObserver ):
-    CActive( CActive::EPriorityStandard ),
-    iCallName ( aCallName ),
-    iCallStateObserver ( aCallStateObserver ),
-    iGuardTimerCallBack( GuardTimerExpired, this ) 
-    {    
-    CActiveScheduler::Add( this );
-    
-    iGuardTimerEntry.Set( iGuardTimerCallBack );
-    }
-
-
-// -----------------------------------------------------------------------------
-// Symbian second-phase constructor.
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::ConstructL( )
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::ConstructL" ) 
-    
-    User::LeaveIfError( iPropertyEvent.Attach(
-        KPSUidTelRemotePartyInformation,
-        KTelCLINumber ) );
-    
-    iGuardTimer = CDeltaTimer::NewL( CActive::EPriorityStandard );
-    
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::ConstructL" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::SetStateL( )
-// Sets the call state property key.See mussesseioninformationapi.h
-// Also sets the call information if call state is Connected.
-// If call is connected but remote info cannot be found, information
-// publishing is delayed until remote info comes available or monitoring
-// for the info timeouts. In voip case, remote info should be basically
-// always available, but in some cases it is not immediately available
-// when call status changes to connected.
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::SetStateL(NMusSessionInformationApi::TMusCallEvent aVal)
-    {    
-    MUS_LOG1( "mus: [MUSAO]  -> CMusVoipCallMonitor::SetStateL, aVal %d", aVal )
-    // set the call state only if the call count is one else it should be decided 
-    // by conference monitor or line/tsy monitor.
-
-    TBool delayStateChange( EFalse );
-    if ( aVal == NMusSessionInformationApi::ECallConnected )
-        {
-        if ( !RemoteInfoExistsL() )
-            {
-            MonitorForRemoteInfoL();
-            delayStateChange = ETrue;
-            }
-        }
-    else
-        {
-        StopRemoteInfoMonitoring();
-        }
-    
-    if ( delayStateChange )
-        {
-        MUS_LOG( "mus: [MUSAO]      state change delayed!" )   
-        }
-    else
-        {
-        ReportStateChangeL( aVal );
-        }
-    
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::SetStateL" )    
-    }
-
-///-----------------------------------------------------------------------------
-// CMusVoipCallMonitor::SetCallInfoL( )
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::SetCallInfoL()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::SetCallInfoL")     
-    
-    // Set Call Provider Information
-    TUint32 serviceId = CallServiceIdL();
-    SetCallProviderInfoL( serviceId );
-
-    HBufC* remoteUri = HBufC::NewLC( RProperty::KMaxPropertySize );
-    TPtr rUri = remoteUri->Des();
-    TInt err = RProperty::Get( KPSUidTelRemotePartyInformation,
-                               KTelCLINumber,
-                               rUri );
-    
-    if ( err == KErrNone && remoteUri->Des().Length() > 0 )
-        {
-        MUS_LOG_TDESC( "mus: [MUSAO] voip remote name: ", remoteUri->Des());
-        
-        // Add "sip:" prefix to remoteUri unless it already exists
-        _LIT( KSipPrefix, "sip:" );
-        TPtr prefix = remoteUri->Des().LeftTPtr( KSipPrefix().Length() );
-        if ( prefix.Compare( KSipPrefix ) != 0 )
-            {
-            if ( remoteUri->Des().Length() + KSipPrefix().Length() >
-                 remoteUri->Des().MaxLength() )
-                {
-                User::Leave( KErrOverflow );
-                }
-            remoteUri->Des().Insert( 0, KSipPrefix );
-            }
-        //if domain not present, add domain from voip profile (username)
-        if ( remoteUri->Find( KSipAt ) == KErrNotFound )
-            {
-            rUri.Set( remoteUri->Des() );
-            AddDomainFromOwnUsernameL( serviceId, rUri );
-            MUS_LOG_TDESC ( "mus: [MUSAO] full voip remote name:", (*remoteUri) )
-            }
-        }
-    else
-        {
-        remoteUri->Des().Zero();
-        }
-
-    User::LeaveIfError( RProperty::Set(
-            NMusSessionInformationApi::KCategoryUid,
-            NMusSessionInformationApi::KMusTelNumber, remoteUri->Des() ) );
-    
-    CleanupStack::PopAndDestroy(remoteUri);
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::SetCallInfoL" )  
-    }
-
-///-----------------------------------------------------------------------------
-// CMusVoipCallMonitor::AddDomainFromOwnUsernameL( )
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::AddDomainFromOwnUsernameL( 
-    TUint32 /*aServiceId*/, 
-    TDes16& /*aUri*/ )
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::AddDomainFromOwnUsernameL")
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::AddDomainFromOwnUsernameL, NOT SUPPORTED")
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::AddDomainFromOwnUsernameL")
-    }
-
-///-----------------------------------------------------------------------------
-// CMusVoipCallMonitor::CallServiceIdL( )
-// -----------------------------------------------------------------------------
-//
-TUint32 CMusVoipCallMonitor::CallServiceIdL()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::CallServiceIdL")
-    TUint32 serviceId( 0 );
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::CallServiceIdL, NOT SUPPORTED")
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::CallServiceIdL")
-    return serviceId;
-    }
-
-///-----------------------------------------------------------------------------
-// CMusVoipCallMonitor::SetCallProviderInfoL( )
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::SetCallProviderInfoL( TUint32 aServiceId )
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::SetCallProviderInfoL")
-    CSPSettings* settings = CSPSettings::NewLC();    
-    CSPEntry* entry = CSPEntry::NewLC();
-    
-    TInt errorCode = settings->FindEntryL( aServiceId, *entry );
-    
-    if ( errorCode == KErrNone && entry != NULL ) 
-        {
-        const TDesC& name = entry->GetServiceName();    
-    
-        MUS_LOG_TDESC ( "mus: [MUSAO]]  CallProviderName IS -->", name )
-        User::LeaveIfError(RProperty::Set( 
-                                        NMusSessionInformationApi::KCategoryUid,
-                                        NMusSessionInformationApi::KMUSCallProvider,
-                                        name));
-        }
-    
-    CleanupStack::PopAndDestroy( entry );
-    CleanupStack::PopAndDestroy( settings );
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::SetCallProviderInfoL" )  
-    }
-
-
-// -----------------------------------------------------------------------------
-// Checks the aName is equal to this monitors name.
-// @return ETrue if matches else EFalse
-// -----------------------------------------------------------------------------
-//
-TBool CMusVoipCallMonitor::IsEqual(TName& aName)
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::IsEqual" )
-    MUS_LOG_TDESC( "mus: [MUSAO]  -> aName : ", aName );
-    MUS_LOG_TDESC( "mus: [MUSAO]  -> iCallName : ", iCallName );
-    TBool val = EFalse ;    
-    val = ( aName == iCallName );    
-    MUS_LOG1( "mus: [MUSAO]  <- CMusCallMonitor::IsEqual = %d",val )
-    return val;
-    }
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::RunL
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::RunL()
-    {
-    MUS_LOG( "mus: [MUSAO] -> CMusVoipCallMonitor::RunL" )
-    
-    if ( RemoteInfoExistsL() )
-        {
-        // Connected state reporting was delayed because not having
-        // remote info, now it can be reported and monitoring is not needed anymore
-        StopRemoteInfoMonitoring();
-        ReportStateChangeL( NMusSessionInformationApi::ECallConnected  );
-        }
-    else
-        {
-        // resubscribe
-        iPropertyEvent.Subscribe( iStatus );    
-        SetActive();
-        }
-
-    MUS_LOG( "mus: [MUSAO] <- CMusVoipCallMonitor::RunL" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::DoCancel()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::DoCancel" )
-    
-    iPropertyEvent.Cancel();
-    
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::DoCancel" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::RunError
-// -----------------------------------------------------------------------------
-//
-TInt CMusVoipCallMonitor::RunError( TInt aError )
-    {
-    MUS_LOG1( "mus: [MUSAO]  -> CMusVoipCallMonitor::RunError = %d", aError )    
-    if ( aError != KErrNoMemory )
-        {
-        aError = KErrNone;
-        }
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::RunError" )
-    return aError;    
-    }
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::RemoteInfoExistsL
-// -----------------------------------------------------------------------------
-//
-TBool CMusVoipCallMonitor::RemoteInfoExistsL()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::RemoteInfoExistsL" )
-
-    HBufC* remoteUri = HBufC::NewLC(RProperty::KMaxPropertySize);
-    TPtr rUri = remoteUri->Des();
-    
-    TInt err = RProperty::Get( KPSUidTelRemotePartyInformation,
-                                 KTelCLINumber,
-                                 rUri );
-
-    TBool remoteInfoExists( err == KErrNone && remoteUri->Des().Length() > 0 );
-    CleanupStack::PopAndDestroy(remoteUri);
-    
-    MUS_LOG1( "mus: [MUSAO]  <- CMusVoipCallMonitor::RemoteInfoExistsL = %d", 
-              remoteInfoExists )    
-
-    return remoteInfoExists;
-    }
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::MonitorForRemoteInfoL
-// Start monitoring remote info P&S key. Guard timer is started
-// to prevent waiting for the infomation forever.
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::MonitorForRemoteInfoL()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::MonitorForRemoteInfoL" )
-    
-    if ( !IsActive() )
-        {
-        MUS_LOG( "mus: [MUSAO]      activate" )
-        
-        iGuardTimer->Remove( iGuardTimerEntry );
-        TTimeIntervalMicroSeconds32 interval( KMusAoRemoteInfoMonitoringTimeout );
-        iGuardTimer->Queue( interval, iGuardTimerEntry );
-        
-        iPropertyEvent.Subscribe( iStatus );    
-        SetActive();
-        }
-    
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::MonitorForRemoteInfoL" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::MonitorForRemoteInfoL
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::StopRemoteInfoMonitoring()
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::StopRemoteInfoMonitoring" )
-    
-    if ( iGuardTimer )
-        {
-        iGuardTimer->Remove( iGuardTimerEntry );
-        }
-    
-    Cancel();
-    
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::StopRemoteInfoMonitoring" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::ReportStateChangeL
-// -----------------------------------------------------------------------------
-//
-void CMusVoipCallMonitor::ReportStateChangeL( 
-    NMusSessionInformationApi::TMusCallEvent aVal )
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::ReportStateChangeL" )
-    
-    TInt currentVal = 0;
-    User::LeaveIfError(RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                                       NMusSessionInformationApi::KMusCallEvent,
-                                       currentVal));
-    
-    
-    // Report only if the value changed else do not publish.
-    if(currentVal != (TInt)aVal)
-        {
-        User::LeaveIfError(RProperty::Set( 
-                                   NMusSessionInformationApi::KCategoryUid,
-                                   NMusSessionInformationApi::KMusCallEvent,
-                                   aVal ));    
-        }        
-    // When call is connected and the callcount is one, 
-    // set the call informations.
-    if( aVal==NMusSessionInformationApi::ECallConnected ) 
-        {
-        SetCallInfoL();
-        }  
-    
-    iCallStateObserver.MusCallStateChanged();
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::ReportStateChangeL" )
-    }
-
-// -----------------------------------------------------------------------------
-// CMusVoipCallMonitor::GuardTimerExpired
-// If timer expired, it took too long to get remote party information via
-// P&S monitoring. Because of monitoring, call connected was not yet informed,
-// inform it now.
-// -----------------------------------------------------------------------------
-//
-TInt CMusVoipCallMonitor::GuardTimerExpired( TAny* aPtr )
-    {
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::GuardTimerExpired" )
-    if ( aPtr )
-        {
-        CMusVoipCallMonitor* self = reinterpret_cast<CMusVoipCallMonitor*>( aPtr );
-        self->StopRemoteInfoMonitoring();
-        TRAP_IGNORE( 
-                self->ReportStateChangeL( NMusSessionInformationApi::ECallConnected ) )
-        }
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::GuardTimerExpired" )
-    
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------------
-// CMusCallConferenceMonitor::IsDataReadyL()
-// Checks if Data is ready VoIP Call.
-// --------------------------------------------------------------------------------
-
-TBool CMusVoipCallMonitor::IsDataReadyL()
-    {
-    //This function need to updated if some other P/S Key is published
-    //to ensure correct behaviour.
-
-    MUS_LOG( "mus: [MUSAO]  -> CMusVoipCallMonitor::IsDataReadyL" )
-
-    // Ensure Provider Information is Availble.
-    HBufC* providerInfo = HBufC::NewLC( RProperty::KMaxPropertySize );
-    TPtr pInfo = providerInfo->Des();
-    TInt err  = KErrNone;
-    
-    err = RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                                NMusSessionInformationApi::KMUSCallProvider,
-                                 pInfo );
-
-    TBool providerInfoExisit ( err == KErrNone && providerInfo->Des().Length() > 0 );
-    CleanupStack::PopAndDestroy( providerInfo );
-
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::IsDataReadyL" )
-    return !IsActive() && providerInfoExisit;
-    }
-
-
-// --------------------------------------------------------------------------------
-// Reset the Call Provider Information. 
-// --------------------------------------------------------------------------------
-
-void CMusVoipCallMonitor::ResetCallProviderName( )
-    {
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::ResetCallProviderName" )
-    TInt errorCode = RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                 NMusSessionInformationApi::KMUSCallProvider,
-                                 KNullDesC );
-
-    // Error Code is just for debug only 
-    MUS_LOG1( "mus: [MUSAO]  ErrorCode = %d", errorCode )
-    MUS_LOG( "mus: [MUSAO]  <- CMusVoipCallMonitor::ResetCallProviderName" )
-    }
-
-
-// End of file
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/callinformation.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Call state information
-*
-*/
-
-
-#ifndef CALLINFORMATION_H
-#define CALLINFORMATION_H
-
-#include <e32base.h>
-#include <mcall.h>
-
-/**  The category UID for the messages in this header file. */
-const TUid KCatCallInformation = { 0x102078FD }; 
-
-/**  Version number of this API */
-const TInt KCallInformationVersionMajor( 1 );
-const TInt KCallInformationVersionMinor( 0 );
-const TInt KCallInformationVersionBuild( 0 );
-  
-#include <e32cmn.h>
-
-/**
- *  Holds single calls information.
- *
- *  @since S60 v5.1
- */
-NONSHARABLE_CLASS( TCallInfo ) : public MCall
-    {
-public:
-    
-    TInt CallIndex() const { return iIndex; }   
-    
-    CCPCall::TCallType CallType() const { return iType; }
-
-    CCPCall::TCallState CallState() const { return iState; }
-    
-    TUint32 ServiceId() const { return iServiceId; }
-
-    CCPCall::TCallDirection CallDirection() const { return iDirection; }
-    
-    CCPCall::TCallState iState;
-    CCPCall::TCallType iType;
-    CCPCall::TCallDirection iDirection;
-    TInt iIndex;
-    TInt iIdentifier;
-    TUint32 iServiceId;
-    };
-
-
-/**
- *  Class holding information about calls.
- *  Can be packed for IPC purposes. 
- *  
- *  @since S60 v5.1
- */
-NONSHARABLE_CLASS( CCallInfos ) : public CBase 
-    {
-public:
-    
-    /**
-     * Two-phased constructor.     
-     */
-    static CCallInfos* NewL();
-    
-    /**
-     * Two-phased constructor.     
-     */
-    static CCallInfos* NewLC();
-    
-    /**
-     * Destructor.
-     */
-    virtual ~CCallInfos();
-    
-    /**
-     * Adds information about a call.  
-     *
-     * @since S60 v5.1
-     * @param aCallInfo Call information to be added.    
-     */
-    inline void AddL( TCallInfo& aCallInfo );
-    
-    /**
-     * Returns information about all calls.
-     *
-     * @since S60 v5.1      
-     * @return Reference to call info array
-     */
-    inline const RArray<TCallInfo>& CallInfos() const;
-    
-    /**
-     * Packages this class for IPC transfer.
-     *
-     * @since S60 v5.1
-     * @return Pointer to descriptor holding the class.
-     */
-    inline HBufC8* ExternalizeL() const;
-    
-    /**
-     * Intializes the class from descriptor
-     *
-     * @since S60 v5.1
-     * @param aCallInfos Reference to descriptor containg the class data.   
-     */    
-    inline void InternalizeL( const TDesC8& aCallInfos );
-    
-
-    // Helper function for the STUB ONLY:
-    inline void AddCallInfosL();
-    
-private:
-
-    inline CCallInfos();
-    
-    
-private:
-    RArray<TCallInfo> iCallInfos;
-    };
-
-/**
- * Commands
- */
-enum TCallInformationCommands
-    {
-    EGetAllCallStates = 0
-    };
-    
-/**
- * Events
- */
-enum TCallInformationEvents
-    {
-    EChangesInCallStates = 0
-    };
-
-
-// Implementation is stubed.
-#include "ccallinfos_stub.inl"
-
-#endif // CALLINFORMATION_H
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/ccallinfoiter.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Iterator class for going through ongoing calls.
-*
-*/
-
-
-#ifndef C_CALLINFOITER_H
-#define C_CALLINFOITER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-// forward declarations 
-class CCallInfos;
-class MCall;
-
-// CLASS DECLARATION
-
-/**
- *  Class to be used for going through ongoing calls. 
- *
- *  @code
- *  1) Go trough all calls, no need to call Count() first. 
- *  CCallInfoIter& iter = iCallInfo->GetCallsL();    
- *    
- *  for( iter.First(); !iter.IsDone(); iter.Next() )
- *     {
- *     const MCall& call( iter.Current() );
- *     DoSomethingWhenCallDetected( call ); 
- *     }
- *             
- *  2) Check if there are any calls
- *  CCallInfoIter& iter = iCallInfo->GetCallsL(); 
- *  TInt amountOfCalls = iter.Count();
- *  
- *  if ( amountOfCalls == 0)
- *      {
- *      DoSomethingBecauseAllCallsHaveEnded();
- *      }      
- *             
- *  @endcode
- *
- *  @lib telephonyservice.lib
- *  @since S60 v5.1 
- */
-NONSHARABLE_CLASS( CCallInfoIter ) : public CBase
-    {
-public:    
-
-    /**
-     * Two-phased constructor.
-     * @param aCallInfos Container for call information. 
-     */
-    static CCallInfoIter* NewL( CCallInfos& aCallInfos );
-
-    /**
-     * Two-phased constructor.
-     * @param aCallInfos Container for call information.
-     */
-    static CCallInfoIter* NewLC( CCallInfos& aCallInfos );
-    
-    /**
-     * Destructor.
-     */
-    ~CCallInfoIter();
-    
-    /**
-     * Intializes the current call to the first call
-     * 
-     * @since S60 v5.1  
-     */
-    IMPORT_C void First();
-    
-    /**
-     * Tests whether all calls are went through
-     * 
-     * @since S60 v5.1  
-     */  
-    IMPORT_C TBool IsDone() const;
-    
-    /**
-     * Advances the current call to the next call
-     * 
-     * @since S60 v5.1  
-     */  
-    IMPORT_C void Next();
-    
-    /**
-     * Returns the count of calls
-     * 
-     * @since S60 v5.1
-     * @return Amount of calls  
-     */
-    IMPORT_C TInt Count() const;
-       
-    /**
-     * Returns the current call. Panic happens if there are no calls.
-     * 
-     * @since S60 v5.1
-     * @return Reference to the call.  
-     */
-    IMPORT_C const MCall& Current() const;
-
-private:
-
-    /**
-     * Constructor for performing 1st stage construction
-     */
-    CCallInfoIter( CCallInfos& aCallInfos );
-
-    /**
-     * EPOC default constructor for performing 2nd stage construction
-     */
-    void ConstructL();
-    
-private: // data    
-     
-    CCallInfos& iCallInfos;    
-    
-    TInt iCurrentIndex;
-
-    };
-
-#endif // C_CALLINFOITER_H
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/ccallinformation.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Provides information about ongoing calls.
-*
-*/
-
-
-#ifndef C_CALLINFORMATION_H
-#define C_CALLINFORMATION_H
-
-#include <e32base.h>
-#include "callinformation.h"
-#include "mcall.h"
-
-
-// forward declarations 
-class MCallInformationObserver;
-class CCallInformationImpl;
-class CCallInfoIter;
-
-
-/**
- *  Class to be used for receiving information about ongoing calls. 
- *
- *  @code
- *  // create the CCallInformation instance e.g. when the client component is created
- *  iCallInfo = CCallInformation::NewL(); 
- *  iCallInfo->NotifyCallInformationChanges(*iObserver);
- *  
- *  // and use it when needed
- *  CCallInfoIter& iter = iCallInfo->GetCallsL();    
- *  @endcode
- *
- *  @lib telephonyservice.lib
- *  @since S60 v5.1 
- */
-NONSHARABLE_CLASS( CCallInformation ) : public CBase
-    {
-
-public:
-
-    /**
-     * Two-phased constructor.          
-     */
-    IMPORT_C static CCallInformation* NewL();
-    
-
-    /**
-    * Destructor.
-    */
-    virtual ~CCallInformation();
-
-    /**
-     * Allows a client to be notified when there are changes in current calls.
-     * There can be only one observer per CCallInformation instance.
-     *
-     * @since S60 v5.1 
-     * @param aObserver Observer for notifications.
-     */
-     IMPORT_C void NotifyCallInformationChanges( MCallInformationObserver& aObserver );
-    
-    /**
-     * Used to cancel previously placed NotifyCallInformationChanges call.
-     *
-     * @since S60 v5.1      
-     */
-     IMPORT_C void CancelNotification();
-     
-     /**
-     * Gets the snapshot of ongoing calls.
-     *
-     * @since S60 v5.1      
-     * @return Ongoing calls.
-     */
-     IMPORT_C CCallInfoIter& GetCallsL( );
-			
-	 /**
-     * Get calls by given state. 
-     *
-     * @since S60 v5.1 
-     * @param aState Specifies a call state that is used as a search key.
-     * @return Calls in state aSate, e.g. in case of conference call several 
-     *         calls have the same state.
-     */     
-     IMPORT_C CCallInfoIter& GetCallsL( CCPCall::TCallState aState );   
-     
-     
-private:
-
-    CCallInformation();
-
-    void ConstructL();
-
-
-private: // data    
-    
-	CCallInformationImpl* iImpl;	
-	
-	// Helper Data Needed by STUB Implemenation.
-	CCallInfoIter* iInfoIter;
-	CCallInfos* iInfos;
-    };
-
-
-#endif // C_CALLINFORMATION_H
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/ccallinfos_stub.inl	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-#include <s32mem.h> 
-
-const TInt KCallServiceId = 5;
-
-// ---------------------------------------------------------------------------
-// C++ constructor
-// ---------------------------------------------------------------------------
-//
-CCallInfos::CCallInfos()
-    {
-    //Nothing to be done Here.
-    }
-
-// -----------------------------------------------------------------------------
-// Constructor.
-// -----------------------------------------------------------------------------
-//
-inline CCallInfos* CCallInfos::NewL()
-    {
-    return new( ELeave )CCallInfos();
-    }
-
-// -----------------------------------------------------------------------------
-// Constructor.
-// -----------------------------------------------------------------------------
-//
-inline CCallInfos* CCallInfos::NewLC()
-    {
-    CCallInfos* self = new( ELeave )CCallInfos();
-    CleanupStack::PushL( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Desctructor.
-// -----------------------------------------------------------------------------
-//
-inline CCallInfos::~CCallInfos()
-    {
-    if ( iCallInfos.Count())
-        {
-        iCallInfos.Reset();
-        }
-    iCallInfos.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// Returns information about all calls.
-// -----------------------------------------------------------------------------
-//
-inline const RArray<TCallInfo>&  CCallInfos::CallInfos( ) const
-    {
-    return iCallInfos;
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// Add Dummy Call Info.
-// -----------------------------------------------------------------------------
-//
-inline void  CCallInfos::AddCallInfosL( )
-    {
-    }
-
-
-// End of File.
-
- 
-
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/cch.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The new cch client api class
-*
-*/
-
-
-
-#ifndef C_CCH_H
-#define C_CCH_H
-
-#include <e32base.h>
-
-//class CCchImpl;
-class CCchServiceStub;
-
-const TInt KServiceId = 5;
-
-/**
- *  Class for cch service management
- *
- *  CCchService is used for launching various kinds of service functions
- *  @code
- *   ?good_class_usage_example(s)
- *  @endcode
- *
- *  @lib ?library
- */
-class CCchService : public CBase
-    {
-
-public:
-
- 
-protected:
-
-    virtual ~CCchService() { };
-    };
-    
-/**
- *  Class for basic cch functionality, getting services
- *
- *  @code
- *   ?good_class_usage_example(s)
- *  @endcode
- *
- *  @lib cch
- */
-class CCch : public CBase
-    {
-
-public:
-
-    /**
-     * Two-phased constructor.
-     */
-    IMPORT_C static CCch* NewL();
-    
-    /**
-     * Two-phased constructor.
-     */
-    IMPORT_C static CCch* NewLC();
-    
-    /**
-     * Destructor.
-     */
-    ~CCch();
-
-    /**
-     * Returns one service
-     *
-     * @param aId Service id
-     * @return Service or NULL if not found. Ownership is not transferred.
-     */
-    IMPORT_C CCchService* GetService( TInt aId );
-    
-    /**
-     * Returns service ids of all configured services
-     *
-     * @param  aIds Array of TInt to be filled with ids
-     * @return Symbian error code
-     */
-    IMPORT_C TInt GetServiceIds( RArray<TInt>& aIds ) const;
-    
-    /**
-     * Returns ETrue if connectivity dialogs are allowed in service enabling.
-     *
-     * @return ETrue if connectivity dialogs are allowed in service enabling
-     */
-    IMPORT_C TBool ConnectivityDialogsAllowed() const;
-       
-    /**
-     * For allowing/disallowing connectivity dialogs showing in 
-     * service enabling.
-     * 
-     * @param aConnectivityDialogsAllowed Boolean to set connectivity dialogs
-     *        allowed/disallowed
-     */ 
-    IMPORT_C void SetConnectivityDialogsAllowed( 
-        TBool aConnectivityDialogsAllowed );
-
-    
-        
-protected:
-
-    /**
-     * The constructor
-     */
-    CCch();
-    
-private:
-    
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-private: // data
-
-    CCchServiceStub* iServiceStub;
-    };
-
-
-class HelpData
-    {
-public:
-    static HBufC* iUserName;
-    static TInt iGetConnectionParamError;
-    };
-
-#endif // C_CCH_H
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/spentry.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
-* Copyright (c)  Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Service Provider Settings entry
-*
-*/
-
-
-#ifndef C_SPENTRY_H
-#define C_SPENTRY_H
-
-#include <e32base.h>
-
-#include "spdefinitions.h"
-
-class CSPProperty;
-
-
-/**
- *  Service Provider Settings entry. 
- *  Container class for service attributes and settings properties
- *
- *  @lib serviceprovidersettings.lib
- *  @since S60 V3.2
- */
-NONSHARABLE_CLASS( CSPEntry ): public CBase
-    {
-
-	public: // Constructors and destructor
-	    /**
-	    * Two-phased constructor.
-	    */
-	    IMPORT_C static CSPEntry* NewL();
-
-	    /**
-	    * Two-phased constructor.
-	    */
-	    IMPORT_C static CSPEntry* NewLC();
-
-	    /**
-	    * Destructors.
-	    */
-	    IMPORT_C virtual ~CSPEntry();
-
-	public: // Member functions
-	    /**
-	     * Returns service Id of this entry.
-	     *
-	     * @since S60 V3.2
-	     * @return Service ID
-	     */
-	    IMPORT_C TServiceId GetServiceId() const;
-
-	    /**
-	     * Sets unique service provider ID for this entry.
-	     * This ID is generated automatically when new entry is added.
-	     * Service ID is also required when user updates entry in service table
-	     *
-	     * @since S60 V3.2
-	     * @param aServiceId service ID
-	     */
-	    void SetServiceId( TServiceId aServiceId ); 
-
-	    /**
-	     * Returns service name of this entry.
-	     *
-	     * @since S60 V3.2
-	     * @return Service name 
-	     */
-	    IMPORT_C const TDesC& GetServiceName() const;
-
-	    /**
-	     * Sets service name for this entry.
-	     *
-	     * @since S60 V3.2
-	     * @param aServiceName service name
-	     */
-	    IMPORT_C TInt SetServiceName( const TDesC& aServiceName );
-
-	    /**
-	     * Adds new property to this entry.
-	     *
-	     * @since S60 V3.2
-	     * @param aProperty new property pointer
-	     * @return KErrNone if addition succeeded, 
-	     *         system wide error code otherwise.
-	     */
-	    IMPORT_C TInt AddPropertyL( const CSPProperty& aProperty );
-
-	    /**
-	     * Updates content of property in this entry.
-	     *
-	     * @since S60 V3.2
-	     * @param aPropertyName property name
-	     * @param aValue new TInt value
-	     * @return KErrNone if update succeeded.
-	     */
-	    IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TInt aValue );
-
-	    /**
-	     * Updates content of property in this entry.
-	     *
-	     * @since S60 V3.2
-	     * @param aPropertyName property name
-	     * @param aValue new TDesC value
-	     * @return KErrNone if update succeeded.
-	     */
-	    IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, const TDesC& aValue );
-
-	    /**
-	     * Updates content of property in this entry.
-	     *
-	     * @since S60 V3.2
-	     * @param aPropertyName property name
-	     * @param aValue new TOnOff value
-	     * @return KErrNone if update succeeded.
-	     */
-	    IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TOnOff aValue );
-
-	    /**
-	     * Returns property of this entry by property name.
-	     *
-	     * @since S60 V3.2
-	     * @param aProperty On return, reference to requested property
-	     * @param aPropertyName Name of requested property
-	     * @return error code
-	     */
-	    IMPORT_C TInt GetProperty( const CSPProperty*& aProperty, 
-	    						   TServicePropertyName aPropertyName ) const;
-
-	    /**
-	     * Returns property of this entry by property index.
-	     *
-	     * @since S60 V3.2
-	     * @param aProperty On return, reference to requested property
-	     * @param aIndex index of requested property
-	     * @return error code
-	     */
-	    IMPORT_C TInt GetProperty( const CSPProperty*& aProperty, 
-	    							TInt aIndex ) const;
-
-	    /**
-	     * Deletes property from this entry by index.
-	     *
-	     * @since S60 V3.2
-	     * @param aIndex index of requested property
-	     * @return error code
-	     */
-	    IMPORT_C TInt DeleteProperty( TInt aIndex );
-
-	    /**
-	     * Deletes property from this entry by property name.
-	     *
-	     * @since S60 V3.2
-	     * @param aProperty property name
-	     * @return error code
-	     */
-	    IMPORT_C TInt DeleteProperty( TServicePropertyName aProperty );
-
-	    /**
-	     * Returns all properties of this entry.
-	     *
-	     * @since S60 V3.2
-	     * @return Reference to array of properties
-	     */
-	    IMPORT_C const RPropertyArray& GetAllProperties() const;
-
-	    /**
-	     * Returns count of properties in this entry
-	     *
-	     * @since S60 V3.2
-	     * @return Count of properties
-	     */
-	    IMPORT_C TInt PropertyCount() const;
-	    
-	    /**
-	     * reset service entry
-	     *
-	     * @since S60 V3.2
-	     * @return Count of properties
-	     */
-	     IMPORT_C void Reset();
-	    
-
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    */
-	    CSPEntry();
-
-	    /**
-	    * By default Symbian 2nd phase constructor is private.
-	    */
-	    void ConstructL();
-
-	    /**
-	     * Search index of requested property in iPropertyArray
-	     *
-	     * @since S60 ?S60_version
-	     * @param aProperty
-	     * @return Index of property or KErrNotFound
-	     */
-	    TInt SearchProperty( TServicePropertyName aProperty ) const;
-
-	private: // data
-
-	    /**
-	     * Id of service settings entry ( unique )
-	     */
-	    TServiceId iServiceId;
-
-	    /**
-	     * Name of settings entry ( unique )
-	     * Own.
-	     */
-	    RBuf iServiceName;
-
-	    /**
-	     * Service settings properties owned by this entry
-	     * Own.
-	     */
-	    RPropertyArray iPropertyArray;
-
-    };
-
-
-#endif // C_SPENTRY_H
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/spsettings.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,313 +0,0 @@
-/*
-* Copyright (c)  Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Service Provider Settings API
-*
-*/
-
-
-#ifndef C_SPSETTINGS_H
-#define C_SPSETTINGS_H
-
-#include <e32base.h>
-#include <badesca.h>
-
-#include "spdefinitions.h"
-
-class CSPSettingsEngine;
-class CSPEntry;
-class CSPProperty;
-
-/**
- *  Service provider settings API class
- *
- *  Main class of managing service provider settings
- *
- *  @code example code of how to add a new service entry to service table
- *  CSPEntry* entry = CSPEntry::NewL();
- *  TInt err = entry->SetServiceName( _L("somename" ) );
- *  CSPProperty* property = CSPProperty::NewL();
- *  err = property->SetName( EPropertyServiceAttributeMask );
- *  property->SetValue( 100 );
- *  err = entry->AddProperty( property );
- *  // iSettings is instance of CSPSettings
- *  TInt err = iSettings->AddEntryL( *entry );
- *  @endcode 
- *
- *  @lib serviceprovidersettings.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CSPSettings ): public CBase
-    {
-
-	public: // Constructors and destructor
-
-	    /**
-	    * Two-phased constructor.
-	    */
-	    IMPORT_C static CSPSettings* NewL();
-
-	    /**
-	    * Two-phased constructor.
-	    */
-	    IMPORT_C static CSPSettings* NewLC();
-
-	    /**
-	    * Destructors.
-	    */
-	    IMPORT_C virtual ~CSPSettings();
-
-	public:
-
-	    /**
-	     * Stores new service provider settings entry, 
-	     * service Id is returned inside aEntry object
-	     *
-	     * @since S60 v3.2
-	     * @param aEntry New service provider settings entry, on return service Id is filled in
-	     * @return error code
-	     */
-	    IMPORT_C TInt AddEntryL( CSPEntry& aEntry );
-
-	    /**
-	     * Search service provider settings entry by service ID. 
-	     *
-	     * @since S60 v3.2
-	     * @param aServiceId Id of requested xSP settings entry
-	     * @param aEntry on return, SP settings entry corresponding to aServiceId.
-	     * @return error code, KErrNone if succeeded, otherwise system wide error code
-	     */
-	    IMPORT_C TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry );
-
-
-	    /**
-	     * Updates service provider settings entry to settings storage.
-	     * Service ID must be set to entry before update.
-	     *
-	     * @since S60 v3.2
-	     * @param aEntry Updated service provider settings entry
-	     * @return error code, KErrNone if update succeeded, otherwise system wide error code
-	     */
-	    IMPORT_C TInt UpdateEntryL( const CSPEntry& aEntry );
-
-	    /**
-	     * Deletes service provider settings entry from storage by service ID.
-	     *
-	     * @since S60 v3.2
-	     * @param aEntryId Id of settings entry which is going to be deleted
-	     * @return error code, KErrNone if delete succeeded, otherwise system wide error code
-	     */
-	    IMPORT_C TInt DeleteEntryL( TServiceId aServiceId );
-
-	    /**
-	     * Search property of service provider settings entry from storage.
-	     *
-	     * @since S60 v3.2
-	     * @param aServiceId The service ID of requested service entry
-	     * @param aPropertyName property name to be found
-	     * @param aProperty on return, requested property
-	     * @return error code, KErrNone if succeeded, otherwise system wide error code
-	     */
-	    IMPORT_C TInt FindPropertyL( TServiceId aServiceId,
-	                                TServicePropertyName aPropertyName,
-	                                CSPProperty& aProperty );
-
-	    /**
-	     * Add or update properties of service provider settings entry to storage.
-	     * If property name exists, update property. If property doesn't exist,
-	     * add property
-	     *
-	     * @since S60 v3.2
-	     * @param aServiceId The ID of updated service entry
-	     * @param aPropertyArray new properties to be added or updated
-	     * @return error code, KErrNone if update succeeded, otherwise system wide error code
-	     */
-	    IMPORT_C TInt AddOrUpdatePropertiesL( TServiceId aServiceId, 
-	                                  		  const RPropertyArray& aPropertyArray );
-
-
-	    /**
-	     * Add or update one property of service provider settings entry to storage.
-	     * If property name exists, update property. If property doesn't exist,
-	     * add property
-	     *
-	     * @since S60 v3.2
-	     * @param aServiceId The ID of updated service entry
-	     * @param aProperty new property to be added or updated
-	     * @return error code, KErrNone if update succeeded, otherwise system wide error code
-	     */
-	    IMPORT_C TInt AddOrUpdatePropertyL( TServiceId aServiceId, 
-	                                  		const CSPProperty& aProperty );
-
-	    /**
-	     * Return count of service provider settings entries in storage.
-	     *
-	     * @since S60 v3.2
-	     * @return Count of stored service provider settings.
-	     */
-	    IMPORT_C TInt SettingsCountL();
-
-	    /**
-	     * Search all service provider IDs from storage
-	     *
-	     * @since S60 v3.2
-	     * @param aServiceIds An array containing returned service IDs
-	     * @return error code
-	     */
-	    IMPORT_C TInt FindServiceIdsL( RIdArray& aServiceIds );
-
-
-	    /**
-	     * Search all service names from settings storage by given service IDs.
-	     * Removes ID from array if it is not found from settings storage.
-	     *
-	     * @since S60 v3.2
-	     * @param aServiceIds An array of service IDs
-	     * @param aServiceNames on return, array which saves found service names 
-	     * @return error code
-	     */
-	    IMPORT_C TInt FindServiceNamesL( RIdArray& aServiceIds,
-	                                    CDesCArray& aServiceNames );
-
-
-	   /**
-	     * Search subservice properties of requested service provider settings entry by ID 
-	     * and subservice type
-	     *
-	     * @since S60 v3.2
-	     * @param aServiceId The ID of requested service entry
-	     * @param aPropertyType property type of sub service
-	     * @param aPropertyArray on return,  array which saves found subservice properties
-	     * @return error code
-	     */
-	    IMPORT_C TInt FindSubServicePropertiesL( TServiceId aServiceId,
-	    										TSPItemType aPropertyType,
-	                                            RPropertyArray& aPropertyArray );
-
-	    /**
-	     * Deletes service properties by service ID and property name.
-	     *
-	     * @since S60 v3.2
-	     * @param aServiceId The service ID of requested service entry
-	     * @param aNameArray name of properties to be deleted
-	     * @return error code
-	     */
-	    IMPORT_C TInt DeleteServicePropertiesL( TServiceId aServiceId,
-	                                            const RPropertyNameArray& aNameArray );
-	                                            
-	    /**
-	     * Find service IDs with same properties
-	     *
-	     * @since S60 v3.2
-	     * @param aPropertyArray property array
-	     * @param on return, service Ids with same properties
-	     * @return error code
-	     */
-	    IMPORT_C TInt FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray, 
-	    											 RIdArray& aServiceIds );
-
-	    /**
-	     * Get SIP VoIP software version.
-	     *
-	     * @since S60 v3.2
-	     * @return SIP VoIP software version
-	     */
-	    IMPORT_C static const TDesC& GetSIPVoIPSWVersion();
-	    
-	    /**
-	     * Check feature is supported or not
-	     *
-	     * @since S60 v3.2
-	     * @return SIP VoIP software version
-	     */
-	    IMPORT_C TBool IsFeatureSupported( TSPServiceFeature aFeature );
-
-	private:
-
-	    /**
-	    * C++ default constructor.
-	    */
-	    CSPSettings();
-
-	    /**
-	    * By default Symbian 2nd phase constructor is private.
-	    */
-	    void ConstructL();
-	    
-	    /**
-	    * Commit or rollback transaction
-	    * @since S60 v3.2
-	    * @param aError error code of CenRep operation
-	    * @param aServiceId changed service Id
-	    * @return error code
-	    */
-	    TInt CommitOrRollbackL( TInt aError, TServiceId aServiceId );
-
-	    /**
-	     * Check is VoIP Service Id and then are Properties VoIP related
-	     *
-	     * @since S60 v3.2.3
-	     * @return KErrNotSupported if VoIP not supported and checking 
-	     * of Service Id and Properties gives true
-	     */
-	    TInt CheckSupportedL( TServiceId aServiceId, const RPropertyNameArray& aNameArray );
-	    
-	    /**
-	     * Check is VoIP Service Id
-	     *
-	     * @since S60 v3.2.3
-	     * @return KErrNotSupported if VoIP not supported and checking 
-	     * of Service Id gives true
-	     */
-	    TInt CheckSupportedL( TServiceId aServiceId );
-
-	    /**
-	     * Check is SP item type VoIP related
-	     *
-	     * @since S60 v3.2.3
-	     * @return KErrNotSupported if VoIP not supported and checking 
-	     * of SP item type gives true
-	     */
-		TInt CheckSupportedL( TSPItemType aPropertyType );
-		
-	    /**
-	     * Check does an array have Properties VoIP related
-	     *
-	     * @since S60 v3.2.3
-	     * @return KErrNotSupported if VoIP not supported and checking 
-	     * of the array gives true
-	     */
-		TInt CheckSupportedL( const RPropertyArray& aPropertyArray );
-
-	private: // data
-
-	    /**
-	     * Settings engine
-	     * Own.
-	     */
-	    CSPSettingsEngine* iSettingsEngine;
-
-
-	    /**
-	     * Feature manager support VoIP
-	     * Own.
-	     */
-	    TBool iFeatureManagerSupportVoIP;
-        /**
-         * Writing settings allowed
-         */
-        TBool iSettingsWriteAllowed;
-
-    };
-
-#endif // C_SPSETTINGS_H
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/ccallinfoiter_stub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c)  Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Iterator class for going through ongoing calls.
-*
-*/
-
-
-#include <callinformation.h>    //Call Information Mediator API
-#include "ccallinfoiter.h"
-#include "mcall.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-
-// ---------------------------------------------------------------------------
-// C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CCallInfoIter::CCallInfoIter( CCallInfos& aCallInfos ): iCallInfos( aCallInfos )
-    { 
-    First();    
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CCallInfoIter::~CCallInfoIter()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CCallInfoIter* CCallInfoIter::NewLC( CCallInfos& aCallInfos )
-    {
-    CCallInfoIter* self = new (ELeave)CCallInfoIter( aCallInfos );
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CCallInfoIter* CCallInfoIter::NewL( CCallInfos& aCallInfos )
-    {
-    CCallInfoIter* self = CCallInfoIter::NewLC( aCallInfos );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian second-phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CCallInfoIter::ConstructL()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the amount of calls
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CCallInfoIter::Count() const
-    {
-    TUint count = 1;
-    return count; 
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the current call.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const MCall& CCallInfoIter::Current() const
-    {
-    return iCallInfos.CallInfos()[iCurrentIndex];       
-    }
-
-// ---------------------------------------------------------------------------
-// Intializes the current call to the first call.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCallInfoIter::First()
-    {
-    iCurrentIndex = 0; 
-    }
-
-
-// End of File.
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/ccallinformation_stub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Provides information about ongoing calls.
-*
-*/
-
-#include "ccallinformation.h"
-#include "callinformation.h"
-#include "ccallinfoiter.h"
-
-// ---------------------------------------------------------------------------
-// C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CCallInformation::CCallInformation()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian second-phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CCallInformation::ConstructL()
-    {
-    //iImpl = CCallInformationImpl::NewL();
-    
-    iInfos = CCallInfos::NewL();
-    iInfoIter = CCallInfoIter::NewL( *iInfos );
-    }
-
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCallInformation* CCallInformation::NewL()
-    {
-    CCallInformation* self = new (ELeave) CCallInformation( );    
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CCallInformation::~CCallInformation()
-    {
-    //delete iImpl;
-    if ( iInfos )
-        {
-        delete iInfos;
-        iInfos = NULL;
-        }
-    if ( iInfoIter )
-        {
-        delete iInfoIter;
-        iInfoIter = NULL;
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// Get calls by given state. 
-// ---------------------------------------------------------------------------
-//
-
-EXPORT_C CCallInfoIter& CCallInformation::GetCallsL( CCPCall::TCallState aState )
-    {
-    //return iImpl->GetCallsL( aState );
-    // Add dummy data to call infos
-    iInfos->AddCallInfosL();
-    return *iInfoIter;
-    }            
-
-// End of File.
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/spentry_stub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c)  Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Service Provider Settings entry. 
-*
-*/
-
-#include "spentry.h"
-#include "spproperty.h"
-//#include "spdefaultvalues.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CSPEntry::CSPEntry()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-void CSPEntry::ConstructL()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CSPEntry* CSPEntry::NewL()
-    {
-    CSPEntry* self = CSPEntry::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CSPEntry* CSPEntry::NewLC()
-    {
-    CSPEntry* self = new( ELeave ) CSPEntry;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CSPEntry::~CSPEntry()
-    {
-    iServiceName.Close();
-    iPropertyArray.ResetAndDestroy();
-    iPropertyArray.Close();
-    }
-
-// ---------------------------------------------------------------------------
-// Returns service name of this entry
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TDesC& CSPEntry::GetServiceName() const
-    {
-    _LIT( KTestProvideName, "VoIP" );
-    return  KTestProvideName;
-    }
-
-
-// End of File.
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/spsettings_stub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  STUB implementation for SP Settings.
-*
-*/
-
-#include "spsettings.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Default Constructor 
-// ---------------------------------------------------------------------------
-//
-CSPSettings::CSPSettings() 
-    {
-    // Nothing to be done
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CSPSettings::~CSPSettings()
-    {
-    // Nothing to be done
-    }
-
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CSPSettings* CSPSettings::NewL()
-    {
-    CSPSettings* self = CSPSettings::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CSPSettings* CSPSettings::NewLC()
-    {
-    CSPSettings* self = new( ELeave ) CSPSettings;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-void CSPSettings::ConstructL()
-    {
-    //Nothing to be done
-    }
-
-// ---------------------------------------------------------------------------
-// Find service provider settings entry by service ID
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CSPSettings::FindEntryL( TServiceId aServiceId, CSPEntry& /*aEntry*/ )
-    {
-    TInt serviceID = 5;
-    aServiceId = serviceID;
-    return KErrNone;
-    }
-
-
-// End of File
-
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -15,5 +15,5 @@
 *
 */
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
 ut_aoplugin.mmp
\ No newline at end of file
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group/ut_aoplugin.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group/ut_aoplugin.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -42,15 +42,7 @@
 SOURCE                  ut_musresourcefinderutil.cpp
 SOURCE                  ut_muscallconferenceeventmonitor.cpp
 SOURCE                  ut_muscallmonitorbase.cpp
-SOURCE                  ut_musfactorysettings.cpp
-
-// STUBs for telephonyservice and serviceprovidersettings
-SOURCEPATH              ../Stubs/src
-SOURCE                  ccallinfoiter_stub.cpp 
-SOURCE                  ccallinformation_stub.cpp 
-SOURCE                  spentry_stub.cpp 
-SOURCE                  spsettings_stub.cpp
-
+SOURCE                  ut_musclirmonitor.cpp
 
 SOURCEPATH              ../../../src
 SOURCE                  musaopluginmain.cpp
@@ -64,7 +56,7 @@
 SOURCE                  muscallstatusmonitor.cpp
 SOURCE                  muscallconferencemonitor.cpp
 SOURCE                  muscallconferenceeventmonitor.cpp
-SOURCE                  musvoipcallmonitor.cpp
+SOURCE                  musclirmonitor.cpp
 
 SOURCEPATH              ../../../../../tsrc/etelstub/src
 SOURCE                  etelstub.cpp
@@ -73,23 +65,22 @@
 SOURCEPATH              ../../../../../tsrc/centralrepositorystub/src
 SOURCE                  centralrepositorystub.cpp
 SOURCEPATH              ../../../../../tsrc/musmanagerstub/src
-SOURCE    				musmanagerstub.cpp
+SOURCE    		          musmanagerstub.cpp
+SOURCEPATH              ../../../../../tsrc/featmgrstub/src
+SOURCE                  FeatMgr.cpp
 
+USERINCLUDE             ../../../../../tsrc/featmgrstub/inc
 USERINCLUDE               ../inc
-USERINCLUDE               ../../../inc
-USERINCLUDE               ../Stubs/inc
 USERINCLUDE               ../../../../../tsrc/propertystub/inc
 USERINCLUDE               ../../../../../tsrc/etelstub/inc
 USERINCLUDE               ../../../../../tsrc/centralrepositorystub/inc
-USERINCLUDE               ../../../../../tsrc/musmanagerstub/inc
 
 SYSTEMINCLUDE             ../../../inc
 SYSTEMINCLUDE             ../../../../../inc
 SYSTEMINCLUDE             ../../../../../tsrc/etelstub/inc
 SYSTEMINCLUDE             ../../../../../tsrc/propertystub/inc
 SYSTEMINCLUDE             ../../../../../tsrc/centralrepositorystub/inc
-SYSTEMINCLUDE		      ../../../../../tsrc/musmanagerstub/inc
-SYSTEMINCLUDE             /epoc32/include/platform/digia/eunit
+SYSTEMINCLUDE		  ../../../../../tsrc/musmanagerstub/inc
 
 APP_LAYER_SYSTEMINCLUDE
 
@@ -99,6 +90,6 @@
 LIBRARY                 euser.lib 
 LIBRARY                 bafl.lib
 LIBRARY                 efsrv.lib
-LIBRARY                 charconv.lib
+LIBRARY                 etel3rdparty.lib
 
 // End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group/ut_aoplugin.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHAOPlg"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_aoplugin.dll"-"c:\sys\bin\ut_aoplugin.dll"
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/muscommonstubs.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/muscommonstubs.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,6 +16,7 @@
 */
 
 
+
 #ifndef UT_MUSCOMMONSTUBS_H
 #define UT_MUSCOMMONSTUBS_H
 
@@ -43,8 +44,8 @@
         
         // From MMusCallMonitorObserver
         
-        void CallConnectedL( const TDesC& aTelNumber, TBool aIsSipUri );
-        void CallHoldL( const TDesC& aTelNumber, TBool aIsSipUri );
+        void CallConnectedL( const TDesC& aTelNumber );
+        void CallHoldL( const TDesC& aTelNumber );
         void ConferenceCallL();
         void NoActiveCallL();
            
@@ -69,7 +70,6 @@
         TBool iCallHoldCalled;
         TBool iConferenceCallCalled;
         TBool iNoActiveCallCalled;
-        TBool iIsSipUri;
                 
         HBufC* iTelNumber; 
         RMobileCall::TMobileCallEvent iCallEvent;
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musaocalleventmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musaocalleventmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,6 +16,7 @@
 */
 
 
+
 #ifndef UT_MUSAOCALLEVENTMONITOR_H
 #define UT_MUSAOCALLEVENTMONITOR_H
 
@@ -66,9 +67,9 @@
 
 private: // test MMusCallMonitorObserver      
     
-    virtual void CallConnectedL( const TDesC& aTelNumber, TBool aIsSipUri );
+    virtual void CallConnectedL( const TDesC& aTelNumber );
     
-    virtual void CallHoldL( const TDesC& aTelNumber, TBool aIsSipUri );
+    virtual void CallHoldL( const TDesC& aTelNumber );
     
     virtual void ConferenceCallL();
     
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musaoplugin.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musaoplugin.h	Wed Sep 01 12:31:01 2010 +0100
@@ -67,15 +67,13 @@
 
 public: // test functions 
 
+    void NewLL();  
     void DefinePropertiesLL();
     void DefinePropertyL_IntPropertyL();
     void DefinePropertyL_DesCPropertyL();
     void DeletePropertiesL();
     
     void UT_HandleServerCommandLL();
-    void UT_StartMusClientL();
-    void UT_StopMusClientL();
-    void UT_MusCallStateChangedL();
        
 private: // data
 
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallconferencemonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallconferencemonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -72,7 +72,6 @@
         void UT_CMusCallConferenceMonitor_DoCancelL();
         void UT_CMusCallConferenceMonitor_RunErrorL();
         void UT_CMusCallConferenceMonitor_MonitorCallLL();
-        void UT_CMusCallConferenceMonitor_GetConfStatus();
         
     private:    // Data
         
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscalleventmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscalleventmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,7 +26,6 @@
 #include "etelmm.h"
 #include "mussesseioninformationapi.h"
 #include "mmustsypropertyobserver.h"
-#include "mmuscallstateobserver.h"
 
 //  FORWARD DECLARATIONS
 class CMusCallEventMonitor;
@@ -43,9 +42,7 @@
  * 
  */
 NONSHARABLE_CLASS( UT_CMusCallEventMonitor ): public CEUnitTestSuiteClass,
-											   MMusTsyPropertyObserver,
-											   MMusCallStateObserver
-											   
+											   MMusTsyPropertyObserver
     {
     public:     // Constructors and destructors
 
@@ -70,10 +67,6 @@
     virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal,
     									 TName& aCallName );
     
-    public:    // from MMusCallStateObserver.
-
-        virtual void MusCallStateChanged();
-    
 
     private: // Constructors and destructors
 
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,8 +26,6 @@
 #include "etelmm.h"
 #include "mussesseioninformationapi.h"
 #include "mmustsypropertyobserver.h"
-#include "mmuscallstateobserver.h"
-
 // Forward declaration
 class CMusCallMonitor;
 
@@ -44,8 +42,7 @@
  * 
  */
 NONSHARABLE_CLASS( UT_CMusCallMonitor ): public CEUnitTestSuiteClass,
-											MMusTsyPropertyObserver, 
-											 MMusCallStateObserver
+											MMusTsyPropertyObserver
     {
     public:
         //Two phase construction
@@ -64,11 +61,6 @@
     virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal,
     									 TName& aCallName );    
 
-    public:    // from MMusCallStateObserver.
-
-    virtual void MusCallStateChanged();
-    
-    
     private: // Constructor
         UT_CMusCallMonitor();
         void ConstructL();
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallmonitorbase.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallmonitorbase.h	Wed Sep 01 12:31:01 2010 +0100
@@ -27,8 +27,6 @@
 #include "muscallmonitorbase.h"
 #include "mussesseioninformationapi.h"
 #include "mmustsypropertyobserver.h"
-#include "mmuscallstateobserver.h"
-
 
 // Forward declaration
 
@@ -44,8 +42,7 @@
 public:
     
     CMusCallMonitorMock( const RMobileCall& aCall,
-    					MMusTsyPropertyObserver& aObserver,
-    					MMusCallStateObserver& aCallStateObserver );
+    					MMusTsyPropertyObserver& aObserver );
     ~CMusCallMonitorMock();
     
     private:
@@ -62,8 +59,7 @@
  * 
  */
 NONSHARABLE_CLASS( UT_CMusCallMonitorBase ): public CEUnitTestSuiteClass,
-											MMusTsyPropertyObserver,
-											MMusCallStateObserver
+											MMusTsyPropertyObserver
     {
     public:
         //Two phase construction
@@ -82,9 +78,6 @@
     virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal,
     									 TName& aCallName );
     
-    public:    // from MMusCallStateObserver.
-    virtual void MusCallStateChanged();
-    
 
     private: // Constructor
         UT_CMusCallMonitorBase();
@@ -99,14 +92,16 @@
     private: // Test methdods
         void UT_SetStateLL();
         void UT_SetCallInfoLL();
-        void UT_RunErrorL();     
-        void UT_CMusCallMonitorBase_IsDataReadyLL();
+        void UT_RunErrorL();
+        
+        void UT_SetClirSettingL();
+        void UT_SetTerminatingPrivacyL();
+        void UT_RemovePrefixL();
         
     
     private:    // Data        
         CMusCallMonitorBase* iCallMonitorBase;
         RMobileCall iCall;
-        TBool iCallStateObserverInvoked;
 
         EUNIT_DECLARE_TEST_TABLE;
 
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallstatusmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallstatusmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,7 +26,6 @@
 #include "etelmm.h"
 #include "mussesseioninformationapi.h"
 #include "mmustsypropertyobserver.h"
-#include "mmuscallstateobserver.h"
 
 //  FORWARD DECLARATIONS
 class CMusCommonObserverStub;
@@ -44,9 +43,7 @@
  * 
  */
 NONSHARABLE_CLASS( UT_CMusCallStatusMonitor ): public CEUnitTestSuiteClass,
-													 MMusTsyPropertyObserver,
-                                                     MMusCallStateObserver
-													 
+													 MMusTsyPropertyObserver
     {
     public:     // Constructors and destructors
 
@@ -70,10 +67,6 @@
      */
     virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal,
     									 TName& aCallName );
-    
-    public:    // from MMusCallStateObserver.
-    
-    virtual void MusCallStateChanged();
 
     private: // Constructors and destructors
 
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musfactorysettings.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef __UT_CMusFactorySettings_H__
-#define __UT_CMusFactorySettings_H__
-
-
-//  EXTERNAL INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-
-
-// Forward declaration
-class MusFactorySettings;
-class CRepository;
-
-// Next row is to disable warning emerging from EUnit code.
-// Placement is due to a fact that most test case files
-// include this file. Directive can be removed when 
-// EUnit is fixed.  
-#pragma warn_illtokenpasting off
-
-//  CLASS DEFINITION
-/**
- * Tester class for CMusCallMonitorBase. 
- * 
- */
-NONSHARABLE_CLASS( UT_CMusFactorySettings ): public CEUnitTestSuiteClass
-    {
-    public:
-        //Two phase construction
-        static UT_CMusFactorySettings* NewL();
-        static UT_CMusFactorySettings* NewLC();
-        // Destructor                  
-        ~UT_CMusFactorySettings();
-
-    private: // Constructor
-        UT_CMusFactorySettings();
-        void ConstructL();
-
-    private: // Test case setup and teardown
-        void SetupL();
-        void Teardown();
-
-    private: // Test methdods
-        void UT_CMusFactorySettings_IsSupportedLL();
-        
-    private:    // Data
-        CRepository* iMusCentralRepository ; 
-        EUNIT_DECLARE_TEST_TABLE;
-
-    };
-
-#endif      //  __UT_CMusFactorySettings_H__
-
-// End of file
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muslineeventmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muslineeventmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -21,7 +21,7 @@
 #define MUSLINEEVENTMONITORTEST_H
 
 //#include <etelmm.h>
-#include <CEUnitTestSuiteClass.h>
+#include <digia/eunit/ceunittestsuiteclass.h>
 
 //#include "ut_musaocallmonitor.h"
 #include "muscallstatusmonitorobserver.h"
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muspropertymonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muspropertymonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -20,10 +20,6 @@
 #define __UT_CMusPropertyMonitor_H__
 
 
-// USER INCLUDES
-
-#include "mmuscallstateobserver.h" 
-
 //  EXTERNAL INCLUDES
 #include <digia/eunit/ceunittestsuiteclass.h>
 #include <digia/eunit/eunitmacros.h>
@@ -42,8 +38,7 @@
  * Tester class for CMusTsyPropertyMonitor. 
  * 
  */
-NONSHARABLE_CLASS( UT_CMusPropertyMonitor ): public CEUnitTestSuiteClass,
-                                                    MMusCallStateObserver
+NONSHARABLE_CLASS( UT_CMusPropertyMonitor ): public CEUnitTestSuiteClass
     {
     public:     // Constructors and destructors
 
@@ -57,12 +52,6 @@
          * Destructor
          */
         ~UT_CMusPropertyMonitor();
-        
-
-    public:     // MMusCallStateObserver
-
-        virtual void MusCallStateChanged();
-
 
     private: // Constructors and destructors
 
@@ -79,13 +68,10 @@
     
         void UT_CMusPropertyMonitor_RunLL();
         void UT_CMusPropertyMonitor_DoCancelL();
-        void UT_CMusPropertyMonitor_RunErrorL();
-        void UT_CMusPropertyMonitor_IsCallConnected();
+        void UT_CMusPropertyMonitor_RunErrorL(); 
 
     private:    // Data
         CMusPropertyMonitor* iMusPropertyMonitor;
-        TBool iMusCallStateObserverInovked;
-       
 
         EUNIT_DECLARE_TEST_TABLE;
 
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_mustsypropertymonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_mustsypropertymonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -20,9 +20,6 @@
 #define __UT_CMusTsyPropertyMonitor_H__
 
 
-// USER INCLUDE
-#include "mmuscallstateobserver.h"
-
 //  EXTERNAL INCLUDES
 #include <digia/eunit/ceunittestsuiteclass.h>
 #include <digia/eunit/eunitmacros.h>
@@ -30,7 +27,6 @@
 //  FORWARD DECLARATIONS
 class CMusCommonObserverStub;
 class CMusTsyPropertyMonitor;
-class CRepository;
 
 // Next row is to disable warning emerging from EUnit code.
 // Placement is due to a fact that most test case files
@@ -43,8 +39,7 @@
  * Tester class for CMusTsyPropertyMonitor. 
  * 
  */
-NONSHARABLE_CLASS( UT_CMusTsyPropertyMonitor ): public CEUnitTestSuiteClass,
-                                                       MMusCallStateObserver
+NONSHARABLE_CLASS( UT_CMusTsyPropertyMonitor ): public CEUnitTestSuiteClass
     {
     public:     // Constructors and destructors
 
@@ -53,17 +48,11 @@
          */
         static UT_CMusTsyPropertyMonitor* NewL();
         static UT_CMusTsyPropertyMonitor* NewLC();
-
+                
         /**
          * Destructor
          */
         ~UT_CMusTsyPropertyMonitor();
-        
-    
-    public:     // MMusCallStateObserver
-
-        virtual void MusCallStateChanged();
-
 
     private: // Constructors and destructors
 
@@ -73,6 +62,7 @@
     private: // Test case setup and teardown
 
         void SetupL();
+        void Setup2L();
         void Teardown();
 
     private: // Test methdods
@@ -83,17 +73,14 @@
         void UT_CMusTsyPropertyMonitor_RunErrorL(); 
         void UT_CMusTsyPropertyMonitor_AddCallMonitorLL();
         void UT_CMusTsyPropertyMonitor_RemoveCallMonitorL();
-        void UT_CMusTsyPropertyMonitor_MonitorCSCallLL();
-        void UT_CMusTsyPropertyMonitor_MonitorVoipCallLL();
         void UT_CMusTsyPropertyMonitor_MonitorCallLL();
+        void UT_CMusTsyPropertyMonitor_MonitorCallL_2L();
         void UT_CMusTsyPropertyMonitor_RemoveUnUsedCallMonitorsL();
-        void UT_CMusTsyPropertyMonitor_CheckCallCriteriaLL();
-        void UT_CMusTsyPropertyMonitor_IsDataReadyLL();
 
     private:    // Data
         CMusTsyPropertyMonitor* iMusTsyPropertyMonitor;
         RMobilePhone iPhone;
-        CRepository* iMusCentralRepository ; 
+        
         
 
         EUNIT_DECLARE_TEST_TABLE;
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musvoipcallmonitor.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef __UT_CMusVoipCallMonitor_H__
-#define __UT_CMusVoipCallMonitor_H__
-
-// USER INCLUDE
-#include "mmuscallstateobserver.h"
-
-//  EXTERNAL INCLUDES
-#include <ceunittestsuiteclass.h>
-#include <eunitmacros.h>
-#include <etel.h>
-
-//  INTERNAL INCLUDES
-
-// Forward declaration
-class CMusVoipCallMonitor;
-
-
-// Next row is to disable warning emerging from EUnit code.
-// Placement is due to a fact that most test case files
-// include this file. Directive can be removed when 
-// EUnit is fixed.  
-#pragma warn_illtokenpasting off
-
-//  CLASS DEFINITION
-/**
- * Tester class for CMusCallMonitorBase. 
- * 
- */
-NONSHARABLE_CLASS( UT_CMusVoipCallMonitor ): public CEUnitTestSuiteClass,
-                                                    MMusCallStateObserver
-    {
-    public:
-        //Two phase construction
-        static UT_CMusVoipCallMonitor* NewL();
-        static UT_CMusVoipCallMonitor* NewLC();
-        // Destructor                  
-        ~UT_CMusVoipCallMonitor();
-        
-    public: // From MMusCallStateObserver
-        
-        virtual void MusCallStateChanged();
-
-    private: // Constructor
-        UT_CMusVoipCallMonitor();
-        void ConstructL();
-
-    private: // Test case setup and teardown
-        void SetupL();
-        void Teardown();
-
-    private: // Test methdods
-        void UT_CMusVoipCallMonitor_IsEqualL();
-        void UT_CMusVoipCallMonitor_SetStateLL();
-        void UT_CMusVoipCallMonitor_SetCallInfoLL();
-        void UT_CMusVoipCallMonitor_SetCallInfoLOverflowL();
-        
-        void TestSetCallInfoLL( const TDesC& aSipUriFromTelephony,
-                                const TDesC& aSipUriPassedToMus );
-        void UT_CMusVoipCallMonitor_SetCallProviderInfoLL();
-        void UT_CMusVoipCallMonitor_AddDomainFromOwnUsernameLL();
-
-        void UT_CMusVoipCallMonitor_IsDataReadyLL();
-        void UT_CMusVoipCallMonitor_ResetCallProviderNameL();
-    
-    private:    // Data        
-        CMusVoipCallMonitor* iVoipCallMonitor;
-        RTelServer iTelServer;
-
-        EUNIT_DECLARE_TEST_TABLE;
-
-    };
-
-#endif      //  __UT_CMusVoipCallMonitor_H__
-
-// End of file
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/muscommonstubs.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/muscommonstubs.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -16,6 +16,7 @@
 */
 
 
+
 #include "muscommonstubs.h"
 
 
@@ -51,14 +52,11 @@
 // 
 // -----------------------------------------------------------------------------
 //	
-void CMusCommonObserverStub::CallConnectedL( const TDesC& aTelNumber,
-											 TBool aIsSipUri )
+void CMusCommonObserverStub::CallConnectedL( const TDesC& aTelNumber )
     {
     delete iTelNumber;
-    iTelNumber = NULL;
     iTelNumber = aTelNumber.AllocL();
     iCallConnectedCalled = ETrue;
-    iIsSipUri = aIsSipUri;
     }
 
 
@@ -66,14 +64,11 @@
 // 
 // -----------------------------------------------------------------------------
 //	    
-void CMusCommonObserverStub::CallHoldL( const TDesC& aTelNumber,
-										TBool aIsSipUri )
+void CMusCommonObserverStub::CallHoldL( const TDesC& aTelNumber )
     {
     delete iTelNumber;
-    iTelNumber = NULL;
     iTelNumber = aTelNumber.AllocL();
     iCallHoldCalled = ETrue;
-    iIsSipUri = aIsSipUri;
     }
     
 
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_aopluginDllMain.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_aopluginDllMain.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -15,6 +15,7 @@
 *
 */
 
+
 //  EXTERNAL INCLUDES
 #include <digia/eunit/ceunittestsuite.h>
 
@@ -29,8 +30,7 @@
 #include "ut_muscallmonitorbase.h"  
 #include "ut_musresourcefinderutil.h"
 #include "ut_mustsypropertymonitor.h"
-#include "ut_musvoipcallmonitor.h"
-#include "ut_musfactorysettings.h"
+#include "ut_musclirmonitor.h"
 
 /**
  * Test suite factory function.
@@ -71,9 +71,9 @@
 
     rootSuite->AddL( UT_CMusCallMonitorBase::NewLC() );
     CleanupStack::Pop();  
-    
-    rootSuite->AddL( UT_CMusFactorySettings::NewLC() );
-    CleanupStack::Pop();  
+   
+    rootSuite->AddL( UT_CMusClirMonitor::NewLC() );
+    CleanupStack::Pop();
 
     CleanupStack::Pop( rootSuite );
     return rootSuite;
@@ -86,5 +86,3 @@
 
 
 
-
-
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musaocalleventmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musaocalleventmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -15,6 +15,7 @@
 *
 */
 
+
 #include "ut_musaocalleventmonitor.h"
 #include "musaocalleventmonitor.h"
 #include "mussesseioninformationapi.h"
@@ -65,8 +66,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusAoCallEventMonitor::CallConnectedL( const TDesC& /*aTelNumber*/,
-												TBool /*aIsSipUri*/ )
+void UT_CMusAoCallEventMonitor::CallConnectedL( const TDesC& /*aTelNumber*/ )
     {
     iCallConnected = ETrue;
     }
@@ -76,8 +76,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusAoCallEventMonitor::CallHoldL( const TDesC& /*aTelNumber*/,
-										   TBool /*aIsSipUri*/ )
+void UT_CMusAoCallEventMonitor::CallHoldL( const TDesC& /*aTelNumber*/ )
     {
     iCallHold = ETrue;
     }
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musaoplugin.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musaoplugin.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -28,14 +28,13 @@
 #include <alwaysonlinemanagercommon.h>
 #include <alwaysonlinemanagerclient.h>
 #include <digia/eunit/eunitmacros.h>
-#include <digia/eunit/eunitdecorators.h>
+#include "FeatMgr.h"
+
+
 
 #pragma warn_illtokenpasting off
 
 _LIT( KEmptyTelNumber, "");
-_LIT( KEmptyProviderName, "");
-
-_LIT(KTestTelNumber,"+3585050");
 
 
 // -----------------------------------------------------------------------------
@@ -102,8 +101,63 @@
     delete iPlugin;
     iPlugin = NULL ;
     PropertyHelper::Close();
+    
     }
+	
+	
+//// -----------------------------------------------------------------------------
+////
+//// -----------------------------------------------------------------------------
+//// 
+void UT_CMusAoPlugin::NewLL()
+	{
+	
+    TInt res = KErrNone;
+    TInt ret = KErrNone;
+	FeatureManager::MultimediaSharingNotSupported();
+	iPlugin->DeleteProperties();
+    delete iPlugin;
+    iPlugin = NULL ;
+	iPlugin = CMusAoPlugin::NewL(); 
+	EUNIT_ASSERT( iPlugin );
+    EUNIT_ASSERT( iPlugin->iTsyPropertyMonitor == NULL);
+    EUNIT_ASSERT( iPlugin->iPropertyMonitor == NULL);
+    // camera information property
+    ret = RProperty::Get( NMusResourceApi::KCategoryUid,
+            NMusResourceApi::KCameraInformation,
+                          res );
+    EUNIT_ASSERT_EQUALS( ret, KErrNotFound )
+    ret = KErrNone;
 
+    // call event
+    ret = RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                          NMusSessionInformationApi::KMusCallEvent,
+                          res );
+    EUNIT_ASSERT_EQUALS( ret, KErrNotFound )
+    ret = KErrNone;
+    
+    // phone number
+    TBuf<15> telnumber; // TODO change to des
+    User::LeaveIfError( RProperty::Get(
+                            NMusSessionInformationApi::KCategoryUid,
+                            NMusSessionInformationApi::KMusTelNumber,
+                            telnumber ) );
+    EUNIT_ASSERT_EQUALS( telnumber.Compare( KEmptyTelNumber ), KErrNone )
+    
+    // Mus allowed
+    ret = RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                          NMusSessionInformationApi::KMUSForbidden,
+                          res );
+    EUNIT_ASSERT_EQUALS( ret, KErrNotFound )
+    ret = KErrNone;
+
+    // Call direction
+    ret = RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                          NMusSessionInformationApi::KMusCallDirection,
+                          res );
+    EUNIT_ASSERT_EQUALS( ret, KErrNotFound )
+    FeatureManager::MultimediaSharingSupported();
+	}
 
 // -----------------------------------------------------------------------------
 //
@@ -111,9 +165,7 @@
 // 
 void UT_CMusAoPlugin::DefinePropertiesLL()
     {
-/* Test 1 */
-    TInt res = KErrNone;
-    TInt err = KErrNone;   
+/* Test 1 */  
     /* Set Product Mode variation key value to
        00 - VideoPlayer always available
        0-Keypad available dynamic
@@ -128,7 +180,7 @@
     iPlugin->DefinePropertiesL();
     // It should not configure any PS keys for camera
     // Check the stub whether define is called.   
-    err = RProperty::Get( NMusResourceApi::KCategoryUid,
+    TInt err = RProperty::Get( NMusResourceApi::KCategoryUid,
                     NMusResourceApi::KCameraAvailability,
                     keyValue );
     EUNIT_ASSERT(keyValue == KErrNotFound );
@@ -178,9 +230,8 @@
 
     iPlugin->DefinePropertiesL();                       
 
-    res = KErrNone;
     // camera information property
-    res = RProperty::Get( NMusResourceApi::KCategoryUid,
+    TInt res = RProperty::Get( NMusResourceApi::KCategoryUid,
                                         NMusResourceApi::KCameraInformation,
                                         keyValue );
     EUNIT_ASSERT_EQUALS( keyValue, NMusResourceApi::EUsePrimaryCamera )    
@@ -199,17 +250,6 @@
                             telnumber ) );
     EUNIT_ASSERT_EQUALS( telnumber.Compare( KEmptyTelNumber ), KErrNone )
 
-    // callprovider
-    TBuf<15> callprovider;
-    User::LeaveIfError( RProperty::Get(
-                            NMusSessionInformationApi::KCategoryUid,
-                            NMusSessionInformationApi::KMUSCallProvider,
-                            callprovider ) );
-    EUNIT_ASSERT_EQUALS( callprovider.Compare( KEmptyProviderName ), KErrNone )
-
-    
-    
-    
     // Mus allowed
     RProperty::Get(NMusSessionInformationApi::KCategoryUid,
                    NMusSessionInformationApi::KMUSForbidden,
@@ -362,6 +402,13 @@
                           NMusSessionInformationApi::KMusCallDirection,
                           res );
     EUNIT_ASSERT_EQUALS( ret, KErrNotFound )
+    
+    // Call privacy
+    ret = RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                          NMusSessionInformationApi::KMUSPrivacy,
+                          res );
+    EUNIT_ASSERT_EQUALS( ret, KErrNotFound )
+
 
     }
 
@@ -377,103 +424,6 @@
     }
 
 
-
-// -----------------------------------------------------------------------------
-// Test Starting MushClient
-// -----------------------------------------------------------------------------
-// 
-
-void UT_CMusAoPlugin::UT_StartMusClientL()
-    {
-    // Ensure MushAO Plugin Exisit
-    EUNIT_ASSERT( iPlugin);
-    // Mush Manager Client process is not Created
-    EUNIT_ASSERT( !iPlugin->iManager );
-    
-    // Test1: Ensure Start really creates the MushClient process
-    iPlugin->StartMusClientL();
-    EUNIT_ASSERT( iPlugin->iManager );
-    
-    // Test2: Trying to Create Client process again if it already exisit.
-    iPlugin->StartMusClientL();
-    EUNIT_ASSERT( iPlugin->iManager );
-    
-    //Reset Plugin Data.
-    iPlugin->StopMusClient();
-    }
-
-
-// -----------------------------------------------------------------------------
-// Test Starting MushClient
-// -----------------------------------------------------------------------------
-// 
-
-void UT_CMusAoPlugin::UT_StopMusClientL()
-    {
-    EUNIT_ASSERT( iPlugin);
-    EUNIT_ASSERT( !iPlugin->iManager );
-    
-    // Test1: Deleteing Mush Cient when it does not exisit
-    iPlugin->StopMusClient();
-    EUNIT_ASSERT( !iPlugin->iManager );
-
-    // Create Mush Client process
-    iPlugin->StartMusClientL();
-    EUNIT_ASSERT( iPlugin->iManager );
-    
-    // Test2: Deleting Mush Client when it Exisit.
-    iPlugin->StopMusClient();
-    EUNIT_ASSERT( !iPlugin->iManager );
-    }
-
-
-// -----------------------------------------------------------------------------
-// From MMusCallStateObserver
-// Test MushCall State Changed
-// -----------------------------------------------------------------------------
-// 
-
-void UT_CMusAoPlugin::UT_MusCallStateChangedL()
-    {
-    TName cs_call_1(_L("cs_call_1"));
-
-    // Test 1: Data Ready: Call Connected: -> Start Mush 
-    
-    // Add Some dummy CS Call
-    // Set Call Connected:
-    // Set the Required Data.
-    iPlugin->iTsyPropertyMonitor->AddCallMonitorL( cs_call_1);
-
-    User::LeaveIfError(RProperty::Set( 
-                               NMusSessionInformationApi::KCategoryUid,
-                               NMusSessionInformationApi::KMusCallEvent,
-                               NMusSessionInformationApi::ECallConnected ));
-    
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                            NMusSessionInformationApi::KMusTelNumber,
-                                            KTestTelNumber ));
-
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                            NMusSessionInformationApi::KMusCallDirection,
-                                            NMusSessionInformationApi::ECallOrginated ));
-
-    // This can not be tested easily wit M-ALLOC 
-    EUNIT_DISABLE_ALLOC_DECORATOR;
-    iPlugin->MusCallStateChanged();
-    
-    EUNIT_ASSERT( iPlugin->iManager )
-    EUNIT_ENABLE_ALLOC_DECORATOR;
-    
-    // Test 2: Data Not Ready: Call Connected: -> Stop Mush
-    User::LeaveIfError(RProperty::Set( 
-                               NMusSessionInformationApi::KCategoryUid,
-                               NMusSessionInformationApi::KMusCallEvent,
-                               NMusSessionInformationApi::ENoCall ));
-    
-    iPlugin->MusCallStateChanged();
-    EUNIT_ASSERT( !iPlugin->iManager )
-    }
-
 //  TEST TABLE
 
 EUNIT_BEGIN_TEST_TABLE(
@@ -482,6 +432,13 @@
     "UNIT")
 
 EUNIT_TEST(
+    "UT_NewLL",
+    "CMusAoPlugin",
+    "NewL",
+    "FUNCTIONALITY",
+    SetupL, NewLL, Teardown)
+        
+EUNIT_TEST(
     "DefinePropertiesLL",
     "CMusAoPlugin",
     "DefinePropertiesL",
@@ -509,6 +466,8 @@
     "FUNCTIONALITY",
     SetupL, DeletePropertiesL, Teardown)
     
+    
+
 EUNIT_TEST(
     "HandleServerCommandL",
     "CMusAoPlugin",
@@ -516,26 +475,12 @@
     "FUNCTIONALITY",
     SetupL, UT_HandleServerCommandLL, Teardown)
 
-EUNIT_TEST(
-    "StartMusClient",
-    "CMusAoPlugin",
-    "StartMusClient",
-    "FUNCTIONALITY",
-    SetupL, UT_StartMusClientL, Teardown)
+
+EUNIT_END_TEST_TABLE
+
+
 
-EUNIT_TEST(
-    "StopMusClient",
-    "CMusAoPlugin",
-    "StopMusClient",
-    "FUNCTIONALITY",
-    SetupL, UT_StopMusClientL, Teardown)
-    
-EUNIT_TEST(
-    "MusCallStateChanged",
-    "CMusAoPlugin",
-    "MusCallStateChanged",
-    "FUNCTIONALITY",
-    SetupL, UT_MusCallStateChangedL, Teardown)
-    
-    
-EUNIT_END_TEST_TABLE
+
+
+
+
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallconferenceeventmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallconferenceeventmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -164,14 +164,13 @@
                      val );
     EUNIT_ASSERT( val==NMusSessionInformationApi::EConferenceCall);
 
-    RTelHelper::SetConfEvent( RMobileConferenceCall::EConferenceTerminated );
-    iConferenceCallEventMonitor->SetStateL( NMusSessionInformationApi::ENoCall );                               
+    RTelHelper::SetConfEvent( RMobileConferenceCall::EConferenceTerminated );                               
     iConferenceCallEventMonitor->Cancel(); // Cancel the active object    
     iConferenceCallEventMonitor->RunL();
     RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallEvent,
                      val );
-    EUNIT_ASSERT( val==NMusSessionInformationApi::ENoCall);
+    EUNIT_ASSERT( val==NMusSessionInformationApi::EConferenceTerminated);
 
     RTelHelper::SetConfEvent( RMobileConferenceCall::EConferenceSwapped );
     iConferenceCallEventMonitor->SetStateL( NMusSessionInformationApi::ENoCall );                               
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallconferencemonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallconferencemonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -96,9 +96,6 @@
                     NMusSessionInformationApi::KMusCallCount,
                     1 );
     */
-    
-    RTelHelper::SetConfStatus( RMobileConferenceCall::EConferenceIdle );
-
     RProperty::Set( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallEvent,
                      0 );
@@ -107,6 +104,7 @@
                     CMusCallConferenceMonitor::NewL(  iMobilePhone,
                                                       iLine ,
                                                       iCallMonitorArray );
+    
     }
 
 
@@ -220,14 +218,6 @@
     
     }
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusCallConferenceMonitor::UT_CMusCallConferenceMonitor_GetConfStatus()
-    {
-    EUNIT_ASSERT( iConferenceCallMonitor->GetConfStatus() == RMobileConferenceCall::EConferenceIdle );
-    }
 
 //  TEST TABLE
 
@@ -271,13 +261,6 @@
     "FUNCTIONALITY",
     SetupL, UT_CMusCallConferenceMonitor_MonitorCallLL, Teardown)
     
-EUNIT_TEST(
-    "GetCconfStatusL - test ",
-    "CMusConferenceCallMonitor",
-    "GetCconfStatus",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusCallConferenceMonitor_GetConfStatus, Teardown)
-    
 
 EUNIT_END_TEST_TABLE
 
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscalleventmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscalleventmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -111,7 +111,7 @@
                      NMusSessionInformationApi::KMusCallEvent,
                      0 );
     
-    iCallEventMonitor = CMusCallEventMonitor::NewL( iCall, *this, *this );
+    iCallEventMonitor = CMusCallEventMonitor::NewL( iCall, *this );
     
     }
 
@@ -170,13 +170,17 @@
 
 	// Test : Local Transfered. Means no call.
     iCallEventMonitor->Cancel();
+    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                    NMusSessionInformationApi::KMusCallEvent,
+                    val );
+    TInt callEnt = val;
     RTelHelper::SetCallEvent( RMobileCall::ELocalTransfer );    
     iCallEventMonitor->RunL();
     RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallEvent,
                      val );
                      
-    EUNIT_ASSERT( val==NMusSessionInformationApi::ENoCall);
+    EUNIT_ASSERT( callEnt==val );
     
 	// Test : Remote is on hold
     iCallEventMonitor->Cancel();
@@ -212,12 +216,16 @@
     
 	// Test : Remote is on conference
     iCallEventMonitor->Cancel();
+    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                    NMusSessionInformationApi::KMusCallEvent,
+                    val );
+    callEnt = val;
     RTelHelper::SetCallEvent( RMobileCall::ERemoteConferenceCreate );
     iCallEventMonitor->RunL();
     RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallEvent,
                      val );
-    EUNIT_ASSERT( val==NMusSessionInformationApi::EConferenceCall);
+    EUNIT_ASSERT( callEnt==val );
 
 	// Test : Remote conference transfer
     iCallEventMonitor->Cancel();
@@ -226,7 +234,7 @@
     RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallEvent,
                      val );
-    EUNIT_ASSERT( val==NMusSessionInformationApi::EConferenceCall);//Previous state.   
+    EUNIT_ASSERT( val==callEnt );
 
     // remote is connected state and local resume
     iCallEventMonitor->Cancel();
@@ -292,18 +300,12 @@
     {
     EUNIT_ASSERT( iCallEventMonitor );
     TInt error = KErrNotFound;
-    iCallEventMonitor->RunError(error);
+    EUNIT_ASSERT_EQUALS(iCallEventMonitor->RunError(error), KErrNone);
+    EUNIT_ASSERT_EQUALS(iCallEventMonitor->RunError(KErrNone), KErrNone);
     }
 
 
-// -----------------------------------------------------------------------------
-//  MusCallStateChanged from the MusCallStateObserver 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusCallEventMonitor::MusCallStateChanged()
-    {
-    //NOP:
-    }   
+   
 
 
 //  TEST TABLE
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -135,12 +135,12 @@
 
     EUNIT_ASSERT( !iCallMonitor->iCallStatusMonitor );
     EUNIT_ASSERT( !iCallMonitor->iCallEventMonitor );
-    iCallMonitor->StartMonitorL( iLine, *this, *this );
+    iCallMonitor->StartMonitorL( iLine, *this );
 
     EUNIT_ASSERT( iCallMonitor->iCallStatusMonitor );
     EUNIT_ASSERT( iCallMonitor->iCallEventMonitor );
 
-    EUNIT_ASSERT_LEAVE( iCallMonitor->StartMonitorL( iLine, *this , *this) );
+    EUNIT_ASSERT_LEAVE( iCallMonitor->StartMonitorL( iLine, *this ) );
     }
 
 
@@ -158,7 +158,7 @@
     EUNIT_ASSERT( !iCallMonitor->iCallStatusMonitor );
     EUNIT_ASSERT( !iCallMonitor->iCallEventMonitor );
 
-    iCallMonitor->StartMonitorL( iLine, *this, *this );
+    iCallMonitor->StartMonitorL( iLine, *this );
 
     EUNIT_ASSERT( iCallMonitor->iCallStatusMonitor );
     EUNIT_ASSERT( iCallMonitor->iCallEventMonitor );
@@ -193,21 +193,13 @@
     
     EUNIT_ASSERT( !iCallMonitor->IsMonitored() );
     
-    iCallMonitor->StartMonitorL( iLine, *this, *this );
+    iCallMonitor->StartMonitorL( iLine, *this );
     EUNIT_ASSERT( iCallMonitor->IsMonitored() );
     
     
     }
 
 
-// -----------------------------------------------------------------------------
-//  MusCallStateChanged from the MusCallStateObserver 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusCallMonitor::MusCallStateChanged()
-    {
-    // NOP
-    }   
    
 
 
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallmonitorbase.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallmonitorbase.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -24,16 +24,10 @@
 //  SYSTEM INCLUDES
 #include <digia/eunit/eunitmacros.h>
 
-// Test configurations
-_LIT(KEmptyProvider,"");
-_LIT(KTestTelNumber,"+3585050");
-
-
 
 CMusCallMonitorMock::CMusCallMonitorMock( const RMobileCall& aCall,
-										MMusTsyPropertyObserver& aObserver,
-										MMusCallStateObserver& aCallStateObserver ) 
-        : CMusCallMonitorBase( aCall, aObserver, aCallStateObserver )
+										MMusTsyPropertyObserver& aObserver ) 
+        : CMusCallMonitorBase( aCall, aObserver )
     {
     }
 
@@ -113,25 +107,12 @@
 // UT_CMusCallMonitorBase::NotifyCallStateChanged() 
 // -----------------------------------------------------------------------------
 //
-void UT_CMusCallMonitorBase::NotifyCallStateChanged(
-									NMusSessionInformationApi::TMusCallEvent /*aVal*/,
-									TName& /*aCallName*/ )
+void 
+UT_CMusCallMonitorBase::NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent /*aVal*/,
+                                                TName& /*aCallName*/ )
     {          
     }
 
-
-
-// -----------------------------------------------------------------------------
-//  MusCallStateChanged from the MusCallStateObserver 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusCallMonitorBase::MusCallStateChanged()
-    {
-    iCallStateObserverInvoked = ETrue;
-    }   
-
-
-
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -142,15 +123,13 @@
                      NMusSessionInformationApi::KMusCallEvent,
                      0 );
     RTelHelper::SetCallDirection( RMobileCall::EDirectionUnknown );
-    iCallMonitorBase = new CMusCallMonitorMock( iCall, *this, *this );
-    iCallStateObserverInvoked = EFalse;
+    iCallMonitorBase = new CMusCallMonitorMock( iCall, *this );    
     }
 
 
 void UT_CMusCallMonitorBase::Setup2L()
     {
-    iCallStateObserverInvoked = EFalse;
-    iCallMonitorBase = new CMusCallMonitorMock( iCall, *this, *this );    
+    iCallMonitorBase = new CMusCallMonitorMock( iCall, *this );    
     }
 
 // -----------------------------------------------------------------------------
@@ -176,6 +155,7 @@
 void UT_CMusCallMonitorBase::UT_SetStateLL()
     {
     TInt tmp;
+    
     EUNIT_ASSERT ( RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallEvent, tmp ) != KErrNone );
     
@@ -193,13 +173,9 @@
         {
         User::Leave( KErrNoMemory );
         }
-	
-	EUNIT_ASSERT (!iCallStateObserverInvoked )
+
 	
     iCallMonitorBase->SetStateL( NMusSessionInformationApi::ECallHold );
-	
-	EUNIT_ASSERT ( iCallStateObserverInvoked )
-
     RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallEvent,
                      tmp );
@@ -237,7 +213,7 @@
                      telnro );
     
     EUNIT_ASSERT( telnro == KTelnro );
-    
+
     RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallDirection,
                      direction );
@@ -275,16 +251,7 @@
     
     EUNIT_ASSERT( direction == NMusSessionInformationApi::ECallTerminated );
     
-    /* Test for call provider */
-    // Call Provider info is only Set for VoIP Calls
-    iCallMonitorBase->SetCallInfoL();  
-    TBuf<RProperty::KMaxPropertySize> provider;
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                    NMusSessionInformationApi::KMUSCallProvider,
-                    provider );
-    
-    
-    EUNIT_ASSERT( provider == KEmptyProvider );
+
     }
 
 
@@ -299,41 +266,81 @@
 
 
 // -----------------------------------------------------------------------------
-// UT_CMusCallMonitorBase::UT_CMusCallMonitorBase_IsDataReadyLL()
-// Test if required Data is ready for CS calls
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusCallMonitorBase::UT_SetClirSettingL()
+    {
+    TInt tmp;
+    _LIT( KTestNumber1, "11111" );
+    _LIT( KTestNumber2, "#31#11111" );
+    
+    iCallMonitorBase->SetClirSetting( KTestNumber1() );
+    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                     NMusSessionInformationApi::KMusClirSetting,
+                     tmp );
+    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ESendOwnNumber);
+    
+    iCallMonitorBase->SetClirSetting( KTestNumber2() );
+    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                     NMusSessionInformationApi::KMusClirSetting,
+                     tmp );
+    EUNIT_ASSERT( tmp==NMusSessionInformationApi::EDoNotSendOwnNumber);
+        
+    }
+
+// -----------------------------------------------------------------------------
+//
 // -----------------------------------------------------------------------------
 //
-void UT_CMusCallMonitorBase::UT_CMusCallMonitorBase_IsDataReadyLL()
+void UT_CMusCallMonitorBase::UT_SetTerminatingPrivacyL()
     {
-    TBool dataReady = EFalse;
+    TInt tmp;
+        
+    iCallMonitorBase->SetTerminatingPrivacy( iCallMonitorBase->iCall );
+    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                     NMusSessionInformationApi::KMUSPrivacy,
+                     tmp );
+    EUNIT_ASSERT( tmp==NMusSessionInformationApi::EPrivacyOff);
+        
+    RTelHelper::SetRemoteIdStatus( RMobileCall::ERemoteIdentitySuppressed );
+    iCallMonitorBase->SetTerminatingPrivacy( iCallMonitorBase->iCall );
+    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                     NMusSessionInformationApi::KMUSPrivacy,
+                     tmp );
+    EUNIT_ASSERT( tmp==NMusSessionInformationApi::EPrivacyOn);
     
-    //Test-1: Date Ready:
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                            NMusSessionInformationApi::KMusTelNumber,
-                                            KTestTelNumber ));
-
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                            NMusSessionInformationApi::KMusCallDirection,
-                                            NMusSessionInformationApi::ECallOrginated ));
-            
-    dataReady = iCallMonitorBase->IsDataReadyL();
-    EUNIT_ASSERT_EQUALS( dataReady, ETrue )
     
-    //Test-2: Partial Data is Ready
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                            NMusSessionInformationApi::KMusTelNumber,
-                                            KNullDesC ));
-    dataReady = iCallMonitorBase->IsDataReadyL();
-    EUNIT_ASSERT_EQUALS( dataReady, EFalse )
+    }
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusCallMonitorBase::UT_RemovePrefixL()
+    {
+    _LIT( KTestNumber1, "11111" );
+    _LIT( KTestNumber2, "#31#11111" );
+    _LIT( KTestNumber3, "*31#11111" );
 
-    //Test-3: Data Not Ready.
-    User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                 NMusSessionInformationApi::KMusCallEvent,
-                 ( TInt ) NMusSessionInformationApi::ENoCall ));
-
-    dataReady = iCallMonitorBase->IsDataReadyL();
-    EUNIT_ASSERT_EQUALS( dataReady, EFalse )
+    
+    HBufC* test1 = iCallMonitorBase->RemovePrefix(  KTestNumber1 );
+    CleanupStack::PushL( test1 );
+    EUNIT_ASSERT( *test1 == KTestNumber1 );
+    CleanupStack::PopAndDestroy( test1 );
+    
+    HBufC* test2 = iCallMonitorBase->RemovePrefix(  KTestNumber3 );
+    CleanupStack::PushL( test2 );
+    EUNIT_ASSERT( *test2 == KTestNumber1 );
+    CleanupStack::PopAndDestroy( test2 );
+    
+    HBufC* test3 = iCallMonitorBase->RemovePrefix(  KTestNumber2 );
+    CleanupStack::PushL( test3 );
+    EUNIT_ASSERT( *test3 == KTestNumber1 );
+    CleanupStack::PopAndDestroy( test3 );
+    
+    
+        
     }
 
 
@@ -365,15 +372,30 @@
     "FUNCTIONALITY",
     SetupL, UT_RunErrorL, Teardown)
     
-    
 EUNIT_TEST(
-    "IsDataReadyL - test",
+    "SetClirSetting - test",
+    "CMusCallMonitorBase",
+    "SetClirSetting",
+    "FUNCTIONALITY",
+    SetupL, UT_SetClirSettingL, Teardown)
+
+EUNIT_TEST(
+    "SetTerminatingPrivacy - test",
     "CMusCallMonitorBase",
-    "IsDataReadyL",
+    "SetTerminatingPrivacy",
     "FUNCTIONALITY",
-    SetupL, UT_CMusCallMonitorBase_IsDataReadyLL, Teardown)    
+    SetupL, UT_SetTerminatingPrivacyL, Teardown)
+
+EUNIT_TEST(
+    "RemovePrefix - test",
+    "CMusCallMonitorBase",
+    "RemovePrefix",
+    "FUNCTIONALITY",
+    SetupL, UT_RemovePrefixL, Teardown)
     
 
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
+
+
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallstatusmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscallstatusmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -111,7 +111,7 @@
                      NMusSessionInformationApi::KMusCallEvent,
                      NMusSessionInformationApi::ENoCall );
     
-    iCallStatusMonitor = CMusCallStatusMonitor::NewL( iCall, *this, *this ); 
+    iCallStatusMonitor = CMusCallStatusMonitor::NewL( iCall, *this ); 
     }
 
 
@@ -173,34 +173,40 @@
         callEvent  )
     
     // RMobileCall::EStatusDisconnecting
+    User::LeaveIfError(
+        RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                        NMusSessionInformationApi::KMusCallEvent,
+                        callEvent ) );
+    TInt callEnt = callEvent;
     iCallStatusMonitor->iCallStatus = RMobileCall::EStatusDisconnecting;
     iCallStatusMonitor->CheckStateL();
     User::LeaveIfError(
         RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                         NMusSessionInformationApi::KMusCallEvent,
                         callEvent ) );  
-    EUNIT_ASSERT_EQUALS( 
-        static_cast< TInt >( NMusSessionInformationApi::ENoCall ),
-        callEvent )
+    EUNIT_ASSERT( callEnt==callEvent );
     EUNIT_ASSERT( iCallStatusMonitor == NULL )
     
     // RMobileCall::EStatusDisconnectingWithInband
     // iCallStatusMonitor was deleted by the previous call
-    iCallStatusMonitor = CMusCallStatusMonitor::NewL( iCall, *this, *this );
+    iCallStatusMonitor = CMusCallStatusMonitor::NewL( iCall, *this );
+    User::LeaveIfError(
+        RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                        NMusSessionInformationApi::KMusCallEvent,
+                        callEvent ) );
+    callEnt = callEvent;
     iCallStatusMonitor->iCallStatus = RMobileCall::EStatusDisconnectingWithInband;
     iCallStatusMonitor->CheckStateL();
     User::LeaveIfError(
         RProperty::Get( NMusSessionInformationApi::KCategoryUid,
                         NMusSessionInformationApi::KMusCallEvent,
                         callEvent ) );    
-    EUNIT_ASSERT_EQUALS( 
-        static_cast< TInt >( NMusSessionInformationApi::ENoCall ),
-        callEvent )
+    EUNIT_ASSERT( callEnt == callEvent );
     EUNIT_ASSERT( iCallStatusMonitor == NULL )
     
     // RMobileCall::EStatusHold
     // iCallStatusMonitor was deleted by the previous call
-    iCallStatusMonitor = CMusCallStatusMonitor::NewL( iCall, *this, *this ); 
+    iCallStatusMonitor = CMusCallStatusMonitor::NewL( iCall, *this ); 
     iCallStatusMonitor->iCallStatus = RMobileCall::EStatusHold;
     iCallStatusMonitor->CheckStateL();
     User::LeaveIfError(
@@ -294,14 +300,7 @@
     }
 
 
-// -----------------------------------------------------------------------------
-//  MusCallStateChanged from the MusCallStateObserver 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusCallStatusMonitor::MusCallStateChanged()
-    {
-    // NOP
-    }   
+   
 
 
 //  TEST TABLE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musclirmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,291 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Monitor that observes the calling line identity restriction
+*                setting
+*
+*/
+
+#include "musclirmonitor.h"
+#include "ut_musclirmonitor.h"
+#include "e32property.h"
+
+#include <etelmm.h>
+#include <etel.h>
+#include <mmtsy_names.h>
+#include <digia/eunit/eunitmacros.h>
+
+
+#pragma warn_illtokenpasting off
+
+// Constants
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::NewLC
+// -----------------------------------------------------------------------------
+//
+UT_CMusClirMonitor* UT_CMusClirMonitor::NewLC()
+    {    
+    UT_CMusClirMonitor* self = new (ELeave) UT_CMusClirMonitor();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::ConstructL
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::ConstructL()
+    {
+    CEUnitTestSuiteClass::ConstructL();
+    }
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::UT_CMusClirMonitor
+// -----------------------------------------------------------------------------
+//
+UT_CMusClirMonitor::UT_CMusClirMonitor() :
+    CEUnitTestSuiteClass()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::~UT_CMusClirMonitor
+// -----------------------------------------------------------------------------
+//
+UT_CMusClirMonitor::~UT_CMusClirMonitor()
+    {
+    }
+
+   
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::UT_ReadClir
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::UT_ReadClir()
+    {
+    // Cancel initial request
+    iMonitor->Cancel();
+    
+    iMonitor->ReadClir();
+    EUNIT_ASSERT( iMonitor->IsActive() );
+    
+    // Monitor is already reading, new attempts do nothing 
+    iMonitor->ReadClir();
+    iMonitor->ReadClir();
+    
+    EUNIT_ASSERT_EQUALS( iMonitor->iErrorCount, 0 );
+    }
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::UT_RunL
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::UT_RunL()
+    {
+    CTelephony::TIdentityServiceStatus value1 =
+        CTelephony::EIdServiceActivePermanent;
+    CTelephony::TIdentityServiceStatus value2 =
+            CTelephony::EIdServiceNotProvisioned;
+
+    EUNIT_ASSERT( iMonitor->iAllowed );
+    iMonitor->Cancel();
+    iMonitor->iTIdentityServiceV1.iIdentityStatus = value1;
+    iMonitor->iStatus = KErrNone;    
+    iMonitor->RunL();
+    EUNIT_ASSERT( !iMonitor->iAllowed );
+    EUNIT_ASSERT_EQUALS( iMonitor->iErrorCount, 0 );
+    
+    
+    iMonitor->Cancel();
+    iMonitor->iTIdentityServiceV1.iIdentityStatus = value2;
+    iMonitor->iStatus = KErrGeneral;
+    iMonitor->RunL();
+    // iAllowed value does not change because request completed with error
+    EUNIT_ASSERT( !iMonitor->iAllowed );
+    EUNIT_ASSERT_EQUALS( iMonitor->iErrorCount, 1 );
+    
+   
+    iMonitor->Cancel();
+    iMonitor->iTIdentityServiceV1.iIdentityStatus = value2;
+    iMonitor->iStatus = KErrNone;
+    iMonitor->RunL();
+    EUNIT_ASSERT( iMonitor->iAllowed );
+    // After successful read, error count is reset
+    EUNIT_ASSERT_EQUALS( iMonitor->iErrorCount, 0 );
+    }
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::UT_RunLErrorsL
+// Test that if reading fails, it is retried few times. 
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::UT_RunLErrorsL()
+    {
+    // Must have same value as in musclirmonitor.cpp
+    const TInt KMaxErrorsBeforeStop = 5;
+
+    EUNIT_ASSERT_EQUALS( iMonitor->iErrorCount, 0 );
+    
+    for ( TInt i = 1; i <= KMaxErrorsBeforeStop; ++i )
+        {
+        // Reading fails
+        iMonitor->Cancel();
+        iMonitor->iStatus = KErrNotSupported;
+        iMonitor->RunL();
+        EUNIT_ASSERT_EQUALS( iMonitor->iErrorCount, i );
+        // Retry started
+        EUNIT_ASSERT( iMonitor->IsActive() );
+        }
+    
+    // Reading fails
+    iMonitor->Cancel();
+    iMonitor->iStatus = KErrNotSupported;
+    iMonitor->RunL();
+    EUNIT_ASSERT_EQUALS( iMonitor->iErrorCount, KMaxErrorsBeforeStop + 1 );
+
+    // No more retries
+    EUNIT_ASSERT( !iMonitor->IsActive() );
+    }
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::UT_DoCancel
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::UT_DoCancel()
+    {
+    EUNIT_ASSERT( iMonitor->IsActive() );
+
+    // Can't call DoCancel directly, must call it via the CActive::Cancel
+    iMonitor->Cancel();
+    
+    EUNIT_ASSERT( !iMonitor->IsActive() );
+    }
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::UT_RunError
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::UT_RunError()
+    {
+    EUNIT_ASSERT( iMonitor->RunError( KErrNone ) == KErrNone );
+    EUNIT_ASSERT( iMonitor->RunError( KErrGeneral ) == KErrNone );
+    EUNIT_ASSERT( iMonitor->RunError( 48 ) == KErrNone );
+    EUNIT_ASSERT( iMonitor->RunError( -2092 ) == KErrNone );
+    }
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::UT_TranslateResult
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::UT_TranslateResult()
+    {
+    iMonitor->iAllowed = EFalse;
+    
+    iMonitor->TranslateResult( CTelephony::EIdServiceActiveDefaultAllowed );
+    EUNIT_ASSERT( iMonitor->iAllowed );
+    
+    iMonitor->TranslateResult( CTelephony::EIdServiceActivePermanent );
+    EUNIT_ASSERT( !iMonitor->iAllowed );
+    
+    iMonitor->TranslateResult( CTelephony::EIdServiceNotProvisioned );
+    EUNIT_ASSERT( iMonitor->iAllowed );
+    
+    iMonitor->TranslateResult( CTelephony::EIdServiceActiveDefaultRestricted );
+    EUNIT_ASSERT( !iMonitor->iAllowed );
+    
+    iMonitor->TranslateResult( CTelephony::EIdServiceUnknown );
+    EUNIT_ASSERT( !iMonitor->iAllowed );
+    }
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::SetupL
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::SetupL()
+    {        
+    iMonitor = CMusClirMonitor::NewL();
+    }
+
+
+// -----------------------------------------------------------------------------
+// UT_CMusClirMonitor::Teardown
+// -----------------------------------------------------------------------------
+//
+void UT_CMusClirMonitor::Teardown()
+    {
+    delete iMonitor;
+    iMonitor = NULL;
+    PropertyHelper::Close();
+    
+    }
+
+// test table
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CMusClirMonitor,
+    "UT_CMusClirMonitor",
+    "UNIT" )
+
+EUNIT_TEST(
+    "UT_ReadClir",
+    "CMusClirMonitor",
+    "ReadClir",
+    "FUNCTIONALITY",
+    SetupL, UT_ReadClir, Teardown)
+
+EUNIT_TEST(
+    "UT_RunL",
+    "CMusClirMonitor",
+    "RunL",
+    "FUNCTIONALITY",
+    SetupL, UT_RunL, Teardown)
+
+EUNIT_TEST(
+    "UT_RunLErrorsL",
+    "CMusClirMonitor",
+    "RunL",
+    "FUNCTIONALITY",
+    SetupL, UT_RunLErrorsL, Teardown)
+
+EUNIT_TEST(
+    "UT_DoCancel",
+    "CMusClirMonitor",
+    "DoCancel",
+    "FUNCTIONALITY",
+    SetupL, UT_DoCancel, Teardown)
+
+EUNIT_TEST(
+    "UT_RunError",
+    "CMusClirMonitor",
+    "RunError",
+    "FUNCTIONALITY",
+    SetupL, UT_RunError, Teardown)
+
+EUNIT_TEST(
+    "UT_TranslateResult",
+    "CMusClirMonitor",
+    "TranslateResult",
+    "FUNCTIONALITY",
+    SetupL, UT_TranslateResult, Teardown)
+
+EUNIT_END_TEST_TABLE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musclirmonitor.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Monitor that observes the calling line identity restriction
+*                setting
+*
+*/
+
+
+
+#ifndef UT_MUSCLIRMONITORTEST_H
+#define UT_MUSCLIRMONITORTEST_H
+
+#include <etelmm.h>
+#include <digia/eunit/ceunittestsuiteclass.h>
+
+
+class CMusClirMonitor;
+class CMusAoPlugin;
+
+
+NONSHARABLE_CLASS( UT_CMusClirMonitor )
+    : public CEUnitTestSuiteClass
+    {
+
+public: // constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~UT_CMusClirMonitor();
+
+    /**
+     * Two-phased constructor. Leaves on failure.
+     * @return The constructed UT_CMusClirMonitor object.
+     */
+    static UT_CMusClirMonitor* NewLC();
+
+private:
+
+    /**
+     * C++ constructor.
+     */
+    UT_CMusClirMonitor();
+
+    /**
+     * Symbian 2nd-phase constructor.
+     */
+    void ConstructL();
+
+public: 
+
+    void UT_ReadClir();
+    
+    void UT_RunL();
+    
+    void UT_RunLErrorsL();
+
+    void UT_DoCancel();
+
+    void UT_RunError();
+    
+    void UT_TranslateResult();
+
+private:
+
+    void SetupL();
+    
+    void Teardown();
+
+private: // data
+
+    // Owned
+    CMusClirMonitor* iMonitor;
+
+    EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif // UT_MUSCLIRMONITORTEST_H
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscommondllmain.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muscommondllmain.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -17,7 +17,6 @@
 
 //  USER INCLUDES
 #include "ut_muscallmonitor.h"
-#include "ut_musvoipcallmonitor.h"
 #include "ut_muscallstatusmonitor.h"
 #include "ut_muscalleventmonitor.h"
 #include "ut_muscallconferenceeventmonitor.h"
@@ -25,7 +24,6 @@
 #include "ut_muscallmonitorbase.h"  
 #include "ut_musresourcefinderutil.h"
 #include "ut_mustsypropertymonitor.h"
-#include "ut_musfactorysettings.h"
 
 //  SYSTEM INCLUDES
 #include <digia/eunit/ceunittestsuite.h>
@@ -54,6 +52,7 @@
 
     rootSuite->AddL( UT_CMusTsyPropertyMonitor::NewLC() );
     CleanupStack::Pop();  
+
     
     rootSuite->AddL( UT_MusResourceFinderUtil::NewLC() );
     CleanupStack::Pop();  
@@ -64,12 +63,6 @@
     rootSuite->AddL( UT_CMusCallMonitorBase::NewLC() );
     CleanupStack::Pop();  
     
-    rootSuite->AddL( UT_CMusVoipCallMonitor::NewLC() );
-    CleanupStack::Pop();
-    
-    rootSuite->AddL( UT_CMusFactorySettings::NewLC() );
-    CleanupStack::Pop();
-        
     CleanupStack::Pop( rootSuite );
 
     return rootSuite;
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musconferencecallmonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musconferencecallmonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -126,6 +126,9 @@
     {
     EUNIT_ASSERT_EQUALS( iMonitor->RunError( KErrNone ),
                          KErrNone )
+    // Make sure RunError handles the error compleatly and returns
+    // KErrNone
+    EUNIT_ASSERT( iMonitor->RunError( KErrGeneral ) == KErrNone );
     }
 
 // -----------------------------------------------------------------------------
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_musfactorysettings.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-//  INTERNAL INCLUDES
-#include <CTSYDomainPSKeys.h>
-#include "etelmm.h"
-#include "ut_musfactorysettings.h"
-#include "musfactorysettings.h"
-#include "centralrepository.h"
-#include "e32property.h"
-
-
-//  SYSTEM INCLUDES
-#include <eunitmacros.h>
-
-// -----------------------------------------------------------------------------
-// Two phase symbian constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusFactorySettings* UT_CMusFactorySettings::NewL()
-    {
-    UT_CMusFactorySettings* self = UT_CMusFactorySettings::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Two phase symbian constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusFactorySettings* UT_CMusFactorySettings::NewLC()
-    {
-    UT_CMusFactorySettings* self = new( ELeave ) UT_CMusFactorySettings();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Destructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusFactorySettings::~UT_CMusFactorySettings()
-    {  
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-UT_CMusFactorySettings::UT_CMusFactorySettings()
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-// Second phase construct
-// -----------------------------------------------------------------------------
-//
-void UT_CMusFactorySettings::ConstructL()
-    {
-    // The ConstructL from the base class CEUnitTestSuiteClass must be called.
-    // It generates the test case table.
-    CEUnitTestSuiteClass::ConstructL();
-    
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusFactorySettings::SetupL()
-    {
-    iMusCentralRepository = CRepository::NewL( MusSettingsKeys::KRepositoryUid );    
-    CRepository::ResetStubGlobal();
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusFactorySettings::Teardown()
-    {  
-    delete iMusCentralRepository;   
-    iMusCentralRepository = NULL;    
-    CRepository::ResetStubGlobal();
-    PropertyHelper::Close(); // CRepository puts stuff to RProperty static
-    }
-
-// TEST CASES
-
-// -----------------------------------------------------------------------------
-// SetCallInfo test function
-// -----------------------------------------------------------------------------
-//
-void UT_CMusFactorySettings::UT_CMusFactorySettings_IsSupportedLL()
-    {    
-    // call cases    
-    // all call types allowed    
-    TPSCTsyCallType callType = EPSCTsyCallTypeCSVoice;
-    User::LeaveIfError( CRepository::SetStubGlobal(MusSettingsKeys::KAllowOnlyWithActiveCSCall,
-                                                   MusSettingsKeys::EAllowedAllCalls) );
-    EUNIT_ASSERT( MusFactorySettings::IsSupportedL( callType ));
-   
-    // allowed csonly and call type is voip
-    callType = EPSCTsyCallTypeVoIP;
-    User::LeaveIfError( CRepository::SetStubGlobal(MusSettingsKeys::KAllowOnlyWithActiveCSCall,
-                              MusSettingsKeys::EAllowedCSOnly) );
-    EUNIT_ASSERT( !MusFactorySettings::IsSupportedL( callType ));
-    
-    // allowed csonly and call type is cs
-    callType = EPSCTsyCallTypeCSVoice;
-    User::LeaveIfError( CRepository::SetStubGlobal(MusSettingsKeys::KAllowOnlyWithActiveCSCall,
-                              MusSettingsKeys::EAllowedCSOnly) );
-    EUNIT_ASSERT( MusFactorySettings::IsSupportedL( callType ));
-               
-    // allowed csonly and call type is EPSCTsyCallTypeNone
-    callType = EPSCTsyCallTypeNone;
-    User::LeaveIfError( CRepository::SetStubGlobal(MusSettingsKeys::KAllowOnlyWithActiveCSCall,
-                              MusSettingsKeys::EAllowedCSOnly) );
-    EUNIT_ASSERT( !MusFactorySettings::IsSupportedL( callType )); 
- 
-    // network cases
-    // all bearer types allowed
-    RMobilePhone::TMobilePhoneNetworkMode networkType = RMobilePhone::ENetworkModeGsm;
-    User::LeaveIfError( CRepository::SetStubGlobal(MusSettingsKeys::KAllowOnlyIn3GNetwork,
-                               MusSettingsKeys::EAllowedAllBearers) );
-    EUNIT_ASSERT( MusFactorySettings::IsSupportedL( networkType ));
-    
-    // 3g only and network type is gsm
-    networkType = RMobilePhone::ENetworkModeGsm;
-    User::LeaveIfError( CRepository::SetStubGlobal(MusSettingsKeys::KAllowOnlyIn3GNetwork,
-                                MusSettingsKeys::EAllowed3GOnly) );
-    EUNIT_ASSERT( !MusFactorySettings::IsSupportedL( networkType ));  
-    
-    // 3g only and network type is 3g
-    networkType = RMobilePhone::ENetworkModeWcdma;
-    User::LeaveIfError( CRepository::SetStubGlobal(MusSettingsKeys::KAllowOnlyIn3GNetwork,
-                                 MusSettingsKeys::EAllowed3GOnly) );
-    EUNIT_ASSERT( MusFactorySettings::IsSupportedL( networkType ));   
-    
-    // if allowed3gonly setting cenrep key not found
-    // then function should not leave and should behave like in default
-    // case ie all bearer supported. so it should return ETrue
-    networkType = RMobilePhone::ENetworkModeGsm;
-    User::LeaveIfError( CRepository::SetStubGlobal(MusSettingsKeys::KAllowOnlyIn3GNetwork,
-                                     MusSettingsKeys::EAllowed3GOnly) );
-    CRepository::iForceFailWithCode = KErrNotFound;
-    TBool supported = EFalse;
-    EUNIT_ASSERT_NO_LEAVE( supported = MusFactorySettings::IsSupportedL( networkType ))
-    EUNIT_ASSERT( supported );
-    }
-
-//  TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
-    UT_CMusFactorySettings,
-    "UT_CMusFactorySettings",
-    "UNIT" )
-
-EUNIT_TEST(
-    "IsSupportedL - test",
-    "CMusFactorySettings",
-    "IsSupportedL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusFactorySettings_IsSupportedLL, Teardown)
-
-EUNIT_END_TEST_TABLE
-
-//  END OF FILE
-
-
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muspropertymonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_muspropertymonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -92,9 +92,8 @@
 //
 void UT_CMusPropertyMonitor::SetupL()
     {        
-    iMusPropertyMonitor = CMusPropertyMonitor::NewL(*this);
+    iMusPropertyMonitor = CMusPropertyMonitor::NewL();
     iMusPropertyMonitor->iPropertyEvent.iPValue = NMusSessionInformationApi::ENoCall;
-    iMusCallStateObserverInovked = EFalse;
     }
 
 
@@ -109,6 +108,10 @@
     }
 
 
+
+
+
+
 // TEST CASES
 
 // -----------------------------------------------------------------------------
@@ -118,11 +121,43 @@
 void UT_CMusPropertyMonitor::UT_CMusPropertyMonitor_RunLL()
     {
     EUNIT_ASSERT( iMusPropertyMonitor);   
-    EUNIT_ASSERT( !iMusCallStateObserverInovked );
+    EUNIT_ASSERT( !iMusPropertyMonitor->iManager );   
+    
     iMusPropertyMonitor->iPropertyEvent.iPValue = NMusSessionInformationApi::ENoCall;
     iMusPropertyMonitor->Cancel();
     iMusPropertyMonitor->RunL();
-    EUNIT_ASSERT( iMusCallStateObserverInovked );   
+    EUNIT_ASSERT( !iMusPropertyMonitor->iManager );   
+
+    iMusPropertyMonitor->iPropertyEvent.iPValue = NMusSessionInformationApi::ECallConnected;
+    iMusPropertyMonitor->Cancel();
+    iMusPropertyMonitor->RunL();
+    EUNIT_ASSERT( iMusPropertyMonitor->iManager );
+    
+    iMusPropertyMonitor->iPropertyEvent.iPValue = NMusSessionInformationApi::EConferenceTerminated;
+    iMusPropertyMonitor->Cancel();
+    iMusPropertyMonitor->RunL();
+    EUNIT_ASSERT( iMusPropertyMonitor->iManager );
+    
+    iMusPropertyMonitor->iPropertyEvent.iPValue = NMusSessionInformationApi::ECallHold;
+    iMusPropertyMonitor->Cancel();
+    iMusPropertyMonitor->RunL();
+    EUNIT_ASSERT( iMusPropertyMonitor->iManager );
+    
+    iMusPropertyMonitor->iPropertyEvent.iPValue = NMusSessionInformationApi::EConferenceCall;
+    iMusPropertyMonitor->Cancel();
+    iMusPropertyMonitor->RunL();
+    EUNIT_ASSERT( iMusPropertyMonitor->iManager );
+    
+    iMusPropertyMonitor->iPropertyEvent.iPValue = NMusSessionInformationApi::ENoCall;
+    iMusPropertyMonitor->Cancel();
+    iMusPropertyMonitor->RunL();
+    EUNIT_ASSERT( !iMusPropertyMonitor->iManager );  
+    
+    iMusPropertyMonitor->iPropertyEvent.iPValue = 555;
+    iMusPropertyMonitor->Cancel();
+    iMusPropertyMonitor->RunL();
+    EUNIT_ASSERT( !iMusPropertyMonitor->iManager );  
+    
     }
 
 
@@ -146,70 +181,14 @@
 //
 void UT_CMusPropertyMonitor::UT_CMusPropertyMonitor_RunErrorL()
     {
-    EUNIT_ASSERT( !iMusCallStateObserverInovked );
     EUNIT_ASSERT( iMusPropertyMonitor );
-    TInt CallState;
     TInt error = KErrNotFound;
-
-    // Call is Established:
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                             NMusSessionInformationApi::KMusCallEvent,
-                             NMusSessionInformationApi::ECallConnected ) );
-
-    // Test1: Invoking Error Situation, Ensure Calll is disconected.
-    User::LeaveIfError( iMusPropertyMonitor->RunError(error));
-    User::LeaveIfError( RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                             NMusSessionInformationApi::KMusCallEvent,
-                             CallState ) );
-    EUNIT_ASSERT( CallState == NMusSessionInformationApi::ENoCall );
-    EUNIT_ASSERT( iMusCallStateObserverInovked );
+    iMusPropertyMonitor->RunError(error);
     }
 
 
-// -----------------------------------------------------------------------------
-// UT_CMusPropertyMonitor::UT_CMusPropertyMonitor_IsCallConnected()
-// Checks from the P/S keys if the Call is connected.
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyMonitor::UT_CMusPropertyMonitor_IsCallConnected()
-    {
-    // Test1: Call Not Connected:
-    TBool callConnected = EFalse;
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                             NMusSessionInformationApi::KMusCallEvent,
-                             NMusSessionInformationApi::ENoCall ) );
-    
-    callConnected = iMusPropertyMonitor->IsCallConnected();
-    EUNIT_ASSERT( callConnected == EFalse );
-    
-    // Test2: Call Connected:
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                             NMusSessionInformationApi::KMusCallEvent,
-                             NMusSessionInformationApi::ECallConnected ) );
 
-    callConnected = iMusPropertyMonitor->IsCallConnected();
-    EUNIT_ASSERT( callConnected == ETrue );
-    
-    
-    // Test3: Hold and Conference are concidered as call connected
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                             NMusSessionInformationApi::KMusCallEvent,
-                             NMusSessionInformationApi::ECallHold ) );
-
-    callConnected = iMusPropertyMonitor->IsCallConnected();
-    EUNIT_ASSERT( callConnected == ETrue );
-    }
-
-
-// -----------------------------------------------------------------------------
-//  MusCallStateChanged from the MusCallStateObserver 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusPropertyMonitor::MusCallStateChanged()
-    {
-    iMusCallStateObserverInovked = ETrue;
-    }
-
+   
 
 
 //  TEST TABLE
@@ -240,13 +219,6 @@
     "FUNCTIONALITY",
     SetupL, UT_CMusPropertyMonitor_RunErrorL, Teardown)
 
-EUNIT_TEST(
-    "IsCallConnected - test",
-    "CMusCallStatusMonitor",
-    "IsCallConnected",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusPropertyMonitor_IsCallConnected, Teardown)
-    
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_mustsypropertymonitor.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/ut_mustsypropertymonitor.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -19,27 +19,17 @@
 //  INTERNAL INCLUDES
 #include "etelmm.h"
 #include "e32property.h"
-#include "centralrepository.h"
 #include "ut_mustsypropertymonitor.h"
 #include "mustsypropertymonitor.h"
-#include "muscallmonitor.h"
-#include "musvoipcallmonitor.h"
-#include "muscallconferencemonitor.h"
+#include "mussettings.h"
+
 
 //  SYSTEM INCLUDES
 #include <digia/eunit/eunitmacros.h>
 #include <CTSYDomainPSKeys.h>
-#include <telremotepartyinformationpskeys.h>
-
 
 _LIT(KTelNo,"1234");
-_LIT( KTestProvideName, "VoIP" );
-_LIT( KDefaultSipUri, "sip:default@uri" );
 
-TName cs_call_1(_L("cs_call_1"));
-TName cs_call_2(_L("cs_call_2"));
-TName voip_call_1(_L("voip_call_1"));
-TName voip_call_2(_L("voip_call_2"));
 
 // -----------------------------------------------------------------------------
 //
@@ -103,13 +93,34 @@
 //
 void UT_CMusTsyPropertyMonitor::SetupL()
     {
-    iMusCentralRepository = CRepository::NewL( MusSettingsKeys::KRepositoryUid );
     RProperty::Set( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallEvent,
                      0 );
+    MultimediaSharingSettings::SetPropertyValueL(
+                                                MusSettingsKeys::KPrivacyExchange,
+                                                MusSettingsKeys::EPrivacy );                                                   
     
-    iMusTsyPropertyMonitor = CMusTsyPropertyMonitor::NewL( iPhone, *this );
+    iMusTsyPropertyMonitor = CMusTsyPropertyMonitor::NewL( iPhone );
     iMusTsyPropertyMonitor->iPropertyEvent.iPValue = EPSCTsyCallStateUninitialized;
+    
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void UT_CMusTsyPropertyMonitor::Setup2L()
+    {
+    RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                     NMusSessionInformationApi::KMusCallEvent,
+                     0 );
+    MultimediaSharingSettings::SetPropertyValueL(
+                                                MusSettingsKeys::KPrivacyExchange,
+                                                MusSettingsKeys::ENoPrivacy );                                                   
+    
+    iMusTsyPropertyMonitor = CMusTsyPropertyMonitor::NewL( iPhone );
+    iMusTsyPropertyMonitor->iPropertyEvent.iPValue = EPSCTsyCallStateUninitialized;
+    
     }
 
 
@@ -119,8 +130,6 @@
 //
 void UT_CMusTsyPropertyMonitor::Teardown()
     {
-    delete iMusCentralRepository;
-    iMusCentralRepository = NULL;
     delete iMusTsyPropertyMonitor;
     PropertyHelper::Close();
     iPhone.Close();
@@ -135,23 +144,30 @@
 //
 // -----------------------------------------------------------------------------
 //
+void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_NewLL()
+    {
+    EUNIT_ASSERT( iMusTsyPropertyMonitor);
+    EUNIT_ASSERT( MultimediaSharingSettings::PrivacySetting() );//feature is on by default
+    EUNIT_ASSERT( iMusTsyPropertyMonitor->iClirMonitor );
+    
+    MultimediaSharingSettings::SetPropertyValueL( MusSettingsKeys::KPrivacyExchange,
+                                                  MusSettingsKeys::ENoPrivacy );
+    delete iMusTsyPropertyMonitor;
+    iMusTsyPropertyMonitor = NULL;
+    
+    iMusTsyPropertyMonitor = CMusTsyPropertyMonitor::NewL( iPhone );
+    EUNIT_ASSERT( !MultimediaSharingSettings::PrivacySetting() );//feature is on by default
+    EUNIT_ASSERT( !iMusTsyPropertyMonitor->iClirMonitor );
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_RunLL()
     {
-
-    // Set intial call type too unintialiazed.
-    if ( RProperty::Set( KPSUidCtsyCallInformation,KCTsyCallType,
-                             EPSCTsyCallTypeUninitialized ))
-        {
-        User::Leave( KErrNoMemory );
-        }
-    // Set intial call count
-    if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                         NMusSessionInformationApi::KMusCallCount,
-                         0 ) != KErrNone )
-        {
-        User::Leave( KErrNoMemory );
-        }
-    
     EUNIT_ASSERT( iMusTsyPropertyMonitor);
     TInt val = KErrNone;
     
@@ -209,12 +225,13 @@
 
     iMusTsyPropertyMonitor->iPropertyEvent.iPValue = EPSCTsyCallStateHold;
     iMusTsyPropertyMonitor->SetStateL( NMusSessionInformationApi::ENoCall );
-	if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                     NMusSessionInformationApi::KMusCallCount,
-                     1 ) != KErrNone )
-        {
-        User::Leave( KErrNoMemory );
-        }
+    if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                 NMusSessionInformationApi::KMusCallCount,
+                 1 ) != KErrNone )
+    {
+    User::Leave( KErrNoMemory );
+    }
+    
     //simulate multicall scenario
     TName callName(_L("Voice1"));
     iMusTsyPropertyMonitor->AddCallMonitorL( callName );
@@ -289,155 +306,65 @@
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_MonitorCSCallLL()
+void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_MonitorCallLL()
     {
-    if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                            NMusSessionInformationApi::KMusCallCount,
-                            0 ) != KErrNone )
-        {
-        User::Leave( KErrNoMemory );
-        }
     RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusIdle );
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );    
-    iMusTsyPropertyMonitor->MonitorCSCallL();
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
-    
-    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusHangingUp );    
-    iMusTsyPropertyMonitor->MonitorCSCallL();
     EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
     
-    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusConnected );    
-    iMusTsyPropertyMonitor->MonitorCSCallL();
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 1 );
-    
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusAnswering );    
-    iMusTsyPropertyMonitor->MonitorCSCallL();
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 1 );
-
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusIdle );
-    iMusTsyPropertyMonitor->MonitorCSCallL();    
+    iMusTsyPropertyMonitor->MonitorCallL();
     EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
     
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_MonitorVoipCallLL()
-    {    
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 0 );
+    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusHangingUp );
+    
+    iMusTsyPropertyMonitor->MonitorCallL();
+    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
+    
+    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusConnected );
     if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
                      NMusSessionInformationApi::KMusCallCount,
                      0 ) != KErrNone )
         {
         User::Leave( KErrNoMemory );
         }
+    iMusTsyPropertyMonitor->MonitorCallL();
+    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 1 );
     
-    // State connected    
-    TPSCTsyCallState callState = EPSCTsyCallStateConnected;    
-    iMusTsyPropertyMonitor->MonitorVoipCallL( callState );
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 1 );
+    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusAnswering );
+    //already exist
+    iMusTsyPropertyMonitor->MonitorCallL();
+    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 1 );
     
-    // State answering
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 0 );
-    callState = EPSCTsyCallStateAnswering ;    
-    iMusTsyPropertyMonitor->MonitorVoipCallL( callState );
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 1 );
+
+    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusUnknown );
     
-    // State disconnecting ( Atleast one previous voip call is present )    
-    callState = EPSCTsyCallStateDisconnecting;    
-    iMusTsyPropertyMonitor->MonitorVoipCallL( callState );
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 0 );
+    iMusTsyPropertyMonitor->MonitorCallL();
+    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
+
+    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusIdle );
+    iMusTsyPropertyMonitor->MonitorCallL();
+    
+    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
     }
 
-
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_MonitorCallLL()
+void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_MonitorCallL_2L()
     {
-    TInt tmp = 0;
-    if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                         NMusSessionInformationApi::KMusCallCount,
-                         0 ) != KErrNone )
-       {
-       User::Leave( KErrNoMemory );
-       }
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-    // Test : Cs call and call state is connected
-    TPSCTsyCallState callState = EPSCTsyCallStateConnected;
-    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusConnected );    
-    TPSCTsyCallType callType = EPSCTsyCallTypeCSVoice;
-    iMusTsyPropertyMonitor->MonitorCallL(callState,callType);    
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 1 );
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 0 );
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                          NMusSessionInformationApi::KMusCallEvent,
-                          tmp );
-    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallConnected);  
-    
-    // Test : unknown call type   
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();              
-    callType = EPSCTsyCallTypeNone;
-    iMusTsyPropertyMonitor->MonitorCallL(callState,callType);    
     EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 0 );
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                          NMusSessionInformationApi::KMusCallEvent,
-                          tmp );
-    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ENoCall);    
+    EUNIT_ASSERT( !iMusTsyPropertyMonitor->iClirMonitor );
     
-    // Test : Voip call and call state is connected and factory settings not found  
-    // if key not found then it should behave default = AllowedAllCalls.    
-    callState = EPSCTsyCallStateConnected;      
-    callType = EPSCTsyCallTypeVoIP;
-    iMusTsyPropertyMonitor->MonitorCallL(callState,callType);    
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 1 );
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                          NMusSessionInformationApi::KMusCallEvent,
-                          tmp );
-    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallConnected);    
-    
+    RTelHelper::SetCallStatus( (RMobileCall::TMobileCallStatus)RCall::EStatusConnected );
+    if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+                     NMusSessionInformationApi::KMusCallCount,
+                     0 ) != KErrNone )
+        {
+        User::Leave( KErrNoMemory );
+        }
+    iMusTsyPropertyMonitor->MonitorCallL();
+    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 1 );
     
-    // Test : Voip call and call state is connected and factory settings set to 
-    // all call supported.
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-    iMusCentralRepository->Set(MusSettingsKeys::KAllowOnlyWithActiveCSCall,
-                                                      MusSettingsKeys::EAllowedAllCalls);
-    callState = EPSCTsyCallStateConnected;      
-    callType = EPSCTsyCallTypeVoIP;
-    iMusTsyPropertyMonitor->MonitorCallL(callState,callType);    
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 1 );
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                          NMusSessionInformationApi::KMusCallEvent,
-                          tmp );
-    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallConnected);    
-        
-    // Test : Voip call and call state is connected but factory settings are cs only
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-    iMusCentralRepository->Set(MusSettingsKeys::KAllowOnlyWithActiveCSCall,MusSettingsKeys::EAllowedCSOnly);    
-    callState = EPSCTsyCallStateConnected;      
-    callType = EPSCTsyCallTypeVoIP;
-    iMusTsyPropertyMonitor->MonitorCallL(callState,callType);    
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count() == 0 );
-    if ( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() != 0 )
-        {
-        User::Leave( KErrNoMemory ); // Call was not removed because of memory running out was "silenty" handled.
-        }
-    EUNIT_ASSERT( iMusTsyPropertyMonitor->iVoipCallMonitorArray.Count() == 0 ); 
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                          NMusSessionInformationApi::KMusCallEvent,
-                          tmp );
-    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ENoCall);    
     }
 
 // -----------------------------------------------------------------------------
@@ -460,190 +387,8 @@
     iMusTsyPropertyMonitor->RemoveUnUsedCallMonitors();
     EUNIT_ASSERT( iMusTsyPropertyMonitor->iCallMonitorArray.Count()==0 );    
     }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_CheckCallCriteriaLL()
-    {
-    if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                            NMusSessionInformationApi::KMusCallCount,
-                            0 ) != KErrNone )
-          {
-          User::Leave( KErrNoMemory );
-          }
-    TInt tmp = 0;
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-
-    User::LeaveIfError( RProperty::Set( KPSUidTelRemotePartyInformation,
-                                        KTelCLINumber,
-                                        _L( "sip:somebody@somewhere" ) ) );
    
-    // Test : no cs call , one voip call    
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_1 );
-    iMusTsyPropertyMonitor->CheckCallCriteriaL();
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                             NMusSessionInformationApi::KMusCallEvent,
-                             tmp );
-    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallConnected);
-    // Test : one cs call , multiple voip calls
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->AddCallMonitorL( cs_call_1 );
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_1 );
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_2 );
-    iMusTsyPropertyMonitor->CheckCallCriteriaL();
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                                 NMusSessionInformationApi::KMusCallEvent,
-                                 tmp );
-    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallHold);
-    // Test: multiple cs call, one voip call
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->AddCallMonitorL( cs_call_1 );
-    iMusTsyPropertyMonitor->AddCallMonitorL( cs_call_2 );
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_1 );
-    iMusTsyPropertyMonitor->CheckCallCriteriaL();
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                                 NMusSessionInformationApi::KMusCallEvent,
-                                 tmp );
-    EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallHold);    
-    
-    // Test : multiple cs call , multiple voip calls
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();  
-    iMusTsyPropertyMonitor->AddCallMonitorL( cs_call_1 );
-    iMusTsyPropertyMonitor->AddCallMonitorL( cs_call_2 );
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_1 );
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_2 );
-    iMusTsyPropertyMonitor->CheckCallCriteriaL();
-    RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                                  NMusSessionInformationApi::KMusCallEvent,
-                                  tmp );
-     EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallHold);       
-    // Test : one cs call , one voip call
-     iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-     iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();  
-     iMusTsyPropertyMonitor->AddCallMonitorL( cs_call_1 );     
-     iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_1 );  
-     iMusTsyPropertyMonitor->CheckCallCriteriaL();
-     RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                                    NMusSessionInformationApi::KMusCallEvent,
-                                    tmp );
-     EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallHold);
-     // Test: one cs call , no voip call
-     iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-     iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy(); 
-     RTelHelper::SetCallStatus( RMobileCall::EStatusConnected );
-     iMusTsyPropertyMonitor->AddCallMonitorL( cs_call_1 );    
-     iMusTsyPropertyMonitor->CheckCallCriteriaL();
-     RProperty::Get( NMusSessionInformationApi::KCategoryUid,
-                         NMusSessionInformationApi::KMusCallEvent,
-                         tmp );
-     EUNIT_ASSERT( tmp==NMusSessionInformationApi::ECallConnected);
-    }
-
-
 
-// -----------------------------------------------------------------------------
-// UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_IsDataReadyLL()
-// Test to query from corresponding monitors if they are ready.
-// -----------------------------------------------------------------------------
-//
-
-
-void UT_CMusTsyPropertyMonitor::UT_CMusTsyPropertyMonitor_IsDataReadyLL()
-    {
-    TBool dataReady = EFalse;
-
-    // Test-1: CS Call Ready:
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-
-    if ( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                            NMusSessionInformationApi::KMusCallCount,
-                            0 ) != KErrNone )
-        {
-        User::Leave( KErrNoMemory );
-        }
-
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                            NMusSessionInformationApi::KMusTelNumber,
-                                            KTelNo ));
-
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                            NMusSessionInformationApi::KMusCallDirection,
-                                            NMusSessionInformationApi::ECallOrginated ));
-    
-    iMusTsyPropertyMonitor->AddCallMonitorL( cs_call_1 );
-    dataReady = iMusTsyPropertyMonitor->IsDataReadyL();
-    EUNIT_ASSERT_EQUALS( dataReady, ETrue )
-    
-    // Test-2: CS Call NotReady: 
-    User::LeaveIfError( RProperty::Set( NMusSessionInformationApi::KCategoryUid,
-                                            NMusSessionInformationApi::KMusTelNumber,
-                                            KNullDesC ));
-    
-    dataReady = iMusTsyPropertyMonitor->IsDataReadyL();
-    EUNIT_ASSERT_EQUALS( dataReady, EFalse )
-
-    // Test-3 VoIP Call Ready
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_1 );
-    
-    User::LeaveIfError( RProperty::Set(
-                              NMusSessionInformationApi::KCategoryUid,
-                              NMusSessionInformationApi::KMusTelNumber, 
-                              KDefaultSipUri ));
-
-    User::LeaveIfError(RProperty::Set( 
-                              NMusSessionInformationApi::KCategoryUid,
-                              NMusSessionInformationApi::KMUSCallProvider,
-                              KTestProvideName ));
-    
-    dataReady = iMusTsyPropertyMonitor->IsDataReadyL();
-    EUNIT_ASSERT_EQUALS( dataReady, ETrue )
-    
-    
-    // Test-4 VoIP Call Not Ready
-    User::LeaveIfError( RProperty::Set(
-                          NMusSessionInformationApi::KCategoryUid,
-                          NMusSessionInformationApi::KMUSCallProvider, 
-                          KNullDesC ));
-    
-    dataReady = iMusTsyPropertyMonitor->IsDataReadyL();
-
-    EUNIT_ASSERT_EQUALS( dataReady, EFalse )
-
-    // Test-5: Conference Case
-    iMusTsyPropertyMonitor->iCallMonitorArray.ResetAndDestroy();
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy(); 
-
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_1 );
-    iMusTsyPropertyMonitor->AddVoipCallMonitorL( voip_call_2 );
-    
-    dataReady = iMusTsyPropertyMonitor->IsDataReadyL();
-    EUNIT_ASSERT_EQUALS( dataReady, EFalse )
-    iMusTsyPropertyMonitor->iVoipCallMonitorArray.ResetAndDestroy();
-    
-    // Test-3 Handling conference case.
-    iMusTsyPropertyMonitor->iConferenceMonitor->iConfStatus = RMobileConferenceCall::EConferenceActive;
-    dataReady = iMusTsyPropertyMonitor->IsDataReadyL();
-    EUNIT_ASSERT_EQUALS( dataReady, ETrue )
-    iMusTsyPropertyMonitor->iConferenceMonitor->iConfStatus = RMobileConferenceCall::EConferenceIdle;
-    }
-
-
-// -----------------------------------------------------------------------------
-//  MusCallStateChanged from the MusCallStateObserver 
-// -----------------------------------------------------------------------------
-//
-void UT_CMusTsyPropertyMonitor::MusCallStateChanged()
-    {
-    // NOP
-    }
 
 //  TEST TABLE
 
@@ -652,6 +397,14 @@
     "UT_CMusTsyPropertyMonitor",
     "UNIT" )
 
+    
+EUNIT_TEST(
+    "NewL - test",
+    "CMusTsyPropertyMonitor",
+    "NewL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMusTsyPropertyMonitor_NewLL, Teardown)
+
 EUNIT_TEST(
     "RunL - test",
     "CMusTsyPropertyMonitor",
@@ -674,7 +427,7 @@
     SetupL, UT_CMusTsyPropertyMonitor_RunErrorL, Teardown)
 
 EUNIT_TEST(
-    "UT_CMusTsyPropertyMonitor_RemoveUnUsedCallMonitorsL",
+    "RemoveUnUsedCallMonitorsL",
     "CMusCallStatusMonitor",
     "RemoveUnUsedCallMonitors",
     "FUNCTIONALITY",
@@ -700,35 +453,14 @@
     "MonitorCallL",
     "FUNCTIONALITY",
     SetupL, UT_CMusTsyPropertyMonitor_MonitorCallLL, Teardown)
-    
-EUNIT_TEST(
-    "MonitorCsCallL - test",
-    "CMusTsyPropertyMonitor",
-    "MonitorCsCallL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusTsyPropertyMonitor_MonitorCSCallLL, Teardown)
-    
-EUNIT_TEST(
-    "MonitorVoipCallL - test",
-    "CMusTsyPropertyMonitor",
-    "MonitorVoipCallL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusTsyPropertyMonitor_MonitorVoipCallLL, Teardown)
 
 EUNIT_TEST(
-    "CheckCallCriteriaL - test",
+    "MonitorCallL no clir - test",
     "CMusTsyPropertyMonitor",
-    "CheckCallCriteriaL",
+    "MonitorCallL",
     "FUNCTIONALITY",
-    SetupL, UT_CMusTsyPropertyMonitor_CheckCallCriteriaLL, Teardown)
-    
-EUNIT_TEST(
-    "IsDataReadyL - test",
-    "CMusTsyPropertyMonitor",
-    "IsDataReadyL",
-    "FUNCTIONALITY",
-    SetupL, UT_CMusTsyPropertyMonitor_IsDataReadyLL, Teardown)
-    
+    Setup2L, UT_CMusTsyPropertyMonitor_MonitorCallL_2L, Teardown)
+
 EUNIT_END_TEST_TABLE
 
 //  END OF FILE
--- a/mmshplugins/mmshsettingsuiplugin/data/mussettingsuirsc.rss	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/data/mussettingsuirsc.rss	Wed Sep 01 12:31:01 2010 +0100
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  Resource file for MUSSettingsPlugin.
-*  Version     : %version: 19 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: be1sipx1#19 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -229,20 +229,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_vs_video_saving_setting_page
-// Video saving setting page.
-// ---------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_vs_video_saving_setting_page
-    {
-    number = EAknSettingPageNoOrdinalDisplayed;
-    label = qtn_msh_set_saving_title;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type = EAknSetListBox;
-    editor_resource_id = r_setting_listbox;
-    }
-
-// ---------------------------------------------------------------------------
 // r_vs_recorded_video_saving_setting_page
 // Recorded video saving setting page.
 // ---------------------------------------------------------------------------
@@ -299,7 +285,7 @@
         {
         LBUF
             {
-            txt = qtn_msh_set_activation_always;
+            txt = qtn_msh_set_activation_on;
             },
         LBUF
             {
@@ -308,6 +294,7 @@
         };
     }
 
+
 // ---------------------------------------------------------------------------
 // r_activation_setting_page_lbx
 // Activation setting page's listbox.
@@ -428,11 +415,11 @@
         MENU_TITLE
             {
             menu_pane = r_vs_menu_item_exit;
-            },
+            }/*,
         MENU_TITLE
             {
             menu_pane = r_vs_menu_item_change;
-            }
+            }*/
         };
     }
 
@@ -461,7 +448,7 @@
             }
         };
     }
-
+/*
 // ---------------------------------------------------------------------------
 //    r_vs_settings_menu_item_change
 //    Options menu item 'Change'.
@@ -478,7 +465,7 @@
             }
         };
     }
-
+*/
 // ---------------------------------------------------------------------------
 // r_setting_listbox
 // Common listbox editor resource for setting pages.
--- a/mmshplugins/mmshsettingsuiplugin/inc/mmussipprofilehandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/inc/mmussipprofilehandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -13,6 +13,7 @@
 *
 * Description:  Mixin-class that provides functionality for manipulating
 *                MuS specific settings.
+*  Version     : %version: 6 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -20,13 +21,15 @@
 #ifndef M_MMUSSIPPROFILEHANDLER_H
 #define M_MMUSSIPPROFILEHANDLER_H
 
-#include <sipmanagedprofile.h>
+#include <e32def.h>
+#include <e32cmn.h>
+
+class CSIPProfile;
 
 /**
 *  MMusSIPProfileHandler class
 *  Mixin class for SIP profile manipulation.
 *  Handles SIP profile manipulations.
-*  @since S60 v3.2
 */
 class MMusSIPProfileHandler
     {
@@ -38,17 +41,17 @@
      *         default SIP profile.
      */
     virtual TInt DefaultProfileIndex() = 0;
-
+    
     /**
-     * Returns pointer to the SIP profile array, does not change ownership.
+     * Returns a reference to the SIP profile array.
      * Note that previously returned value goes out of scope after a new
      * call to ProfileArrayL. So it is not advised to store return value
      * in long persistent variable, but rather to be used like stack
      * variables for safety.
      *
-     * @return Pointer to internally cached SIP profile array.
+     * @return Reference to internally cached SIP profile array.
      */
-    virtual CArrayPtr<CSIPManagedProfile>* ProfileArrayL() = 0;
+    virtual RPointerArray<CSIPProfile>& ProfileArrayL() = 0;
 
     /**
      * Returns the id of the default SIP profile.
@@ -56,6 +59,12 @@
      *         default SIP profile.
      */
     virtual TUint32 DefaultProfileId() = 0;
+    
+    /*
+     * 
+     * 
+     */
+    virtual void DisableProfileL() = 0;
 
     /**
      * Returns profile id based on index.
--- a/mmshplugins/mmshsettingsuiplugin/inc/mussettingscontainer.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/inc/mussettingscontainer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -185,11 +185,6 @@
     MusSettingsKeys::TOperatorVariant iOperatorVariant;
 
     /**
-     * VS activation current value.
-     */
-    MusSettingsKeys::TActivation iVSActication;
-
-    /**
      * Listbox items.
      */
     CGSListBoxItemTextArray* iListboxItemArray;
--- a/mmshplugins/mmshsettingsuiplugin/inc/mussettingsmodel.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/inc/mussettingsmodel.h	Wed Sep 01 12:31:01 2010 +0100
@@ -12,6 +12,7 @@
 * Contributors:
 *
 * Description:  MUSSettingsPlugin model class.
+*  Version     : %version: 11 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -20,20 +21,17 @@
 #ifndef  C_MUSSETTINGSMODEL_H
 #define  C_MUSSETTINGSMODEL_H
 
-#include 	"mussettings.h"
+#include <e32base.h>
+#include <badesca.h>
 
 class MMusSIPProfileHandler;
 class CMusSIPProfileModel;
-class MultimediaSharingSettings;
-
 class CAknMemorySelectionDialogMultiDrive;
 
 
 /**
  *  CMusSettingsModel is the model class of GS application.
  *  It provides functions to get and set setting values.
- *
- *  @since S60 v3.2
  */
 class CMusSettingsModel : public CBase
     {
@@ -52,111 +50,52 @@
     ~CMusSettingsModel();
 
     /**
-     * Returns operator variant mode.
-     * @return 0: Standard (MusSettingsKeys::EStandard)
-     *         1: Operator Specific (MusSettingsKeys::EOperatorSpecific)
-     */
-    MusSettingsKeys::TOperatorVariant VSSettingsOperatorVariantL();
-
-    /**
-     * Returns VS activation mode.
-     * @return 0: Always (MusSettingsKeys::EAlwaysActive)
-     *         1: Automatic (MusSettingsKeys::EActiveInHomeNetworks)
-     *         2: Off (MusSettingsKeys::ENever)
-     */
-    MusSettingsKeys::TActivation VSSettingsActivationL();
-
-    /**
-     * Returns SIP profile mode.
-     * @return 0: Use default SIP profile.
-     *         1: Use user selected SIP profile.
-     */
-    TInt VSSettingsProfileL();
-
-    /**
-     * Returns video autorecord mode.
-     * @return 0: on  (MusSettingsKeys::EAutoRecordOn)
-     *		   1: off (MusSettingsKeys::EAutoRecordOff)
-     */
-    MusSettingsKeys::TAutoRecord VSSettingsAutoRecordL();
-
-    /**
      * Returns recorded video saving mode.
      * @return 2: phone memory 
      *         4: memory card 
      */
     TInt VSSettingsRecordedVideoSavingL();
-
+    
     /**
-     * Returns state of note (on/off). This setting is called "Capability
-     * auditory note" in standard variant and "Alerts" in operator specific
-     * variant.
-     * @return 0: enabled (MusSettingsKeys::EAuditoryNotificationOn)
-     *         1: disabled (MusSettingsKeys::EAuditoryNotificationOff)
+     * operator specific variant
+     * Sets activation item 
+     * @param aActive (enabled/disabled).
      */
-    MusSettingsKeys::TAuditoryNotification VSSettingsNoteL();
-
-    /**
-     * Sets packet data VS activation mode.
-     * @param aActivation Activation mode.
-     */
-    void SetVSSettingsActivationL(
-    		const MusSettingsKeys::TActivation aActivation );
+    void SetActivationItem( TBool aActive );
 
     /**
-     * Sets SIP profile mode.
-     * @param aProfile Profile id.
-     */
-    void SetVSSettingsProfileL( const TInt aProfile );
-
-    /**
-     * Sets video autorecord mode.
-     * @param aAutoRecord save mode of video.
+     * operator specific variant
+     * @return activation item 
      */
-    void SetVSSettingsAutoRecordL(
-    		const MusSettingsKeys::TAutoRecord aAutoRecord );
-
-    /**
-    * Sets location of video saving.
-    * @param aVideoLocation location of video
-    */
-    void SetVSSettingsRecordedVideoSavingL( const TInt aVideoLocation );
-
-    /**
-     * Sets mode of note ("Capability auditory note" in standard variant and
-     * "Alerts" in operator specific variant).
-     * @param aValue New state for note (enabled/disabled).
-     */
-    void SetVSSettingsNoteL(
-    		const MusSettingsKeys::TAuditoryNotification aValue );
-
+    TBool ActivationItem();
+    
     /**
      * Returns the array containing the profile names.
      * NOTE! The ownership of the array is transferred to the caller.
      * @return Array consisting of the names of the SIP profiles.
      */
-	CDesCArray* ListOfProfileNamesL();
+    CDesCArray* ListOfProfileNamesL();
 
     /**
      * Gets a SIP profile name by ID.
      * Ownership is transferred to caller.
      * @return SIP profile name.
      */
-	HBufC* ProfileNameL( TInt aId );
+    HBufC* ProfileNameL( TInt aId );
 
     /**
      * Gets the index of the default SIP profile.
      * @return KErrNotFound, if one does not exist, otherwise index of the
      *         default SIP profile.
      */
-	TInt DefaultProfileIndex();
+    TInt DefaultProfileIndex();
 
     /**
      * Gets the id of the default SIP profile.
      * @return KErrNotFound, if one does not exist, otherwise id of the
      *         default SIP profile.
      */
-	TUint32 DefaultProfileId();
+    TUint32 DefaultProfileId();
 
     /**
      * Returns SIP profile index on locally cached array based on id.
@@ -179,23 +118,27 @@
      */
     CAknMemorySelectionDialogMultiDrive* MemorySelectionDialogLC();
 
+    /**
+    * Initialize SIP profile enabler data.
+    */
+    void InitializeProfileEnablerL();
     
 public: // constants
 
     /**
      * Default SIP profile.
      */
-	static const TInt KVsSipProfileDefault;
-
+    static const TInt KVsSipProfileDefault;
+    
     /**
      * SIP profile select.
      */
-	static const TInt KVsSipProfileSelect;
+    static const TInt KVsSipProfileSelect;
 
     /**
      * Null selection SIP profile.
      */
-	static const TInt KVsSipProfileSelectNone;
+    static const TInt KVsSipProfileSelectNone;
 
 private:
 
@@ -204,7 +147,7 @@
      * @param aHandler Reference to SIP profile manipulator.
      */
     CMusSettingsModel( MMusSIPProfileHandler& aHandler );
-
+    
     void ConstructL();
 
 private: // data
@@ -213,12 +156,11 @@
      * SIP profile handler.
      */
     MMusSIPProfileHandler& iHandler;
-
+    
     /**
-     * Central repository keys of video sharing.
-     * Own.
+     * Operator variant. If SIP profile disabled
      */
-    MultimediaSharingSettings* iMSSettingsKeys;
+    TBool iProfileDisabled;
 
     };
 
--- a/mmshplugins/mmshsettingsuiplugin/inc/mussettingsplugin.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/inc/mussettingsplugin.h	Wed Sep 01 12:31:01 2010 +0100
@@ -12,6 +12,7 @@
 * Contributors:
 *
 * Description:  MUSSettingsPlugin implementation.
+*  Version     : %version: 21 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -127,7 +128,7 @@
      *         TGSPluginProviderCategory.
      */
     virtual TInt PluginProviderCategory() const;
-    
+	
 
 public: // From MEikMenuObserver    
     
@@ -141,6 +142,9 @@
     CMusSettingsPlugin();
 
     void ConstructL();
+    
+    void OpenResourceFileL();
+    void CloseResourceFile();
 
     /**
     * Hides non-virtual member from base class CGSBaseView.
@@ -181,16 +185,6 @@
 private:
 
     /**
-    * Shows VS activation Setting dialog.
-    */
-    void ShowVSSettingsActivationSettingDialogL();
-
-    /**
-    * Shows Operator specific VS activation Setting dialog.
-    */
-    void ShowOperatorSpecificActivationSettingDialogL();
-
-    /**
     * Shows Profile Setting dialog.
     */
     void ShowVSSettingsProfileSettingDialogL();
@@ -238,16 +232,15 @@
 
 protected: // data
 
+	HBufC* iCaption;
+	bool iResourceFileOpen;
+
     /**
      * Instance of SIP profile handler to manage SIP profiles.
      * Own.
      */
     CMusSIPProfileModel* iHandler;
 
-    /**
-     * Instance of SIP profile handler to manage SIP profiles.
-     * Own.
-     */
 
     /**
      * Pointer of model class of this application.
--- a/mmshplugins/mmshsettingsuiplugin/inc/mussipprofilemodel.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/inc/mussipprofilemodel.h	Wed Sep 01 12:31:01 2010 +0100
@@ -12,6 +12,7 @@
 * Contributors:
 *
 * Description:  Class implementing SIP profile model.
+*  Version     : %version: 9 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -23,25 +24,21 @@
 
 #include "mmussipprofilehandler.h"
 #include <e32base.h>
-#include <sipmanagedprofile.h>
-#include <gsplugininterface.h>
 #include <sipprofileregistryobserver.h>
-
+#include <sipobserver.h>
+#include <sipconnectionobserver.h>
 
 class CSIPManagedProfileRegistry;
-
+class CMusSettingsModel;
 
 /**
  *  CMusSIPProfileModel model class.
  *  Model class implementing SIP profile model.
- *
- *  @since S60 v3.2
  */
-class CMusSIPProfileModel
-    :public CBase,
-     public MSIPProfileRegistryObserver,
-	 public MMusSIPProfileHandler
-	 {
+class CMusSIPProfileModel : public CBase,
+                            public MSIPProfileRegistryObserver,
+                            public MMusSIPProfileHandler
+{
 public:
 
     static CMusSIPProfileModel* NewL();
@@ -57,17 +54,32 @@
      * From MMusSIPProfileHandler.
      * Returns the index of the default SIP profile.
      * @return KErrNotFound, if one does not exist, otherwise index of the
-     *         default SIP profile.
+     * default SIP profile.
      */
-    virtual TInt DefaultProfileIndex();
+    TInt DefaultProfileIndex();
 
     /**
      * From MMusSIPProfileHandler.
      * Returns the id of the default SIP profile.
      * @return KErrNotFound, if one does not exist, otherwise id of the
-     *         default SIP profile.
+     * default SIP profile.
+     */
+    TUint32 DefaultProfileId();
+	
+    /*
+     * Disables MUS profile
      */
-	virtual TUint32 DefaultProfileId();
+    void DisableProfileL();
+	
+    /*
+     * Enables MUS profile
+     */
+    void EnableProfileL();
+	
+    /*
+     * Checks, if MUS profile is enabled
+     */
+    TBool ProfileEnabledL();
 
     /**
      * From MMusSIPProfileHandler.
@@ -75,7 +87,7 @@
      * @param aId Profile id
      * @return Profile index or KErrNotFound if no matching profile is found.
      */
-    virtual TInt ProfileIndexByIdL( TUint32 aId );
+    TInt ProfileIndexByIdL( TUint32 aId );
 
     /**
      * From MMusSIPProfileHandler.
@@ -83,19 +95,19 @@
      * @param aIndex Profile index
      * @return Profile id or KUnknownProfileId if no matching profile is found.
      */
-    virtual TUint32 ProfileIdByIndex( TUint aIndex );
+    TUint32 ProfileIdByIndex( TUint aIndex );
 
     /**
      * From MMusSIPProfileHandler.
-     * Returns pointer to the SIP profile array, does not change ownership.
+     * Returns a reference to the SIP profile array.
      * Note that previously returned value goes out of scope after a new
      * call to ProfileArrayL. So it is not advised to store return value
      * in long persistent variable, but rather to be used like stack
      * variables for safety.
      *
-     * @return Pointer to internally cached SIP profile array.
+     * @return Reference to internally cached SIP profile array.
      */
-    virtual CArrayPtr<CSIPManagedProfile>* ProfileArrayL();
+    RPointerArray<CSIPProfile>& ProfileArrayL();
 
 public: // From base class MSIPProfileRegistryObserver.
 
@@ -104,68 +116,65 @@
      * SIP profile information event.
      * @param aProfileId Id of SIP profile in question.
      * @param aEvent Type of information event.
-	 */
-	virtual void ProfileRegistryEventOccurred(
+     */
+    void ProfileRegistryEventOccurred(
 	    TUint32 aSIPProfileId,
 	    TEvent aEvent );
 
-	/**
-     * From MSIPProfileRegistryObserver.
-	 * An asynchronous error has occurred related to SIP profile.
-     * @param aSIPProfileId Id of the failed profile.
-	 * @param aError An error code.
-	 */
-	virtual void ProfileRegistryErrorOccurred(
-	    TUint32 aSIPProfileId,
-	    TInt aError );
+    /**
+    * From MSIPProfileRegistryObserver.
+    * An asynchronous error has occurred related to SIP profile.
+    * @param aSIPProfileId Id of the failed profile.
+    * @param aError An error code.
+    */
+    void ProfileRegistryErrorOccurred(
+        TUint32 aSIPProfileId,
+        TInt aError );
+
+
+public:
+    
+    /**
+     * Set CMusSettingsModel to handle ProfileRegistry Event.
+     * @param aCMusSettingsModel the CMusSettingsModel to handle ProfileRegistry Event
+     */		
+    void SetCMusSettingsModel(CMusSettingsModel* aCMusSettingsModel);
 
 protected:
 
     /**
-     * Reads the profile array from SIP Profile Client.
-     */
-    void ReadArrayFromEngineL();
-
-    /**
      * Sorts internal array of SIP profiles by id.
      */
     void SortProfilesL();
 
-    /**
-     * Deletes internally cached profiles.
-     */
-    void DeleteProfiles();
-
-    /**
-     * Reads profile list from the engine; if reading fails,
-     * keeps the old list safe.
-     */
-    void ReadProfileListFromEngineSafeL();
 
 private:
 
     CMusSIPProfileModel();
 
     void ConstructL();
-
-    /**
-     * For deleting RPointerArray in case of leave.
-     */
-    static void ResetAndDestroy( TAny* aPointerArray );
+    
 
 private: // data
 
     /**
-     * Instance of the SIP profile registry engine for managing SIP profiles.
-     * Own.
-     */
+    * Instance of the SIP profile registry engine for managing SIP profiles.
+    * Own.
+    */
     CSIPManagedProfileRegistry* iEngine;
 
     /**
-     * Locally cached array of SIP profiles.
-     * Own.
-     */
-    CArrayPtrFlat<CSIPManagedProfile>* iProfiles;
+    * Locally cached array of SIP profiles.
+    */
+    RPointerArray<CSIPProfile> iProfiles;
+    
+    /**
+    * CMusSettingsModel to handle ProfileRegistry 
+    * Event
+    */
+    CMusSettingsModel* iCMusSettingsModel;
+    
+    
 
     };
 
--- a/mmshplugins/mmshsettingsuiplugin/src/mussettingscontainer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/src/mussettingscontainer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -12,31 +12,34 @@
 * Contributors:
 *
 * Description:  Container for MUSSettingsPlugin.
+*  Version     : %version: be1sipx1#22 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
 
 
-#include    "mussettingscontainer.h"
-#include    "mussettingsplugin.h"
-#include    "mussettingsmodel.h"
-#include    "gslistbox.h"
-#include    "mussettingsplugin.hrh"
-#include    <mussettingsuirsc.rsg>
-#include    <aknlists.h>
-#include    <akntitle.h>
-#include 	<aknnotewrappers.h>
-#include    <csxhelp/msh.hlp.hrh>
-#include    <gsfwviewuids.h>
-#include    <StringLoader.h>
-#include 	<sipmanagedprofile.h>
-#include 	<ctsydomainpskeys.h>
-#include	<e32property.h>
-#include    <pathinfo.h>
+#include "mussettingscontainer.h"
+#include "mussettingsplugin.h"
+#include "mussettingsmodel.h"
+#include "gslistbox.h"
+#include "mussettingsplugin.hrh"
+#include <mussettingsuirsc.rsg>
+#include <aknlists.h>
+#include <akntitle.h>
+#include <aknnotewrappers.h>
+#include <csxhelp/msh.hlp.hrh>
+#include <gsfwviewuids.h>
+#include <StringLoader.h>
+#include <sipmanagedprofile.h>
+#include <ctsydomainpskeys.h>
+#include <e32property.h>
+#include <pathinfo.h>
 
 
+#ifdef RD_MULTIPLE_DRIVE
 #include    <CAknMemorySelectionDialogMultiDrive.h>
 
+#endif
 
 /** default SIP profile is selected */
 const TInt KDefaultSipProfile = 0;
@@ -62,7 +65,7 @@
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::ConstructL()" )
 
-    iOperatorVariant = iModel.VSSettingsOperatorVariantL();
+    iOperatorVariant = MultimediaSharingSettings::OperatorVariantSettingL();
 
     iListBox = new( ELeave ) CAknSettingStyleListBox;
 
@@ -83,17 +86,17 @@
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::~CMusSettingsContainer()" )
     delete iActivationItems;
-  	delete iProfileItems;
-  	delete iAutoRecordItems;
-   	delete iListboxItemArray;
-   	delete iNoteItems;
+    delete iProfileItems;
+    delete iAutoRecordItems;
+    delete iNoteItems;
+    delete iListboxItemArray;
     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::~CMusSettingsContainer()" )
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Constructs a listbox from a specified resource id.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::ConstructListBoxL( TInt aResLbxId )
     {
@@ -104,17 +107,10 @@
     iListBox->Model()->SetItemTextArray( iListboxItemArray );
     iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
 
-    if ( iOperatorVariant == MusSettingsKeys::EStandard )
-    	{
-    	iActivationItems = iCoeEnv->ReadDesC16ArrayResourceL( 
-    	                                R_ACTIVATION_SETTING_PAGE_LBX );
-    	}
-    else
-    	{
-    	iActivationItems =
-    		iCoeEnv->ReadDesC16ArrayResourceL(
-    		R_OPERATOR_ACTIVATION_SETTING_PAGE_LBX );
-    	}
+    // OCC: removed "Automatic in home network" choice
+    iActivationItems =
+            iCoeEnv->ReadDesC16ArrayResourceL(
+            R_OPERATOR_ACTIVATION_SETTING_PAGE_LBX );
 
     iAutoRecordItems = iCoeEnv->ReadDesC16ArrayResourceL(
                                     R_VS_VIDEO_SAVING_SETTING_PAGE_LBX );
@@ -122,17 +118,9 @@
     iProfileItems = iCoeEnv->ReadDesC16ArrayResourceL(
     	R_SIP_PROFILE_SETTING_PAGE_LBX );
 
-    if ( iOperatorVariant == MusSettingsKeys::EStandard )
-    	{
-        iNoteItems = iCoeEnv->ReadDesC16ArrayResourceL(
-        	R_VS_AUDIO_SETTING_PAGE_LBX );
-        }
-    else
-        {
-        iNoteItems = iCoeEnv->ReadDesC16ArrayResourceL(
-            R_VS_NOTE_SETTING_PAGE_LBX );
-        }
-
+    iNoteItems = iCoeEnv->ReadDesC16ArrayResourceL(
+							R_VS_AUDIO_SETTING_PAGE_LBX );
+    
     CreateListBoxItemsL();
 
     // Operator variant mode needs some item should not be visible to user.
@@ -141,7 +129,8 @@
     	{        
         // Hide VS Activation Settings. If needed in future it can be made
         // visible.
-        HideItemsL( KGSSettIdVSActivation );
+    	// 
+        //HideItemsL( KGSSettIdVSActivation );
         // Hide SIP Profile choosing option.If needed in future it can be made
         // visible.
         HideItemsL( KGSSettIdSIPProfile );
@@ -150,9 +139,9 @@
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Populates listbox items.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::CreateListBoxItemsL()
     {
@@ -173,9 +162,9 @@
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Updates a specified feature (item in listbox).
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::UpdateListBoxL( TInt aFeatureId )
     {
@@ -192,19 +181,19 @@
             	{
             	MakeOperatorActivationItemL();
             	}
-	        break;
+            break;
         case KGSSettIdSIPProfile:
             MakeSIPProfileItemL();
             break;
         case KGSSettIdAutoRecord:
             MakeAutoRecordItemL();
-        	break;
+            break;
         case KGSSettIdRecordedVideoSaving:
-        	MakeRecordedVideoSavingItemL();
-        	break;
+            MakeRecordedVideoSavingItemL();
+            break;
         case KGSSettIdNote:
-        	MakeNoteItemL();
-        	break;
+            MakeNoteItemL();
+            break;
         default:
             break;
         }
@@ -214,109 +203,116 @@
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Generic method to add an item to listbox and make it visible.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::AddItemL( TInt aId, const TPtrC aText )
-	{
-	MUS_LOG( "[MUSSET] -> CMusSettingsContainer::AddItemL()" )
+    {
+    MUS_LOG( "[MUSSET] -> CMusSettingsContainer::AddItemL()" )
     iListboxItemArray->SetDynamicTextL( aId, aText );
     iListboxItemArray->SetItemVisibilityL( aId,
-    	CGSListBoxItemTextArray::EVisible );
-	MUS_LOG( "[MUSSET] <- CMusSettingsContainer::AddItemL()" )
-	}
+    CGSListBoxItemTextArray::EVisible );
+    MUS_LOG( "[MUSSET] <- CMusSettingsContainer::AddItemL()" )
+    }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Adds activation setting item to listbox.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::MakeActivationItemL()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeActivationItemL()" )
 
-   	iVSActication = iModel.VSSettingsActivationL();
-   	AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ iVSActication ] );
+    MusSettingsKeys::TActivation activation = 
+                                MultimediaSharingSettings::ActivationSettingL();
+ 
+    if ( activation != MusSettingsKeys::EAlwaysActive )
+        {
+        // We make sure that if someone has written to CenRep value bigger
+        // than 1 (which after OCC changes means 'Off') we treat it as 'Off'.
+        activation = MusSettingsKeys::EActiveInHomeNetworks;
+        }
+    
+    AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ activation ] );
 
     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeActivationItemL()" )
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Adds operator specific activation setting item to listbox.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::MakeOperatorActivationItemL()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeOperatorActivationItemL()" )
-
-   	iVSActication = iModel.VSSettingsActivationL();
-   	if ( iVSActication == MusSettingsKeys::ENever ) // ==2
-    	{ // operator specific one is different from usual one
-    	iVSActication = MusSettingsKeys::EActiveInHomeNetworks; //==1
-    	}
-
-	AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ iVSActication ] );
+            
+    //sync with real value, if op specifig
+    iModel.InitializeProfileEnablerL();
+    
+    MUS_LOG1( "Activation item=%d (0=VS enabled, 1=VS disabled)", iModel.ActivationItem() )
+    AddItemL( KGSSettIdVSActivation, ( *iActivationItems )[ iModel.ActivationItem() ] );
 
     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeOperatorActivationItemL()" )
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Adds SIP profile setting item to settings listbox. Item will contain
 // indication of [no SIP profile selected], [using default SIP profile] or
 // [name of SIP profile specified to be used]
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::MakeSIPProfileItemL()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeSIPProfileItemL()" )
 
-    TInt profile = iModel.VSSettingsProfileL();
+    TInt profile = MultimediaSharingSettings::SipProfileSettingL();
 
     if ( profile != KDefaultSipProfile && profile != KNoSipProfileSelected )
     	{
-    	// profile id defined, get profile name
-		HBufC* name = iModel.ProfileNameL( profile );
+        // profile id defined, get profile name
+        HBufC* name = iModel.ProfileNameL( profile );
 
-		if ( name )
-			{
-			CleanupStack::PushL( name );
-			AddItemL( KGSSettIdSIPProfile, *name );
-			CleanupStack::PopAndDestroy( name );
-    		}
+        if ( name )
+            {
+            CleanupStack::PushL( name );
+            AddItemL( KGSSettIdSIPProfile, *name );
+            CleanupStack::PopAndDestroy( name );
+            }
     	else
-    		{
-    		// show profile value not selected
-    		AddItemL( KGSSettIdSIPProfile,
-    			( *iProfileItems )[ CMusSettingsModel::KVsSipProfileSelectNone ] );
-			}
-		}
+            {
+            // show profile value not selected
+            AddItemL( KGSSettIdSIPProfile,
+                    ( *iProfileItems )[ CMusSettingsModel::KVsSipProfileSelectNone ] );
+                    }
+            }
     else if ( profile == KNoSipProfileSelected )
     	{
     	AddItemL( KGSSettIdSIPProfile,
     		( *iProfileItems )[ CMusSettingsModel::KVsSipProfileSelectNone ] );
-		}
+        }
     else
     	{
-	    AddItemL(
-	    	KGSSettIdSIPProfile,
-	    	( *iProfileItems )[ CMusSettingsModel::KVsSipProfileDefault ] );
-		}
+        AddItemL(
+            KGSSettIdSIPProfile,
+            ( *iProfileItems )[ CMusSettingsModel::KVsSipProfileDefault ] );
+            }
 
     MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeSIPProfileItemL()" )
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Adds autorecord item to listbox.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::MakeAutoRecordItemL()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeAutoRecordItemL()" )
-    TInt autoRecordMode = iModel.VSSettingsAutoRecordL();
+    TInt autoRecordMode = MultimediaSharingSettings::AutoRecordSettingL();
     
     MUS_LOG1( "[MUSSET]    autoRecordMode: %d", autoRecordMode  )
     MUS_LOG1( "[MUSSET]    iAutoRecordItems.Count: %d", iAutoRecordItems->Count() )
@@ -334,9 +330,9 @@
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Adds recorded video saving item to listbox.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::MakeRecordedVideoSavingItemL()
     {
@@ -352,12 +348,12 @@
     
     if ( index == KErrNotFound )
         {
-        MUS_LOG( "[MUSSET] -> preferred drive doesn't exist anymore \
-(e.g. remote drive deleted), taking system drive..." )
+        MUS_LOG( "[MUSSET]    Preferred drive doesn't exist anymore, " )
+        MUS_LOG( "[MUSSET]    e.g. remote drive deleted, using system drive" )
 
         driveNumber = RFs::GetSystemDrive();
         index = dlg->FindIndexByDrive( driveNumber );
-        iModel.SetVSSettingsRecordedVideoSavingL( driveNumber );
+        MultimediaSharingSettings::SetVideoLocationSettingL( driveNumber );
         }
 
     TFileName item( KNullDesC );  
@@ -373,38 +369,38 @@
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Adds note item to listbox. (Alerts setting). Present only with operator
 // variant set.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::MakeNoteItemL()
     {
-    MUS_LOG(
-    	"[MUSSET] -> CMusSettingsContainer::MakeNoteItemL()" )
+    MUS_LOG( "[MUSSET] -> CMusSettingsContainer::MakeNoteItemL()" )
 
-    TInt savingMode = iModel.VSSettingsNoteL();
+    MusSettingsKeys::TAuditoryNotification auditoryNotification = 
+                    MultimediaSharingSettings::AuditoryNotificationSettingL();
 
-    MUS_LOG1( "[MUSSET] -> CMusSettingsContainer::Mode:%d()", savingMode );
+    MUS_LOG1( "[MUSSET] -> CMusSettingsContainer::Mode:%d()", 
+              auditoryNotification )
 
     // If unset, use and set default value
-    if ( savingMode < 0 || savingMode > 1 )
-	    {
-	    savingMode = 0;
-	    iModel.SetVSSettingsNoteL(
-	        MusSettingsKeys::EAuditoryNotificationOff );
-	    }
+    if ( auditoryNotification < 0 || auditoryNotification > 1 )
+        {
+        auditoryNotification = MusSettingsKeys::EAuditoryNotificationOff;
+        MultimediaSharingSettings::SetAuditoryNotificationSettingL(
+                                    MusSettingsKeys::EAuditoryNotificationOff );
+        }
 
-	AddItemL( KGSSettIdNote, ( *iNoteItems )[ savingMode ] );
-
-    MUS_LOG(
-    	"[MUSSET] <- CMusSettingsContainer::MakeNoteItemL()" )
+    AddItemL( KGSSettIdNote, ( *iNoteItems )[ auditoryNotification ] );
+	
+    MUS_LOG( "[MUSSET] <- CMusSettingsContainer::MakeNoteItemL()" )
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Gets help context.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::GetHelpContext( TCoeHelpContext& aContext ) const
     {
@@ -415,9 +411,9 @@
     }
 
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Returns currently selected feature (listbox item).
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 TInt CMusSettingsContainer::CurrentFeatureId() const
     {
@@ -426,45 +422,48 @@
     }
 
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // If call is on, informs user with note that new profile is going to be active
 // after current call.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::ShowNewProfileActiveAfterCallL()
     {
     MUS_LOG(
     	"[MUSSET] -> CMusSettingsContainer::ShowNewProfileActiveAfterCallL()" )
-	TPSCTsyCallState callState;
-	User::LeaveIfError( RProperty::Get( KPSUidCtsyCallInformation,
-			KCTsyCallState,
-			(TInt&)callState) );
-	if ( callState == EPSCTsyCallStateAlerting ||
-		callState ==  EPSCTsyCallStateRinging ||
-		callState ==  EPSCTsyCallStateDialling ||
-		callState ==  EPSCTsyCallStateAnswering ||
-		callState ==  EPSCTsyCallStateDisconnecting ||
-		callState ==  EPSCTsyCallStateConnected ||
-		callState ==  EPSCTsyCallStateHold)
-		{
-		HBufC* infoTxt = StringLoader::LoadLC( R_QTN_MSH_SET_PROFILE_NOTE );
-	    CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );
-	    note->ExecuteLD( infoTxt->Des() );
-	    CleanupStack::PopAndDestroy( infoTxt );
-	    MUS_LOG(
-	    	"[MUSSET] <- CMusSettingsContainer::ShowNewProfileActiveAfterCallL()" )
-		}
+    TPSCTsyCallState callState;
+    User::LeaveIfError( RProperty::Get( KPSUidCtsyCallInformation,
+                    KCTsyCallState,
+                    (TInt&)callState) );
+    
+    if ( callState == EPSCTsyCallStateAlerting ||
+         callState ==  EPSCTsyCallStateRinging ||
+         callState ==  EPSCTsyCallStateDialling ||
+         callState ==  EPSCTsyCallStateAnswering ||
+         callState ==  EPSCTsyCallStateDisconnecting ||
+         callState ==  EPSCTsyCallStateConnected ||
+         callState ==  EPSCTsyCallStateHold)
+        {
+        HBufC* infoTxt = StringLoader::LoadLC( R_QTN_MSH_SET_PROFILE_NOTE );
+        CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );
+        note->ExecuteLD( infoTxt->Des() );
+        CleanupStack::PopAndDestroy( infoTxt );
+        }
+    
+    MUS_LOG(
+        "[MUSSET] <- CMusSettingsContainer::ShowNewProfileActiveAfterCallL()" )
     }
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // void CMusSettingsContainer::HideItemsL(TInt aItemIndex)
 // Some items are unwanted by operators.Hide those items from listbox item
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsContainer::HideItemsL(TInt aItemIndex)
     {
     MUS_LOG1("[MUSSET] -> CMusSettingsContainer::HideItemsL() %d",aItemIndex )    
     iListboxItemArray->SetItemVisibilityL( aItemIndex,
             	CGSListBoxItemTextArray::EInvisible );
-	MUS_LOG("[MUSSET] <- CMusSettingsContainer::HideItemsL()" )	
+    MUS_LOG("[MUSSET] <- CMusSettingsContainer::HideItemsL()" )	
     }
+
--- a/mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -12,18 +12,19 @@
 * Contributors:
 *
 * Description:  Document model class for MUSSettingsPlugin.
+*  Version     : %version: 18 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
 
-
-#include    "mmussipprofilehandler.h"
 #include    "mussettingsmodel.h"
+#include    "muslogger.h"
 #include    "mussipprofilemodel.h"
-#include    "muslogger.h"
+#include    "mussettings.h"
+#include    "mmussipprofilehandler.h"
+
+#include    <escapeutils.h>
 #include    <centralrepository.h>
-#include    <escapeutils.h>
-
 #include    <CAknMemorySelectionDialogMultiDrive.h>
 #include    <AknCommonDialogsDynMem.h>
 #include    <mussettingsuirsc.rsg> // GUI Resource
@@ -39,6 +40,10 @@
 // ======== MEMBER FUNCTIONS ========
 
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 CMusSettingsModel* CMusSettingsModel::NewL( MMusSIPProfileHandler& aHandler )
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsModel::NewL()" )
@@ -52,6 +57,10 @@
     }
 
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 CMusSettingsModel::CMusSettingsModel( MMusSIPProfileHandler& aHandler )
     : iHandler( aHandler )
     {
@@ -59,224 +68,82 @@
     }
 
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 void CMusSettingsModel::ConstructL()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsModel::ConstructL()" )
-    iMSSettingsKeys = new (ELeave) MultimediaSharingSettings;
+    InitializeProfileEnablerL();
+    static_cast<CMusSIPProfileModel*> (&iHandler)->SetCMusSettingsModel(this);
     MUS_LOG( "[MUSSET] <- CMusSettingsModel::ConstructL()" )
     }
 
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 CMusSettingsModel::~CMusSettingsModel()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsModel::~CMusSettingsModel()" )
-    delete iMSSettingsKeys;
-    iMSSettingsKeys = NULL;
     MUS_LOG( "[MUSSET] <- CMusSettingsModel::~CMusSettingsModel()" )
     }
 
-
-// ----------------------------------------------------------------------------
-// Returns operator variant mode (normal or operator specific. This is used for
-// runtime variation of Settings UI.
-// ----------------------------------------------------------------------------
-//
-MusSettingsKeys::TOperatorVariant CMusSettingsModel::VSSettingsOperatorVariantL()
-    {
-    MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsOperatorVariantL()" )
-
-    MusSettingsKeys::TOperatorVariant operatorVariant =
-    	iMSSettingsKeys->OperatorVariantSettingL();
-
-    MUS_LOG1(
-        "[MUSSET] <- CMusSettingsContainer::VSSettingsOperatorVariantL()( %d )",
-        operatorVariant )
-    return operatorVariant;
-    }
-
-
-// ----------------------------------------------------------------------------
-// Returns VS activation mode.
-// ----------------------------------------------------------------------------
-//
-MusSettingsKeys::TActivation CMusSettingsModel::VSSettingsActivationL()
-    {
-    MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsActivationL()" )
-    MusSettingsKeys::TActivation activationMode =
-    	iMSSettingsKeys->ActivationSettingL();
-    MUS_LOG1(
-        "[MUSSET] <- CMusSettingsContainer::VSSettingsActivationL()( %d )",
-        activationMode )
-    return activationMode;
-    }
-
-
-// ----------------------------------------------------------------------------
-// Returns SIP profile mode.
-// ----------------------------------------------------------------------------
-//
-TInt CMusSettingsModel::VSSettingsProfileL()
-    {
-    MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsProfileL()" )
-    TInt vsProfileMode = iMSSettingsKeys->SipProfileSettingL();
-    MUS_LOG1(
-        "[MUSSET] <- CMusSettingsContainer::VSSettingsProfileL()( %d )",
-        vsProfileMode )
-    return vsProfileMode;
-    }
-
-
-// ----------------------------------------------------------------------------
-// Returns video autorecord mode.
-// ----------------------------------------------------------------------------
-//
-MusSettingsKeys::TAutoRecord CMusSettingsModel::VSSettingsAutoRecordL()
-    {
-    MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsAutoRecordL()" )
-    MusSettingsKeys::TAutoRecord vsAutoRecordMode =
-        iMSSettingsKeys->AutoRecordSettingL();
-    MUS_LOG1(
-        "[MUSSET] <- CMusSettingsContainer::VSSettingsAutoRecordL()( %d )",
-        vsAutoRecordMode )
-    return  vsAutoRecordMode;
-    }
-
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Returns recorded video saving mode.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 TInt CMusSettingsModel::VSSettingsRecordedVideoSavingL()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsRecordedVideoSavingL()" )
-    TInt vsVideoLocationMode = iMSSettingsKeys->VideoLocationSettingL();
+    TInt vsVideoLocationMode = MultimediaSharingSettings::VideoLocationSettingL();
     MUS_LOG1(
-    "[MUSSET] <- CMusSettingsContainer::VSSettingsRecordedVideoSavingL()( %d )",
+    "[MUSSET] <- CMusSettingsModel::VSSettingsRecordedVideoSavingL()( %d )",
         vsVideoLocationMode )
     return vsVideoLocationMode;
     }
 
-
 // ----------------------------------------------------------------------------
-// Returns mode of audible note.
-// ----------------------------------------------------------------------------
-//
-MusSettingsKeys::TAuditoryNotification CMusSettingsModel::VSSettingsNoteL()
-    {
-    MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsNoteL()" )
-    MusSettingsKeys::TAuditoryNotification vsNoteMode =
-        iMSSettingsKeys->AuditoryNotificationSettingL();
-    MUS_LOG1(
-    "[MUSSET] <- CMusSettingsContainer::VSSettingsNoteL()( %d )",
-        vsNoteMode )
-    return vsNoteMode;
-    }
-
-
-// ----------------------------------------------------------------------------
-// Sets VS activation mode.
-// ----------------------------------------------------------------------------
-//
-void CMusSettingsModel::SetVSSettingsActivationL(
-        const MusSettingsKeys::TActivation aActivation)
-    {
-    MUS_LOG1(
-    "[MUSSET] -> CMusSettingsContainer::SetVSSettingsActivationL()( %d )",
-        aActivation )
-    iMSSettingsKeys->SetActivationSettingL( aActivation );
-    MUS_LOG( "[MUSSET] <- CMusSettingsModel::SetVSSettingsActivationL()" )
-    }
-
-
-// ----------------------------------------------------------------------------
-// Sets SIP Profile mode.
-// ----------------------------------------------------------------------------
-//
-void CMusSettingsModel::SetVSSettingsProfileL( const TInt aProfile )
-    {
-    MUS_LOG1(
-    "[MUSSET] -> CMusSettingsContainer::SetVSSettingsProfileL()( %d )",
-        aProfile )
-    iMSSettingsKeys->SetSipProfileSettingL( aProfile );
-    MUS_LOG( "[MUSSET] <- CMusSettingsModel::SetVSSettingsProfileL()" )
-    }
-
-
-// ----------------------------------------------------------------------------
-// Sets video autorecord mode.
+// Change Activation.
 // ----------------------------------------------------------------------------
 //
-void CMusSettingsModel::SetVSSettingsAutoRecordL(
-    const MusSettingsKeys::TAutoRecord aAutoRecord )
+void CMusSettingsModel::SetActivationItem( TBool aActive )
     {
-    MUS_LOG1(
-    "[MUSSET] -> CMusSettingsContainer::SetVSSettingsAutoRecordL()( %d )",
-        aAutoRecord )
-    iMSSettingsKeys->SetAutoRecordSettingL( aAutoRecord );
-    MUS_LOG( "[MUSSET] <- CMusSettingsModel::SetVSSettingsAutoRecordL()" )
-    }
-
-
-// ----------------------------------------------------------------------------
-// Sets video location.
-// ----------------------------------------------------------------------------
-//
-void CMusSettingsModel::SetVSSettingsRecordedVideoSavingL(
-    const TInt  aVideoLocation )
-    {
-    MUS_LOG1(
-    "[MUSSET] -> CMusSettingsContainer::SetVSSettingsRecordedVideoSavingL()( %d )",
-        aVideoLocation )
-    iMSSettingsKeys->SetVideoLocationSettingL( aVideoLocation );
-    MUS_LOG(
-        "[MUSSET] <- CMusSettingsModel::SetVSSettingsRecordedVideoSavingL()" )
+    MUS_LOG( "[MUSSET] -> CMusSettingsModel::SetActivationItem()" )
+    MUS_LOG1( "            Profile disabled? ( %d )", aActive )
+    iProfileDisabled = aActive;
+    MUS_LOG( "[MUSSET] <- CMusSettingsModel::SetActivationItem()" )
     }
 
-
 // ----------------------------------------------------------------------------
-// Sets mode of auditory note. In operator specific variants auditory note also
-// sets mode of popup notification setting.
+// Get Activation item.
 // ----------------------------------------------------------------------------
 //
-void CMusSettingsModel::SetVSSettingsNoteL(
-    const MusSettingsKeys::TAuditoryNotification aValue )
+TBool CMusSettingsModel::ActivationItem()
     {
-    MUS_LOG1(
-    "[MUSSET] -> CMusSettingsContainer::SetVSSettingsNoteL()( %d )", aValue )
-    iMSSettingsKeys->SetAuditoryNotificationSettingL( aValue );
-
-    if ( VSSettingsOperatorVariantL() == MusSettingsKeys::EOperatorSpecific )
-        {
-        if ( MusSettingsKeys::EAuditoryNotificationOn == aValue )
-            {
-            iMSSettingsKeys->SetPopupNotificationSettingL(
-                MusSettingsKeys::EPopupNotificationOn );
-            }
-        else
-            {
-            iMSSettingsKeys->SetPopupNotificationSettingL(
-                MusSettingsKeys::EPopupNotificationOff );
-            }
-        }
+    MUS_LOG( "[MUSSET] -> CMusSettingsModel::ActivationItem()" )
+    MUS_LOG( "[MUSSET] <- CMusSettingsModel::ActivationItem()" )
+    return iProfileDisabled;
     }
 
-
 // -----------------------------------------------------------------------------
 // Returns the list of profile names
 // -----------------------------------------------------------------------------
 CDesCArray* CMusSettingsModel::ListOfProfileNamesL()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsModel::ListOfProfileNamesL()" )
-    CArrayPtr<CSIPManagedProfile>* list = iHandler.ProfileArrayL();
+    RPointerArray<CSIPProfile>& list = iHandler.ProfileArrayL();
 
     CDesCArray* array = new ( ELeave ) CDesCArrayFlat( KSIPGranularity );
     CleanupStack::PushL( array );
 
-    for ( TInt i = 0; i < list->Count(); i++ )
+    for ( TInt i = 0; i < list.Count(); i++ )
         {
         const TDesC8* providerName = 0;
         User::LeaveIfError(
-            list->At(i)->GetParameter( KSIPProviderName, providerName ) );
+            list[i]->GetParameter( KSIPProviderName, providerName ) );
 
         HBufC8* decodedProvider =
             EscapeUtils::EscapeDecodeL( *providerName );
@@ -304,7 +171,7 @@
 HBufC* CMusSettingsModel::ProfileNameL( TInt aId )
     {
     MUS_LOG1(
-    "[MUSSET] -> CMusSettingsContainer::ProfileNameL()( %d )",
+    "[MUSSET] -> CMusSettingsModel::ProfileNameL()( %d )",
         aId )
     const TDesC8* providerName = 0;
     TInt index = ProfileIndexByIdL( aId );
@@ -312,7 +179,7 @@
 
     if ( index >= 0 )
         {
-        if ( KErrNone == iHandler.ProfileArrayL()->At( index )->
+        if ( KErrNone == iHandler.ProfileArrayL()[index]->
                 GetParameter( KSIPProviderName, providerName ) )
             {
             HBufC8* decodedProvider =
@@ -335,9 +202,9 @@
     }
 
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Returns default SIP profile index.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 TInt CMusSettingsModel::DefaultProfileIndex()
     {
     MUS_LOG( "[MUSSET] <- CMusSettingsModel::DefaultProfileIndex()" )
@@ -345,9 +212,9 @@
     }
 
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Returns id of default SIP profile.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 TUint32 CMusSettingsModel::DefaultProfileId()
     {
     MUS_LOG( "[MUSSET] <- CMusSettingsModel::DefaultProfileId()" )
@@ -355,9 +222,9 @@
     }
 
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Returns SIP profile index based on the Id of SIP profile.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 TInt CMusSettingsModel::ProfileIndexByIdL( TUint32 aId )
     {
     MUS_LOG( "[MUSSET] <- CMusSettingsModel::ProfileIndexByIdL()" )
@@ -365,19 +232,41 @@
     }
 
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Returns SIP profile Id based on the index of SIP profile.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 TUint32 CMusSettingsModel::ProfileIdByIndex( TUint aIndex )
     {
     MUS_LOG( "[MUSSET] <- CMusSettingsModel::ProfileIdByIndex()" )
     return iHandler.ProfileIdByIndex( aIndex );
     }
 
+// -----------------------------------------------------------------------------
+// Initialize SIP profile enabler data.
+// -----------------------------------------------------------------------------
+void CMusSettingsModel::InitializeProfileEnablerL() 
+    {
+    MUS_LOG( "[MUSSET] -> CMusSettingsModel::InitializeProfileEnabler()" )
+    if ( MultimediaSharingSettings::OperatorVariantSettingL() ==
+               MusSettingsKeys::EOperatorSpecific )
+       {
+       TBool enabled(EFalse);
+       
+       CMusSIPProfileModel& handler = 
+           static_cast<CMusSIPProfileModel&>( iHandler );
+       TRAPD( error, enabled = handler.ProfileEnabledL());
+       enabled = error != KErrNone ? EFalse : enabled;
+       MUS_LOG2("SIP registration service( %d ), error( %d )", enabled, error )
+       //profile enabled - activation disabled = false 
+       //profile disabled - activation disabled = true 
+       SetActivationItem( !enabled );
+       }
+    MUS_LOG( "[MUSSET] <- CMusSettingsModel::InitializeProfileEnabler()" )
+    }
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Returns memory selction dialog pointer.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 CAknMemorySelectionDialogMultiDrive* CMusSettingsModel::MemorySelectionDialogLC()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsModel::MemorySelectionDialogLC()" )
--- a/mmshplugins/mmshsettingsuiplugin/src/mussettingsplugin.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/src/mussettingsplugin.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -12,6 +12,7 @@
 * Contributors:
 *
 * Description:  MUSSettingsPlugin implementation.
+*  Version     : %version: be1sipx1#38 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -54,13 +55,20 @@
 // ======== MEMBER FUNCTIONS ========
 
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 CMusSettingsPlugin::CMusSettingsPlugin()
     : iResources( *iCoeEnv )
     {
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::CMusSettingsPlugin()" )
     }
 
-
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
 CMusSettingsPlugin::~CMusSettingsPlugin()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::~CMusSettingsPlugin()" )
@@ -71,29 +79,31 @@
         delete iContainer;
         iContainer = NULL;
         }
-
-    iResources.Close();
+        
+    CloseResourceFile();
 
     delete iModel;
     iModel = NULL;
 	delete iHandler;
 	iHandler = NULL;
     delete iDiskNotifyHandler;
+    delete iCaption;
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::~CMusSettingsPlugin()" )
     }
 
-
+// -----------------------------------------------------------------------------
+// 
+//
+// -----------------------------------------------------------------------------
+//
 void CMusSettingsPlugin::ConstructL()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::ConstructL()" )
     FeatureManager::InitializeLibL();
+  
+    iResourceFileOpen = false;
+    OpenResourceFileL();
 
-    HBufC* fileName = MusResourceFinderUtil::ResourcePathL(
-        KVSSettingsResourceFileName );    
-    TFileName fName(*fileName);
-    delete fileName;
-    MUS_LOG_TDESC( "[MUSSET] Resource FileName ",fName )
-    iResources.OpenL(fName);        
     MUS_LOG( "[MUSSET] Constructing the Base " )
     BaseConstructL( R_GS_VS_VIEW );
     iHandler = CMusSIPProfileModel::NewL();
@@ -101,11 +111,20 @@
     iModel = CMusSettingsModel::NewL( *iHandler );
     iDiskNotifyHandler = CDiskNotifyHandler::NewL( *this, 
                                             iEikonEnv->FsSession() );
-    User::LeaveIfError( iDiskNotifyHandler->NotifyDisk() ); // Subscribe disk notifications
+    // Subscribe disk notifications
+    User::LeaveIfError( iDiskNotifyHandler->NotifyDisk() ); 
+
+    iCaption = StringLoader::LoadL( R_GS_VS_PLUGIN_CAPTION );
+    CloseResourceFile();
+
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::ConstructL()" )
     }
 
-
+// -----------------------------------------------------------------------------
+// 
+//
+// -----------------------------------------------------------------------------
+//
 CMusSettingsPlugin* CMusSettingsPlugin::NewL( TAny* /*aInitParams*/ )
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::NewL()" )
@@ -117,11 +136,10 @@
     return self;
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CAknView.
 // Returns UID of *this* settings plugin.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 TUid CMusSettingsPlugin::Id() const
     {
@@ -130,11 +148,10 @@
     return KGSVSSettingsPluginUID;
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Hides non-virtual member from base class CGSBaseView.
 // Handles a change in client rectangle size.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::HandleClientRectChange()
     {
@@ -146,11 +163,10 @@
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::HandleClientRectChange()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CAknView.
 // Called by framework when *this* control is to be activated/focused.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::DoActivateL(
     const TVwsViewId& aPrevViewId,
@@ -158,69 +174,39 @@
     const TDesC8& aCustomMessage )
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::DoActivateL()" )
+    OpenResourceFileL();
     CGSBaseView::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage );
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::DoActivateL()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CAknView.
 // Called by framework when *this* control is to be deactivated.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::DoDeactivate()
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::DoDeactivate()" )
     CGSBaseView::DoDeactivate();
+    CloseResourceFile();
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::DoDeactivate()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CAknView.
 // Handles a user selected menu command.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::HandleCommandL( TInt aCommand )
     {
     MUS_LOG1( "[MUSSET] -> CMusSettingsPlugin::HandleCommandL()( %d )",
               aCommand )
-    CMusSettingsContainer& container =
-        *static_cast<CMusSettingsContainer*>( iContainer );
-    const TInt currentItem = container.CurrentFeatureId();
-
     switch ( aCommand )
         {
         case EGSMSKCmdAppChange:
-        case EGSCmdAppChange:
+//        case EGSCmdAppChange:
             {
-        	if ( currentItem == KGSSettIdVSActivation
-        		&& aCommand == EGSCmdAppChange )
-        		{
-        		if ( iModel->VSSettingsOperatorVariantL() ==
-        			MusSettingsKeys::EOperatorSpecific )
-        			{
-        			ShowOperatorSpecificActivationSettingDialogL();
-        			}
-        		else
-        			{
-        			ShowVSSettingsActivationSettingDialogL();
-        			}
-        		}
-        	else if ( currentItem == KGSSettIdRecordedVideoSaving
-        		&& aCommand == EGSCmdAppChange )
-        		{
-        		ShowVSSettingsRecordedVideoSavingSettingDialogL();
-        		}
-        	else if ( KGSSettIdNote == currentItem
-        		&& EGSCmdAppChange == aCommand )
-        		{
-        		ShowVSSettingsNoteSettingDialogL();
-        		}
-        	else
-        		{
-        		HandleListBoxSelectionL();
-        		}
+            HandleListBoxSelectionL();
             break;
             }
 
@@ -249,26 +235,26 @@
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::HandleCommandL()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CGSPluginInterface.
 // Gets caption text of *this* plugin.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::GetCaptionL( TDes& aCaption ) const
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::GetCaptionL()" )
-    HBufC* result = StringLoader::LoadL( R_GS_VS_PLUGIN_CAPTION );
-    aCaption.Copy( *result );
-    delete result;
+    if ( iCaption && iCaption->Length() <= aCaption.MaxLength() )
+        {
+    	aCaption.Copy( *iCaption );
+        }
+    
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::GetCaptionL()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CGSPluginInterface.
 // Returns provider category of *this* plugin.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 TInt CMusSettingsPlugin::PluginProviderCategory() const
     {
@@ -276,11 +262,10 @@
     return KGSPluginProviderInternal;
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class MEikMenuObserver.
 // Called by framework before creating menus
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::DynInitMenuPaneL( TInt aResourceId,
                                               CEikMenuPane* aMenuPane )
@@ -294,12 +279,11 @@
             }
         }
     }
-
     
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From MDiskNotifyHandlerCallback
 // Called by framework When disk status changed
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::HandleNotifyDisk( TInt /*aError*/, 
                                            const TDiskEvent& /*aEvent*/ )
@@ -319,11 +303,10 @@
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::HandleNotifyDisk()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CGSBaseView.
 // Called by GS framework to create a GS container for *this* plugin.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::NewContainerL()
     {
@@ -331,11 +314,10 @@
     iContainer = new( ELeave ) CMusSettingsContainer( *iModel );
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CGSBaseView.
 // Handles users "middle click" aka MSK on selected feature.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::HandleListBoxSelectionL()
     {
@@ -343,61 +325,35 @@
     CMusSettingsContainer& container =
         *static_cast<CMusSettingsContainer*>( iContainer );
     const TInt currentItem = container.CurrentFeatureId();
-
-    RDebug::Print( _L(
-        "[CMusSettingsPlugin] Item selected: %d" ),
-        currentItem );
-
-	MusSettingsKeys::TOperatorVariant operatorVarValue =
-		iModel->VSSettingsOperatorVariantL();
+    MUS_LOG1( "[MUSSET]    Item selected: ", currentItem )
 
     switch ( currentItem )
         {
         case KGSSettIdVSActivation:
             {
-        	if ( operatorVarValue == MusSettingsKeys::EOperatorSpecific )
-    			{
-    			SwitchOnOffValueL( KGSSettIdVSActivation );
-    			container.UpdateListBoxL( KGSSettIdVSActivation );
-				}
-			else
-				{
-				ShowVSSettingsActivationSettingDialogL();
-    			}
-    		break;
+            SwitchOnOffValueL( KGSSettIdVSActivation );
+            break;
     	    }
-
         case KGSSettIdSIPProfile:
             {
             ShowVSSettingsProfileSettingDialogL();
             break;
             }
-
         case KGSSettIdAutoRecord:
             {
             SwitchOnOffValueL( KGSSettIdAutoRecord );
-            container.UpdateListBoxL( KGSSettIdAutoRecord );
-        	break;
+            break;
             }
-
         case KGSSettIdRecordedVideoSaving:
             {
-
-        	ShowVSSettingsRecordedVideoSavingSettingDialogL();
-
-//        	SwitchOnOffValueL( KGSSettIdRecordedVideoSaving );
-//        	container.UpdateListBoxL( KGSSettIdRecordedVideoSaving );
-
-        	break;
+            ShowVSSettingsRecordedVideoSavingSettingDialogL();
+            break;
             }
-
         case KGSSettIdNote:
             {
-        	SwitchOnOffValueL( KGSSettIdNote );
-        	container.UpdateListBoxL( KGSSettIdNote );
-        	break;
+            SwitchOnOffValueL( KGSSettIdNote );
+            break;
             }
-
         default:
             {
             break;
@@ -406,12 +362,11 @@
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::HandleListBoxSelectionL()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CGSBaseView.
 // Returns container class of *this* plugin. iContainer is always garanteed to
 // be of type CMusSettingsContainer*.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 CMusSettingsContainer* CMusSettingsPlugin::Container()
     {
@@ -419,115 +374,17 @@
     return static_cast<CMusSettingsContainer*>( iContainer );
     }
 
-
-// ----------------------------------------------------------------------------
-// Shows a dialog for user to modify VS activation setting. Note that this
-// method has an alternative method for operator specific variant.
-// ----------------------------------------------------------------------------
-//
-void CMusSettingsPlugin::ShowVSSettingsActivationSettingDialogL()
-    {
-    MUS_LOG(
-    "[MUSSET] -> CMusSettingsPlugin::ShowVSSettingsActivationSettingDialogL()"
-     )
-
-    MusSettingsKeys::TActivation currentValue =
-    	iModel->VSSettingsActivationL();
-
-    CDesCArrayFlat* items = iCoeEnv->ReadDesC16ArrayResourceL(
-        R_ACTIVATION_SETTING_PAGE_LBX );
-
-    CleanupStack::PushL( items );
-    TInt intCurrentValue = static_cast<TInt>( currentValue );
-
-    CAknRadioButtonSettingPage* dlg =
-    	new ( ELeave ) CAknRadioButtonSettingPage(
-        	R_ACTIVATION_SETTING_PAGE,
-        	intCurrentValue,
-        	items);
-
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
-        {
-        currentValue =
-        	static_cast<MusSettingsKeys::TActivation>( intCurrentValue );
-
-        iModel->SetVSSettingsActivationL( currentValue );
-        Container()->UpdateListBoxL( KGSSettIdVSActivation );
-        }
-
-    CleanupStack::PopAndDestroy( items );
-    MUS_LOG(
-    "[MUSSET] <- CMusSettingsPlugin::ShowVSSettingsActivationSettingDialogL()" )
-    }
-
-
-// ----------------------------------------------------------------------------
-// Shows a dialog for user to modify VS activation setting. Note that this
-// method is used only for operator specific variant. Alternative method for
-// "standard" variant exists. Note that because standard variant contains 3
-// different values and operator variant contains only 2 values (0,2) the value
-// 2 (MusSettingsKeys::ENever) is converted to value 1
-// (MusSettingsKeys::EActiveInHomeNetworks) in operator variant just before
-// showing the dialog. After showing the dialog the conversion mentioned above
-// is reversed. This temporarily conversion is done solely to use values 0 and
-// 1 for direct mapping to items array.
-// ----------------------------------------------------------------------------
-//
-void CMusSettingsPlugin::ShowOperatorSpecificActivationSettingDialogL()
-    {
-    MUS_LOG(
-    "[MUSSET] -> CMusSettingsPlugin::ShowOperatorSpecificActivationSettingDialogL()"
-     )
-
-    MusSettingsKeys::TActivation currentValue =
-    	iModel->VSSettingsActivationL();
-
-    if ( currentValue == MusSettingsKeys::ENever )
-    	{
-    	currentValue = MusSettingsKeys::EActiveInHomeNetworks;
-    	}
-
-    CDesCArrayFlat* items = iCoeEnv->ReadDesC16ArrayResourceL(
-        R_OPERATOR_ACTIVATION_SETTING_PAGE_LBX);
-
-    CleanupStack::PushL( items );
-    TInt intCurrentValue = static_cast<TInt>(currentValue);
-
-    CAknRadioButtonSettingPage* dlg =
-    	new ( ELeave ) CAknRadioButtonSettingPage(
-        	R_ACTIVATION_SETTING_PAGE,
-        	intCurrentValue,
-        	items );
-
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
-        {
-        currentValue =
-        	static_cast<MusSettingsKeys::TActivation>( intCurrentValue );
-        if ( currentValue == MusSettingsKeys::EActiveInHomeNetworks )
-        	{
-        	currentValue = MusSettingsKeys::ENever;
-        	}
-        iModel->SetVSSettingsActivationL( currentValue );
-        Container()->UpdateListBoxL( KGSSettIdVSActivation );
-        }
-
-    CleanupStack::PopAndDestroy( items );
-    MUS_LOG(
-    "[MUSSET] <- CMusSettingsPlugin::ShowOperatorSpecificActivationSettingDialogL()" )
-    }
-
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Shows SIP profile setting dialog (i.e. "use default profile" or "select
 // profile from list"). If select profile from list is selected, a list of
 // SIP profiles is provided for user to choose wanted SIP profile.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::ShowVSSettingsProfileSettingDialogL()
     {
     MUS_LOG(
     "[MUSSET] -> CMusSettingsPlugin::ShowVSSettingsProfileSettingDialogL()" )
-    TInt cenRepValue = iModel->VSSettingsProfileL();
+    TInt cenRepValue = MultimediaSharingSettings::SipProfileSettingL();
     TInt profileMode = CMusSettingsModel::KVsSipProfileDefault;
     if ( cenRepValue != CMusSettingsModel::KVsSipProfileDefault )
     	{
@@ -548,29 +405,29 @@
     if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
         {
         if ( profileMode == CMusSettingsModel::KVsSipProfileDefault )
-        	{
-        	if ( oldProfileMode != profileMode )
-        		{
-        		iModel->SetVSSettingsProfileL( 
-        		            CMusSettingsModel::KVsSipProfileDefault );
-        		Container()->ShowNewProfileActiveAfterCallL();
-        		Container()->UpdateListBoxL( KGSSettIdSIPProfile );
-        		}
-        	}
+            {
+            if ( oldProfileMode != profileMode )
+                {
+                MultimediaSharingSettings::SetSipProfileSettingL( 
+                            CMusSettingsModel::KVsSipProfileDefault );
+                Container()->ShowNewProfileActiveAfterCallL();
+                Container()->UpdateListBoxL( KGSSettIdSIPProfile );
+                }
+            }
         else
-        	{
+            {
             ShowVSSettingsSelectSipProfileDialogL();
-			}
+            }
         }
     CleanupStack::PopAndDestroy( items );
     MUS_LOG(
     "[MUSSET] <- CMusSettingsPlugin::ShowVSSettingsProfileSettingDialogL()" )
     }
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Provides user a list of SIP profiles to select from. If no SIP profiles
 // exist an error note is displayed.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::ShowVSSettingsSelectSipProfileDialogL()
     {
@@ -579,50 +436,48 @@
 	CleanupStack::PushL( array );
 
 	if ( array->Count() < 1 )
-		{
-		ShowNoProfilesNotificationL();
-		}
+            {
+            ShowNoProfilesNotificationL();
+            }
 	else
-		{
-    	TInt selectedIndex = iModel->ProfileIndexByIdL(
-    	    iModel->VSSettingsProfileL() );
-        TInt currentIndex ( selectedIndex );
+            {
+            TInt selectedIndex = iModel->ProfileIndexByIdL(
+                                MultimediaSharingSettings::SipProfileSettingL() );
+            TInt currentIndex ( selectedIndex );
 
-		if ( selectedIndex == KErrNotFound )
-			{
-			// first profile in the list
-			selectedIndex = CMusSettingsModel::KVsSipProfileDefault;
-			}
+            if ( selectedIndex == KErrNotFound )
+                {
+                // first profile in the list
+                selectedIndex = CMusSettingsModel::KVsSipProfileDefault;
+                }
 
-		// Create and display the pop-up list
-		CAknRadioButtonSettingPage* defaultPopUp =
-			new ( ELeave ) CAknRadioButtonSettingPage(
-    			R_VS_SIP_PROFILE_LIST_VIEW_SELECT_SETTING_PAGE,
-    			selectedIndex,
-    			array );
-		if ( defaultPopUp->ExecuteLD(
-			CAknSettingPage::EUpdateWhenChanged ) )
-			{
-			if ( selectedIndex != currentIndex )
-        		{
-	        	// User has changed the selected profile, set new
-    	    	// setting to persistent storage
-    	    	TUint newValue = iModel->ProfileIdByIndex( selectedIndex );
-	    	    iModel->SetVSSettingsProfileL( newValue );
-	    	    Container()->ShowNewProfileActiveAfterCallL();
-				Container()->UpdateListBoxL( KGSSettIdSIPProfile );
-    			}
-			}
-		}
+            // Create and display the pop-up list
+            CAknRadioButtonSettingPage* defaultPopUp =
+                    new ( ELeave ) CAknRadioButtonSettingPage(
+                    R_VS_SIP_PROFILE_LIST_VIEW_SELECT_SETTING_PAGE,
+                    selectedIndex,
+                    array );
+            if ( defaultPopUp->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
+                {
+                if ( selectedIndex != currentIndex )
+                    {
+                    // User has changed the selected profile, set new
+                    // setting to persistent storage
+                    TUint newValue = iModel->ProfileIdByIndex( selectedIndex );
+                        MultimediaSharingSettings::SetSipProfileSettingL( newValue );
+                        Container()->ShowNewProfileActiveAfterCallL();
+                                    Container()->UpdateListBoxL( KGSSettIdSIPProfile );
+                    }
+                }
+            }
 
 	CleanupStack::PopAndDestroy( array );  // array
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Provides a dialog for user to choose saving location for recorderded video.
 // (locations are naturally phone memory or memory card).
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::ShowVSSettingsRecordedVideoSavingSettingDialogL()
     {
@@ -632,20 +487,9 @@
                     TParsePtrC( PathInfo::PhoneMemoryRootPath() ).Drive() );
     TDriveUnit mmcUnit( TParsePtrC( PathInfo::MemoryCardRootPath() ).Drive() );
     TInt currentValue =	iModel->VSSettingsRecordedVideoSavingL();
-
-
-     CAknMemorySelectionDialogMultiDrive* dlg = 
-                                    iModel->MemorySelectionDialogLC();
-
-    // Use ECFDDialogTypeSave to have double list box in the query
-/*	CAknMemorySelectionDialog* dlg = CAknMemorySelectionDialog::NewL(
-                                    ECFDDialogTypeSave,
-                                    R_VS_RECORDED_VIDEO_SAVING_SETTING_PAGE,
-                                    EFalse );
-    CleanupStack::PushL( dlg );    
-*/
-
     
+    CAknMemorySelectionDialogMultiDrive* dlg = 
+                                    iModel->MemorySelectionDialogLC();   
 
     TBool result( EFalse );
     TDriveNumber driveNumber((TDriveNumber)currentValue);    
@@ -654,67 +498,37 @@
     if ( result != CAknCommonDialogsBase::TReturnKey(
                                         CAknCommonDialogsBase::ERightSoftkey) )
         {
-        if ( ( TInt ) driveNumber != currentValue )
+        if ( /*( TInt )*/ driveNumber != currentValue )
             {
-            iModel->SetVSSettingsRecordedVideoSavingL( ( TInt ) driveNumber );
+            MultimediaSharingSettings::SetVideoLocationSettingL( ( TInt ) driveNumber );
             }
         Container()->UpdateListBoxL( KGSSettIdRecordedVideoSaving );
         }
 
-/*  CAknMemorySelectionDialog::TMemory mem;
-    if ( currentValue == ( TInt )mmcUnit )
-        {
-        mem = CAknMemorySelectionDialog::EMemoryCard;
-        }
-    else
-        {
-        mem = CAknMemorySelectionDialog::EPhoneMemory;
-        }
-                    
-    TFileName ignore;
-    TFileName path;
-
-    if ( dlg->ExecuteL( mem, &path, &ignore ) )
-        {
-        if ( mem == CAknMemorySelectionDialog::EPhoneMemory 
-        	&& currentValue != ( TInt ) phoneMemUnit )
-        	{
-        	iModel->SetVSSettingsRecordedVideoSavingL( ( TInt )phoneMemUnit );
-        	Container()->UpdateListBoxL( KGSSettIdRecordedVideoSaving );
-        	}	
-        else if ( mem == CAknMemorySelectionDialog::EMemoryCard
-        	&& currentValue != ( TInt )mmcUnit )
-        	{
-        	iModel->SetVSSettingsRecordedVideoSavingL( ( TInt )mmcUnit );
-        	Container()->UpdateListBoxL( KGSSettIdRecordedVideoSaving );
-        	}	
-        }
-*/
-
     CleanupStack::PopAndDestroy(dlg); 
     MUS_LOG(
     "[MUSSET] <- CMusSettingsPlugin::ShowVSSettingsRecordedVideoSavingSettingDialogL()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // In standard variant provides user a "Capability auditory note" setting
 // dialog, and in operator variant provides user an "Alerts" setting dialog.
 // Note that in both variants the different dialogs toggle the same setting.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::ShowVSSettingsNoteSettingDialogL()
     {
     MUS_LOG(
     "[MUSSET] -> CMusSettingsPlugin::ShowVSSettingsNoteSettingDialogL()" )
     MusSettingsKeys::TAuditoryNotification currentValue =
-    	iModel->VSSettingsNoteL();
+                    MultimediaSharingSettings::AuditoryNotificationSettingL();
     TInt intCurrentValue = static_cast<TInt>( currentValue );
 
     CAknRadioButtonSettingPage* dlg;
     CDesCArrayFlat* items;
 
-    if ( iModel->VSSettingsOperatorVariantL() == MusSettingsKeys::EStandard )
+    if ( MultimediaSharingSettings::OperatorVariantSettingL() == 
+         MusSettingsKeys::EStandard )
         {
         items = iCoeEnv->ReadDesC16ArrayResourceL(
             R_VS_AUDIO_SETTING_PAGE_LBX );
@@ -738,9 +552,9 @@
     if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
         {
         currentValue =
-        	static_cast<MusSettingsKeys::TAuditoryNotification>
-        	    ( intCurrentValue );
-        iModel->SetVSSettingsNoteL( currentValue );
+                static_cast<MusSettingsKeys::TAuditoryNotification>( intCurrentValue );
+        MultimediaSharingSettings::SetAuditoryNotificationSettingL(
+                                                                currentValue );
         Container()->UpdateListBoxL( KGSSettIdNote );
         }
 
@@ -749,10 +563,9 @@
     "[MUSSET] <- CMusSettingsPlugin::ShowVSSettingsNoteSettingDialogL()" )
     }
 
-
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Shows a notifications that no SIP profiles exists.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::ShowNoProfilesNotificationL()
     {
@@ -764,84 +577,133 @@
     MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::ShowNoProfilesNotificationL()" )
     }
 
-
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Switches between two possible values from one to another (i.e. toggles a
 // setting on/off). Toggled setting is passed in aValue parameter.
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 void CMusSettingsPlugin::SwitchOnOffValueL( TInt aValue )
     {
+    MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::SwitchOnOffValueL()" )
+            
     switch( aValue )
-	    {
-	    case KGSSettIdVSActivation:
-	    	{
-	    	if ( MusSettingsKeys::EAlwaysActive
-	    		== iModel->VSSettingsActivationL() )
-	    		{
-	    		iModel->SetVSSettingsActivationL( MusSettingsKeys::ENever );
-	    		}
-	    	else
-	    		{
-	    		iModel->SetVSSettingsActivationL(
-	    			MusSettingsKeys::EAlwaysActive );
-	    		}
-	    	break;
-	    	}
-	    case KGSSettIdAutoRecord:
-	        {
-	        if ( MusSettingsKeys::EAutoRecordOff ==
-	                                iModel->VSSettingsAutoRecordL() )
-		    	{
-		    	iModel->SetVSSettingsAutoRecordL( 
-		    	                    MusSettingsKeys::EAutoRecordOn );
-		    	}
-			else
-				{
-				iModel->SetVSSettingsAutoRecordL(
-					                MusSettingsKeys::EAutoRecordOff );
-				}
-	        break;
-	        }
-	    case KGSSettIdRecordedVideoSaving:
-	    	{
-		    TDriveUnit phoneMemUnit( 
-		            TParsePtrC( PathInfo::PhoneMemoryRootPath() ).Drive() );
-            TDriveUnit mmcUnit( 
-                    TParsePtrC( PathInfo::MemoryCardRootPath() ).Drive() );    
-    
-		    if ( ( TInt )phoneMemUnit 
-		        == iModel->VSSettingsRecordedVideoSavingL() )
-		    	{
-		    	iModel->SetVSSettingsRecordedVideoSavingL( ( TInt )mmcUnit );
-		    	}
-			else
-				{
-				iModel->SetVSSettingsRecordedVideoSavingL( ( TInt )phoneMemUnit );
-				}
-			break;
-	    	}
-		case KGSSettIdNote:
-			{
-		    if ( MusSettingsKeys::EAuditoryNotificationOn
-		    	== iModel->VSSettingsNoteL() )
-		    	{
-		    	iModel->SetVSSettingsNoteL(
-		    		MusSettingsKeys::EAuditoryNotificationOff );
-		    	}
-			else
-				{
-				iModel->SetVSSettingsNoteL(
-					MusSettingsKeys::EAuditoryNotificationOn );
-				}
-			break;
-			}
-	    default:
-	    	{
-	    	MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::SwitchOnOffValueL() - error unknown setting" )
-	    	User::Leave( KErrArgument );
-	    	}
-	    }
+        {
+        case KGSSettIdVSActivation:
+            {
+            MusSettingsKeys::TOperatorVariant operatorVarValue =
+                    MultimediaSharingSettings::OperatorVariantSettingL();
+                
+            if ( operatorVarValue == MusSettingsKeys::EOperatorSpecific )
+                {
+                
+                TInt aCallCount = 0;
+                RProperty::Get( NMusSessionInformationApi::KCategoryUid,
+                              NMusSessionInformationApi::KMusCallCount,
+                              aCallCount );
+                MUS_LOG1( "[MUSSET] CallCount ( %d )", aCallCount)
+                if ( aCallCount == 0 )
+                    {
+                    MUS_LOG( "[MUSSET] no calls. Set VS on/off" )
+                    TBool enabled = EFalse;
+                    TRAPD( error, enabled = iHandler->ProfileEnabledL( ));
+                    MUS_LOG2( "[MUSSET]   VS now %d (err=%d)", enabled, error )
+                    if ( !error ) 
+                        {
+                        if( enabled ) //currently enabled => disable
+                            {
+                            TRAPD( error, iHandler->DisableProfileL() );
+                            MUS_LOG1( "[MUSSET]   VS is off (err=%d)", error )
+                            //activation disabled = true
+                            iModel->SetActivationItem( enabled );
+                            
+                            if ( error == KErrNone )
+                            	{
+								MUS_LOG( "[MUSSET]    Activation setting set off" )
+								//MusSettingsKeys::ENever = 2 can not be used anymore
+								//EActiveInHomeNetworks = 1 is used instead -> off
+								MultimediaSharingSettings::SetActivationSettingL(
+												MusSettingsKeys::EActiveInHomeNetworks );
+								}
+                            }
+                        else//currently disabled => enable
+                            {
+                            TRAPD( error, iHandler->EnableProfileL() );
+                            MUS_LOG1( "[MUSSET]   VS is on (err=%d)", error )
+                            //if failed activation disabled = true
+                            enabled = error != KErrNone;
+                            //activation disabled = false/true(if failed)
+                            iModel->SetActivationItem( enabled );
+
+                            if ( error == KErrNone )
+                            	{
+								MUS_LOG( "[MUSSET]    Activation setting set on" )
+								MultimediaSharingSettings::SetActivationSettingL(
+													MusSettingsKeys::EAlwaysActive );
+								}                            
+                            }             
+                        }
+                    }
+                }
+            else
+                {
+                if ( MusSettingsKeys::EAlwaysActive ==
+                     MultimediaSharingSettings::ActivationSettingL() )
+                    {
+                    MUS_LOG( "[MUSSET]    Activation setting set off" )
+                    //MusSettingsKeys::ENever = 2 can not be used anymore
+                    //EActiveInHomeNetworks = 1 is used instead -> off
+                    MultimediaSharingSettings::SetActivationSettingL(
+                                    MusSettingsKeys::EActiveInHomeNetworks );
+                    }
+                else
+                    {
+                    MUS_LOG( "[MUSSET]    Activation setting set on" )
+                    MultimediaSharingSettings::SetActivationSettingL(
+                                        MusSettingsKeys::EAlwaysActive );
+                    }
+                }
+            break;
+        }
+        case KGSSettIdAutoRecord:
+            {
+            if ( MusSettingsKeys::EAutoRecordOff ==
+                        MultimediaSharingSettings::AutoRecordSettingL() )
+                {
+                MultimediaSharingSettings::SetAutoRecordSettingL( 
+                                            MusSettingsKeys::EAutoRecordOn );
+                }
+            else
+                {
+                MultimediaSharingSettings::SetAutoRecordSettingL(
+                                            MusSettingsKeys::EAutoRecordOff );
+                }
+            break;
+            }
+        case KGSSettIdNote:
+            {
+            if ( MusSettingsKeys::EAuditoryNotificationOn == 
+                        MultimediaSharingSettings::AuditoryNotificationSettingL() )
+                {
+                MultimediaSharingSettings::SetAuditoryNotificationSettingL(
+                        MusSettingsKeys::EAuditoryNotificationOff );
+                }
+            else
+                {
+                MultimediaSharingSettings::SetAuditoryNotificationSettingL(
+                                        MusSettingsKeys::EAuditoryNotificationOn );
+                }
+            break;
+            }
+        default:
+            {
+            MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::SwitchOnOffValueL() - error unknown setting" )
+            User::Leave( KErrArgument );
+            }
+        }
+	        
+	Container()->UpdateListBoxL( aValue );
+	        
+    MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::SwitchOnOffValueL()" )
     }
 
 // -----------------------------------------------------------------------------
@@ -859,16 +721,18 @@
     CleanupStack::PopAndDestroy( dlg );
     }
 
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // From class CGSPluginInterface.
 // Creates a new icon of desired type. Overrided to provide custom icons.
 // Ownership of the created icon is transferred to the caller.
-// ----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
 CGulIcon* CMusSettingsPlugin::CreateIconL( const TUid aIconType )
     {
     MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::CreateIconL()" )
 
+    OpenResourceFileL();
+
 	CGulIcon* icon;
 
     if( aIconType == KGSIconTypeLbxItem )
@@ -902,3 +766,37 @@
     return icon;
     }
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusSettingsPlugin::OpenResourceFileL()
+	{
+    MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::OpenResourceFileL()" )
+        
+    if (!iResourceFileOpen) 
+        {
+        HBufC* fileName = MusResourceFinderUtil::ResourcePathL(
+        KVSSettingsResourceFileName );    
+        TFileName fName(*fileName);
+        delete fileName;
+        MUS_LOG_TDESC( "[MUSSET] Resource FileName ",fName )
+        iResources.OpenL(fName);  
+        iResourceFileOpen = true;
+        } 
+    
+    MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::OpenResourceFileL()" )
+	}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusSettingsPlugin::CloseResourceFile()
+    {
+    MUS_LOG( "[MUSSET] -> CMusSettingsPlugin::CloseResourceFile()" )
+    iResources.Close();
+    iResourceFileOpen = false;
+    MUS_LOG( "[MUSSET] <- CMusSettingsPlugin::CloseResourceFile()" )
+    }
+
--- a/mmshplugins/mmshsettingsuiplugin/src/mussettingspluginimplementationtable.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/src/mussettingspluginimplementationtable.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -20,7 +20,7 @@
 #include "mussettingsplugin.h"
 #include <ecom/implementationproxy.h>
 #include <e32std.h>
-
+#include "muslogger.h"
 
 // ======== LOCAL FUNCTIONS ========
 
@@ -41,7 +41,7 @@
 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
     TInt& aTableCount )
 	{
-    RDebug::Print(_L("[GSLog] ImplementationGroupProxy()" ));
+    MUS_LOG( "[GSLog] ImplementationGroupProxy()" );
 	aTableCount = sizeof(KGSVSSettingsPluginImplementationTable)
         / sizeof(TImplementationProxy);
 	return KGSVSSettingsPluginImplementationTable;
--- a/mmshplugins/mmshsettingsuiplugin/src/mussipprofilemodel.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsettingsuiplugin/src/mussipprofilemodel.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -12,40 +12,56 @@
 * Contributors:
 *
 * Description:  Model for managing SIP profiles.
+*  Version     : %version: 19 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
 
+#include <sipmanagedprofileregistry.h>
+#include <sipmanagedprofile.h>
 
 #include "mussipprofilemodel.h"
 #include "muslogger.h"
-#include <aknnotewrappers.h>
-#include <StringLoader.h>
-#include <aknview.h>
-#include <sipmanagedprofileregistry.h>
+#include "mussettings.inl"
+#include "mussettingsmodel.h"
 
 
-const TInt KSIPGranularity   = 5;
 const TInt KUnknownProfileId = 0;
 
 
 // ======== MEMBER FUNCTIONS ========
 
 
+// ----------------------------------------------------------------------------
+// 
+// ----------------------------------------------------------------------------
+//
 CMusSIPProfileModel::CMusSIPProfileModel()
     {
-    MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::CMusSIPProfileModel()" )
     }
 
-
+// ----------------------------------------------------------------------------
+// 
+// ----------------------------------------------------------------------------
+//
 void CMusSIPProfileModel::ConstructL()
     {
     MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ConstructL()" )
+            
+    MUS_LOG( "[MUSSET]  Creating CSIPManagedProfileRegistry " )
     iEngine = CSIPManagedProfileRegistry::NewL( *this );
-    ReadArrayFromEngineL();
+    MUS_LOG( "[MUSSET]  Done " )
+    MUS_LOG( "[MUSSET]  Getting profiles " )
+    iEngine->ProfilesL( iProfiles );
+    MUS_LOG( "[MUSSET]  Done " )
+    SortProfilesL();
+    MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ConstructL()" )
     }
 
-
+// ----------------------------------------------------------------------------
+// 
+// ----------------------------------------------------------------------------
+//
 CMusSIPProfileModel* CMusSIPProfileModel::NewL()
     {
     MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::NewL()" )
@@ -59,30 +75,28 @@
     return self;
     }
 
-
+// ----------------------------------------------------------------------------
+// 
+// ----------------------------------------------------------------------------
+//
 CMusSIPProfileModel::~CMusSIPProfileModel()
     {
     MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::~CMusSIPProfileModel()" )
-    DeleteProfiles();
+    iProfiles.ResetAndDestroy();
     delete iEngine;
-    iEngine = NULL;
     MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::~CMusSIPProfileModel()" )
     }
 
-
 // ----------------------------------------------------------------------------
-// Returns pointer to the locally cached SIP profile array.
+// Returns reference to the locally cached SIP profile array.
 // ----------------------------------------------------------------------------
 //
-CArrayPtr<CSIPManagedProfile>* CMusSIPProfileModel::ProfileArrayL()
+RPointerArray<CSIPProfile>& CMusSIPProfileModel::ProfileArrayL()
     {
-    MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ProfileArrayL()" )
-    ReadProfileListFromEngineSafeL();
-    MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ProfileArrayL()" )
+    MUS_LOG( "[MUSSET] <-> CMusSIPProfileModel::ProfileArrayL()" )
     return iProfiles;
     }
 
-
 // ----------------------------------------------------------------------------
 // Returns index to the default SIP profile in locally cached array.
 // ----------------------------------------------------------------------------
@@ -92,12 +106,12 @@
     MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::DefaultProfileIndex()" )
     TInt index( KErrNotFound );
 
-    for ( TInt i = 0; i < iProfiles->Count(); i++ )
+    for ( TInt i = 0; i < iProfiles.Count(); i++ )
         {
         TBool defProfile( EFalse );
         if (
     	    KErrNone ==
-    	    iProfiles->At( i )->GetParameter( KSIPDefaultProfile, defProfile )
+    	    iProfiles[i]->GetParameter( KSIPDefaultProfile, defProfile )
     	    && defProfile )
             {
             index = i;
@@ -110,7 +124,6 @@
     return index;
     }
 
-
 // ----------------------------------------------------------------------------
 // Returns id of the default SIP profile. If default SIP profile is not found
 // KUnknownProfileId is returned.
@@ -121,16 +134,14 @@
     MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::DefaultProfileId()" )
     TUint32 id( KUnknownProfileId );
 
-    for ( TInt i = 0; i < iProfiles->Count(); i++ )
+    for ( TInt i = 0; i < iProfiles.Count(); i++ )
         {
         TBool defProfile( EFalse );
-        if (
-    	    KErrNone ==
-    	    iProfiles->At( i )->GetParameter( KSIPDefaultProfile, defProfile )
-    	    && defProfile )
+        TInt error = iProfiles[i]->GetParameter( KSIPDefaultProfile, defProfile );
+        if ( error == KErrNone && defProfile )
             {
-        	iProfiles->At( i )->GetParameter( KSIPProfileId, id );
-        	break;
+            iProfiles[i]->GetParameter( KSIPProfileId, id );
+            break;
             }
         }
 
@@ -139,6 +150,66 @@
     return id;
     }
 
+// -----------------------------------------------------------------------------
+// Disable SIP Registration.
+// -----------------------------------------------------------------------------
+//
+void CMusSIPProfileModel::DisableProfileL()
+    {
+    MUS_LOG( "[MUSSET]  -> CMusSIPProfileModel::DisableProfileL " )        
+    CSIPManagedProfile* managedProfile = static_cast<CSIPManagedProfile*>(
+            iEngine->ProfileL( DefaultProfileId()) );
+    CleanupStack::PushL( managedProfile );
+    MUS_LOG( "[MUSSET]  Add registration parameter to profile.dat file " )
+    //set autoregistration off (i.e. when needed) => disable profile
+    User::LeaveIfError( managedProfile->SetParameter( KSIPAutoRegistration, EFalse ) );
+    MUS_LOG( "[MUSSET]  Saving profile " )
+    iEngine->SaveL( *managedProfile );
+    MUS_LOG( "[MUSSET]  Saved" )
+    CleanupStack::PopAndDestroy( managedProfile );
+    MUS_LOG( "[MUSSET]  <- CMusSIPProfileModel::DisableProfileL " )        
+    }
+
+// -----------------------------------------------------------------------------
+// Enable SIP Registration.
+// -----------------------------------------------------------------------------
+//
+void CMusSIPProfileModel::EnableProfileL()
+    {
+    MUS_LOG( "[MUSSET]  -> CMusSIPProfileModel::EnableProfileL " )        
+    CSIPManagedProfile* managedProfile = static_cast<CSIPManagedProfile*>(
+            iEngine->ProfileL( DefaultProfileId() ) );
+    CleanupStack::PushL( managedProfile );
+    MUS_LOG( "[MUSSET] Add registration parameters to profile.dat file " )
+    //set autoregistration on (i.e. always on) => enable profile
+    User::LeaveIfError( managedProfile->SetParameter( KSIPAutoRegistration, ETrue ) );
+    MUS_LOG( "[MUSSET]  Saving profile " )
+    iEngine->SaveL( *managedProfile );
+    MUS_LOG( "[MUSSET]  Saved" )
+    CleanupStack::PopAndDestroy( managedProfile );
+    MUS_LOG( "[MUSSET]  <- CMusSIPProfileModel::EnableRegisterL " )        
+    }
+
+// -----------------------------------------------------------------------------
+// if SIP Registration enabled.
+// -----------------------------------------------------------------------------
+//
+TBool CMusSIPProfileModel::ProfileEnabledL()
+    {
+    MUS_LOG( "[MUSSET]  -> CMusSIPProfileModel::ProfileEnabledL " ) 
+    CSIPManagedProfile* managedProfile = static_cast<CSIPManagedProfile*>(
+            iEngine->ProfileL( DefaultProfileId() ) );
+    CleanupStack::PushL( managedProfile );
+    TBool enabled;
+    MUS_LOG( "[MUSSET]  Getting KSIPAutoRegistration" ) 
+    User::LeaveIfError( 
+            managedProfile->GetParameter( KSIPAutoRegistration, enabled ) );
+    MUS_LOG( "[MUSSET]  Done" ) 
+    MUS_LOG1( "[MUSSET]  KSIPAutoRegistration=%d", enabled ) 
+    CleanupStack::PopAndDestroy( managedProfile );
+    MUS_LOG( "[MUSSET]  <- CMusSIPProfileModel::ProfileEnabledL " )
+    return enabled;
+    }
 
 // ----------------------------------------------------------------------------
 // Returns index of the default SIP profile on locally cached array. If default
@@ -149,14 +220,12 @@
     {
     MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ProfileIndexByIdL()" )
     TInt index( KErrNotFound );
-
-	ReadProfileListFromEngineSafeL();
-    for ( TInt i = 0; i < iProfiles->Count(); i++ )
+    
+    for ( TInt i = 0; i < iProfiles.Count(); i++ )
         {
         TUint32 id( KUnknownProfileId );
-
-        if ( KErrNone == iProfiles->At( i )->GetParameter( KSIPProfileId, id )
-            && id == aId )
+        TInt error = iProfiles[i]->GetParameter( KSIPProfileId, id );
+        if ( error == KErrNone && id == aId )
             {
             index = i;
             break;
@@ -178,10 +247,9 @@
     MUS_LOG1( "[MUSSET] -> CMusSIPProfileModel::ProfileIdByIndex()( %d )",
               aIndex )
 	TUint32 profileId( KUnknownProfileId );
-    if ( iProfiles->Count() > aIndex )
+    if ( aIndex < iProfiles.Count() )
         {
-        if ( iProfiles->At( aIndex )->GetParameter(
-            KSIPProfileId, profileId ) )
+        if ( iProfiles[aIndex]->GetParameter( KSIPProfileId, profileId ) )
             {
             profileId = KUnknownProfileId;
             }
@@ -191,41 +259,6 @@
     return profileId;
     }
 
-
-// ----------------------------------------------------------------------------
-// Reads SIP profiles from SIP Profile Client array to locally cached array.
-// ----------------------------------------------------------------------------
-//
-void CMusSIPProfileModel::ReadArrayFromEngineL()
-    {
-    MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ReadArrayFromEngineL()" )
-
-    DeleteProfiles();
-
-    // Create the profile pointer array
-    iProfiles =
-        new ( ELeave ) CArrayPtrFlat<CSIPManagedProfile>( KSIPGranularity );
-
-    RPointerArray<CSIPProfile> profilePointerArray;
-    TCleanupItem clItem( ResetAndDestroy, &profilePointerArray );
-    CleanupStack::PushL( clItem );
-
-    iEngine->ProfilesL( profilePointerArray );
-    for ( TInt i = 0; i < profilePointerArray.Count(); i++ )
-        {
-        iProfiles->AppendL(
-            static_cast<CSIPManagedProfile*>( profilePointerArray[i] ) );
-        }
-
-    profilePointerArray.Reset();
-    CleanupStack::PopAndDestroy(); // clItem (profilePointerArray)
-
-    SortProfilesL();
-
-    MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ReadArrayFromEngineL()" )
-    }
-
-
 // ----------------------------------------------------------------------------
 // Sorts internal array of SIP profiles by id. Used algorithm is generally
 // slower than quicksort and selectionsort but very feasible for expected
@@ -236,52 +269,69 @@
     {
 	TUint32 profileIdFirst( 0 );
 	TUint32 profileIdSecond( 0 );
-    for ( TInt a = 0; a < iProfiles->Count() - 1; a++ )
+    for ( TInt a = 0; a < iProfiles.Count() - 1; a++ )
         {
-        for ( TInt b = a + 1; b < iProfiles->Count(); b++ )
+        for ( TInt b = a + 1; b < iProfiles.Count(); b++ )
             {
-            User::LeaveIfError( iProfiles->At( a )->GetParameter(
+            User::LeaveIfError( iProfiles[a]->GetParameter(
             	KSIPProfileId, profileIdFirst ) );
-    		User::LeaveIfError( iProfiles->At( b )->GetParameter(
+    		User::LeaveIfError( iProfiles[b]->GetParameter(
     			KSIPProfileId, profileIdSecond ) );
             if ( profileIdFirst > profileIdSecond )
                 {
-                CSIPManagedProfile* tmp = iProfiles->At( b );
-                iProfiles->At( b ) = iProfiles->At( a );
-                iProfiles->At( a )  = tmp;
+                CSIPProfile* tmp = iProfiles[b];
+                iProfiles[b] = iProfiles[a];
+                iProfiles[a]  = tmp;
                 }
             }
         }
     }
 
-
-// ----------------------------------------------------------------------------
-// Deletes internally cached SIP profiles.
-// ----------------------------------------------------------------------------
-//
-void CMusSIPProfileModel::DeleteProfiles()
-    {
-    if ( iProfiles )
-        {
-        iProfiles->ResetAndDestroy();
-        delete iProfiles;
-        iProfiles = NULL;
-        }
-    }
-
-
 // ----------------------------------------------------------------------------
 // From class MSIPProfileRegistryObserver.
 // Notifies of an event in SIP profile registry.
 // ----------------------------------------------------------------------------
 //
 void CMusSIPProfileModel::ProfileRegistryEventOccurred(
-    TUint32 /*aSIPProfileId*/, TEvent /*aEvent*/ )
-	{
+    TUint32 aSIPProfileId, TEvent aEvent )
+	{  
+    MUS_LOG("[MUSSET] -> CMusSIPProfileModel::ProfileRegistryEventOccurred()" )
+    MUS_LOG2("            SIPProfileId is %d,Event is %d",aSIPProfileId,aEvent)
+    
+    // We revert back to default settings if the profile used by MuS is deleted
+    if ( aEvent == EProfileDestroyed )
+    	{
+    	TRAP_IGNORE( 
+            //if the profile is the profile used by mush
+            if ( MultimediaSharingSettings::SipProfileSettingL() ==
+                 aSIPProfileId )
+                {
+                //set the profile to default	
+                MultimediaSharingSettings::SetSipProfileSettingL( 
+                                    CMusSettingsModel::KVsSipProfileDefault );
+                //set mush off
+                MultimediaSharingSettings::SetActivationSettingL(
+                                    MusSettingsKeys::EActiveInHomeNetworks );
+                }
+            );
+		 }
+    
+    if ( aEvent == EProfileCreated ||
+         aEvent == EProfileUpdated ||
+         aEvent == EProfileDestroyed )
+        {
+        // Profiles have been manipulated in SIP side, we must delete client
+        // side profile objects and retrieve them again. If fetching fails,
+        // we have empty array which is better than showing wrong values to
+        // user.
+        iProfiles.ResetAndDestroy();
+        TRAP_IGNORE( iEngine->ProfilesL( iProfiles ) );
+        TRAP_IGNORE( SortProfilesL() );
+        }
+    
     MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ProfileRegistryEventOccurred()" )
 	}
 
-
 // ----------------------------------------------------------------------------
 // From class MSIPProfileRegistryObserver.
 // An asynchronous error has occurred related to SIP profile
@@ -294,50 +344,11 @@
     MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ProfileRegistryErrorOccurred()" )
     }
 
-
 // ----------------------------------------------------------------------------
-// Reads SIP profile list from engine; if reading fails, old cached list is
-// kept and returned.
+//Set CMusSettingsModel to handle ProfileRegistry Event.
 // ----------------------------------------------------------------------------
 //
-void CMusSIPProfileModel::ReadProfileListFromEngineSafeL()
-    {
-    MUS_LOG(
-    	"[MUSSET] -> CMusSIPProfileModel::ReadProfileListFromEngineSafeL()" )
-    // To prevent complete disaster it we'll save the pointer of the old array
-    CArrayPtrFlat<CSIPManagedProfile>* profiles = iProfiles;
-    iProfiles = 0;
-    TRAPD( error, ReadArrayFromEngineL() );
-
-    if ( error )
-        {
-        // Problems with re-reading profiles; use existing array
-        DeleteProfiles();
-        iProfiles = profiles;
-        User::Leave( error );
-        }
-    else
-        {
-        // No problems; delete backup array
-        profiles->ResetAndDestroy();
-        delete profiles;
-        }
-    MUS_LOG(
-    	"[MUSSET] <- CMusSIPProfileModel::ReadProfileListFromEngineSafeL()" )
-    }
-
-
-// ----------------------------------------------------------------------------
-// For deleting RPointerArray in case of leave (used in association with
-// TCleanupItem).
-// ----------------------------------------------------------------------------
-//
-void CMusSIPProfileModel::ResetAndDestroy( TAny* aPointerArray )
-    {
-    MUS_LOG( "[MUSSET] -> CMusSIPProfileModel::ResetAndDestroy()" )
-    RPointerArray<CSIPProfile>* array =
-        static_cast<RPointerArray<CSIPProfile>*>( aPointerArray );
-    array->ResetAndDestroy();
-    array->Close();
-    MUS_LOG( "[MUSSET] <- CMusSIPProfileModel::ResetAndDestroy()" )
-    }
+void CMusSIPProfileModel::SetCMusSettingsModel(CMusSettingsModel* aCMusSettingsModel)
+	{
+	iCMusSettingsModel = aCMusSettingsModel;
+	}
--- a/mmshplugins/mmshsipcrplugin/group/mussipcrplugin.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsipcrplugin/group/mussipcrplugin.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -51,9 +51,8 @@
 LIBRARY                 sipclient.lib      // SIP Client API
 LIBRARY                 sipprofilecli.lib  // SIP Profile Agent Client API
 LIBRARY                 sipcodec.lib       // SIP Codec
-LIBRARY			sdpcodec.lib       // SDP Codec
-LIBRARY                 centralrepository.lib // for MultimediaSharingSettings
-
+LIBRARY                 featmgr.lib
 DEBUGLIBRARY            flogger.lib        // file logger
 
 PAGED
+
--- a/mmshplugins/mmshsipcrplugin/inc/mussipcrplugin.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsipcrplugin/inc/mussipcrplugin.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,7 +26,6 @@
 #include <ecom/implementationproxy.h>
 
 class CMusManager;
-class CSdpMediaField;
 
 IMPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount );
 
@@ -87,20 +86,14 @@
      */
     const TDesC8& Capabilities();
 
-private: // New functions
-    
-    /**
-     * Check whether video field has sendrecv attribute
-     * @return ETrue if video has sendrecv attribute, EFalse otherwise 
-     */
-    TBool CheckForSendRecvAttributeL(
-        RPointerArray<CSdpMediaField>& aFields ) const;
-    
+private: // data
+
+    TUid DoChannelL( RStringF aMethod ); 
+	
 private: // data
 
     CMusManager* iManager;
-    TBool iCloseStringPool;
-    
+
     };
 
 
--- a/mmshplugins/mmshsipcrplugin/src/mussipcrplugin.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsipcrplugin/src/mussipcrplugin.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -24,20 +24,10 @@
 #include "musmanager.h"
 #include "musuid.hrh"
 #include "musunittesting.h"
-#include "mussettings.h"
 
-#include <mussettingskeys.h>
 #include <sipstrings.h>
 #include <sipstrconsts.h>
-#include <sdpdocument.h>
-#include <sdpmediafield.h>
-#include <sdpcodecstringpool.h>
-#include <sdpcodecstringconstants.h>
-#include <sdpattributefield.h>
-
-_LIT8( KSendRecv, "sendrecv");                  // For attribute checks
-_LIT8( KRecvOnly, "recvonly");                  // For attribute checks
-_LIT8( KSendOnly, "sendonly" );                 // For attribute checks
+#include <featmgr.h>
 
 _LIT8(KCapabilities,
 "<SIP_CLIENT ALLOW_STARTING=\"YES\">\
@@ -55,7 +45,6 @@
 </SDP_LINES>\
 </SIP_CLIENT>");
 
-
 // -------------------------------------------------------------------------
 // Two-phased constructor.
 // -------------------------------------------------------------------------
@@ -80,10 +69,6 @@
     {
     MUS_LOG( "mus: [MUSSCR]  -> CMusSipCrPlugin::~CMusSipCrPlugin()" );
     delete iManager;
-    if ( iCloseStringPool )
-        {
-        SdpCodecStringPool::Close();
-        }
     MUS_LOG( "mus: [MUSSCR]  <- CMusSipCrPlugin::~CMusSipCrPlugin()" );
     }
 
@@ -105,31 +90,6 @@
     {
     MUS_LOG( "mus: [MUSSCR]  -> CMusSipCrPlugin::ConstructL()" );
     iManager = CMusManager::NewL();
-    
-    TRAPD( err, SdpCodecStringPool::OpenL() );
-    
-    switch ( err )
-        {
-        case KErrNone:
-            {
-            //close pool at destructor, not opened by others
-            iCloseStringPool = ETrue;
-            break;
-            }
-        
-        case KErrAlreadyExists:
-            {
-            //already opened, do not try to close at destructor
-            iCloseStringPool = EFalse;
-            break;
-            }
-        
-        default:
-            {
-            User::Leave( err );
-            }
-        }
-    
     MUS_LOG( "mus: [MUSSCR]  <- CMusSipCrPlugin::ConstructL()" );
     }
 
@@ -141,16 +101,34 @@
 TUid CMusSipCrPlugin::ChannelL( RStringF aMethod,
     const TDesC8& /*aRequestUri*/,
     const RPointerArray<CSIPHeaderBase>& /*aHeaders*/,
-    const TDesC8& aContent,
-    const CSIPContentTypeHeader* /*aContentType*/ )
+    const TDesC8& /*aContent*/,
+    const CSIPContentTypeHeader* /*aContentType*/)
     {
-    MUS_LOG( "mus: [MUSSCR]  -> CMusSipCrPlugin::ChannelL()" );
-    
+	FeatureManager::InitializeLibL();
+    TBool support = FeatureManager::FeatureSupported( KFeatureIdMultimediaSharing );
+	FeatureManager::UnInitializeLib();
+	TUid uid;
+	uid.iUid = ( TInt ) CMusManager::ESipInviteNotDesired;
+	if ( support )
+		{
+	    uid = DoChannelL( aMethod );  
+		}
+    return uid;	
+    }
+	
+	
+// -------------------------------------------------------------------------
+// CMusSipCrPlugin::DoChannelL
+// -------------------------------------------------------------------------
+TUid CMusSipCrPlugin::DoChannelL( RStringF aMethod )
+    {
+    MUS_LOG( "mus: [MUSSCR]  -> CMusSipCrPlugin::DoChannelL()" );
+
     if ( aMethod == SIPStrings::StringF( SipStrConsts::EOptions ) )
         {
         TUid uid;
         uid.iUid = ( TInt ) CMusManager::ESipOptions;
-        MUS_LOG1( "mus: [MUSSCR]     <- CMusSipCrPlugin::ChannelL(): KSipOptions %d",
+        MUS_LOG1( "mus: [MUSSCR]     <- CMusSipCrPlugin::DoChannelL(): KSipOptions %d",
                   uid.iUid );
         return uid;
         }
@@ -164,7 +142,7 @@
             {
             TUid uid;
             uid.iUid = ( TInt ) CMusManager::ESipInviteNotDesired;
-            MUS_LOG1( "mus: [MUSSCR]     <- CMusSipCrPlugin::ChannelL(): \
+            MUS_LOG1( "mus: [MUSSCR]     <- CMusSipCrPlugin::DoChannelL(): \
                       KNotAllowedSipInvite %d", uid.iUid );
             return uid;
             }
@@ -172,90 +150,14 @@
             {
             TUid uid;
             uid.iUid = ( TInt ) CMusManager::ESipInviteDesired;
-            TBool twoWaySupported = MultimediaSharingSettings::VideoDirectionL() == 
-                                    MusSettingsKeys::ETwoWayVideo;
-            
-            if ( ( aContent.Length() > 0 ) && twoWaySupported )
-                {
-                MUS_LOG( "mus: [MUSSCR]  2 way supported, parsing SDP..." );
-                CSdpDocument* sdpDocument = CSdpDocument::DecodeLC( aContent );
-                TBool sendRecv = CheckForSendRecvAttributeL( sdpDocument->MediaFields() );
-                if ( sendRecv )
-                    {
-                    uid.iUid = ( TInt ) CMusManager::ESipInviteDesired2WayVideo;
-                    }
-                    
-                CleanupStack::PopAndDestroy( sdpDocument );
-                }
-
-            MUS_LOG1( "mus: [MUSSCR]     <- CMusSipCrPlugin::ChannelL(): \
+            MUS_LOG1( "mus: [MUSSCR]     <- CMusSipCrPlugin::DoChannelL(): \
                       KAllowedSipInvite %d", uid.iUid );
             return uid;
             }
         }
     }
 
-// -------------------------------------------------------------------------
-// CMusSipCrPlugin::CheckForSendRecvAttribute
-// -------------------------------------------------------------------------
-//
-TBool CMusSipCrPlugin::CheckForSendRecvAttributeL(
-    RPointerArray<CSdpMediaField>& aFields ) const
-    {
-    MUS_LOG( "mus: [MUSSCR]  -> CMusSipCrPlugin::CheckForSendRecvAttribute()" );
-    
-    TBool sendRecv = EFalse;
-    TBool sendAttrFound = EFalse;
-    TBool videoFound = EFalse;
-    RStringF videoType = SdpCodecStringPool::StringPoolL().StringF(
-                    SdpCodecStringConstants::EMediaVideo,
-                    SdpCodecStringPool::StringTableL() );
-    const TInt fieldcount = aFields.Count();
-    
-    for ( TInt i = 0; i < fieldcount && !videoFound; i++ )
-        {
-        CSdpMediaField* mField = aFields[i];
-        
-        //only check video fields
-        videoFound = mField->Media() == videoType;
-        
-        if ( videoFound )
-            {
-            RPointerArray< CSdpAttributeField > attrList =
-                mField->AttributeFields();
-            
-            TInt attrCount = attrList.Count();
-            for (TInt j = 0; j < attrCount && !sendAttrFound; j++ )
-                {
-                CSdpAttributeField* attributeField = attrList[j];
-                RStringF attribute = attributeField->Attribute();                
-                
-                if ( KErrNotFound != attribute.DesC().FindF( KSendRecv ) )
-                    {
-                    sendRecv = ETrue;
-                    sendAttrFound = ETrue;
-                    MUS_LOG( "mus: [MUSSCR]  <sendrecv> attribute found!" );
-                    }
-                else if ( ( KErrNotFound != attribute.DesC().FindF( KSendOnly ) ) ||
-                          ( KErrNotFound != attribute.DesC().FindF( KRecvOnly ) ) )
-                    {
-                    MUS_LOG( "mus: [MUSSCR]  <sendonly>/<recvonly> attribute found!" );
-                    sendAttrFound = ETrue;
-                    }
-                }
-            
-            if ( !sendAttrFound )
-                {
-                MUS_LOG( "mus: [MUSSCR]  no send/recv related attributes found!" );
-                sendRecv = ETrue;
-                }
-            }
-        }
-    MUS_LOG1( "mus: [MUSSCR]  <- CMusSipCrPlugin::CheckForSendRecvAttribute(), \
-            sendrecv: %d", sendRecv );
-   
-    return sendRecv;
-    }
+
 
 // -------------------------------------------------------------------------
 // CMusSipCrPlugin::ConnectL
@@ -266,7 +168,6 @@
     MUS_LOG1( "mus: [MUSSCR]     -> CMusSipCrPlugin::ConnectL( %d )", aUid.iUid );
     if ( aUid.iUid == CMusManager::ESipOptions ||
          aUid.iUid == CMusManager::ESipInviteDesired ||
-         aUid.iUid == CMusManager::ESipInviteDesired2WayVideo ||
          aUid.iUid == CMusManager::ESipInviteNotDesired )
         {
         iManager->HandleSipRequestL(( CMusManager::TRequestType ) aUid.iUid );
--- a/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -15,5 +15,5 @@
 *
 */
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
 ut_sipcrplugin.mmp
\ No newline at end of file
--- a/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group/ut_sipcrplugin.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group/ut_sipcrplugin.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -17,7 +17,7 @@
 
 
 #include <platform_paths.hrh>
-#include <eunitcaps.h>
+#include<eunitcaps.h>
 
 TARGET                  ut_sipcrplugin.dll
 TARGETTYPE              dll
@@ -25,7 +25,8 @@
 TARGETPATH              /DigiaEUnit/Tests
 UID                     0x1000af5a 0x01700a21
 
-CAPABILITY              EUNIT_CAPS
+CAPABILITY      EUNIT_CAPS
+
 VENDORID                VID_DEFAULT
 
 MACRO                   UNIT_TESTING
@@ -41,10 +42,10 @@
 SOURCEPATH              ../../../../../tsrc/musmanagerstub/src
 SOURCE    		          musmanagerstub.cpp
 
-SOURCEPATH              ../../../../../tsrc/multimediasharingsettingsstub/src
-SOURCE                  mussettings.cpp
+SOURCEPATH              ../../../../../tsrc/featmgrstub/src
+SOURCE                  FeatMgr.cpp
 
-USERINCLUDE             ../../../../../tsrc/multimediasharingsettingsstub/inc 
+USERINCLUDE             ../../../../../tsrc/featmgrstub/inc
 USERINCLUDE             ../inc
 USERINCLUDE             ../../../inc
 USERINCLUDE             ../../../../../inc
@@ -60,9 +61,6 @@
 LIBRARY                 sipclient.lib      // SIP Client API
 LIBRARY                 sipprofilecli.lib  // SIP Profile Agent Client API
 LIBRARY                 sipcodec.lib       // SIP Codec
-LIBRARY					sdpcodec.lib       // SDP Codec
-LIBRARY                 bafl.lib           // Basic Application Framework Library
-
 
 EXPORTUNFROZEN
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group/ut_sipcrplugin.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHSIPCRPl"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_sipcrplugin.dll"-"c:\sys\bin\ut_sipcrplugin.dll"
--- a/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/inc/mussipcrplugintest.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/inc/mussipcrplugintest.h	Wed Sep 01 12:31:01 2010 +0100
@@ -63,8 +63,6 @@
 
 public: // Test functions
 
-    void UT_ConstructL();
-    
     void UT_ChannelL();
    
     void UT_ConnectL();
@@ -73,7 +71,6 @@
 
     void UT_ImplementationGroupProxy();
 
-    void UT_CheckForSendRecvAttributeL();
 
 public:
     void SetupL();
--- a/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/src/mussipcrplugintest.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/src/mussipcrplugintest.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -15,76 +15,25 @@
 *
 */
 
-
+#include <sipstrings.h>
 #include "musunittesting.h"
 #include "musmanagerstub.h"
 #include "mussipcrplugin.h"
 #include "mussipcrplugintest.h"
 #include "muslogger.h" 
 #include "musmanager.h"
-#include "mussettings.h"
 
 #include <alwaysonlinemanagercommon.h>
 #include <alwaysonlinemanagerclient.h>
 #include <digia/eunit/eunitmacros.h>
 #include <SipResolvedClient.h>    
-#include <sipstrings.h>
 #include <sipstrconsts.h>
-#include <SdpCodecStringPool.h>
-#include <sdpdocument.h>
+#include "FeatMgr.h"
+
 
 // Next row is to disable warning emerging from EUnit code.
 #pragma warn_illtokenpasting off
 
-_LIT8( KSdpSendOnly, "v=0\r\n\
-o=Inviter2008 63241204263093750 132223800 IN IP4 10.0.0.6\r\n\
-s=-\r\n\
-c=IN IP4 10.0.0.6\r\n\
-t=0 0\r\n\
-m=video 49152 RTP/AVP 98\r\n\
-a=sendonly\r\n\
-a=rtpmap:98 H264/90000\r\n" );
-
-_LIT8( KSdpSendRecv, "v=0\r\n\
-o=Inviter2008 63241204263093750 132223800 IN IP4 10.0.0.6\r\n\
-s=-\r\n\
-c=IN IP4 10.0.0.6\r\n\
-t=0 0\r\n\
-m=video 49152 RTP/AVP 98\r\n\
-a=sendrecv\r\n\
-a=rtpmap:98 H264/90000\r\n" );
-
-_LIT8( KSdpNoMedia, "v=0\r\n\
-o=Inviter2008 63241204263093750 132223800 IN IP4 10.0.0.6\r\n\
-s=-\r\n\
-c=IN IP4 10.0.0.6\r\n\
-t=0 0\r\n" );
-
-_LIT8( KSdpNoVideo, "v=0\r\n\
-o=Inviter2008 63241204263093750 132223800 IN IP4 10.0.0.6\r\n\
-s=-\r\n\
-c=IN IP4 10.0.0.6\r\n\
-t=0 0\r\n\
-m=audio 5000 RTP/AVP 106 8 0\r\n\
-a=sendrecv\r\n\
-a=rtpmap:106 AMR/8000\r\n" );
-
-_LIT8( KSdpVideoNoAttributes, "v=0\r\n\
-o=Inviter2008 63241204263093750 132223800 IN IP4 10.0.0.6\r\n\
-s=-\r\n\
-c=IN IP4 10.0.0.6\r\n\
-t=0 0\r\n\
-m=video 49152 RTP/AVP 98\r\n" );
-
-_LIT8( KSdpRecvOnly, "v=0\r\n\
-o=Inviter2008 63241204263093750 132223800 IN IP4 10.0.0.6\r\n\
-s=-\r\n\
-c=IN IP4 10.0.0.6\r\n\
-t=0 0\r\n\
-m=video 49152 RTP/AVP 98\r\n\
-a=recvonly\r\n\
-a=rtpmap:98 H264/90000\r\n" );
-
 
 // --------------------------------------------------------------------------
 // C++ constructor.
@@ -140,7 +89,6 @@
 void CMusSipCrPluginTest::SetupL(  )
     {
     iPlugin = CMusSipCrPlugin::NewL();
-    SIPStrings::OpenL();
     }
 
 
@@ -150,7 +98,6 @@
 // 
 void CMusSipCrPluginTest::Teardown(  )
     {
-    SIPStrings::Close();
     delete iPlugin;
     }
 
@@ -158,29 +105,6 @@
 
 // ------------------------- Test functions begin ---------------------------
 
-// --------------------------------------------------------------------------
-// 
-// --------------------------------------------------------------------------
-// 
-void CMusSipCrPluginTest::UT_ConstructL()
-    {
-    // 1. String pool was opend by us
-    EUNIT_ASSERT( iPlugin->iCloseStringPool );
-        
-    // 2. String pool was already opened by someone else, KErrAlreadyExists
-    delete iPlugin;
-    iPlugin = NULL;
-    SdpCodecStringPool::OpenL();
-    TRAPD( err, iPlugin = CMusSipCrPlugin::NewL() );
-    if ( err != KErrNone )
-        {
-        SdpCodecStringPool::Close();
-        User::Leave(err);
-        }
-    EUNIT_ASSERT( !iPlugin->iCloseStringPool );
-    SdpCodecStringPool::Close();    
-    }
-
 
 // --------------------------------------------------------------------------
 // 
@@ -188,6 +112,8 @@
 // 
 void CMusSipCrPluginTest::UT_ChannelL()
     {
+    SIPStrings::OpenL();
+    
     RPointerArray<CSIPHeaderBase> array;
     
     TUid response;
@@ -202,7 +128,7 @@
 
     EUNIT_ASSERT( response.iUid == CMusManager::ESipOptions )
 
-    // Everything is OK, 2-way video not supported
+    // Everything is OK
     CMusManager::SetAvailability( 
                  ( MultimediaSharing::TMusAvailabilityStatus ) KErrNone );
     
@@ -236,28 +162,53 @@
                        NULL );
     
     EUNIT_ASSERT( response.iUid == CMusManager::ESipInviteNotDesired )
-       
-    // 2-way video is supported and sendrecv not present in SDP    
-    MultimediaSharingSettings::iVideoDirection = MusSettingsKeys::ETwoWayVideo;    
+    //Feature Manager testing
+    FeatureManager::MultimediaSharingNotSupported();
+    response = iPlugin->ChannelL( 
+    		           SIPStrings::StringF( SipStrConsts::EOptions ),
+                       KNullDesC8(),
+                       array,
+                       KNullDesC8(),
+                       NULL );
+
+    EUNIT_ASSERT( response.iUid == CMusManager::ESipInviteNotDesired )
+    // Everything is OK
     CMusManager::SetAvailability( 
                  ( MultimediaSharing::TMusAvailabilityStatus ) KErrNone );
-
+    
     response = iPlugin->ChannelL( SIPStrings::StringF( SipStrConsts::EMessage ),
                        KNullDesC8(),
                        array,
-                       KSdpSendOnly(),
+                       KNullDesC8(),
                        NULL );
-
-    EUNIT_ASSERT( response.iUid == CMusManager::ESipInviteDesired )
+    
+    EUNIT_ASSERT( response.iUid == CMusManager::ESipInviteNotDesired )
     
-    // 2-way video is supported and sendrecv is present in SDP    
+    // Server is shut down                     
+    CMusManager::SetAvailability( MultimediaSharing::EErrServerShutDown );
+    
     response = iPlugin->ChannelL( SIPStrings::StringF( SipStrConsts::EMessage ),
                        KNullDesC8(),
                        array,
-                       KSdpSendRecv(),
+                       KNullDesC8(),
                        NULL );
-        
-    EUNIT_ASSERT( response.iUid == CMusManager::ESipInviteDesired2WayVideo )
+
+    EUNIT_ASSERT( response.iUid == CMusManager::ESipInviteNotDesired )
+
+    // Mus is not supported
+    CMusManager::SetAvailability(
+            ( MultimediaSharing::TMusAvailabilityStatus ) KErrNotSupported );
+    
+    response = iPlugin->ChannelL( SIPStrings::StringF( SipStrConsts::EMessage ),
+                       KNullDesC8(),
+                       array,
+                       KNullDesC8(),
+                       NULL );
+    
+    EUNIT_ASSERT( response.iUid == CMusManager::ESipInviteNotDesired )
+    FeatureManager::MultimediaSharingSupported();  
+    SIPStrings::Close();                       
+                        
     }
 
 
@@ -318,45 +269,6 @@
     }
 
 
-// --------------------------------------------------------------------------
-// 
-// --------------------------------------------------------------------------
-// 
-void CMusSipCrPluginTest::UT_CheckForSendRecvAttributeL()
-    {
-    CSdpDocument* sdpDocument;
-    TBool sendRecv;
-    
-    // 1. SDP doesn't have a single media field
-    sdpDocument = CSdpDocument::DecodeLC( KSdpNoMedia() );
-    sendRecv = iPlugin->CheckForSendRecvAttributeL( sdpDocument->MediaFields() );
-    CleanupStack::PopAndDestroy( sdpDocument );
-    EUNIT_ASSERT( !sendRecv );
-    
-    // 2. SDP has audio field, but no video
-    sdpDocument = CSdpDocument::DecodeLC( KSdpNoVideo() );
-    sendRecv = iPlugin->CheckForSendRecvAttributeL( sdpDocument->MediaFields() );
-    CleanupStack::PopAndDestroy( sdpDocument );
-    EUNIT_ASSERT( !sendRecv );
-    
-    // 3. SDP has video field without any attributes
-    sdpDocument = CSdpDocument::DecodeLC( KSdpVideoNoAttributes() );
-    sendRecv = iPlugin->CheckForSendRecvAttributeL( sdpDocument->MediaFields() );
-    CleanupStack::PopAndDestroy( sdpDocument );
-    EUNIT_ASSERT( sendRecv );
-        
-    // 4. SDP has video with "sendrecv" attribute
-    sdpDocument = CSdpDocument::DecodeLC( KSdpSendRecv() );
-    sendRecv = iPlugin->CheckForSendRecvAttributeL( sdpDocument->MediaFields() );
-    CleanupStack::PopAndDestroy( sdpDocument );
-    EUNIT_ASSERT( sendRecv );    
-    
-    // 5. SDP has video with "recvonly" attribute
-    sdpDocument = CSdpDocument::DecodeLC( KSdpRecvOnly() );
-    sendRecv = iPlugin->CheckForSendRecvAttributeL( sdpDocument->MediaFields() );
-    CleanupStack::PopAndDestroy( sdpDocument );
-    EUNIT_ASSERT( !sendRecv );
-    }
 
 
 //  TEST TABLE
@@ -365,13 +277,6 @@
     CMusSipCrPluginTest,
     "CMusSipCrPluginTest",
     "CMusSipCrPluginTest" )
-   
-EUNIT_TEST(
-    "ConstructL - test",
-    "CMusSipCrPluginTest",
-    "UT_ConstructL",
-    "FUNCTIONALITY",
-    SetupL, UT_ConstructL, Teardown)
 
 EUNIT_TEST(
     "CMusSipCrPluginTest",
@@ -401,12 +306,5 @@
     "FUNCTIONALITY",
     SetupL, UT_ImplementationGroupProxy, Teardown)
     
-EUNIT_TEST(
-    "CheckForSendRecvAttribute - stest",
-    "CMusSipCrPluginTest",
-    "UT_CheckForSendRecvAttribute",
-    "FUNCTIONALITY",
-    SetupL, UT_CheckForSendRecvAttributeL, Teardown)
-    
 EUNIT_END_TEST_TABLE
 
--- a/mmshplugins/mmshwpadapterplugin/src/muswpitem.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshwpadapterplugin/src/muswpitem.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -210,7 +210,7 @@
         }
     else if ( aValue == KMusWpActivationConditionInHome() )
         {
-        iActivationCondition = MusSettingsKeys::EActiveInHomeNetworks;
+        iActivationCondition = MusSettingsKeys::EAlwaysActive;
         }
     else if ( aValue == KMusWpActivationConditionNever )
         {
--- a/mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -15,6 +15,6 @@
 *
 */
 
-PRJ_MMPFILES
+PRJ_TESTMMPFILES
 
 ut_muswpadapter.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/group/ut_muswpadapter.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+
+;Languages
+&EN
+
+;Header
+#{"EUnit: MMSHWPAda"},(0x01700000),1,0,0
+
+(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique vendor name
+:"Nokia"
+
+;DLL files
+"\epoc32\release\armv5\urel\ut_muswpadapter.dll"-"c:\sys\bin\ut_muswpadapter.dll"
--- a/mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/src/ut_muswpitem.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/src/ut_muswpitem.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -277,7 +277,7 @@
                   MusSettingsKeys::EAlwaysActive )
     iWpItem->SetActivationCondition( KMusWpParamValue2() ); // Home
     EUNIT_ASSERT( iWpItem->iActivationCondition == 
-                  MusSettingsKeys::EActiveInHomeNetworks )
+                  MusSettingsKeys::EAlwaysActive )
     iWpItem->SetActivationCondition( KMusWpParamValue3() ); // Never
     EUNIT_ASSERT( iWpItem->iActivationCondition == 
                   MusSettingsKeys::ENever )
--- a/rom/multimediasharing.iby	Tue Aug 31 15:12:07 2010 +0300
+++ b/rom/multimediasharing.iby	Wed Sep 01 12:31:01 2010 +0100
@@ -21,62 +21,52 @@
 #define __MULTIMEDIASHARING_IBY__
 
 
-#if defined(__MULTIMEDIA_SHARING) || defined(__CS_VIDEO_TELEPHONY)
-
-/*========================================================================
-* Livecomms UI dll for both MUS and VT
-* ========================================================================
-*/
-file=ABI_DIR\UREL\livecommsui.dll SHARED_LIB_DIR\livecommsui.dll
+#ifdef __MULTIMEDIA_SHARING
 
-/*========================================================================
-* MUS SIS stub
-* ========================================================================
-*/
-data=DATAZ_\system\install\multimediasharing_stub.sis    system\install\multimediasharing_stub.sis
-
-#endif
-
-
-#ifdef __MULTIMEDIA_SHARING
 
 /*========================================================================
 * MUS UI
 * ========================================================================
 */
-
-//file=ABI_DIR\UREL\musui.exe PROGRAMS_DIR\musui.exe
-//data=DATAZ_\resource\apps\musui.rsc \resource\apps\musui.rsc
-//data=DATAZ_\private\10003a3f\import\apps\musui_reg.rsc \private\10003a3f\import\apps\musui_reg.rsc
+S60_APP_EXE(musui)
+S60_APP_AIF_ICONS(musui)
+data=DATAZ_\BITMAP_DIR\musuiicons.mif BITMAP_DIR\musuiicons.mif
+data=DATAZ_\BITMAP_DIR\musuitoolbaricons.mif BITMAP_DIR\musuitoolbaricons.mif
+data=ZPRIVATE\10003A3F\APPS\musui_reg.rsc PRIVATE\10003A3F\IMPORT\APPS\musui_reg.rsc
+#ifndef RD_APPS_TO_EXES
+SCALABLE_IMAGE(System\Apps\musui,System\Apps\musui,musui)
+#else
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,musui)
+#endif
 
 
 /*========================================================================
 * MUS General
 * ========================================================================
 */
-//file=ABI_DIR\UREL\musmanagerserver.exe          PROGRAMS_DIR\musmanagerserver.exe
-//file=ABI_DIR\UREL\musmanagerclient.dll          SHARED_LIB_DIR\musmanagerclient.dll
-//file=ABI_DIR\UREL\musindicator.dll              SHARED_LIB_DIR\musindicator.dll
-//data=DATAZ_\private\1028238D\tone.amr           private\1028238D\tone.amr
-//data=DATAZ_\BITMAP_DIR\musindicatoricons.mif    BITMAP_DIR\musindicatoricons.mif
-//data=DATAZ_\BITMAP_DIR\musindicatoricons.mbm    BITMAP_DIR\musindicatoricons.mbm
+file=ABI_DIR\urel\musmanagerserver.exe          PROGRAMS_DIR\musmanagerserver.exe
+file=ABI_DIR\urel\musmanagerclient.dll          SHARED_LIB_DIR\musmanagerclient.dll
+file=ABI_DIR\urel\musengine.dll                 SHARED_LIB_DIR\musengine.dll
+file=ABI_DIR\urel\musindicator.dll              SHARED_LIB_DIR\musindicator.dll
+data=DATAZ_\private\1028238D\tone.amr           private\1028238D\tone.amr
+data=DATAZ_\BITMAP_DIR\musindicatoricons.mif    BITMAP_DIR\musindicatoricons.mif
+data=DATAZ_\BITMAP_DIR\musindicatoricons.mbm    BITMAP_DIR\musindicatoricons.mbm
 
 /*========================================================================
 * MUS Ecom Plugins
 * ========================================================================
 */
-//ECOM_PLUGIN(musaoplugin.dll,musaoplugin.rsc)
+ECOM_PLUGIN(musaoplugin.dll,musaoplugin.rsc)
 
-//ECOM_PLUGIN(musaiwprovider.dll,musaiwprovider.rsc)
-//ECOM_PLUGIN(musavailabilityplugin.dll,musavailabilityplugin.rsc)
-//ECOM_PLUGIN(muswpadapter.dll,muswpadapter.rsc)
+ECOM_PLUGIN(musaiwprovider.dll,musaiwprovider.rsc)
+ECOM_PLUGIN(musavailabilityplugin.dll,musavailabilityplugin.rsc)
+ECOM_PLUGIN(muswpadapter.dll,muswpadapter.rsc)
 //ECOM_PLUGIN(mmcctranscoder.dll,10282896.rsc)
-//ECOM_PLUGIN(musengineplugin.dll,musengineplugin.rsc)
 
 // In __VOIP terminals, MuS uses same client resolver plugin as VoIP.
 // In all other terminals, a separate resolver plugin is needed 
 #ifndef __VOIP
-//ECOM_PLUGIN(mussipcrplugin.dll,mussipcrplugin.rsc)
+ECOM_PLUGIN(mussipcrplugin.dll,mussipcrplugin.rsc)
 #endif
 
 
@@ -84,8 +74,15 @@
 * MUS Settings UI
 * ========================================================================
 */
-//ECOM_PLUGIN( mussettingsui.dll,mussettingsui.rsc )
-//data=DATAZ_\BITMAP_DIR\mussettingsplugin.mif BITMAP_DIR\mussettingsplugin.mif
+ECOM_PLUGIN( mussettingsui.dll,mussettingsui.rsc )
+data=DATAZ_\BITMAP_DIR\mussettingsplugin.mif BITMAP_DIR\mussettingsplugin.mif
+
+
+/*========================================================================
+* MUS SIS stub
+* ========================================================================
+*/
+data=DATAZ_\system\install\multimediasharing_stub.sis    system\install\multimediasharing_stub.sis
 
 
 /*========================================================================
@@ -95,7 +92,7 @@
 * in centralrepository. Hence central repositary uid should be specified as proxy data owner.
 * ========================================================================
 */
-//data=DATAZ_\private\1028238D\backup_registration.xml     private\1028238D\backup_registration.xml
+data=DATAZ_\private\1028238D\backup_registration.xml     private\1028238D\backup_registration.xml
 
 #endif
 
Binary file rom/multimediasharing_stub.SIS has changed
--- a/rom/multimediasharingresources.iby	Tue Aug 31 15:12:07 2010 +0300
+++ b/rom/multimediasharingresources.iby	Wed Sep 01 12:31:01 2010 +0100
@@ -20,46 +20,37 @@
 #ifndef __MULTIMEDIASHARINGRESOURCES_IBY__
 #define __MULTIMEDIASHARINGRESOURCES_IBY__
 
-#if defined(__MULTIMEDIA_SHARING) || defined(__CS_VIDEO_TELEPHONY)
-data=DATAZ_\data\others\lcvtview.docml data\others\lcvtview.docml
-#endif
-
 #ifdef __MULTIMEDIA_SHARING
 
 /*========================================================================
-* MUS UI DOCML
+* MUS UI
 * ========================================================================
 */
-data=DATAZ_\data\others\lcidleview.docml data\others\lcidleview.docml
-data=DATAZ_\data\others\lcreceiveview.docml data\others\lcreceiveview.docml
-data=DATAZ_\data\others\lcsendview.docml data\others\lcsendview.docml
-data=DATAZ_\data\others\lctwowayview.docml data\others\lctwowayview.docml
-data=DATAZ_\data\others\lcreceiveonlyview.docml data\others\lcreceiveonlyview.docml
-
+S60_APP_RESOURCE( musui )
 
 /*========================================================================
 * MUS Settings UI
 * ========================================================================
 */
-//data=DATAZ_\RESOURCE_FILES_DIR\mussettingsuirsc.rsc RESOURCE_FILES_DIR\mussettingsuirsc.rsc
+data=DATAZ_\RESOURCE_FILES_DIR\mussettingsuirsc.rsc RESOURCE_FILES_DIR\mussettingsuirsc.rsc
 
 /*========================================================================
 * MUS wireless provisioning adapter
 * ========================================================================
 */
-//data=DATAZ_\RESOURCE_FILES_DIR\muswpadapterresource.rsc RESOURCE_FILES_DIR\muswpadapterresource.rsc
+data=DATAZ_\RESOURCE_FILES_DIR\muswpadapterresource.rsc RESOURCE_FILES_DIR\muswpadapterresource.rsc
 
 /*========================================================================
 * MUS AIW Provider Ecom Plugin
 * ========================================================================
 */
-//data=DATAZ_\RESOURCE_FILES_DIR\musaiwproviderui.rsc RESOURCE_FILES_DIR\musaiwproviderui.rsc
+data=DATAZ_\RESOURCE_FILES_DIR\musaiwproviderui.rsc RESOURCE_FILES_DIR\musaiwproviderui.rsc
 
 /*========================================================================
 * MUS Indicator dll
 * ========================================================================
 */
-//data=DATAZ_\RESOURCE_FILES_DIR\musindicator.rsc RESOURCE_FILES_DIR\musindicator.rsc
+data=DATAZ_\RESOURCE_FILES_DIR\musindicator.rsc RESOURCE_FILES_DIR\musindicator.rsc
 
 #endif
 
--- a/sysdef_1_5_1.dtd	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
- <!ELEMENT SystemDefinition (systemModel?, build?)>
- <!ATTLIST SystemDefinition
-  name CDATA #REQUIRED
-  schema CDATA #REQUIRED>
- <!ELEMENT systemModel (layer+)>
- <!ELEMENT layer (logicalset* | module*)*>
- <!ATTLIST layer
-  name CDATA #REQUIRED
-  levels CDATA #IMPLIED
-  span CDATA #IMPLIED>
- <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalset name CDATA #REQUIRED>
- <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalsubset name CDATA #REQUIRED>
- <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
- <!ATTLIST module
-  name CDATA #REQUIRED
-  level CDATA #IMPLIED>
- <!ELEMENT component (unit* | package* | prebuilt*)*>
- <!ATTLIST component name CDATA #REQUIRED>
- <!ELEMENT unit EMPTY>
- <!ATTLIST unit
-  unitID ID #REQUIRED
-  name CDATA #REQUIRED
-  mrp CDATA #REQUIRED
-  filter CDATA #IMPLIED
-  bldFile CDATA #REQUIRED
-  priority CDATA #IMPLIED
-  contract CDATA #IMPLIED
-  proFile CDATA #IMPLIED
-  qmakeArgs CDATA #IMPLIED>
- <!ELEMENT package EMPTY>
- <!ATTLIST package
-  name CDATA #REQUIRED
-  mrp CDATA #REQUIRED
-  filter CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT prebuilt EMPTY>
- <!ATTLIST prebuilt
-  name CDATA #REQUIRED
-  version CDATA #REQUIRED
-  late (Y|N) #IMPLIED
-  filter CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
- <!ELEMENT unitList (unitRef+)>
- <!ATTLIST unitList
-  name ID #REQUIRED
-  description CDATA #REQUIRED>
- <!ELEMENT unitRef EMPTY>
- <!ATTLIST unitRef unit IDREF #REQUIRED>
- <!ELEMENT targetList EMPTY>
- <!ATTLIST targetList
-  name ID #REQUIRED
-  description CDATA #REQUIRED
-  target IDREFS #REQUIRED>
- <!ELEMENT target EMPTY>
- <!ATTLIST target
-  name ID #REQUIRED
-  abldTarget CDATA #REQUIRED
-  description CDATA #REQUIRED>
- <!ELEMENT option EMPTY>
- <!ATTLIST option
-  name ID #REQUIRED
-  abldOption CDATA #REQUIRED
-  description CDATA #REQUIRED
-  enable (Y | N | y | n) #REQUIRED>
- <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
- <!ATTLIST configuration
-  name ID #REQUIRED
-  description CDATA #REQUIRED
-  filter CDATA #REQUIRED>
- <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
- <!ELEMENT unitListRef EMPTY>
- <!ATTLIST unitListRef unitList IDREF #REQUIRED>
- <!ELEMENT layerRef EMPTY>
- <!ATTLIST layerRef layerName CDATA #REQUIRED>
- <!ELEMENT buildLayer EMPTY>
- <!ATTLIST buildLayer
-  command CDATA #REQUIRED
-  targetList IDREFS #IMPLIED
-  unitParallel (Y | N | y | n) #REQUIRED
-  targetParallel (Y | N | y | n) #IMPLIED>
- <!ELEMENT specialInstructions EMPTY>
- <!ATTLIST specialInstructions
-  name CDATA #REQUIRED
-  cwd CDATA #REQUIRED
-  command CDATA #REQUIRED>  
--- a/tsrc/CenrepEditor/Src/cenrepeditorappui.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/CenrepEditor/Src/cenrepeditorappui.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -63,7 +63,8 @@
         {
         iTabGroup = (CAknTabGroup*) iDecoratedTabGroup->DecoratedControl();
         }    
-    iPhoneResources =  CPhoneResources::NewL();
+    iPhoneResources =  CPhoneResources::NewL();  
+    iPhoneResources->ReadL();      
       
    	CCenrepEditorView1*   view1 = new (ELeave) CCenrepEditorView1;
     CleanupStack::PushL( view1 );
@@ -71,7 +72,8 @@
     AddViewL( view1 );      // transfer ownership to CAknViewAppUi
     CleanupStack::Pop();    // view1
          
-    iOtherResources =  COtherResources::NewL();
+    iOtherResources =  COtherResources::NewL();    
+    iOtherResources->ReadL(); 
 
     CCenrepEditorView2*	view2 = new (ELeave) CCenrepEditorView2;
     CleanupStack::PushL( view2 );
--- a/tsrc/CenrepEditor/Src/cenrepeditorlistbox2.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/CenrepEditor/Src/cenrepeditorlistbox2.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -16,9 +16,10 @@
 */
 #include <aknnotewrappers.h>
 #include <akntextsettingpage.h> 
+#include "cenrepeditorListbox2.h"
 
 #include "cenrepeditorListbox2.h"
-
+#include <e32debug.h>
 
 CAknSettingItem* COtherResourcesListbox::CreateSettingItemL( TInt aIdentifier )
     {
@@ -48,6 +49,9 @@
     case EOtherResourceSessionSetupMethod:        
         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iSessionSetupMethod);
         break;
+    case EOtherRResourcePrivacyVariationMode:
+        settingItem=ConstructByValueL( aIdentifier, iOtherResources->iPrivacyVariation ); 
+        break;  
     case EOtherResourceAutoRecord:        
         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iAutoRecord);
         break;
@@ -77,28 +81,8 @@
         break;   
     case EOtherResourceEncodingDevice:
         settingItem = new (ELeave) 
-            CAknTextSettingItem( aIdentifier, iOtherResources->iEncodingDeviceStr );
-        settingItem->SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed);
-        break;        
-    case EOtherResourceAllowOnlyWithActiveCSCall:        
-        settingItem=ConstructByValueL( aIdentifier,iOtherResources->iOnlyWithActiveCSCall );
-        break;    
-    case EOtherResourceAllowOnlyIn3GNetwork:        
-        settingItem=ConstructByValueL( aIdentifier,iOtherResources->iOnlyIn3GNetwork );
-        break;
-    case EOtherResourceCameraUsage:        
-        settingItem=ConstructByValueL( aIdentifier,iOtherResources->iCameraUsage );
-        break;
-    case EOtherResourceVideoDirection:        
-        settingItem=ConstructByValueL( aIdentifier,iOtherResources->iVideoDirection );
-        break;
-    case EOtherResourceVideoBandwidth:        
-        settingItem = new (ELeave) 
-            CAknIntegerEdwinSettingItem( aIdentifier,iOtherResources->iVideoBandwidth );
-        break;
-    case EOtherResourceFastMode:        
-        settingItem = ConstructByValueL( aIdentifier, iOtherResources->iFastMode );
-        break;
+           CAknTextSettingItem( aIdentifier, iOtherResources->iEncodingDeviceStr ); 
+    	break;             
     default:
         break;
         }
@@ -120,9 +104,47 @@
     }
 
 
-CAknSettingItem* COtherResourcesListbox::ConstructByValueL( 
-    TInt aIdentifier,
-    TInt& aVal)
+// ------------------------------------------------------------------
+// CPhoneResourcesListbox::ConstructByValueL( aIdentifier, )
+// ------------------------------------------------------------------
+//
+
+CAknSettingItem* COtherResourcesListbox::ConstructByValueL( TInt aIdentifier,  
+                                            TInt& aVal )
     {    
-    return new (ELeave) CAknEnumeratedTextPopupSettingItem(aIdentifier,aVal);
+    CAknSettingItem* settingItem = NULL ;
+    if(aVal<0 )
+        {        
+        settingItem = new (ELeave) CAknSettingItem(aIdentifier);
+        settingItem->SetProtectionState(CAknSettingItem::ESettingItemProtected);
+        }
+    else
+        {
+        settingItem = new (ELeave) 
+            CAknEnumeratedTextPopupSettingItem(aIdentifier,aVal);
+        }
+    return settingItem ;
     }
+
+
+void COtherResourcesListbox::EditItemL(TInt aIndex, TBool aCalledFromMenu)
+    {
+    CAknSettingItemList::EditItemL(aIndex, aCalledFromMenu);
+    
+    CAknSettingItem* currentItem = SettingItemArray()->At(aIndex);
+    if ( currentItem->Identifier() == EOtherResourceEncodingDevice )
+        {
+        TLex lex( currentItem->SettingTextL() );
+        TUint uid;
+        TInt err = lex.Val(uid, EHex);
+        
+        if ( (err != KErrNone) || !lex.Eos() )
+            {
+            currentItem->LoadL();
+            currentItem->UpdateListBoxTextL();
+
+            CAknWarningNote* warningNote = new (ELeave) CAknWarningNote;
+            warningNote->ExecuteLD(_L("Invalid value"));
+            }
+         }
+    }
--- a/tsrc/CenrepEditor/Src/cenrepeditormodel.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/CenrepEditor/Src/cenrepeditormodel.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -40,6 +40,7 @@
 
 CPhoneResources* CPhoneResources::NewLC()
     {
+    // create a new expense object
     CPhoneResources* self = new (ELeave) CPhoneResources();
     CleanupStack::PushL(self);
     self->ConstructL();
@@ -53,79 +54,112 @@
     return self;
     }
 
-CPhoneResources::~CPhoneResources()
-    {
-    }
-
 void CPhoneResources::ConstructL()
 	{
-    // If a P&S key is not found, set it to KErrNotFound.
-	// This is why the RProperty::Get return values are not handled below.
-	iCameraAvailability = KErrNotFound;
-    RProperty::Get(NMusResourceApi::KCategoryUid, 
-                   NMusResourceApi::KCameraAvailability, 
-                   iCameraAvailability);
-
-    iKeypadAvailability = KErrNotFound;
-    RProperty::Get(NMusResourceApi::KCategoryUid, 
-                   NMusResourceApi::KKeypadAvailability, 
-                   iKeypadAvailability);
+    iCameraAvailability = -1;
+    iKeypadAvailability = -1 ;
+    iVideoPlayerAvailability = -1;
+    iCameraInformation = -1;
+    iKodiakPhoneCall = -1;
+    iDummy = 1; // just a postive value , dirty idea but just works at this time 
+	}
 
-    iVideoPlayerAvailability = KErrNotFound;  
-    RProperty::Get(NMusResourceApi::KCategoryUid, 
-                   NMusResourceApi::KVideoPlayerAvailability, 
-                   iVideoPlayerAvailability );
-
-    iCameraInformation = KErrNotFound;    
-    RProperty::Get(NMusResourceApi::KCategoryUid, 
-                   NMusResourceApi::KCameraInformation, 
-                   iCameraInformation );   
-    
-    iKodiakPhoneCall = KErrNotFound;
-    TInt err = RProperty::Get(KPSUidCtsyCallInformation, 
-                              KCTsyKodiakPtt, 
-                              iKodiakPhoneCall );
-    if (err != KErrNone)
+void CPhoneResources::ReadL()
+	{
+    TInt err = KErrNone;
+            // 1. camera property
+    err = RProperty::Get( NMusResourceApi::KCategoryUid, 
+                             NMusResourceApi::KCameraAvailability, 
+                              iCameraAvailability);
+    if(err)HandleError(ETrue,err,_L("CameraAvailability"));
+            // 2. keypad property
+    err = RProperty::Get( NMusResourceApi::KCategoryUid, 
+                               NMusResourceApi::KKeypadAvailability, 
+                               iKeypadAvailability );
+    if(err)HandleError(ETrue , err,_L("KeypadAvailability"));
+            // 3. video player property
+    err = RProperty::Get( NMusResourceApi::KCategoryUid, 
+                               NMusResourceApi::KVideoPlayerAvailability, 
+                               iVideoPlayerAvailability );
+    if(err)HandleError( ETrue, err ,_L("VideoPlayerAvailability"));
+            // 3. video player property
+    err = RProperty::Get( NMusResourceApi::KCategoryUid, 
+                               NMusResourceApi::KCameraInformation, 
+                               iCameraInformation );
+    if(err)HandleError( ETrue, err ,_L("CameraInformation"));    
+    err = RProperty::Get( KPSUidCtsyCallInformation, 
+                               KCTsyKodiakPtt, 
+                               iKodiakPhoneCall );
+    if(err)
         {  
         iKodiakPhoneCall = EPSCTsyKodiakPttNotActive;        
         RProperty::Define(KPSUidCtsyCallInformation,KCTsyKodiakPtt,EPSCTsyKodiakPttNotActive);
-        }
+        }   
+	}
+
+
+CPhoneResources::~CPhoneResources()
+	{
 	}
 
 void CPhoneResources::SaveL()
     {
-    SetValueL(NMusResourceApi::KCategoryUid, 
-              NMusResourceApi::KCameraAvailability, 
-              iCameraAvailability);
-
-    SetValueL(NMusResourceApi::KCategoryUid, 
-              NMusResourceApi::KKeypadAvailability, 
-              iKeypadAvailability);
+    //TInt err = KErrNone;
 
-    SetValueL(NMusResourceApi::KCategoryUid, 
-              NMusResourceApi::KVideoPlayerAvailability, 
-              iVideoPlayerAvailability);
-
-    SetValueL(NMusResourceApi::KCategoryUid, 
-              NMusResourceApi::KCameraInformation, 
-              iCameraInformation);
-
-    SetValueL(KPSUidCtsyCallInformation, 
-              KCTsyKodiakPtt, 
-              iKodiakPhoneCall);                
+    User::LeaveIfError(SetValueL( NMusResourceApi::KCategoryUid, 
+                             NMusResourceApi::KCameraAvailability, 
+                              iCameraAvailability));
+    //if(err)HandleError( EFalse, err ,_L("CameraAvailability"));
+            // 2. keypad property
+    User::LeaveIfError(SetValueL( NMusResourceApi::KCategoryUid, 
+                               NMusResourceApi::KKeypadAvailability, 
+                               iKeypadAvailability ));
+    //if(err)HandleError(EFalse, err,_L("KeypadAvailability"));
+          // 3. video player property
+    User::LeaveIfError(SetValueL( NMusResourceApi::KCategoryUid, 
+                               NMusResourceApi::KVideoPlayerAvailability, 
+                               iVideoPlayerAvailability ));
+    //if(err)HandleError(EFalse, err,_L("VideoPlayerAvailability"));
+          // 3. video player property
+    User::LeaveIfError(SetValueL( NMusResourceApi::KCategoryUid, 
+                               NMusResourceApi::KCameraInformation, 
+                                iCameraInformation ));
+    //if(err)HandleError(EFalse, err,_L("CameraInformation"));
+             // 4. Kodiak PS Key    
+    User::LeaveIfError(SetValueL( KPSUidCtsyCallInformation, 
+                               KCTsyKodiakPtt, 
+                                iKodiakPhoneCall ));
+    //if(err)HandleError( EFalse, err ,_L("KodiakPSKeyInformation"));                 
     }
 
-void CPhoneResources::SetValueL(TUid aCategory, TUint aKey, TInt aValue)
+TInt CPhoneResources::SetValueL(TUid aCategory, TUint aKey, TInt aValue)
+    {
+    if(aValue<0)return KErrNone; // dont care if the key is not read intially
+    return RProperty::Set( aCategory, aKey, aValue );
+    }
+
+
+void CPhoneResources::HandleError(TBool aType ,TInt aError , TPtrC aKeyName )
     {
-    // Don't care if the key is not found initially
-    if (aValue >= 0)
+    CAknErrorNote *dlg = new CAknErrorNote(ETrue);
+    TBuf<100> buf;
+    if(aType)
         {
-        User::LeaveIfError(RProperty::Set(aCategory, aKey, aValue));
+        buf.Append(_L("Unable to Read Key "));
         }
+    else
+        {
+        buf.Append(_L("Unable to Save "));
+        }
+    buf.Append(aKeyName);
+    buf.Append(_L(" Error "));
+    buf.AppendNum(aError);
+    dlg->ExecuteLD(buf); 
     }
 
 COtherResources* COtherResources::NewLC()
     {
+    // create a new expense object
     COtherResources* self = new (ELeave) COtherResources();
     CleanupStack::PushL(self);
     self->ConstructL();
@@ -141,157 +175,185 @@
 
 void COtherResources::ConstructL()
     {
-    iRepository = CRepository::NewL(MusSettingsKeys::KRepositoryUid);
-    
-    // If a CenRep key is not found, set it to KErrNotFound.
-    // This is why the CRepository::Get return values are not handled below.
-    iActivation = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KActivation, iActivation);
-    
-    iOperatorVariant = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KOperatorVariant,iOperatorVariant);
-    
-    iAuditoryNotification = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KAuditoryNotification, iAuditoryNotification);
-    
-    iPopupNotification = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KPopupNotification, iPopupNotification);
-    
-    iPopupNotificationType = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KPopupNotificationType, iPopupNotificationType);
-    
-    iEdgeDtmSupport = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KEdgeDtmSupport, iEdgeDtmSupport);
-    
-    iSessionSetupMethod = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KForceInternetSignaling, iSessionSetupMethod);
-    
-    iAutoRecord = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KAutoRecord, iAutoRecord);
-    
-    iVideoLocation = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KVideoLocation, iVideoLocation);
-    
-    iSipProfileId = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KSipProfileId, iSipProfileId);
-    
-    iUiOrientation = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KUiOrientation, iUiOrientation);
-    
-    iCapabilityQuery = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KCapabilityQuery, iCapabilityQuery);
-    
-    iProductModeVariation = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KProductModeVariation, iProductModeVariation);    
-    
-    iRepository->Get(MusSettingsKeys::KEncoderConfigurationInfo, iEncoderInfo );
-    
-    iEncodingDevice = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KEncodingDevice, iEncodingDevice );
-    iEncodingDeviceStr.Zero();
-    if ( iEncodingDevice >= 0 )
-        {
-        iEncodingDeviceStr.AppendNum(iEncodingDevice, EHex); 
-        }
-    
-    iOnlyWithActiveCSCall = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KAllowOnlyWithActiveCSCall, iOnlyWithActiveCSCall);
-    
-    iOnlyIn3GNetwork = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KAllowOnlyIn3GNetwork, iOnlyIn3GNetwork); 
-    
-    iCameraUsage = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KCameraUsage, iCameraUsage); 
-    
-    iVideoDirection = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KVideoDirection, iVideoDirection);
-    
-    iVideoBandwidth = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KVideoBandwidth, iVideoBandwidth);
-    
-    iFastMode = KErrNotFound;
-    iRepository->Get(MusSettingsKeys::KFastStartupMode, iFastMode);
+    iActivation = -1 ;
+    iOperatorVariant = -1 ;
+    iAuditoryNotification = -1;
+    iPopupNotification = -1 ;
+    iPopupNotificationType = -1 ;
+    iEdgeDtmSupport = -1 ;
+    iSessionSetupMethod = -1 ;
+    iAutoRecord = -1 ;
+    iVideoLocation = -1 ;
+    iSipProfileId = -1 ;
+    iUiOrientation = -1 ;
+    iCapabilityQuery = -1;  
+    iProductModeVariation=-1;
+    iEncodingDevice = -1;
+    iPrivacyVariation = -1;
+    iDummy = 1; // just a postive value      
     }
 
+void COtherResources::ReadL()
+	{     
+    
+    TRAPD(err,ReadCRKeyValuesL());
+    if(err) HandleError (ETrue,err,_L("Read Error"));
+    
+	}
+	
+void COtherResources::ReadCRKeyValuesL()
+{
+
+	TInt err=KErrNone;
+    CRepository* cr = NULL ;
+    TRAP(err,cr = CRepository::NewL( MusSettingsKeys::KRepositoryUid ));
+    cr->CleanupCancelTransactionPushL();
+    if(err)
+        {
+        CAknErrorNote *dlg = new CAknErrorNote(ETrue);
+        dlg->ExecuteLD(_L(\
+                   "Unable to Construct CRepository for UID 0x1028238B"));        
+        return ; // dont leave 
+        }    
+   
+    ReadKeyValueL( cr, MusSettingsKeys::KActivation,iActivation ); 
+	ReadKeyValueL( cr, MusSettingsKeys::KOperatorVariant,iOperatorVariant);
+  	ReadKeyValueL( cr, MusSettingsKeys::KAuditoryNotification, iAuditoryNotification);
+   	ReadKeyValueL( cr, MusSettingsKeys::KPopupNotification, iPopupNotification);
+    ReadKeyValueL( cr, MusSettingsKeys::KPopupNotificationType, iPopupNotificationType);
+    ReadKeyValueL( cr, MusSettingsKeys::KEdgeDtmSupport, iEdgeDtmSupport);
+    ReadKeyValueL( cr, MusSettingsKeys::KForceInternetSignaling, iSessionSetupMethod);
+   	ReadKeyValueL( cr, MusSettingsKeys::KAutoRecord, iAutoRecord);
+	ReadKeyValueL( cr, MusSettingsKeys::KVideoLocation, iVideoLocation);
+ 	ReadKeyValueL( cr, MusSettingsKeys::KSipProfileId, iSipProfileId);
+  	ReadKeyValueL( cr, MusSettingsKeys::KUiOrientation, iUiOrientation);    
+ 	ReadKeyValueL( cr, MusSettingsKeys::KCapabilityQuery, iCapabilityQuery);     	
+ 	ReadKeyValueL( cr, MusSettingsKeys::KProductModeVariation, iProductModeVariation);    
+ 	ReadKeyValueL( cr, MusSettingsKeys::KEncoderConfigurationInfo, iEncoderInfo );
+ 	ReadKeyValueL( cr, MusSettingsKeys::KEncodingDevice, iEncodingDevice );
+ 	ReadKeyValueL( cr, MusSettingsKeys::KPrivacyExchange, iPrivacyVariation ); 
+
+ 	iEncodingDeviceStr.Zero();
+ 	iEncodingDeviceStr.AppendNum(iEncodingDevice, EHex); 	    
+ 	
+ 	CleanupStack::PopAndDestroy(cr);
+   	delete cr;
+
+}
+
+
 COtherResources::~COtherResources()
-    {
-    delete iRepository;
-    }
+	{
+	}
 
 void COtherResources::SaveL()
     {
-    User::LeaveIfError(
-        iRepository->StartTransaction(CRepository::EConcurrentReadWriteTransaction));    
-    iRepository->CleanupCancelTransactionPushL();
+   
+   	TRAPD(err,SaveCRKeyValuesL());
+   	if(err) HandleError (ETrue,err,_L("Save Error"));
+    
+    }
+
+void COtherResources::SaveCRKeyValuesL()
+    {
+	CRepository* cr = NULL ;
+    TRAPD(err,cr = CRepository::NewL( MusSettingsKeys::KRepositoryUid ));        
+    cr->CleanupCancelTransactionPushL();
+    if(err)
+        {
+        CAknErrorNote *dlg = new CAknErrorNote(ETrue);
+        dlg->ExecuteLD(_L(\
+                   "Unable to Construct CRepository for UID 0x1028238B"));  
+        User::Leave(err);        
+        }      
+    SetKeyValueL( cr,MusSettingsKeys::KActivation, iActivation);
+ 	SetKeyValueL( cr,MusSettingsKeys::KOperatorVariant, iOperatorVariant);
+ 	SetKeyValueL( cr,MusSettingsKeys::KAuditoryNotification,  iAuditoryNotification);
+	SetKeyValueL( cr,MusSettingsKeys::KPopupNotification, iPopupNotification);
+	SetKeyValueL( cr,MusSettingsKeys::KPopupNotificationType, iPopupNotificationType);
+	SetKeyValueL( cr,MusSettingsKeys::KEdgeDtmSupport, iEdgeDtmSupport);
+	SetKeyValueL( cr,MusSettingsKeys::KForceInternetSignaling, iSessionSetupMethod);
+	SetKeyValueL( cr,MusSettingsKeys::KAutoRecord, iAutoRecord);
+	SetKeyValueL( cr,MusSettingsKeys::KVideoLocation, iVideoLocation);
+	SetKeyValueL( cr,MusSettingsKeys::KSipProfileId,  iSipProfileId);
+	SetKeyValueL( cr,MusSettingsKeys::KUiOrientation, iUiOrientation);    
+	SetKeyValueL( cr,MusSettingsKeys::KCapabilityQuery, iCapabilityQuery);    
+    SetKeyValueL( cr,MusSettingsKeys::KProductModeVariation, iProductModeVariation);    
+    SetKeyValueL( cr,MusSettingsKeys::KEncoderConfigurationInfo, iEncoderInfo );
+    SetKeyValueL( cr,MusSettingsKeys::KPrivacyExchange, iPrivacyVariation );
     
-    SetKeyValueL(MusSettingsKeys::KActivation, iActivation);
- 	SetKeyValueL(MusSettingsKeys::KOperatorVariant, iOperatorVariant);
- 	SetKeyValueL(MusSettingsKeys::KAuditoryNotification, iAuditoryNotification);
-	SetKeyValueL(MusSettingsKeys::KPopupNotification, iPopupNotification);
-	SetKeyValueL(MusSettingsKeys::KPopupNotificationType, iPopupNotificationType);
-	SetKeyValueL(MusSettingsKeys::KEdgeDtmSupport, iEdgeDtmSupport);
-	SetKeyValueL(MusSettingsKeys::KForceInternetSignaling, iSessionSetupMethod);
-	SetKeyValueL(MusSettingsKeys::KAutoRecord, iAutoRecord);
-	SetKeyValueL(MusSettingsKeys::KVideoLocation, iVideoLocation);
-	SetKeyValueL(MusSettingsKeys::KSipProfileId, iSipProfileId);
-	SetKeyValueL(MusSettingsKeys::KUiOrientation, iUiOrientation);    
-	SetKeyValueL(MusSettingsKeys::KCapabilityQuery, iCapabilityQuery);    
-    SetKeyValueL(MusSettingsKeys::KProductModeVariation, iProductModeVariation);    
-    User::LeaveIfError( 
-        iRepository->Set(MusSettingsKeys::KEncoderConfigurationInfo, iEncoderInfo));
     TLex lex( iEncodingDeviceStr );
-    TUint tmpUid;
-    lex.SkipSpace();
-    if ( lex.Val(tmpUid, EHex) == KErrNone )
+    TUint uid;
+    err = lex.Val(uid, EHex);    
+    if ( (err == KErrNone) && lex.Eos() )
         {
-        iEncodingDevice = tmpUid;     
+        iEncodingDevice = uid;
+        SetKeyValueL( cr, MusSettingsKeys::KEncodingDevice, iEncodingDevice );        
+        }
+           
+    CleanupStack::PopAndDestroy(cr);
+	delete cr;
+    }
+
+void COtherResources::SetKeyValueL(CRepository* repository, const TInt & aKey , TInt & aVal)
+    {  
+    if(aVal<0)  return; // dont care if key is not intially read
+    TUint32 key(aKey);
+    User::LeaveIfError(repository->StartTransaction(
+                        CRepository::EConcurrentReadWriteTransaction));    
+    User::LeaveIfError(repository->Set(key,aVal));
+    User::LeaveIfError(repository->CommitTransaction(key));    
+    }
+
+void COtherResources::ReadKeyValueL(CRepository* repository, const TInt & aKey , TInt & aVal)
+    {
+    TUint32 key(aKey);
+    User::LeaveIfError(repository->StartTransaction(
+                        CRepository::EConcurrentReadWriteTransaction));
+    User::LeaveIfError(repository->Get(key,aVal));
+    User::LeaveIfError(repository->CommitTransaction(key));
+    }
+
+void COtherResources::SetKeyValueL(CRepository* repository, TInt aKey, const TDesC& aVal)
+    {
+    TUint32 key(aKey);
+    User::LeaveIfError(repository->StartTransaction(
+                        CRepository::EConcurrentReadWriteTransaction));    
+    User::LeaveIfError(repository->Set(key,aVal));
+    User::LeaveIfError(repository->CommitTransaction(key));
+    }
+
+void COtherResources::ReadKeyValueL(CRepository* repository, TInt aKey, TDes& aVal)
+    {
+    TUint32 key(aKey);
+    User::LeaveIfError(repository->StartTransaction(
+                        CRepository::EConcurrentReadWriteTransaction));
+    User::LeaveIfError(repository->Get(key,aVal));
+    User::LeaveIfError(repository->CommitTransaction(key));
+    }
+
+void COtherResources::HandleError(TBool aType ,
+                                    TInt aError , TPtrC aKeyName )
+    {
+    CAknErrorNote *dlg = new CAknErrorNote(ETrue);
+    TBuf<100> buf;
+    if(aType)
+        {
+        buf.Append(_L("Unable to Read Key "));
         }
     else
         {
-        iEncodingDevice = KErrNotFound;
+        buf.Append(_L("Unable to Save Key "));
         }
-    SetKeyValueL(MusSettingsKeys::KEncodingDevice, iEncodingDevice);     
-    SetKeyValueL(MusSettingsKeys::KAllowOnlyWithActiveCSCall, iOnlyWithActiveCSCall);
-    SetKeyValueL(MusSettingsKeys::KAllowOnlyIn3GNetwork, iOnlyIn3GNetwork);
-    SetKeyValueL(MusSettingsKeys::KCameraUsage, iCameraUsage);
-    SetKeyValueL(MusSettingsKeys::KVideoDirection, iVideoDirection);
-    SetKeyValueL(MusSettingsKeys::KVideoBandwidth, iVideoBandwidth);
-    SetKeyValueL(MusSettingsKeys::KFastStartupMode, iFastMode);
-    
-    TUint32 modifiedKeyCount(0);
-    User::LeaveIfError(iRepository->CommitTransaction(modifiedKeyCount));
-    CleanupStack::Pop(); // transaction
-    }
-
-void COtherResources::SetKeyValueL(
-    const TUint32& aKey, 
-    TInt& aVal)
-    {     
-    TBool keyExistsInRepository(EFalse);
-    TInt tmpVal(0);
-    keyExistsInRepository = (iRepository->Get(aKey,tmpVal) == KErrNone);
-    if (aVal < 0)
-        {
-        if (keyExistsInRepository)
-            {
-            User::LeaveIfError(iRepository->Delete(aKey));
-            }
-        }
-    else
-        {
-        if (keyExistsInRepository)
-            {
-            User::LeaveIfError(iRepository->Set(aKey,aVal));
-            }
-        else
-            {
-            User::LeaveIfError(iRepository->Create(aKey,aVal));
-            }
-        }    
+    buf.Append(aKeyName);
+    buf.Append(_L(" Error "));
+    buf.AppendNum(aError);
+    dlg->ExecuteLD(buf); 
     }
 
 CMusApplication* CMusApplication::NewLC()
     {
+    // create a new expense object
     CMusApplication* self = new (ELeave) CMusApplication();
     CleanupStack::PushL(self);
     self->ConstructL();
@@ -308,8 +370,8 @@
 void CMusApplication::ConstructL()
     {
     iUseCase = MultimediaSharing::EMusLiveVideo;     
-    iMultimediasharing=CMusManager::NewL();    
-    iMultimediasharing->ExamineAvailabilityL();
+    //iMultimediasharing=CMusManager::NewL();    
+    //iMultimediasharing->ExamineAvailabilityL();
     }
 
 CMusApplication::~CMusApplication()
@@ -330,10 +392,10 @@
 
 TBool CMusApplication::Start(TInt aUseCase)
     {
-    TRAPD(err,iMultimediasharing->StartApplicationL(
+    /*TRAPD(err,iMultimediasharing->StartApplicationL(
                             MultimediaSharing::TMusUseCase(aUseCase)));
     if(err)HandleError(err,_L("MusStart "));    
-    return (err)?EFalse :ETrue;        
+    return (err)?EFalse :ETrue; */       
     }
      
 TBool CMusApplication::Stop()
@@ -352,9 +414,21 @@
     }
 TInt CMusApplication::MonitorAvailability()
     {
-    return KErrGeneral;        
+    TInt status = KErrGeneral;
+    /*TRequestStatus requestStatus;
+    TRAPD(err,iMultimediasharing->
+            MonitorAvailabilityL(
+                requestStatus,
+                MultimediaSharing::TMusAvailabilityStatus(status))
+                                );
+    if(err)HandleError(err,_L("MusAvailability "));
+    User::WaitForRequest(requestStatus);    
+    */
+    return status;        
     }
 
+
+
 TBool CMusApplication::AvailabilityInfo()
     {                                   
     TBuf<100> buf(_L("Availability Info: ")); 
@@ -442,6 +516,8 @@
     (aStart) ? buf.Append(_L("Started")) : buf.Append(_L("Stoped"));
     dlg->ExecuteLD(buf);      
     }
+       
 
+  
 // End of File  
 
--- a/tsrc/CenrepEditor/data/cenrepeditor.rss	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/CenrepEditor/data/cenrepeditor.rss	Wed Sep 01 12:31:01 2010 +0100
@@ -137,28 +137,27 @@
     {
     type = ENaviDecoratorControlTabGroup;
     control = TAB_GROUP
-        {
-        tab_width = EAknTabWidthWithThreeTabs;  // three tabs
-        active = 0;
-        tabs = 
-            {
-            TAB
-                {
+		{
+		tab_width = EAknTabWidthWithThreeTabs;  // three tabs
+		active = 0;
+		tabs = {
+			TAB
+				{
                 id = EAvkonViewExampleView1Tab; // from application hrh
                 txt = qtn_view1_tab;
                 },
-            TAB
-                {
+			TAB
+				{
                 id = EAvkonViewExampleView2Tab;
                 txt = qtn_view2_tab;
-                },
-            TAB
-                {
+				},
+			TAB
+				{
                 id = EAvkonViewExampleView3Tab;
                 txt = qtn_view3_tab;
-                }
-            };
-        };
+				}
+			};
+		};
 	}
 
 
@@ -176,22 +175,21 @@
     }
     
 RESOURCE CBA r_cenrepeditor_softkeys_save_exit
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftKeySave;
-            txt = qtn_cenrepeditor_cba_text_save;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftKeyExit;
-            txt = qtn_cenrepeditor_cba_text_Exit;
-            }
-        };
-    }
-
+	{
+		buttons =
+			{
+			CBA_BUTTON
+				{
+				id = EAknSoftKeySave;
+				txt = qtn_cenrepeditor_cba_text_save;
+				},
+		CBA_BUTTON
+				{
+				id = EAknSoftKeyExit;
+				txt = qtn_cenrepeditor_cba_text_Exit;
+				}
+			};
+	}
 RESOURCE AVKON_SETTING_ITEM_LIST r_phone_resource_details_settings_list
 	{
     flags= EAknSettingItemNumberedStyle;    
@@ -202,60 +200,85 @@
         AVKON_SETTING_ITEM
             {
             identifier = EPhoneResouceCamera;
-            setting_page_resource = r_popup_settings_page;
+            setting_page_resource = r_availability_settings_page;
             name = "CameraAvailability";
             associated_resource = r_availability_settings_page_texts;
             },	
         AVKON_SETTING_ITEM
             {
             identifier = EPhoneResouceKeypad;
-            setting_page_resource = r_popup_settings_page;
+            setting_page_resource = r_availability_settings_page;
             name = "KeypadAvailability";
             associated_resource = r_availability_settings_page_texts;
             },				
-        AVKON_SETTING_ITEM
-            {
-            identifier = EPhoneResouceVideoPlayer;
-            setting_page_resource = r_popup_settings_page;
-            name = "VideoPlayerAvailability";
+		AVKON_SETTING_ITEM
+			{
+			identifier = EPhoneResouceVideoPlayer;
+			setting_page_resource = r_availability_settings_page;
+			name = "VideoPlayerAvailability";
             associated_resource = r_availability_settings_page_texts;
-            },
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EPhoneResouceCameraInformation;
+			setting_page_resource = r_CameraInformation_settings_page;
+			name = "CameraInformation";
+            associated_resource = r_CameraInformation_settings_page_texts;
+			},
         AVKON_SETTING_ITEM
-            {
-            identifier = EPhoneResouceCameraInformation;
-            setting_page_resource = r_popup_settings_page;
-            name = "CameraInformation";
-            associated_resource = r_CameraInformation_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EKodiakPhoneCall;
-            setting_page_resource = r_popup_settings_page;
-            name = "KodiakPTT";
+			{
+			identifier = EKodiakPhoneCall;
+			setting_page_resource = r_kodiak_call_settings_page;
+			name = "KodiakPTT";
             associated_resource = r_kodiak_call_settings_page_texts;
-            }
+			}
 		};
 	}
 
 
 
 //camera	
+RESOURCE AVKON_SETTING_PAGE r_availability_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_availability_settings_page_texts
     {
     setting_texts_resource = r_availability_page_texts_array;
+    popped_up_texts_resource = r_availability_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_availability_page_texts_array
     {
-    items =
-        {
+        items =
+        {        
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EAvailable"; },        
         AVKON_ENUMERATED_TEXT { value=2; text = "2.ENotAvailable"; }
         };
     }
 
+RESOURCE ARRAY r_availability_settings_page_popedup
+    {
+    items =
+        {        
+        LBUF { txt = "1.EAvailable"; },        
+        LBUF { txt = "2.ENotAvailable"; }        
+        };
+    }
 
 //camera information
+RESOURCE AVKON_SETTING_PAGE r_CameraInformation_settings_page
+    {
+    number = 1;
+    label = "Value";
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_CameraInformation_settings_page_texts
     {
     setting_texts_resource = r_CameraInformation_settings_page_texts_array;
@@ -264,7 +287,7 @@
 
 RESOURCE ARRAY r_CameraInformation_settings_page_texts_array
     {
-    items =
+        items =
         {
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EUsePrimaryCamera"; },
         AVKON_ENUMERATED_TEXT { value=2; text = "2.EUseSecondaryCamera"; }        
@@ -273,28 +296,45 @@
 
 RESOURCE ARRAY r_CameraInformation_settings_page_popedup
     {
-    items =
-        {
+        items =
+        { 
         LBUF { txt = "1.EUsePrimaryCamera"; },
         LBUF { txt = "2.EUseSecondaryCamera"; }        
         };
     }
 
 //kodiak PTT
+RESOURCE AVKON_SETTING_PAGE r_kodiak_call_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_kodiak_call_settings_page_texts
     {
     setting_texts_resource = r_kodiak_call_settings_page_texts_array;
+    popped_up_texts_resource = r_kodiak_call_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_kodiak_call_settings_page_texts_array
     {
-    items =
+        items =
         {
         AVKON_ENUMERATED_TEXT { value=0; text = "0.EPSCTsyKodiakPttNotActive"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EPSCTsyKodiakPttActive"; }        
         };
     }
 
+RESOURCE ARRAY r_kodiak_call_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.EPSCTsyKodiakPttNotActive"; },
+        LBUF { txt = "1.EPSCTsyKodiakPttActive"; }        
+        };
+    }
+
 RESOURCE POPUP_SETTING_LIST r_enumerated_text_setting_other_editor
     {    
    // other="-1.Undefined";
@@ -321,406 +361,477 @@
 
 
 RESOURCE AVKON_SETTING_ITEM_LIST r_other_resource_details_settings_list
-    {
+	{
     flags= EAknSettingItemNumberedStyle; 
-    title = qtn_otherresource_details;
-    initial_number = 1;
-    items =     
-        {
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceActivation;
-            setting_page_resource = r_popup_settings_page;
-            name = "Activation";
+	title = qtn_otherresource_details;
+	initial_number = 1;
+	items =     
+		{
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceActivation;
+			setting_page_resource = r_activation_editor_settings_page;
+			name = "Activation";
             associated_resource = r_activation_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceOperatorVariant;
-            setting_page_resource = r_popup_settings_page;
-            name = "OperatorVariant";
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceOperatorVariant;
+			setting_page_resource = r_operator_editor_settings_page;
+			name = "OperatorVariant";
             associated_resource = r_operator_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceAuditoryNotification;
-            setting_page_resource = r_popup_settings_page;
-            name = "AuditoryNotification";
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceAuditoryNotification;
+			setting_page_resource = r_Auditory_editor_settings_page;
+			name = "AuditoryNotification";
             associated_resource = r_Auditory_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourcePopupNotification;
-            setting_page_resource = r_popup_settings_page;
-            name = "PopupNotification";
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourcePopupNotification;
+			setting_page_resource = r_Popup_editor_settings_page;
+			name = "PopupNotification";
             associated_resource = r_Popup_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourcePopupNotificationType;
+			setting_page_resource = r_PopupType_editor_settings_page;
+			name = "PopupNotificationType";
+            associated_resource = r_PopupType_editor_settings_page_texts;
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceEdgeDtmSupport;
+			setting_page_resource = r_edgedtm_editor_settings_page;
+			name = "EdgeDtmSupport";
+            associated_resource = r_edgedtm_editor_settings_page_texts;
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceSessionSetupMethod;
+			setting_page_resource = r_signal_editor_settings_page;
+			name = "ForceInternetSignaling";
+            associated_resource = r_signal_editor_settings_page_texts;
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceAutoRecord;
+			setting_page_resource = r_videosaving_editor_settings_page;
+			name = "AutoRecord";
+            associated_resource = r_videosaving_editor_settings_page_texts;
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceVideoLocation;
+			setting_page_resource = r_editor_settings_page;
+			name = "VideoLocation";            
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceSipProfileId;
+			setting_page_resource = r_editor_settings_page;
+			name = "SipProfileId";            
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceUiOrientation;
+			setting_page_resource = r_uiorientation_editor_settings_page;
+			name = "UiOrientation";
+            associated_resource = r_uiorientation_editor_settings_page_texts;
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceCapabilityQuery;
+			setting_page_resource = r_capquery_editor_settings_page;
+			name = "CapabilityQuery";
+            associated_resource = r_capquery_editor_settings_page_texts;
+			},
+		AVKON_SETTING_ITEM
+			{
+			identifier = EOtherResourceProductModeVariationKey;
+			setting_page_resource = r_editor_settings_page;
+			name = "ProductModeVariation";            
+			},
+		AVKON_SETTING_ITEM
             {
-            identifier = EOtherResourcePopupNotificationType;
-            setting_page_resource = r_popup_settings_page;
-            name = "PopupNotificationType";
-            associated_resource = r_PopupType_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceEdgeDtmSupport;
-            setting_page_resource = r_popup_settings_page;
-            name = "EdgeDtmSupport";
-            associated_resource = r_edgedtm_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceSessionSetupMethod;
-            setting_page_resource = r_popup_settings_page;
-            name = "ForceInternetSignaling";
-            associated_resource = r_signal_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceAutoRecord;
-            setting_page_resource = r_popup_settings_page;
-            name = "AutoRecord";
-            associated_resource = r_videosaving_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceVideoLocation;
-            setting_page_resource = r_editor_settings_page;
-            name = "VideoLocation";            
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceSipProfileId;
-            setting_page_resource = r_editor_settings_page;
-            name = "SipProfileId";            
+            identifier = EOtherRResourcePrivacyVariationMode;
+            setting_page_resource = r_privacy_settings_page;
+            name = "Privacy variation";
+            associated_resource = r_privacy_editor_settings_page_texts;
             },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceUiOrientation;
-            setting_page_resource = r_popup_settings_page;
-            name = "UiOrientation";
-            associated_resource = r_uiorientation_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceCapabilityQuery;
-            setting_page_resource = r_popup_settings_page;
-            name = "CapabilityQuery";
-            associated_resource = r_capquery_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceProductModeVariationKey;
-            setting_page_resource = r_editor_settings_page;
-            name = "ProductModeVariation";            
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceEncoderConfigurationInfo;
-            setting_page_resource = r_encoder_info_settings_page;
-            name = "EncoderConfigurationInfo";            
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceEncodingDevice;
-            setting_page_resource = r_encoding_device_settings_page;
-            name = "EncodingDevice";            
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceAllowOnlyWithActiveCSCall;
-            setting_page_resource = r_popup_settings_page;
-            name = "AllowWithCSCallOnly";
-            associated_resource = r_activecscall_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceAllowOnlyIn3GNetwork;
-            setting_page_resource = r_popup_settings_page;
-            name = "AllowIn3GNetworkOnly";
-            associated_resource = r_3gnetwork_editor_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceCameraUsage;
-            setting_page_resource = r_popup_settings_page;
-            name = "CameraUsage";
-            associated_resource = r_camera_usage_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceVideoDirection;
-            setting_page_resource = r_popup_settings_page;
-            name = "VideoDirection";
-            associated_resource = r_video_direction_settings_page_texts;
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceVideoBandwidth;
-            setting_page_resource = r_editor_settings_page;
-            name = "VideoBandwidth,KBits";
-            },
-        AVKON_SETTING_ITEM
-            {
-            identifier = EOtherResourceFastMode;
-            setting_page_resource = r_popup_settings_page;
-            name = "FastStartupMode";
-            associated_resource = r_fast_mode_settings_page_texts;
-            }
-        };
-    }
+		AVKON_SETTING_ITEM
+		    {
+		    identifier = EOtherResourceEncoderConfigurationInfo;
+		    setting_page_resource = r_encoder_info_settings_page;
+		    name = "EncoderConfigurationInfo";            
+		    },
+		AVKON_SETTING_ITEM
+		    {
+		    identifier = EOtherResourceEncodingDevice;
+		    setting_page_resource = r_encoding_device_settings_page;
+		    name = "EncodingDevice";            
+		    }
+		};
+	}
 	
 //activation
+RESOURCE AVKON_SETTING_PAGE r_activation_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_activation_editor_settings_page_texts
     {
     setting_texts_resource = r_activation_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_activation_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_activation_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
-        AVKON_ENUMERATED_TEXT { value=0; text = "0.EAlwaysActive"; },
-        AVKON_ENUMERATED_TEXT { value=1; text = "1.EActiveInHomeNetworks"; },        
-        AVKON_ENUMERATED_TEXT { value=2; text = "2.ENever"; }        
+        AVKON_ENUMERATED_TEXT { value=0; text = "0.EAlwaysActive"; },   
+        AVKON_ENUMERATED_TEXT { value=1; text = "1.ENever"; }        
+        };
+    }
+
+RESOURCE ARRAY r_activation_editor_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.EAlwaysActive"; },
+        LBUF { txt = "1.ENever"; }
         };
     }
 
 //operator variant
+RESOURCE AVKON_SETTING_PAGE r_operator_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_operator_editor_settings_page_texts
     {
     setting_texts_resource = r_operator_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_operator_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_operator_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.EStandard"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EOperatorSpecific"; }        
         };
     }
 
+RESOURCE ARRAY r_operator_editor_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.EStandard"; },
+        LBUF { txt = "1.EOperatorSpecific"; }        
+        };
+    }
+
 //Auditory Notification
+RESOURCE AVKON_SETTING_PAGE r_Auditory_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_Auditory_editor_settings_page_texts
     {
     setting_texts_resource = r_Auditory_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_Auditory_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_Auditory_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.EAuditoryNotificationOn"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EAuditoryNotificationOff"; }        
         };
     }
 
+RESOURCE ARRAY r_Auditory_editor_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.EAuditoryNotificationOn"; },
+        LBUF { txt = "1.EAuditoryNotificationOff"; }        
+        };
+    }
+
+
 //Popup Notification
+RESOURCE AVKON_SETTING_PAGE r_Popup_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_Popup_editor_settings_page_texts
     {
     setting_texts_resource = r_Popup_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_Popup_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_Popup_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.EPopupNotificationOn"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EPopupNotificationOff"; }        
         };
     }
 
+RESOURCE ARRAY r_Popup_editor_settings_page_popedup
+    {
+        items =
+        {        
+        LBUF { txt = "0.EPopupNotificationOn"; },
+        LBUF { txt = "1.EPopupNotificationOff"; }        
+        };
+    }
+
 //Popup Notification Type
+RESOURCE AVKON_SETTING_PAGE r_PopupType_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_PopupType_editor_settings_page_texts
     {
     setting_texts_resource = r_PopupType_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_PopupType_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_PopupType_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.ENotificationTypeQueryUser"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.ENotificationTypePopup"; }        
         };
     }
 
+RESOURCE ARRAY r_PopupType_editor_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.ENotificationTypeQueryUser"; },
+        LBUF { txt = "1.ENotificationTypePopup"; }        
+        };
+    }
+
+
 //EDGE/DTM
+RESOURCE AVKON_SETTING_PAGE r_edgedtm_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_edgedtm_editor_settings_page_texts
     {
     setting_texts_resource = r_edgedtm_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_edgedtm_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_edgedtm_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.EDtmModeAllowed"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EDtmModeNotAllowed"; }        
         };
     }
 
+RESOURCE ARRAY r_edgedtm_editor_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.EDtmModeAllowed"; },
+        LBUF { txt = "1.EDtmModeNotAllowed"; }        
+        };
+    }
+
 //Internet Signalling
+RESOURCE AVKON_SETTING_PAGE r_signal_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_signal_editor_settings_page_texts
     {
     setting_texts_resource = r_signal_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_signal_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_signal_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.EForceInternetSignaling"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EFollowProfileConfiguration"; }        
         };
     }
 
+RESOURCE ARRAY r_signal_editor_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.EForceInternetSignaling"; },
+        LBUF { txt = "1.EFollowProfileConfiguration"; }        
+        };
+    }
+
 //Video Saving 
+RESOURCE AVKON_SETTING_PAGE r_videosaving_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_videosaving_editor_settings_page_texts
     {
     setting_texts_resource = r_videosaving_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_videosaving_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_videosaving_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.EAutoRecordOn"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EAutoRecordOff"; }
         };
     }
 
+RESOURCE ARRAY r_videosaving_editor_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.EAutoRecordOn"; },
+        LBUF { txt = "1.EAutoRecordOff"; } 
+        };
+    }
+
 //UI Orientation
+RESOURCE AVKON_SETTING_PAGE r_uiorientation_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_uiorientation_editor_settings_page_texts
     {
     setting_texts_resource = r_uiorientation_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_uiorientation_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_uiorientation_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.EPortrait"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.ELandscape"; }        
         };
     }
 
+RESOURCE ARRAY r_uiorientation_editor_settings_page_popedup
+    {
+        items =
+        {
+        LBUF { txt = "0.EPortrait"; },
+        LBUF { txt = "1.ELandscape"; }               
+        };
+    }
 
 //Capability Query
+RESOURCE AVKON_SETTING_PAGE r_capquery_editor_settings_page
+    {
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
+    }
+
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_capquery_editor_settings_page_texts
     {
     setting_texts_resource = r_capquery_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_capquery_editor_settings_page_popedup;
     }
 
 RESOURCE ARRAY r_capquery_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
         AVKON_ENUMERATED_TEXT { value=0; text = "0.ESequential"; },
         AVKON_ENUMERATED_TEXT { value=1; text = "1.EParallel"; },        
         AVKON_ENUMERATED_TEXT { value=2; text = "2.ENoOptions"; }   
         };
     }
 
-
-//Allow multimedia sharing only with active CS call 
-RESOURCE AVKON_POPUP_SETTING_TEXTS r_activecscall_editor_settings_page_texts
+RESOURCE ARRAY r_capquery_editor_settings_page_popedup
     {
-    setting_texts_resource = r_activecscall_editor_settings_page_texts_array;
-    }
-
-RESOURCE ARRAY r_activecscall_editor_settings_page_texts_array
-    {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
-        AVKON_ENUMERATED_TEXT { value=0; text = "0.EAllowedAllCalls"; },
-        AVKON_ENUMERATED_TEXT { value=1; text = "1.EAllowedCSOnly"; }
-        };
-    }
-
-
-//Allow multimedia sharing only in 3G network 
-RESOURCE AVKON_POPUP_SETTING_TEXTS r_3gnetwork_editor_settings_page_texts
-    {
-    setting_texts_resource = r_3gnetwork_editor_settings_page_texts_array;
-    }
-
-RESOURCE ARRAY r_3gnetwork_editor_settings_page_texts_array
-    {
-    items =
-        {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
-        AVKON_ENUMERATED_TEXT { value=0; text = "0.EAllowedAllBearers"; },
-        AVKON_ENUMERATED_TEXT { value=1; text = "1.EAllowed3GOnly"; }
+        LBUF { txt = "0.ESequential"; },
+        LBUF { txt = "1.EParallel"; },               
+        LBUF { txt = "2.ENoOptions"; }               
         };
     }
 
-
-//Camera Usage 
-RESOURCE AVKON_POPUP_SETTING_TEXTS r_camera_usage_settings_page_texts
+//Privacy
+RESOURCE AVKON_SETTING_PAGE r_privacy_settings_page
     {
-    setting_texts_resource = r_camera_usage_settings_page_texts_array;
+    number = 1;
+    type = EAknCtPopupSettingList;
+    editor_resource_id = r_enumerated_text_setting_other_editor;
     }
 
-RESOURCE ARRAY r_camera_usage_settings_page_texts_array
+RESOURCE AVKON_POPUP_SETTING_TEXTS r_privacy_editor_settings_page_texts
     {
-    items =
-        {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
-        AVKON_ENUMERATED_TEXT { value=0; text = "0.EUseOnlyMainCamera"; },
-        AVKON_ENUMERATED_TEXT { value=1; text = "1.EUseOnlySecondaryCamera"; },
-        AVKON_ENUMERATED_TEXT { value=2; text = "2.EUseCameraSwapping"; }
-        };
-    }
-
-
-//Video direction 
-RESOURCE AVKON_POPUP_SETTING_TEXTS r_video_direction_settings_page_texts
-    {
-    setting_texts_resource = r_video_direction_settings_page_texts_array;
+    setting_texts_resource = r_privacy_editor_settings_page_texts_array;
+    popped_up_texts_resource = r_privacy_editor_settings_page_popedup;
     }
 
-RESOURCE ARRAY r_video_direction_settings_page_texts_array
+RESOURCE ARRAY r_privacy_editor_settings_page_texts_array
     {
-    items =
+        items =
         {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
-        AVKON_ENUMERATED_TEXT { value=0; text = "0.EOneWayVideo"; },
-        AVKON_ENUMERATED_TEXT { value=1; text = "1.ETwoWayVideo"; }
+        AVKON_ENUMERATED_TEXT { value=1; text = "0.EPrivacyOn"; },
+        AVKON_ENUMERATED_TEXT { value=2; text = "1.ErivacyOff"; }        
         };
     }
-
-
-//Fast startup mode
-RESOURCE AVKON_POPUP_SETTING_TEXTS r_fast_mode_settings_page_texts
+RESOURCE ARRAY r_privacy_editor_settings_page_popedup
     {
-    setting_texts_resource = r_fast_mode_settings_page_texts_array;
-    }
-
-RESOURCE ARRAY r_fast_mode_settings_page_texts_array
-    {
-    items =
-        {
-        AVKON_ENUMERATED_TEXT { value=-1; text = "Not defined"; },
-        AVKON_ENUMERATED_TEXT { value=0; text = "0.EFastModeOn"; },
-        AVKON_ENUMERATED_TEXT { value=1; text = "1.EFastModeOff"; }
+        items =
+        {        
+        LBUF { txt = "0.EPrivacyOn"; },
+        LBUF { txt = "1.ErivacyOfff"; }        
         };
     }
-
-
+    
 // add setting page and editor resources for "details" field here
 RESOURCE AVKON_SETTING_PAGE r_editor_settings_page
     {
@@ -730,13 +841,6 @@
     editor_resource_id = r_integer_edwin;
     }
 
-RESOURCE AVKON_SETTING_PAGE r_popup_settings_page
-    {
-    number = 1;
-    type = EAknCtPopupSettingList;
-    editor_resource_id = r_enumerated_text_setting_other_editor;
-    }
-
 RESOURCE AVKON_SETTING_PAGE r_encoder_info_settings_page
     {
     number = 14;
@@ -769,54 +873,54 @@
     }
 
 RESOURCE CBA r_cenrepeditor_softkeys_start_exit
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftKeyStart;
-            txt = qtn_cenrepeditor_cba_text_start;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftKeyExit;
-            txt = qtn_cenrepeditor_cba_text_Exit;
-            }
-        };
-    }
+	{
+		buttons =
+			{
+			CBA_BUTTON
+				{
+				id = EAknSoftKeyStart;
+				txt = qtn_cenrepeditor_cba_text_start;
+				},
+		CBA_BUTTON
+				{
+				id = EAknSoftKeyExit;
+				txt = qtn_cenrepeditor_cba_text_Exit;
+				}
+			};
+	}
 	    
 RESOURCE CBA r_cenrepeditor_softkeys_stop_exit
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftKeyStop;
-            txt = qtn_cenrepeditor_cba_text_stop;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftKeyExit;
-            txt = qtn_cenrepeditor_cba_text_Exit;
-            }
-        };
-    }
+	{
+		buttons =
+			{
+			CBA_BUTTON
+				{
+				id = EAknSoftKeyStop;
+				txt = qtn_cenrepeditor_cba_text_stop;
+				},
+		CBA_BUTTON
+				{
+				id = EAknSoftKeyExit;
+				txt = qtn_cenrepeditor_cba_text_Exit;
+				}
+			};
+	}
 	
 RESOURCE AVKON_SETTING_ITEM_LIST r_cenrepeditor_start_stop_settings_list
 	{
-    flags = EAknSettingItemNumberedStyle;
-    items =     
-        {
-        AVKON_SETTING_ITEM
-            {
-            name = "Usecase";
-            identifier = EApplicationStartStop;
-            setting_page_resource = r_cenrepeditor_start_stop_settings_list_page;
-            associated_resource = r_cenrepeditor_start_stop_associated_settings_list_page;          
-            }
-        };
+	flags = EAknSettingItemNumberedStyle;
+	items =     
+		{
+		AVKON_SETTING_ITEM
+			{
+			name = "Usecase";
+			identifier = EApplicationStartStop;
+			setting_page_resource = r_cenrepeditor_start_stop_settings_list_page;
+			associated_resource = r_cenrepeditor_start_stop_associated_settings_list_page;
+			
+			}
+		};
 	}
-
 RESOURCE AVKON_SETTING_PAGE r_cenrepeditor_start_stop_settings_list_page
     {    
     number = -16380;    
@@ -832,40 +936,66 @@
 RESOURCE AVKON_POPUP_SETTING_TEXTS r_cenrepeditor_start_stop_associated_settings_list_page
     {    
     setting_texts_resource = r_usecase_array;
+    popped_up_texts_resource = r_usecase_array_texts;
     }
-
 RESOURCE ARRAY r_usecase_array
     {
     items = 
         {
-        AVKON_ENUMERATED_TEXT 
-            {
-            text = "Live";
-            value = 0; 
-            },
-        AVKON_ENUMERATED_TEXT 
-            {
-            text = "Clip";
-            value = 1; 
-            },
-        AVKON_ENUMERATED_TEXT 
-            {
-            text = "StillImage";
-            value = 2; 
-            },
-        AVKON_ENUMERATED_TEXT 
-            {
-            text = "Receive";
-            value = 3; 
-            },
-        AVKON_ENUMERATED_TEXT 
-            {
-            text = "Continue";
-            value = 4; 
-            }
+				AVKON_ENUMERATED_TEXT 
+					{
+					text = "Live";
+                    value = 0; 
+					},
+				AVKON_ENUMERATED_TEXT 
+					{
+					text = "Clip";
+					value = 1; 
+					},
+				AVKON_ENUMERATED_TEXT 
+					{
+					text = "StillImage";
+					value = 2; 
+					},
+				AVKON_ENUMERATED_TEXT 
+					{
+					text = "Receive";
+					value = 3; 
+					},
+				AVKON_ENUMERATED_TEXT 
+					{
+					text = "Continue";
+					value = 4; 
+					}
         };
     }
 
+RESOURCE ARRAY r_usecase_array_texts
+    {
+    items = { 
+    				LBUF 
+    					{ 
+    					txt = "Live"; 
+    					},
+    				LBUF 
+    					{
+    					txt = "Clip"; 
+    					},
+    				LBUF 
+    					{ 
+    					txt = "StillImage"; 
+    					},
+    				LBUF 
+    					{ 
+    					txt = "Receive"; 
+    					},
+    				LBUF 
+    					{ 
+    					txt = "Continue"; 
+    					}
+        };
+    }    
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
--- a/tsrc/CenrepEditor/group/CenrepEditor.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/CenrepEditor/group/CenrepEditor.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,13 +18,15 @@
 #include <bldvariant.hrh>
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
+#include <eunitcaps.h>
 
 TARGET          CenrepEditor.exe
 TARGETTYPE      exe
 
 UID             0x100039CE  0x10282398
 VENDORID        VID_DEFAULT
-CAPABILITY      CAP_APPLICATION
+CAPABILITY      EUNIT_CAPS
+
 
 EPOCSTACKSIZE   0xF000
 
@@ -63,6 +65,7 @@
 LANG            SC
 
 USERINCLUDE     ../inc
+USERINCLUDE     ../../../common/inc
 
 APP_LAYER_SYSTEMINCLUDE
 
--- a/tsrc/CenrepEditor/inc/cenrepeditor.hrh	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/CenrepEditor/inc/cenrepeditor.hrh	Wed Sep 01 12:31:01 2010 +0100
@@ -37,43 +37,41 @@
     EAknSoftKeySave=1,
    	EAknSoftKeyExit,
    	EAknSoftKeyStart,
+
+
+
+
+
+
    	EAknSoftKeyStop
     };
-
 enum TAvkonSettingsItemCommand
-    {
-    EPhoneResouceCamera = 1,
-    EPhoneResouceKeypad,
-    EPhoneResouceVideoPlayer,
-    EPhoneResouceCameraInformation,
-    EKodiakPhoneCall        
-    };
-
+		{
+		EPhoneResouceCamera = 1,
+		EPhoneResouceKeypad,
+		EPhoneResouceVideoPlayer,
+		EPhoneResouceCameraInformation,
+        EKodiakPhoneCall        
+		};
 enum TAvkonSettingsItemCommandOther
-    {
-    EOtherResourceActivation=1,
-    EOtherResourceOperatorVariant,
-    EOtherResourceAuditoryNotification,
-    EOtherResourcePopupNotification,
-    EOtherResourcePopupNotificationType,
-    EOtherResourceEdgeDtmSupport,
-    EOtherResourceSessionSetupMethod,
-    EOtherResourceAutoRecord,
-    EOtherResourceVideoLocation,
-    EOtherResourceSipProfileId,
-    EOtherResourceUiOrientation,
-    EOtherResourceCapabilityQuery,
-    EOtherResourceProductModeVariationKey,
-    EOtherResourceEncoderConfigurationInfo,
-    EOtherResourceEncodingDevice,
-    EOtherResourceAllowOnlyWithActiveCSCall,
-    EOtherResourceAllowOnlyIn3GNetwork,
-    EOtherResourceCameraUsage,
-    EOtherResourceVideoDirection,
-    EOtherResourceVideoBandwidth,
-    EOtherResourceFastMode
-    };
-
+		{
+		EOtherResourceActivation=1,
+		EOtherResourceOperatorVariant,
+		EOtherResourceAuditoryNotification,
+		EOtherResourcePopupNotification,
+		EOtherResourcePopupNotificationType,
+		EOtherResourceEdgeDtmSupport,
+		EOtherResourceSessionSetupMethod,
+		EOtherResourceAutoRecord,
+		EOtherResourceVideoLocation,
+		EOtherResourceSipProfileId,
+		EOtherResourceUiOrientation,
+		EOtherResourceCapabilityQuery,
+		EOtherResourceProductModeVariationKey,
+		EOtherResourceEncoderConfigurationInfo,
+		EOtherResourceEncodingDevice,
+		EOtherRResourcePrivacyVariationMode
+		};
 enum TAvkonViewApplicationStartStop
     {
     EApplicationStartStop=1
--- a/tsrc/CenrepEditor/inc/cenrepeditorlistbox2.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/CenrepEditor/inc/cenrepeditorlistbox2.h	Wed Sep 01 12:31:01 2010 +0100
@@ -40,6 +40,12 @@
     public:
         CAknSettingItem* CreateSettingItemL( TInt identifier );
         void SetData(COtherResources* iOtherResources); 
+
+    public: // Implementation from base class
+      //  void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);            
+      // TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);            
+
+        void EditItemL(TInt aIndex, TBool aCalledFromMenu);
         
     private:        
         void SizeChanged();
--- a/tsrc/CenrepEditor/inc/cenrepeditormodel.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/CenrepEditor/inc/cenrepeditormodel.h	Wed Sep 01 12:31:01 2010 +0100
@@ -40,13 +40,22 @@
 		static COtherResources* NewL();
 		static COtherResources* NewLC();
 		~COtherResources();       
-    
-	public:
+    public :
     
         void SaveL();
+        void SaveCRKeyValuesL();
+        void ReadL();
+        void ReadCRKeyValuesL();
+        void ReadKeyValueL(CRepository* repository, const TInt & aKey , TInt & aVal);
+        void SetKeyValueL(CRepository* repository, const TInt & aKey , TInt & aVal);
+
+        void ReadKeyValueL(CRepository* repository, TInt aKey, TDes& aVal);
+        void SetKeyValueL(CRepository* repository, TInt aKey, const TDesC& aVal);
+
+    private : 
+        void HandleError(TBool aType ,TInt aError , TPtrC aKeyName );
 
     public:
-        
         TInt iActivation;
         TInt iOperatorVariant;
         TInt iAuditoryNotification;
@@ -60,22 +69,15 @@
         TInt iUiOrientation; 
         TInt iCapabilityQuery;  
         TInt iProductModeVariation;
-        TInt iEncodingDevice;
-        TInt iOnlyWithActiveCSCall;
-        TInt iOnlyIn3GNetwork;
+        TInt iEncodingDevice;  
+        TInt iPrivacyVariation;
+        TInt iDummy; 
+
         TBuf<NCentralRepositoryConstants::KMaxBinaryLength>  iEncoderInfo;
         TBuf<KMaxUidStringLength> iEncodingDeviceStr;
-        TInt iCameraUsage;
-        TInt iVideoDirection;
-        TInt iVideoBandwidth;
-        TInt iFastMode;
         
-    private:
+    private :
         void ConstructL();
-        void SetKeyValueL(const TUint32& aKey , TInt& aVal);
-        
-    private:
-        CRepository* iRepository;
 	};
 
 class CPhoneResources : public CBase
@@ -84,20 +86,22 @@
 		static CPhoneResources* NewL();
 		static CPhoneResources* NewLC();
 		~CPhoneResources();       
-    
-	public :
+    public :
         void SaveL();
-    
+        void ReadL();        
+    private :
+        void HandleError(TBool aType ,TInt aError , TPtrC aKeyName );
     public:
         TInt iCameraAvailability;
         TInt iKeypadAvailability;
         TInt iVideoPlayerAvailability;
         TInt iCameraInformation;
         TInt iKodiakPhoneCall;
+        TInt iDummy; 
 
     private :
         void ConstructL();
-        void SetValueL(TUid aCategory, TUint aKey, TInt aValue);
+        TInt SetValueL(TUid aCategory, TUint aKey, TInt aValue);
 	};
 
 class CMusApplication : public CBase
Binary file tsrc/CenrepEditor/install/cenrepeditor.sis has changed
Binary file tsrc/CenrepEditor/install/cenrepeditor.sisx has changed
Binary file tsrc/CenrepEditor/install/cenrepeditor_.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/CenrepEditor/install/sis_update_udeb.bat	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,19 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description: 
+@rem
+
+makesis cenrepeditor.pkg cenrepeditor-tmp.sis
+signsis -cr -s "cenrepeditor-tmp.SIS" "cenrepeditor.sisx" "RDTest_02.der" "RDTest_02.key"
+REM del cenrepeditor-tmp.sis
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/centralrepositorystub/inc/cenrepnotifyhandler.h	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+#ifndef CENREPNOTIFYHANDLER_H
+#define CENREPNOTIFYHANDLER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class MCenRepNotifyHandlerCallback;
+class CRepository;
+
+
+
+class CCenRepNotifyHandler : public CBase//CActive
+    {
+    public:
+        /**
+        * Defines different key types. Enumeration is used to indicate the 
+        * key type that is listened to. 
+        */
+        enum TCenRepKeyType
+        {
+            EIntKey,    ///< Key holds a TInt value.
+            ERealKey,   ///< Key holds a TReal value.
+            EStringKey, ///< Key holds a TDesC16 value.
+            EBinaryKey  ///< Key holds a TDesC8 value.
+        };
+
+        IMPORT_C static CCenRepNotifyHandler* NewL( MCenRepNotifyHandlerCallback& aCallback, 
+                                                    CRepository& aSession );
+
+        IMPORT_C static CCenRepNotifyHandler* NewLC( MCenRepNotifyHandlerCallback& aCallback, 
+                                                     CRepository& aSession );
+        IMPORT_C void StartListeningL();
+
+        IMPORT_C void StopListening();
+
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C virtual ~CCenRepNotifyHandler();
+/*
+    protected:
+
+        void RunL();
+    
+        TInt RunError( TInt aError );
+
+        void DoCancel();
+*/
+    private:
+                                                   
+        CCenRepNotifyHandler( MCenRepNotifyHandlerCallback& aCallback, 
+                              CRepository& aSession );
+       
+    private:
+        
+        CRepository& iSession;  // not owned by this class
+        MCenRepNotifyHandlerCallback& iCallback; // not owned by this class
+//        TCenRepKeyType iKeyType;
+//        TUint32 iId;        
+//        TBool iWholeRepository;  // The flag to indicate if listening is for whole repository
+    };
+
+
+/**
+* Class provides a callback interface for handling the notifification
+* events from the Central Repository. The Client derives a class 
+* from this interface and implements the HandleNotify-methods that 
+* interest it.
+* An empty default implementation is provided for all of the methods.
+* In debug build the default implementations print out a debug trace.
+*
+* @publishedPartner
+* @released
+*/
+class MCenRepNotifyHandlerCallback
+    {
+
+    public:
+
+    /** 
+    * This callback method is used to notify the client about
+    * changes in keys when the whole repository is listened for.
+    *
+    * Note: It is not guaranteed that a notification will be received
+    *       for all keys, if multiple keys are changed in rapid succession
+    *       by multiple threads or when the whole repository is reset,
+    *       therefore only listen for whole repository if this is not an issue.
+    *
+    * @param aId Id of the key that has changed. If multiple keys were changed by
+    *            whole repository reset, value will be KInvalidNotificationId.
+    * @capability Dependent Capability required depends on implementation of override.
+    */
+    IMPORT_C virtual void HandleNotifyGeneric( TUint32 aId );
+
+    };
+
+#endif      // CENREPNOTIFYHANDLER_H
+
+// End of File
--- a/tsrc/centralrepositorystub/inc/centralrepository.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/centralrepositorystub/inc/centralrepository.h	Wed Sep 01 12:31:01 2010 +0100
@@ -26,7 +26,6 @@
 
 #include <e32base.h>
 
-const TInt KCenRepStubGlobalKeyValueMaxLen = 20; // stub stuff
 
 namespace NCentralRepositoryConstants
 /** Namespace encapsulating the CentralRepository constants.
@@ -257,10 +256,6 @@
     // Deletes heap reserved by previous function.
     static void DeleteStubAvcConfigKeys();
     
-    // Setter for static cenrep val, note amount of globals is limited
-    static TInt SetStubGlobal(TUint32 aKey, TInt aValue);
-    static void ResetStubGlobal();
-    
 
 public: // Stub data
 
@@ -283,16 +278,6 @@
     
     static TInt iStaticEncoderUid;
     
-    class TCenRepStubKeyValueEntry
-        {
-    public:
-        TUint iKey;
-        TInt iVal;
-        };
-        
-    static TCenRepStubKeyValueEntry iGlobalKeyVals[ KCenRepStubGlobalKeyValueMaxLen ];
-    static TInt iGlobalKeyValsTop;
-    
     TUid iRepositoryUid;
     
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/centralrepositorystub/src/cenrepnotifyhandlerstub.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "cenrepnotifyhandler.h"
+#include "centralrepository.h"
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CCenRepNotifyHandler::CCenRepNotifyHandler(
+     MCenRepNotifyHandlerCallback& aCallback, 
+     CRepository& aSession)
+     : iSession(aSession), iCallback(aCallback)
+    {
+    } 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CCenRepNotifyHandler* CCenRepNotifyHandler::NewL(
+     MCenRepNotifyHandlerCallback& aCallback, 
+     CRepository& aSession)
+    {
+    CCenRepNotifyHandler* newInstance = NewLC(aCallback, aSession);
+    CleanupStack::Pop();
+    return newInstance;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CCenRepNotifyHandler* CCenRepNotifyHandler::NewLC(
+     MCenRepNotifyHandlerCallback& aCallback, 
+     CRepository& aSession)
+    {
+    CCenRepNotifyHandler* newInstance = new (ELeave) CCenRepNotifyHandler(aCallback, aSession);
+    CleanupStack::PushL( newInstance );
+    
+    return newInstance;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CCenRepNotifyHandler::~CCenRepNotifyHandler()
+    {
+    
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CCenRepNotifyHandler::StartListeningL()
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CCenRepNotifyHandler::StopListening()
+    {
+    
+    }
+
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void MCenRepNotifyHandlerCallback::HandleNotifyGeneric(TUint32 /*aId*/)
+    {
+    
+    }
--- a/tsrc/centralrepositorystub/src/centralrepositorystub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/centralrepositorystub/src/centralrepositorystub.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -37,8 +37,6 @@
 TBool CRepository::iStaticWriteAvcKeysToStaticData = EFalse;
 TInt CRepository::iForceFailWithCode = KErrNone;
 TInt CRepository::iStaticEncoderUid = 0;
-CRepository::TCenRepStubKeyValueEntry CRepository::iGlobalKeyVals[ KCenRepStubGlobalKeyValueMaxLen ];
-TInt CRepository::iGlobalKeyValsTop = 0;
 
 
 // -----------------------------------------------------------------------------
@@ -103,7 +101,6 @@
         User::LeaveIfError( 
                 self->Set ( MusSettingsKeys::KSipProfileId,
                             0 /*default profile*/ ) );                    
-    
         User::LeaveIfError( 
                 self->Set ( MusSettingsKeys::KUiOrientation,
                             MusSettingsKeys::EPortrait ) );                    
@@ -126,9 +123,9 @@
 //
 EXPORT_C CRepository::~CRepository()
     {
-    iKeys.Close();
-    iValues.Close();
-    iDesC8Keys.Close();
+    iKeys.Reset();
+    iValues.Reset();
+    iDesC8Keys.Reset();
     delete iDesC8Values;   
     }
 
@@ -206,17 +203,7 @@
                 }
             }
         }
-    if ( iGlobalKeyValsTop >= 0 && iGlobalKeyValsTop < KCenRepStubGlobalKeyValueMaxLen )
-        {
-        for ( TInt i = 0; i < iGlobalKeyValsTop; i++ )
-            {
-            if ( iGlobalKeyVals[ i ].iKey == aKey )
-                {
-                aValue = CRepository::iGlobalKeyVals[ i ].iVal;
-                return KErrNone;
-                }
-            }
-        }
+    
     return err;
     }
 
@@ -491,32 +478,8 @@
     delete iStaticAvcConfigKeys;
     iStaticAvcConfigKeys = NULL;
     }
-
-void CRepository::ResetStubGlobal()
-    {
-    iGlobalKeyValsTop = 0;
-    }
-
-TInt CRepository::SetStubGlobal(TUint32 aKey, TInt aValue)
-    {
-    for ( TInt i = 0; i < iGlobalKeyValsTop; i++ )
-        {
-        if ( iGlobalKeyVals[ i ].iKey == aKey )
-            {
-            iGlobalKeyVals[ i ].iVal = aValue;
-            return KErrNone;
-            }
-        }
+  
     
-    if ( iGlobalKeyValsTop >= KCenRepStubGlobalKeyValueMaxLen )
-        {
-        return KErrNoMemory;
-        }
-    iGlobalKeyVals[ iGlobalKeyValsTop ].iKey = aKey;
-    iGlobalKeyVals[ iGlobalKeyValsTop ].iVal = aValue;
-    iGlobalKeyValsTop++;
-    return KErrNone;
-    }
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -524,7 +487,6 @@
 CRepository::CRepository( TUid aRepositoryUid )
     :iRepositoryUid( aRepositoryUid )
     {
-    
     }    
 
 
--- a/tsrc/cmusavainterfacestub/inc/cmusavainterfacestub.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/cmusavainterfacestub/inc/cmusavainterfacestub.h	Wed Sep 01 12:31:01 2010 +0100
@@ -94,7 +94,6 @@
     virtual TBool ExtensionAvailability();
     virtual TBool Available( MMusAvaObserver::TAvailabilityName aAvailability );
     virtual MMusAvaObserver::TAvailabilityStatus AvailabilityState( MMusAvaObserver::TAvailabilityName aAvailability );
-    virtual void PrepareForReceivedInviteL();
     
 public: //From MMusAvaObserver
 
--- a/tsrc/cmusavainterfacestub/src/cmusavainterfacestub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/cmusavainterfacestub/src/cmusavainterfacestub.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -202,19 +202,7 @@
         }
     return MMusAvaObserver::EMusAvaStatusNotExecuted;
     }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusAvaInterface2::PrepareForReceivedInviteL()
-    {
-    for ( TInt i = 0; i < iAvailabilities.Count(); i++ )
-       {
-       iAvailabilities[i]->PrepareForReceivedInviteL();
-       }
-    }
-
+    
 void CMusAvaInterface2::AvailabilityChanged(
         TAvailabilityName aName,
         TAvailabilityStatus aStatus )
@@ -241,36 +229,23 @@
 
     }
 
-
-// -----------------------------------------------------------------------------
-// CImplementationInformation::~CImplementationInformation
-// -----------------------------------------------------------------------------
-//
 CImplementationInformation::~CImplementationInformation()
     {
-    delete iData;
-    delete iDisplayName;
-    delete iOpaqueData;
+
     }
 
+
 CImplementationInformation* CImplementationInformation::NewL(
-    TUid	aUid,
-	TInt	aVersion,
-	HBufC*  aName,
-	HBufC8* aDataType,
-	HBufC8* aOpaqueData,
-	TDriveUnit aDrive,
-	TBool aRomOnly,
-	TBool aRomBased)
+    TUid	/*aUid*/,
+	TInt	/*aVersion*/,
+	HBufC*  /*aName*/,
+	HBufC8* /*aDataType*/,
+	HBufC8* /*aOpaqueData*/,
+	TDriveUnit /*aDrive*/,
+	TBool /*aRomOnly*/,
+	TBool /*aRomBased*/)
     {
-    CImplementationInformation* self = new(ELeave)CImplementationInformation();
-    CleanupStack::PushL(self);
-    self->iData = aDataType;
-    self->iDisplayName = aName;
-    self->iOpaqueData = aOpaqueData;
-    CleanupStack::Pop(self);
-    return self;
-    //return new (ELeave) CImplementationInformation();
+    return new (ELeave) CImplementationInformation();
     }
 
 void REComSession::DestroyedImplementation( TUid )
@@ -278,7 +253,6 @@
 
     }
 
-
 void REComSession::ListImplementationsL(
     TUid /*aInterfaceUid*/,
     RImplInfoPtrArray &aImplInfoArray )
@@ -314,34 +288,6 @@
     }
     
 
+    
 
-// -----------------------------------------------------------------------------
-// REComSession::ListImplementationsL
-// -----------------------------------------------------------------------------
-//
-void REComSession::ListImplementationsL(
-                            TUid aInterfaceUid,
-                            const TEComResolverParams& resolverParams,
-                            RImplInfoPtrArray& aImplInfoArray)
-    {
-    _LIT8(KDefaultEngineName,"MultimediaSharing");
-    
-    TUid uid(aInterfaceUid); 
-    TInt version = 1; 
-    HBufC*  name = _L("dummy").AllocLC();
-    HBufC8* dataType = _L8("MultimediaSharing").AllocLC();
-    HBufC8* opaqueData = _L8("dummy").AllocLC();
-    TDriveUnit drive;
-    TBool romOnly(ETrue);
-    TBool romBased(ETrue);
-    CImplementationInformation* info = 
-                    CImplementationInformation::NewL(uid,version,name,dataType,
-                                    opaqueData,drive,romOnly,romBased);
-    CleanupStack::Pop(3);
-    CleanupStack::PushL(info);
-    aImplInfoArray.AppendL(info);
-    CleanupStack::Pop(info);
-    }
 
-// End of File
-
--- a/tsrc/contactenginestub/inc/contactenginestub.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef __CONTACTENGINESTUB_H__
-#define __CONTACTENGINESTUB_H__
-
-#include <e32base.h>
-
-enum TContactEngineCalledFunction
-    {
-    EContactEngineStubNone,
-    EContactEngineStubSetText
-    };
-
-class ContactEngineStubHelper
-    {
-public:
-    
-    static void Reset();
-    static void SetErrorCode(TInt aVal); 
-    static TContactEngineCalledFunction GetCalledFunction();
-    static void SetSIPFieldFound( TBool aFound );
-    static void SetSIPFieldInfoFound( TBool aFound );
-    
-    };
-
-
-#endif
--- a/tsrc/contactenginestub/src/contactenginestub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "contactenginestub.h"
-
-#include <cntitem.h>
-#include <cntfield.h>
-#include <cntdef.h>
-#include <cntfldst.h>
-
-static TInt iValue = KErrNone;
-static TContactEngineCalledFunction iFunc = EContactEngineStubNone;
-static TBool iFindField = EFalse;
-static TBool iFindFieldInfo = ETrue;
-static CContactTextField iTextField;
-
-// -----------------------------------------------------------------------------
-// CContactTextField
-// -----------------------------------------------------------------------------
-//
-void CContactTextField::SetTextL(const TDesC& /*aText*/)
-    {
-    iFunc = EContactEngineStubSetText;
-    }
-
-CContactTextField::~CContactTextField()
-    {
-    
-    }
-
-void CContactTextField::InternalizeL(RReadStream& /*aStream*/)    
-    {
-
-    }
-void CContactTextField::ExternalizeL(RWriteStream& /*aStream*/) const    
-    {
-
-    }
-TStreamId CContactTextField::StoreL(CStreamStore& /*aStore*/) const    
-    {
-    return TStreamId( 0 );
-    }
-
-void CContactTextField::RestoreL(CStreamStore& /*aStore*/,RReadStream& /*aStream*/)    
-    {
-
-    }
-
-TBool CContactTextField::IsFull() const    
-    {
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// ContactEngineStubHelper
-// -----------------------------------------------------------------------------
-//
-void ContactEngineStubHelper::Reset()
-    {
-    iValue = KErrNone;
-    iFunc = EContactEngineStubNone;
-    iFindField = EFalse;
-    iFindFieldInfo = ETrue;
-    }
-
-void ContactEngineStubHelper::SetErrorCode( TInt aVal )
-    {
-    iValue = aVal;
-    }
-
-TContactEngineCalledFunction ContactEngineStubHelper::GetCalledFunction()
-    {
-    return iFunc;
-    }
-
-void ContactEngineStubHelper::SetSIPFieldFound( TBool aFound )
-    {
-    iFindField = aFound;
-    }
-
-void ContactEngineStubHelper::SetSIPFieldInfoFound( TBool aFound )
-    {
-    iFindFieldInfo = aFound;
-    }
--- a/tsrc/etelstub/inc/etelmm.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/etelstub/inc/etelmm.h	Wed Sep 01 12:31:01 2010 +0100
@@ -12665,6 +12665,7 @@
     static void SetConfStatus( RMobileConferenceCall::TMobileConferenceStatus aConfStatus );
     static void SetCallDirection( RMobileCall::TMobileCallDirection aDirection );
     static void SetCallEmergency( TBool aVal );
+    static void SetRemoteIdStatus( RMobileCall::TMobileCallRemoteIdentityStatus aStatus );
     };
 
 #endif // __ETELMM_H__
--- a/tsrc/etelstub/src/etelstub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/etelstub/src/etelstub.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -27,7 +27,8 @@
 static RMobileCall::TMobileCallStatus iCallStatus = RMobileCall::EStatusIdle; 
 static RMobileCall::TMobileCallDirection iDirection = RMobileCall::EDirectionUnknown;
 static TBool iReqToCancel = EFalse;
-static RTelSubSessionBase::TCalledFunction iCalledFunction = RTelSubSessionBase::ENone;  
+static RTelSubSessionBase::TCalledFunction iCalledFunction = RTelSubSessionBase::ENone;
+static RMobileCall::TMobileCallRemoteIdentityStatus iRemoteIdStatus = RMobileCall::ERemoteIdentityUnknown;
 
 
 EXPORT_C TInt RTelServer::Connect( int )
@@ -67,9 +68,7 @@
     
 EXPORT_C void RCall::Close()
     {
-    iCallEvent = RMobileCall::ELocalBarred;
-    iCallStatus = RMobileCall::EStatusUnknown; 
-    iDirection = RMobileCall::EDirectionUnknown;
+
     }
     
 EXPORT_C void RLine::Close()
@@ -227,6 +226,7 @@
     callInfo.iRemoteParty.iRemoteNumber.iTelNumber.Copy( KNumber() );
     callInfo.iRemoteParty.iDirection = iDirection;
     callInfo.iEmergency = iEmergency;
+    callInfo.iRemoteParty.iRemoteIdStatus = iRemoteIdStatus;
     RMobileCall::TMobileCallInfoV3Pckg pckg( callInfo );
     
     aBuffer.Copy( pckg );
@@ -365,3 +365,24 @@
     {
     iEmergency = aVal;
     }
+void RTelHelper::SetRemoteIdStatus( RMobileCall::TMobileCallRemoteIdentityStatus aStatus )
+    {
+    iRemoteIdStatus = aStatus;
+    }
+
+EXPORT_C void
+RMobilePhone::GetIdentityServiceStatus(TRequestStatus& aReqStatus,
+	TMobilePhoneIdService /*aService*/,
+	TMobilePhoneIdServiceStatus& /*aStatus*/,
+	TMobileInfoLocation /*aLocation*/) const
+	{
+	aReqStatus = KRequestPending;
+	}
+
+EXPORT_C void
+RMobilePhone::NotifyIdentityServiceStatus(TRequestStatus& aReqStatus,
+	const TMobilePhoneIdService /*aService*/,
+	TMobilePhoneIdServiceStatus& /*aStatus*/) const
+	{
+	aReqStatus = KRequestPending;
+	}
--- a/tsrc/fbsbitmapstub/inc/fbs.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/fbsbitmapstub/inc/fbs.h	Wed Sep 01 12:31:01 2010 +0100
@@ -15,15 +15,49 @@
 *
 */
 
-#ifndef __FBS_H__
-#define __FBS_H__
+#ifndef __FBSBITMAP__
+#define __FBSBITMAP__
 
 #include <e32base.h>
-#include <gdi.h>
-#include <bitmap.h>
+
+enum TDisplayMode
+    {
+    ///No display mode
+    ENoneCopy,
+    ///Monochrome display mode (1 bpp)
+    EGray2Copy,
+    ///Four grayscales display mode (2 bpp)
+    EGray4Copy,
+    ///16 grayscales display mode (4 bpp)
+    EGray16Copy,
+    ///256 grayscales display mode (8 bpp)
+    EGray256Copy,
+    ///Low colour EGA 16 colour display mode (4 bpp)
+    EColor16Copy,
+    ///256 colour display mode (8 bpp)
+    EColor256Copy,
+    ///64,000 colour display mode (16 bpp)
+    EColor64KCopy,
+    ///True colour display mode (24 bpp)
+    EColor16MCopy,
+    ///(Not an actual display mode used for moving buffers containing bitmaps)
+    ERgbCopy,
+    ///4096 colour display (12 bpp).
+    EColor4KCopy,
+    EColor16MUCopy,
+    ///Display mode with alpha (24bpp colour plus 8bpp alpha)
+    EColor16MACopy,
+    //Any new display mode should be insterted here!
+    //There might be up to 255 display modes, so value of the last
+    //inserted EColorXXX enum item should be less than 256 -
+    //BC reasons!
+    EColorLastCopy,
+    };
     
 class CFbsBitmap
 	{
+
+
 	public:
 	
 		CFbsBitmap();
@@ -32,30 +66,16 @@
 	
 	TInt Create( const TSize& aSizeInPixels, TDisplayMode aDispMode);
  
-TInt Load(const TDesC& aFileName,TInt32 aId=0,TBool aShareIfLoaded=ETrue);
-	TInt Load(const TDesC& aFileName,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset);
-	TInt Load(RFile& aFile,TInt32 aId=0,TBool aShareIfLoaded=ETrue);
-	TInt Load(RFile& aFile,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset);		  
-    
-	TInt Resize(const TSize& aSizeInPixels);
-	TSize SizeInPixels() const;
-	TSize value;
+	TInt CFbsBitmap::Load(const TDesC& /*aFileName*/,
+	                      TInt32 /*aId*/,TBool /*aShareIfLoaded*/);
+
 
+	TInt CFbsBitmap::Load(const TDesC& /*aFileName*/,
+	                      TInt32 /*aId*/,TBool /*aShareIfLoaded*/,
+	                      TUint /*aFileOffset*/);
 	
 
 	
 	};
 
-class CFbsFont
-	{
-	};
-
-class RFbsSession
-    {
-    };
-
-class CFbsTypefaceStore
-    {
-    };
-
-#endif
+#endif
\ No newline at end of file
--- a/tsrc/fbsbitmapstub/src/fbs.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/fbsbitmapstub/src/fbs.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -35,38 +35,17 @@
     return KErrNone;
 	}
 
-TInt CFbsBitmap::Load(const TDesC& aFileName,
-                      TInt32 aId,TBool aShareIfLoaded)
+TInt CFbsBitmap::Load(const TDesC& /*aFileName*/,
+                      TInt32 /*aId*/,TBool /*aShareIfLoaded*/)
     {
     return KErrNone;
     }
 
 
-TInt CFbsBitmap::Load(const TDesC& aFileName,
-                      TInt32 aId,TBool aShareIfLoaded,
-                      TUint aFileOffset)
-    {
-    return KErrNone;
-    }
-	
-TInt CFbsBitmap::Load(RFile& aFile,TInt32 aId,TBool aShareIfLoaded)
+TInt CFbsBitmap::Load(const TDesC& /*aFileName*/,
+                      TInt32 /*aId*/,TBool /*aShareIfLoaded*/,
+                      TUint /*aFileOffset*/)
     {
     return KErrNone;
     }
     
-TInt CFbsBitmap::Load(RFile& aFile,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset)
-    {
-    return KErrNone;
-    }
-    
-TInt CFbsBitmap::Resize(const TSize& aSizeInPixels)
-    {
-    value =  aSizeInPixels  ; 
-    return KErrNone;
-    }  
-    
-TSize CFbsBitmap::SizeInPixels() const
-    {
-    return value;
-    } 	
-    
--- a/tsrc/install/multimediasharing_udeb.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/install/multimediasharing_udeb.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -45,6 +45,7 @@
 ;MUS GENERAL
 "\epoc32\release\armv5\udeb\musmanagerserver.exe"-"!:\sys\bin\musmanagerserver.exe"
 "\epoc32\release\armv5\udeb\musmanagerclient.dll"-"!:\sys\bin\musmanagerclient.dll"
+"\epoc32\release\armv5\udeb\musengine.dll"-"!:\sys\bin\musengine.dll"
 "\epoc32\release\armv5\udeb\musindicator.dll"-"!:\sys\bin\musindicator.dll"
 "\epoc32\data\z\resource\musindicator.rsc"-"!:\resource\musindicator.rsc"
 "\epoc32\data\z\private\1028238D\tone.amr"-"!:\private\1028238D\tone.amr"
@@ -82,9 +83,5 @@
 "\EPOC32\DATA\Z\Resource\apps\mussettingsplugin.mif"-"!:\resource\apps\mussettingsplugin.mif"
 
 ;MCC Transcoder
-"\epoc32\RELEASE\armv5\udeb\mmcctranscoder.dll"-"!:\Sys\Bin\mmcctranscoder.dll"
-"\epoc32\data\Z\Resource\Plugins\mmcctranscoder.RSC"-"!:\resource\plugins\mmcctranscoder.RSC"
-
-; Livecomms MusEngine
-"\epoc32\release\armv5\udeb\musengineplugin.dll"-"!:\sys\bin\musengineplugin.dll"
-"\epoc32\data\z\resource\plugins\musengineplugin.rsc"-"!:\resource\plugins\musengineplugin.rsc"
+;"\epoc32\RELEASE\armv5\udeb\mmcctranscoder.dll"-"!:\Sys\Bin\mmcctranscoder.dll"
+;"\epoc32\data\Z\Resource\Plugins\mmcctranscoder.RSC"-"!:\resource\plugins\mmcctranscoder.RSC"
--- a/tsrc/install/multimediasharing_update_udeb.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/install/multimediasharing_update_udeb.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -28,81 +28,62 @@
 
 ; -----------------------------------------------------------------------------------
 
-;Multimediasharing binaries
-
-; Central repository
-;"\epoc32\data\z\private\10202be9\1028238b.txt"-"!:\private\10202BE9\1028238b.txt"
+;MUS FILES
+;for S60 3.2
 
-; Backup registration and restore
-;"\epoc32\data\z\private\1028238D\backup_registration.xml"-"!:\private\1028238D\backup_registration.xml"
-
-; User interface
-;"\epoc32\release\armv5\udeb\musui.exe"-"!:\sys\bin\musui.exe"
+;MUS CENREP KEY
+;"\epoc32\DATA\Z\private\10202be9\1028238b.txt"-"!:\private\10202BE9\1028238b.txt"
 
-"\epoc32\release\armv5\udeb\livecommsui.dll"-"!:\sys\bin\livecommsui.dll"
-
-;"\epoc32\data\z\resource\apps\musui.rsc"-"!:\resource\apps\musui.rsc"
-;"\epoc32\data\z\private\10003a3f\import\apps\musui_reg.rsc"-"!:\private\10003a3f\import\apps\musui_reg.rsc"
-
-; User interface DOCMLs
-;"\epoc32\data\z\data\others\lcidleview.docml"-"!:\data\others\lcidleview.docml"
-;"\epoc32\data\z\data\others\lcreceiveview.docml"-"!:\data\others\lcreceiveview.docml"
-;"\epoc32\data\z\data\others\lcsendview.docml"-"!:\data\others\lcsendview.docml"
-;"\epoc32\data\z\data\others\lctwowayview.docml"-"!:\data\others\lctwowayview.docml"
-;"\epoc32\data\z\data\others\lcvtview.docml"-"!:\data\others\lcvtview.docml"
-;"\epoc32\data\z\data\others\lcreceiveonlyview.docml"-"!:\data\others\lcreceiveonlyview.docml"
+;MUS UI
+"\epoc32\release\armv5\udeb\musui.exe"-"!:\sys\bin\musui.exe"
+"\epoc32\data\z\resource\apps\musui.mbm"-"!:\resource\apps\musui.mbm"
+"\epoc32\data\z\resource\apps\musui_aif.mif"-"!:\resource\apps\musui_aif.mif"
+"\epoc32\data\z\resource\apps\musuiicons.mif"-"!:\resource\apps\musuiicons.mif"
+"\epoc32\data\z\resource\apps\musuitoolbaricons.mif"-"!:\resource\apps\musuitoolbaricons.mif"
+"\epoc32\data\z\resource\apps\musui.rsc"-"!:\resource\apps\musui.rsc"
+"\epoc32\data\z\private\10003a3f\apps\musui_reg.rsc"-"!:\private\10003a3f\import\apps\musui_reg.rsc"
 
-; General components
-;"\epoc32\release\armv5\udeb\musmanagerserver.exe"-"!:\sys\bin\musmanagerserver.exe"
-;"\epoc32\release\armv5\udeb\musmanagerclient.dll"-"!:\sys\bin\musmanagerclient.dll"
-;"\epoc32\release\armv5\udeb\musindicator.dll"-"!:\sys\bin\musindicator.dll"
-;"\epoc32\data\z\resource\musindicator.rsc"-"!:\resource\musindicator.rsc"
-;"\epoc32\data\z\private\1028238D\tone.amr"-"!:\private\1028238D\tone.amr"
-;"\epoc32\data\z\resource\apps\musindicatoricons.mif"-"!:\resource\apps\musindicatoricons.mif"
-;"\epoc32\data\z\resource\apps\musindicatoricons.mbm"-"!:\resource\apps\musindicatoricons.mbm"
+;MUS GENERAL
+"\epoc32\release\armv5\udeb\musmanagerserver.exe"-"!:\sys\bin\musmanagerserver.exe"
+"\epoc32\release\armv5\udeb\musmanagerclient.dll"-"!:\sys\bin\musmanagerclient.dll"
+"\epoc32\release\armv5\udeb\musengine.dll"-"!:\sys\bin\musengine.dll"
+"\epoc32\release\armv5\udeb\musindicator.dll"-"!:\sys\bin\musindicator.dll"
+"\epoc32\data\z\resource\musindicator.rsc"-"!:\resource\musindicator.rsc"
+"\epoc32\data\z\private\1028238D\tone.amr"-"!:\private\1028238D\tone.amr"
+"\epoc32\data\z\resource\apps\musindicatoricons.mif"-"!:\resource\apps\musindicatoricons.mif"
+"\epoc32\data\z\resource\apps\musindicatoricons.mbm"-"!:\resource\apps\musindicatoricons.mbm"
+
+;MUS ECOM PLUGINS
 
-; AlwaysOnline Plugin.
-;"\epoc32\release\armv5\udeb\musaoplugin.dll"-"!:\sys\bin\musaoplugin.dll"
-;"\epoc32\data\z\Resource\Plugins\musaoplugin.RSC"-"!:\resource\plugins\musaoplugin.RSC"
+; Always Online Plugin
+"\epoc32\release\armv5\udeb\musaoplugin.dll"-"!:\sys\bin\musaoplugin.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\musaoplugin.RSC"-"!:\resource\plugins\musaoplugin.RSC"
 
-; Sip client resolver Plugin
-; In VOIP terminals, MuS uses same client resolver plugin as VoIP.
-; In all other terminals, a separate resolver plugin is needed.
-; So uncomment the below lines if phone do not have VOIP.
-;"\epoc32\release\armv5\udeb\mussipcrplugin.dll"-"!:\sys\bin\mussipcrplugin.dll"
-;"\epoc32\data\z\Resource\Plugins\mussipcrplugin.RSC"-"!:\resource\plugins\mussipcrplugin.RSC"
+; SIP Client Resolver Plugin
+"\epoc32\release\armv5\udeb\mussipcrplugin.dll"-"!:\sys\bin\mussipcrplugin.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\mussipcrplugin.RSC"-"!:\resource\plugins\mussipcrplugin.RSC"
 
-; AIW provider Plugin
-;"\epoc32\release\armv5\udeb\musaiwprovider.dll"-"!:\sys\bin\musaiwprovider.dll"
-;"\epoc32\data\z\Resource\Plugins\musaiwprovider.RSC"-"!:\resource\plugins\musaiwprovider.RSC"
-;"\epoc32\data\z\Resource\musaiwproviderui.RSC"-"!:\resource\musaiwproviderui.RSC"
+; AIW Provider Plugin
+"\epoc32\release\armv5\udeb\musaiwprovider.dll"-"!:\sys\bin\musaiwprovider.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\musaiwprovider.RSC"-"!:\resource\plugins\musaiwprovider.RSC"
+"\EPOC32\DATA\Z\Resource\musaiwproviderui.RSC"-"!:\resource\musaiwproviderui.RSC"
 
 ; Availability Plugin
-;"\epoc32\release\armv5\udeb\musavailabilityplugin.dll"-"!:\sys\bin\musavailabilityplugin.dll"
-;"\epoc32\data\z\Resource\Plugins\musavailabilityplugin.RSC"-"!:\resource\plugins\musavailabilityplugin.RSC"
+"\epoc32\release\armv5\udeb\musavailabilityplugin.dll"-"!:\sys\bin\musavailabilityplugin.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\musavailabilityplugin.RSC"-"!:\resource\plugins\musavailabilityplugin.RSC"
 
-; Wireless Provisioning Adapter
-;"\epoc32\release\armv5\udeb\muswpadapter.dll"-"!:\sys\bin\muswpadapter.dll"
-;"\epoc32\data\z\Resource\Plugins\muswpadapter.RSC"-"!:\resource\plugins\muswpadapter.RSC"
-;"\epoc32\data\z\Resource\muswpadapterresource.RSC"-"!:\resource\muswpadapterresource.RSC"
-
-; Settings UI
-;"\epoc32\release\armv5\udeb\mussettingsui.dll"-"!:\sys\bin\mussettingsui.dll"
-;"\epoc32\data\z\Resource\Plugins\mussettingsui.RSC"-"!:\resource\plugins\mussettingsui.RSC"
-;"\epoc32\data\z\Resource\mussettingsuirsc.RSC"-"!:\resource\mussettingsuirsc.RSC"
-;"\epoc32\data\z\Resource\apps\mussettingsplugin.mif"-"!:\resource\apps\mussettingsplugin.mif"
+; WirelessProvisioning Adapter
+"\epoc32\release\armv5\udeb\muswpadapter.dll"-"!:\sys\bin\muswpadapter.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\muswpadapter.RSC"-"!:\resource\plugins\muswpadapter.RSC"
+"\EPOC32\DATA\Z\Resource\muswpadapterresource.RSC"-"!:\resource\muswpadapterresource.RSC"
 
-; MCC Transcoder
-;"\epoc32\release\armv5\udeb\mmcctranscoder.dll"-"!:\Sys\Bin\mmcctranscoder.dll"
-;"\epoc32\data\z\Resource\Plugins\mmcctranscoder.RSC"-"!:\resource\plugins\mmcctranscoder.RSC"
+;SETTINGS UI
+"\epoc32\release\armv5\udeb\mussettingsui.dll"-"!:\sys\bin\mussettingsui.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\mussettingsui.RSC"-"!:\resource\plugins\mussettingsui.RSC"
+"\EPOC32\DATA\Z\Resource\mussettingsuirsc.RSC"-"!:\resource\mussettingsuirsc.RSC"
+"\EPOC32\DATA\Z\Resource\apps\mussettingsplugin.mif"-"!:\resource\apps\mussettingsplugin.mif"
 
-; Help files
-;"\epoc32\data\z\Resource\xhtml\01\0x10282491\contents.zip"-"!:\resource\xhtml\01\0x10282491\contents.zip"
-;"\epoc32\data\z\Resource\xhtml\01\0x10282491\keywords.xml"-"!:\resource\xhtml\01\0x10282491\keywords.xml"
-;"\epoc32\data\z\Resource\xhtml\01\0x10282491\index.xml"-"!:\resource\xhtml\01\0x10282491\index.xml"
-;"\epoc32\data\z\Resource\xhtml\01\0x10282491\meta.xml"-"!:\resource\xhtml\01\0x10282491\meta.xml"
+;MCC Transcoder
+;"\epoc32\RELEASE\armv5\udeb\mmcctranscoder.dll"-"!:\Sys\Bin\mmcctranscoder.dll"
+;"\epoc32\data\Z\Resource\Plugins\mmcctranscoder.RSC"-"!:\resource\plugins\mmcctranscoder.RSC"
 
-; Engine
-;"\epoc32\release\armv5\udeb\musengineplugin.dll"-"!:\sys\bin\musengineplugin.dll"
-;"\epoc32\data\z\resource\plugins\musengineplugin.rsc"-"!:\resource\plugins\musengineplugin.rsc"
-
--- a/tsrc/install/multimediasharing_update_urel.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/install/multimediasharing_update_urel.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -28,80 +28,61 @@
 
 ; -----------------------------------------------------------------------------------
 
-;Multimediasharing binaries
-
-; Central repository
-;"\epoc32\data\z\private\10202be9\1028238b.txt"-"!:\private\10202BE9\1028238b.txt"
+;MUS FILES
+;for S60 3.2
 
-; Backup registration and restore
-;"\epoc32\data\z\private\1028238D\backup_registration.xml"-"!:\private\1028238D\backup_registration.xml"
-
-; User interface
-;"\epoc32\release\armv5\urel\musui.exe"-"!:\sys\bin\musui.exe"
+;MUS CENREP KEY
+;"\epoc32\DATA\Z\private\10202be9\1028238b.txt"-"!:\private\10202BE9\1028238b.txt"
 
-"\epoc32\release\armv5\urel\livecommsui.dll"-"!:\sys\bin\livecommsui.dll"
-
-;"\epoc32\data\z\resource\apps\musui.rsc"-"!:\resource\apps\musui.rsc"
-;"\epoc32\data\z\private\10003a3f\import\apps\musui_reg.rsc"-"!:\private\10003a3f\import\apps\musui_reg.rsc"
-
-; User interface DOCMLs
-;"\epoc32\data\z\data\others\lcidleview.docml"-"!:\data\others\lcidleview.docml"
-;"\epoc32\data\z\data\others\lcreceiveview.docml"-"!:\data\others\lcreceiveview.docml"
-;"\epoc32\data\z\data\others\lcsendview.docml"-"!:\data\others\lcsendview.docml"
-;"\epoc32\data\z\data\others\lctwowayview.docml"-"!:\data\others\lctwowayview.docml"
-;"\epoc32\data\z\data\others\lcvtview.docml"-"!:\data\others\lcvtview.docml"
-;"\epoc32\data\z\data\others\lcreceiveonlyview.docml"-"!:\data\others\lcreceiveonlyview.docml"
+;MUS UI
+"\epoc32\release\armv5\urel\musui.exe"-"!:\sys\bin\musui.exe"
+"\epoc32\data\z\resource\apps\musui.mbm"-"!:\resource\apps\musui.mbm"
+"\epoc32\data\z\resource\apps\musui_aif.mif"-"!:\resource\apps\musui_aif.mif"
+"\epoc32\data\z\resource\apps\musuiicons.mif"-"!:\resource\apps\musuiicons.mif"
+"\epoc32\data\z\resource\apps\musuitoolbaricons.mif"-"!:\resource\apps\musuitoolbaricons.mif"
+"\epoc32\data\z\resource\apps\musui.rsc"-"!:\resource\apps\musui.rsc"
+"\epoc32\data\z\private\10003a3f\apps\musui_reg.rsc"-"!:\private\10003a3f\import\apps\musui_reg.rsc"
 
-; General components
-;"\epoc32\release\armv5\urel\musmanagerserver.exe"-"!:\sys\bin\musmanagerserver.exe"
-;"\epoc32\release\armv5\urel\musmanagerclient.dll"-"!:\sys\bin\musmanagerclient.dll"
-;"\epoc32\release\armv5\urel\musindicator.dll"-"!:\sys\bin\musindicator.dll"
-;"\epoc32\data\z\resource\musindicator.rsc"-"!:\resource\musindicator.rsc"
-;"\epoc32\data\z\private\1028238D\tone.amr"-"!:\private\1028238D\tone.amr"
-;"\epoc32\data\z\resource\apps\musindicatoricons.mif"-"!:\resource\apps\musindicatoricons.mif"
-;"\epoc32\data\z\resource\apps\musindicatoricons.mbm"-"!:\resource\apps\musindicatoricons.mbm"
+;MUS GENERAL
+"\epoc32\release\armv5\urel\musmanagerserver.exe"-"!:\sys\bin\musmanagerserver.exe"
+"\epoc32\release\armv5\urel\musmanagerclient.dll"-"!:\sys\bin\musmanagerclient.dll"
+"\epoc32\release\armv5\urel\musengine.dll"-"!:\sys\bin\musengine.dll"
+"\epoc32\release\armv5\urel\musindicator.dll"-"!:\sys\bin\musindicator.dll"
+"\epoc32\data\z\resource\musindicator.rsc"-"!:\resource\musindicator.rsc"
+"\epoc32\data\z\private\1028238D\tone.amr"-"!:\private\1028238D\tone.amr"
+"\epoc32\data\z\resource\apps\musindicatoricons.mif"-"!:\resource\apps\musindicatoricons.mif"
+"\epoc32\data\z\resource\apps\musindicatoricons.mbm"-"!:\resource\apps\musindicatoricons.mbm"
+
+;MUS ECOM PLUGINS
 
-; AlwaysOnline Plugin.
-;"\epoc32\release\armv5\urel\musaoplugin.dll"-"!:\sys\bin\musaoplugin.dll"
-;"\epoc32\data\z\Resource\Plugins\musaoplugin.RSC"-"!:\resource\plugins\musaoplugin.RSC"
+; Always Online Plugin
+"\epoc32\release\armv5\urel\musaoplugin.dll"-"!:\sys\bin\musaoplugin.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\musaoplugin.RSC"-"!:\resource\plugins\musaoplugin.RSC"
 
-; Sip client resolver Plugin
-; In VOIP terminals, MuS uses same client resolver plugin as VoIP.
-; In all other terminals, a separate resolver plugin is needed.
-; So uncomment the below lines if phone do not have VOIP.
-;"\epoc32\release\armv5\urel\mussipcrplugin.dll"-"!:\sys\bin\mussipcrplugin.dll"
-;"\epoc32\data\z\Resource\Plugins\mussipcrplugin.RSC"-"!:\resource\plugins\mussipcrplugin.RSC"
+; SIP Client Resolver Plugin
+"\epoc32\release\armv5\urel\mussipcrplugin.dll"-"!:\sys\bin\mussipcrplugin.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\mussipcrplugin.RSC"-"!:\resource\plugins\mussipcrplugin.RSC"
 
-; AIW provider Plugin
-;"\epoc32\release\armv5\urel\musaiwprovider.dll"-"!:\sys\bin\musaiwprovider.dll"
-;"\epoc32\data\z\Resource\Plugins\musaiwprovider.RSC"-"!:\resource\plugins\musaiwprovider.RSC"
-;"\epoc32\data\z\Resource\musaiwproviderui.RSC"-"!:\resource\musaiwproviderui.RSC"
+; AIW Provider Plugin
+"\epoc32\release\armv5\urel\musaiwprovider.dll"-"!:\sys\bin\musaiwprovider.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\musaiwprovider.RSC"-"!:\resource\plugins\musaiwprovider.RSC"
+"\EPOC32\DATA\Z\Resource\musaiwproviderui.RSC"-"!:\resource\musaiwproviderui.RSC"
 
 ; Availability Plugin
-;"\epoc32\release\armv5\urel\musavailabilityplugin.dll"-"!:\sys\bin\musavailabilityplugin.dll"
-;"\epoc32\data\z\Resource\Plugins\musavailabilityplugin.RSC"-"!:\resource\plugins\musavailabilityplugin.RSC"
+"\epoc32\release\armv5\urel\musavailabilityplugin.dll"-"!:\sys\bin\musavailabilityplugin.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\musavailabilityplugin.RSC"-"!:\resource\plugins\musavailabilityplugin.RSC"
 
-; Wireless Provisioning Adapter
-;"\epoc32\release\armv5\urel\muswpadapter.dll"-"!:\sys\bin\muswpadapter.dll"
-;"\epoc32\data\z\Resource\Plugins\muswpadapter.RSC"-"!:\resource\plugins\muswpadapter.RSC"
-;"\epoc32\data\z\Resource\muswpadapterresource.RSC"-"!:\resource\muswpadapterresource.RSC"
-
-; Settings UI
-;"\epoc32\release\armv5\urel\mussettingsui.dll"-"!:\sys\bin\mussettingsui.dll"
-;"\epoc32\data\z\Resource\Plugins\mussettingsui.RSC"-"!:\resource\plugins\mussettingsui.RSC"
-;"\epoc32\data\z\Resource\mussettingsuirsc.RSC"-"!:\resource\mussettingsuirsc.RSC"
-;"\epoc32\data\z\Resource\apps\mussettingsplugin.mif"-"!:\resource\apps\mussettingsplugin.mif"
+; WirelessProvisioning Adapter
+"\epoc32\release\armv5\urel\muswpadapter.dll"-"!:\sys\bin\muswpadapter.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\muswpadapter.RSC"-"!:\resource\plugins\muswpadapter.RSC"
+"\EPOC32\DATA\Z\Resource\muswpadapterresource.RSC"-"!:\resource\muswpadapterresource.RSC"
 
-; MCC Transcoder
-;"\epoc32\release\armv5\urel\mmcctranscoder.dll"-"!:\Sys\Bin\mmcctranscoder.dll"
-;"\epoc32\data\z\Resource\Plugins\mmcctranscoder.RSC"-"!:\resource\plugins\mmcctranscoder.RSC"
+;SETTINGS UI
+"\epoc32\release\armv5\urel\mussettingsui.dll"-"!:\sys\bin\mussettingsui.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\mussettingsui.RSC"-"!:\resource\plugins\mussettingsui.RSC"
+"\EPOC32\DATA\Z\Resource\mussettingsuirsc.RSC"-"!:\resource\mussettingsuirsc.RSC"
+"\EPOC32\DATA\Z\Resource\apps\mussettingsplugin.mif"-"!:\resource\apps\mussettingsplugin.mif"
 
-; Help files
-;"\epoc32\data\z\Resource\xhtml\01\0x10282491\contents.zip"-"!:\resource\xhtml\01\0x10282491\contents.zip"
-;"\epoc32\data\z\Resource\xhtml\01\0x10282491\keywords.xml"-"!:\resource\xhtml\01\0x10282491\keywords.xml"
-;"\epoc32\data\z\Resource\xhtml\01\0x10282491\index.xml"-"!:\resource\xhtml\01\0x10282491\index.xml"
-;"\epoc32\data\z\Resource\xhtml\01\0x10282491\meta.xml"-"!:\resource\xhtml\01\0x10282491\meta.xml"
-
-; Engine
-;"\epoc32\release\armv5\urel\musengineplugin.dll"-"!:\sys\bin\musengineplugin.dll"
-;"\epoc32\data\z\resource\plugins\musengineplugin.rsc"-"!:\resource\plugins\musengineplugin.rsc"
+;MCC Transcoder
+;"\epoc32\RELEASE\armv5\urel\mmcctranscoder.dll"-"!:\Sys\Bin\mmcctranscoder.dll"
+;"\epoc32\data\Z\Resource\Plugins\mmcctranscoder.RSC"-"!:\resource\plugins\mmcctranscoder.RSC"
--- a/tsrc/install/multimediasharing_urel.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/install/multimediasharing_urel.pkg	Wed Sep 01 12:31:01 2010 +0100
@@ -45,6 +45,7 @@
 ;MUS GENERAL
 "\epoc32\release\armv5\urel\musmanagerserver.exe"-"!:\sys\bin\musmanagerserver.exe"
 "\epoc32\release\armv5\urel\musmanagerclient.dll"-"!:\sys\bin\musmanagerclient.dll"
+"\epoc32\release\armv5\urel\musengine.dll"-"!:\sys\bin\musengine.dll"
 "\epoc32\release\armv5\urel\musindicator.dll"-"!:\sys\bin\musindicator.dll"
 "\epoc32\data\z\resource\musindicator.rsc"-"!:\resource\musindicator.rsc"
 "\epoc32\data\z\private\1028238D\tone.amr"-"!:\private\1028238D\tone.amr"
@@ -82,9 +83,5 @@
 "\EPOC32\DATA\Z\Resource\apps\mussettingsplugin.mif"-"!:\resource\apps\mussettingsplugin.mif"
 
 ;MCC Transcoder
-"\epoc32\RELEASE\armv5\urel\mmcctranscoder.dll"-"!:\Sys\Bin\mmcctranscoder.dll"
-"\epoc32\data\Z\Resource\Plugins\mmcctranscoder.RSC"-"!:\resource\plugins\mmcctranscoder.RSC"
-
-; Livecomms MusEngine
-"\epoc32\release\armv5\urel\musengineplugin.dll"-"!:\sys\bin\musengineplugin.dll"
-"\epoc32\data\z\resource\plugins\musengineplugin.rsc"-"!:\resource\plugins\musengineplugin.rsc"
\ No newline at end of file
+;"\epoc32\RELEASE\armv5\urel\mmcctranscoder.dll"-"!:\Sys\Bin\mmcctranscoder.dll"
+;"\epoc32\data\Z\Resource\Plugins\mmcctranscoder.RSC"-"!:\resource\plugins\mmcctranscoder.RSC"
--- a/tsrc/mceclientstub/group/mceclientstub.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/group/mceclientstub.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,7 +18,6 @@
 
 // To get the APP_LAYER_SYSTEMINCLUDE-definition
 #include <platform_paths.hrh>
-
 #include <data_caging_paths.hrh>
 #include<eunitcaps.h>
 
@@ -56,18 +55,7 @@
 SOURCE                  mcetransactiondatacontainer.cpp
 SOURCE                  staticdllentry.cpp
 
-SOURCEPATH              ../../sipprofilestub/src
-SOURCE                  sipprofileregistrybasestub.cpp
-SOURCE                  sipprofileregistrystub.cpp
-SOURCE                  sipprofilestub.cpp
-
-
 USERINCLUDE             ../inc
-USERINCLUDE		../../sipprofilestub/inc
-
-
-// to replace SIP profiles with a stub
-SYSTEMINCLUDE           ../../sipprofilestub/inc
 
 // Default system include paths for application layer modules.
 APP_LAYER_SYSTEMINCLUDE
--- a/tsrc/mceclientstub/inc/mcecamerasource.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/inc/mcecamerasource.h	Wed Sep 01 12:31:01 2010 +0100
@@ -49,8 +49,6 @@
 class CMceCameraSource : public CMceMediaSource
 	{
     friend class UT_CMusEngLiveSession;
-    friend class UT_CMusEngTwoWaySession;
-    friend class UT_TMusEngCameraHandler;
 
 	public: // Constructors and destructor
 
@@ -66,12 +64,6 @@
 	    */
 		IMPORT_C static CMceCameraSource* NewLC( CMceManager& aManager );
 		
-        /// Not in the real implementation 
-        IMPORT_C static CMceCameraSource* NewL();		
-		
-		/// Not in the real implementation 
-		IMPORT_C static CMceCameraSource* NewLC();
-		
 	    /**
 	    * Destructor.
 	    */
@@ -218,6 +210,11 @@
 	    * C++ constructor.
 	    */
 		CMceCameraSource();
+
+	    /**
+	    * Second-phase constructor.
+	    */
+		void ConstructL( CMceManager* aManager );
     
     private: // Owned data
    
@@ -235,7 +232,6 @@
     public: // stub data
 	
 	    TInt iCameraIndex;
-	    TInt iCameraCount;
         TInt iZoomFactor;
         TInt iDigitalZoomFactor;
         TInt iContrast;
--- a/tsrc/mceclientstub/inc/mcedisplaysink.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/inc/mcedisplaysink.h	Wed Sep 01 12:31:01 2010 +0100
@@ -71,12 +71,6 @@
 	    */
 		IMPORT_C static CMceDisplaySink* NewLC( CMceManager& aManager );
 
-		/// Not in the real implementation
-        IMPORT_C static CMceDisplaySink* NewL();
-
-        /// Not in the real implementation
-        IMPORT_C static CMceDisplaySink* NewLC();		
-		
 	    /**
 	    * Destructor.
 	    */
@@ -175,6 +169,11 @@
 	     */
 		CMceDisplaySink();
 
+	    /**
+	    * second-phase constructor
+	    */
+		void ConstructL( CMceManager* aManager );
+
     private: // Reserved for future use
     
         TAny* iReserved;         	
--- a/tsrc/mceclientstub/inc/mceinsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/inc/mceinsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -160,7 +160,7 @@
 	    * Two-phased constructor.
 	    * For temporay use only.
 	    */
-        IMPORT_C static CMceInSession* NewL();
+		static CMceInSession* NewL();
 
 	    /**
 	     * C++ default constructor.
@@ -196,4 +196,4 @@
 		};
 
 
-	#endif 
+	#endif 
\ No newline at end of file
--- a/tsrc/mceclientstub/inc/mceoutsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/inc/mceoutsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -86,9 +86,6 @@
 	    */
 		IMPORT_C static CMceOutSession* NewL(CMceRefer& aRefer);
 	    
-		/// Note: This function exists only in the stub
-	    IMPORT_C static	CMceOutSession* NewL();
-		
 	    /**
 	    * Destructor.
 	    */
--- a/tsrc/mceclientstub/inc/mcesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/inc/mcesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -275,15 +275,14 @@
         */
         IMPORT_C void SetModifierL( TMceSessionModifier aModifier, 
                                     TUint aValue );  
-                                         
-        /**
+
+		/**
          * Returns the identifier of profile used by the sesison.
          * @return TUint32 Identifier of the used profile. 0, 
          *         if session is setup without profile.
          */
         IMPORT_C TUint32 Profile() const;
-        
-        
+
     public:
         
         CMceManager& Manager() const;
--- a/tsrc/mceclientstub/src/mcecamerasource.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/src/mcecamerasource.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -56,35 +56,14 @@
 // 
 // -----------------------------------------------------------------------------
 //
-EXPORT_C CMceCameraSource* CMceCameraSource::NewLC( CMceManager& /*aManager*/ )
+EXPORT_C CMceCameraSource* CMceCameraSource::NewLC( CMceManager& aManager )
     {
-    CMceCameraSource* self = new( ELeave )CMceCameraSource();
+    CMceCameraSource* self = new (ELeave) CMceCameraSource();
     CleanupStack::PushL( self );
+    self->ConstructL( &aManager );
     return self;
     }
 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceCameraSource* CMceCameraSource::NewL()
-    {
-    CMceCameraSource* self = CMceCameraSource::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceCameraSource* CMceCameraSource::NewLC()
-    {
-    CMceCameraSource* self = new( ELeave )CMceCameraSource();
-    CleanupStack::PushL( self );
-    return self;
-    }
 
 // -----------------------------------------------------------------------------
 // 
@@ -121,7 +100,7 @@
 //	    
 EXPORT_C TInt CMceCameraSource::CamerasAvailable() const
     {
-    return iCameraCount;
+    return 1;
     }
 
 
@@ -148,9 +127,6 @@
 EXPORT_C void CMceCameraSource::GetCameraInfo( TCameraInfo& aInfo ) const
     {
     aInfo = iCameraInfo;
-    
-    aInfo.iMaxZoom += iCameraIndex*5;
-    aInfo.iMaxDigitalZoom += iCameraIndex*5;
     }
 
 
@@ -346,11 +322,20 @@
     iContrast( 0 ),
     iBrightness( 0 ),
     iExposure( CCamera::EExposureAuto ),
-    iWhiteBalance( CCamera::EWBAuto ),
-    iCameraCount ( 2 )
+    iWhiteBalance( CCamera::EWBAuto )
     {
     iType = KMceCameraSource;
     iCameraInfo.iMinZoom = 1;
     iCameraInfo.iMaxZoom = 3;
     iCameraInfo.iMaxDigitalZoom = 10;
     }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMceCameraSource::ConstructL( CMceManager* /*aManager*/ )
+    {
+    }
+
--- a/tsrc/mceclientstub/src/mcedisplaysink.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/src/mcedisplaysink.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -46,35 +46,14 @@
 // 
 // -----------------------------------------------------------------------------
 //
-EXPORT_C CMceDisplaySink* CMceDisplaySink::NewLC( CMceManager& /*aManager*/ )
+EXPORT_C CMceDisplaySink* CMceDisplaySink::NewLC( CMceManager& aManager )
     {
     CMceDisplaySink* self = new (ELeave) CMceDisplaySink();
     CleanupStack::PushL( self );
+    self->ConstructL( &aManager );
     return self;
     }
 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceDisplaySink* CMceDisplaySink::NewL()
-    {
-    CMceDisplaySink* self = CMceDisplaySink::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceDisplaySink* CMceDisplaySink::NewLC()
-    {
-    CMceDisplaySink* self = new( ELeave )CMceDisplaySink();
-    CleanupStack::PushL( self );
-    return self;
-    }
 
 // -----------------------------------------------------------------------------
 // 
@@ -221,3 +200,17 @@
     {
     iType = KMceDisplaySink;
     }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMceDisplaySink::ConstructL( CMceManager* /*aManager*/ )
+    {
+    }
+
+
+
+
+
--- a/tsrc/mceclientstub/src/mcefilesource.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/src/mcefilesource.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -324,6 +324,8 @@
 //
 void CMceFileSource::InitializeL( CMceManager* aManager )
     {
+    __ASSERT_ALWAYS( aManager, User::Leave( KErrArgument ) );
+
     iDuration = TTimeIntervalMicroSeconds( 100000000 );
     
     iAudioElementCount = 1;
--- a/tsrc/mceclientstub/src/mceinsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/src/mceinsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -52,7 +52,7 @@
 // -----------------------------------------------------------------------------
 //
 
-EXPORT_C CMceInSession* CMceInSession::NewL()
+CMceInSession* CMceInSession::NewL()
     {
     CMceInSession* self = new (ELeave) CMceInSession( NULL, 0 );
     CleanupStack::PushL( self );
--- a/tsrc/mceclientstub/src/mceoutsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mceclientstub/src/mceoutsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -31,16 +31,10 @@
 //
 EXPORT_C CMceOutSession* CMceOutSession::NewL(
                         CMceManager& aManager,
-                        CSIPProfile& aProfile,
+                        CSIPProfile& /*aProfile*/,
                         const TDesC8& aRecipient,
 						HBufC8* aOriginator )
     {
-    // Check that profile has been registered
-    TBool profileRegistered = EFalse;   
-        
-    aProfile.GetParameter( KSIPProfileRegistered, profileRegistered  );  
-    __ASSERT_ALWAYS( profileRegistered, User::Leave( KErrCouldNotConnect ) );        
-    
     CMceOutSession* self = new (ELeave) CMceOutSession( &aManager, 0 );
     CleanupStack::PushL( self );
     self->ConstructL( aRecipient, aOriginator );
@@ -66,14 +60,6 @@
     return NULL;
     }
 
-// -----------------------------------------------------------------------------
-// CMceOutSession::NewL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMceOutSession* CMceOutSession::NewL()
-    {
-    return new( ELeave )CMceOutSession( NULL, 0 );
-    }
 
 // -----------------------------------------------------------------------------
 // CMceOutSession::~CMceOutSession
@@ -118,7 +104,10 @@
     delete aContent;
     delete aContentHeaders;
 
-	iState = CMceSession::EOffering; 
+	iState = CMceSession::EOffering;
+    
+    
+    
     }
 
 
@@ -171,6 +160,7 @@
 //
 void CMceOutSession::ConstructL( const TDesC8& aRecipient, HBufC8* aOriginator )
     {
+  
     delete iRecipient;
     iRecipient = NULL;
     iRecipient = aRecipient.AllocL();
@@ -184,4 +174,6 @@
         }
         
     CMceSession::ConstructL();
+    
+    
     }
--- a/tsrc/mmusavasettingsstub/inc/mmusavasettingsstub.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mmusavasettingsstub/inc/mmusavasettingsstub.h	Wed Sep 01 12:31:01 2010 +0100
@@ -107,6 +107,17 @@
      * @return SIP profile Id.
      */
     virtual TInt SipProfileId() const;
+    
+    /**
+    * Returns the direction of the mobile call.
+    *
+    * @return 0, if the direction of the call is unknown.
+    *         1, call is from public number.
+    *         2, call is from private number   
+    */         
+    virtual TInt CallPrivacy();
+    
+    
 
 private: // data
 
@@ -155,6 +166,13 @@
      * Own.
      */
     CDesCArrayFlat* iAudioCodecs;
+    
+  	/**
+  	* Call privacy indicator
+  	* 
+  	*/
+  
+	TInt iCallPrivacy;
 
     MUS_UNITTEST( UT_CMusAvailabilityPluginManager )
 
--- a/tsrc/mmusavasettingsstub/src/mmusavasettingsstub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/mmusavasettingsstub/src/mmusavasettingsstub.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -93,3 +93,9 @@
     {
     return iSipProfileId;
     }
+
+TInt CMusAvaSettings2::CallPrivacy()
+    {
+    return iCallPrivacy;    
+    }
+   
--- a/tsrc/multimediasharingsettingsstub/inc/mussettings.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/multimediasharingsettingsstub/inc/mussettings.h	Wed Sep 01 12:31:01 2010 +0100
@@ -31,26 +31,19 @@
     {
 public:
 
-    static MusSettingsKeys::TOperatorVariant
-                MultimediaSharingSettings::OperatorVariantSettingL();
-                    
-    static MusSettingsKeys::TAuditoryNotification AuditoryNotificationSettingL();                
-				
-		static MusSettingsKeys::TPopupNotification PopupNotificationSettingL();		
     static MusSettingsKeys::TAutoRecord AutoRecordSettingL();
 
     static TInt VideoLocationSettingL();
 
     static HBufC* VideoFolderSettingLC();
 
-    static MusSettingsKeys::TVideoDirection VideoDirectionL();
 
     static HBufC* iVideoFolder;
     static MusSettingsKeys::TAutoRecord iAutoRecord;
     static TInt iVideoLocation;
-    static MusSettingsKeys::TVideoDirection iVideoDirection;
+
 
     };
 
 
-#endif // MUSSETTINGS_H
+#endif // MUSSETTINGS_H
\ No newline at end of file
--- a/tsrc/multimediasharingsettingsstub/src/mussettings.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/multimediasharingsettingsstub/src/mussettings.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -25,7 +25,7 @@
 
 MusSettingsKeys::TAutoRecord MultimediaSharingSettings::iAutoRecord = MusSettingsKeys::TAutoRecord( 0 );
 TInt MultimediaSharingSettings::iVideoLocation = 2; // phone memory C:
-MusSettingsKeys::TVideoDirection MultimediaSharingSettings::iVideoDirection = MusSettingsKeys::EOneWayVideo;
+
 
 HBufC* MultimediaSharingSettings::VideoFolderSettingLC()
     {
@@ -34,23 +34,6 @@
 
     }
 
-MusSettingsKeys::TAuditoryNotification
-    MultimediaSharingSettings::AuditoryNotificationSettingL()
-    {
-    //EAuditoryNotificationOn,
-    //EAuditoryNotificationOff    
-    TInt value(MusSettingsKeys::EAuditoryNotificationOn);
-    return ( MusSettingsKeys::TAuditoryNotification ) value;
-    }
-    
-MusSettingsKeys::TPopupNotification
-    MultimediaSharingSettings::PopupNotificationSettingL()
-    {
-    //EPopupNotificationOn    
-    //EPopupNotificationOff
-    TInt value(MusSettingsKeys::EPopupNotificationOn);
-    return ( MusSettingsKeys::TPopupNotification ) value;
-    }
 
 MusSettingsKeys::TAutoRecord MultimediaSharingSettings::AutoRecordSettingL()
     {
@@ -63,8 +46,3 @@
     return iVideoLocation;
     }
         
-MusSettingsKeys::TVideoDirection MultimediaSharingSettings::VideoDirectionL()
-    {
-    return iVideoDirection;
-    }
-
--- a/tsrc/musavaailabilitystub/inc/musavaavailabilitystub.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musavaailabilitystub/inc/musavaavailabilitystub.h	Wed Sep 01 12:31:01 2010 +0100
@@ -96,8 +96,6 @@
      * @return Name of *this* availability.
      */
     virtual MMusAvaObserver::TAvailabilityName Name();
-    
-    virtual void PrepareForReceivedInviteL();
 
 public:
 
@@ -105,7 +103,6 @@
     TBool iExecuteLeave;
     MMusAvaObserver::TAvailabilityStatus iStatusStub;
     MMusAvaObserver::TAvailabilityName iNameStub;
-    TBool iPrepareForInviteCalled;
 	
 private:
     
@@ -121,4 +118,4 @@
     };
 
 
-#endif // __MUSAVANETWORKAVAILABILITY_H__
+#endif // __MUSAVANETWORKAVAILABILITY_H__
\ No newline at end of file
--- a/tsrc/musavaailabilitystub/src/musavaailabilitystub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musavaailabilitystub/src/musavaailabilitystub.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -102,15 +102,6 @@
     }
 
 // -------------------------------------------------------------------------
-//
-// -------------------------------------------------------------------------
-//
-void CMusAvaAvailabilityStub::PrepareForReceivedInviteL()
-    {
-    iPrepareForInviteCalled = ETrue;
-    }
-
-// -------------------------------------------------------------------------
 //  Constructor function.
 // -------------------------------------------------------------------------
 //
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/musenginestub/group/ABLD.BAT	Wed Sep 01 12:31:01 2010 +0100
@@ -0,0 +1,15 @@
+@ECHO OFF
+
+REM Bldmake-generated batch file - ABLD.BAT
+REM ** DO NOT EDIT **
+
+perl -S ABLD.PL "\work\src\internal\stubs\musenginestub\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9
+if errorlevel==1 goto CheckPerl
+goto End
+
+:CheckPerl
+perl -v >NUL
+if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed?
+goto End
+
+:End
--- a/tsrc/musenginestub/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/group/bld.inf	Wed Sep 01 12:31:01 2010 +0100
@@ -15,9 +15,5 @@
 *
 */
 
-#include <platform_paths.hrh>
-
 PRJ_MMPFILES
-musenginepluginstub.mmp
-
-
+musenginestub.mmp
\ No newline at end of file
--- a/tsrc/musenginestub/group/musenginepluginstub.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-* 
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET         musenginepluginstub.dll
-TARGETTYPE     dll
-UID            0x1000008d 0x00000112 // Experimental UID
-CAPABILITY     CAP_GENERAL_DLL
-VENDORID       VID_DEFAULT
-
-
-SOURCEPATH  	../src
-SOURCE          musengsessionmanager.cpp
-SOURCE          musengsession.cpp
-SOURCE          musengmcesession.cpp
-SOURCE          musengmceoutsession.cpp
-SOURCE          musenglivesession.cpp
-SOURCE          musengreceivesession.cpp
-SOURCE          musengclipsession.cpp
-
-
-USERINCLUDE 	../inc
-USERINCLUDE     ../../../mmsharing/inc
-USERINCLUDE     ../../../inc
-
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE 	/epoc32/include/ecom
-
-LIBRARY     euser.lib
-LIBRARY     cntmodel.lib ecom.lib
-DEBUGLIBRARY    flogger.lib
--- a/tsrc/musenginestub/group/musenginestub.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/group/musenginestub.mmp	Wed Sep 01 12:31:01 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -10,74 +10,39 @@
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
-* 
-* Description:
+*
+* Description:  Definition of project MceClientStub
 *
 */
 
-// using relative paths for sourcepath and user includes
-// exports are unfrozen
 
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
 #include <platform_paths.hrh>
 #include <data_caging_paths.hrh>
 #include<eunitcaps.h>
-#include "../../../inc/musuid.hrh"
 
-// Capability assignment.
-CAPABILITY 	EUNIT_CAPS
-
-// Vendor ID assignment.
-VENDORID	VID_DEFAULT
+TARGET              	musenginestub.dll
+TARGETTYPE            	dll
+UID                  	0x1000008d 0x00000112 // Experimental UID
 
+CAPABILITY      EUNIT_CAPS
+VENDORID                VID_DEFAULT
 
-TARGET        musengine.dll
-TARGETTYPE    dll
-UID           0x1000008d KMusEngineUid // 0x10282392
-
-//DOCUMENT	  Generic_Symbian_DLL_ReadMe.txt
-
-SOURCEPATH  	../src
+SOURCEPATH              ../src
 SOURCE      	musengsession.cpp
 SOURCE      	musengmcesession.cpp
 SOURCE      	musengmceoutsession.cpp
 SOURCE          musenglivesession.cpp
-SOURCE			musengtwowaysession.cpp
-SOURCE			musengtwowayrecvsession.cpp
 SOURCE          musengreceivesession.cpp
-SOURCE      	musengtelephoneutils.cpp
 SOURCE      	musengsessiondurationtimer.cpp
-SOURCE			musengclipsession.cpp
-SOURCE          musenguriparser.cpp
-SOURCE          musengmceutils.cpp
-SOURCE			musengcamerahandler.cpp
-
-// SIP API
-SOURCE		    mussipprofilehandler.cpp
+SOURCE		musengclipsession.cpp
 
 
-USERINCLUDE 	../inc
-USERINCLUDE 	../../mmshshared/inc
-USERINCLUDE   ../../inc
-USERINCLUDE   ../../../inc
+USERINCLUDE             ../inc
 
 APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE 	/epoc32/include/ecom
 
-LIBRARY     euser.lib
-LIBRARY     bafl.lib
-LIBRARY     inetprotutil.lib
-LIBRARY		phoneclient.lib
-LIBRARY		centralrepository.lib
+LIBRARY                 euser.lib
 
-LIBRARY		sipprofilecli.lib
-LIBRARY		sipclient.lib
-LIBRARY         sipcodec.lib
-LIBRARY 	mceclient.lib  
-LIBRARY 	drmcommon.lib
-LIBRARY		charconv.lib
-LIBRARY     telephonyaudiorouting.lib
-LIBRARY		pbkeng.lib 
-LIBRARY     cntmodel.lib
 
-DEBUGLIBRARY		flogger.lib
-
+EXPORTUNFROZEN
\ No newline at end of file
--- a/tsrc/musenginestub/inc/musengaudioroutingobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSENGAUDIOROUTINGOBSERVER_H
-#define MUSENGAUDIOROUTINGOBSERVER_H
-
-
-// CLASS DECLARATION
-
-/**
-* An interface to be implemented by users of Multimedia Sharing Engine if 
-* they wish to be notified about changes in audio routing.
-*
-*/
-class MMusEngAudioRoutingObserver
-    {
-
-    public:
-
-        /**
-        * Indicates that some other application has changed audio routing.
-        * @param aShowNote ETrue if notification of current change should be
-        *        shown.
-        *
-        */
-        virtual void AudioRoutingChanged( TBool aShowNote ) = 0;
-
-        /**
-        * Observer is required to give information whether audio route change
-        * is allowed currently.
-        * @param ETrue if change is allowed, otherwise EFalse
-        *
-        */
-        virtual TBool AudioRouteChangeAllowed() const = 0;
-        
-    };
-
-#endif // INCLUDE GUARD
\ No newline at end of file
--- a/tsrc/musenginestub/inc/musengcamerahandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGCAMERAHANDLER_H
-#define MUSHENGCAMERAHANDLER_H
-
-// USER
-#include "musunittesting.h"
-#include "mussettings.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class CMceCameraSource;
-class CMceSession;
-
-// CLASS
-
-class TMusEngCameraHandler
-    {
-    MUS_UNITTEST( UT_CMusEngOutSession )
-    MUS_UNITTEST( UT_CMusEngLiveSession )
-    MUS_UNITTEST( UT_CMusEngTwoWaySession )
-    MUS_UNITTEST( UT_CMusEngTwoWayRecvSession )
-    MUS_UNITTEST( UT_TMusEngCameraHandler )
-        
-    public:
-    /*
-    * Defines current camera to be used  
-    */
-    enum TCurrentCamera
-        {
-        ENextCamera = -1,
-        EBackCamera = 0, 
-        EFrontCamera = 1
-        };
-    
-    public:
-    
-        /** 
-        * Determines the number of cameras on the device.
-        *
-        * @param aCurrentCamera returns current camera..
-        *
-        * @return Count of cameras present on the device.
-        */
-        IMPORT_C TInt CamerasAvailableL( TCurrentCamera& aCurrentCamera );
-       
-        /**
-        * Change current camera to front to back
-        * 
-        * @param aCurrentCamera Change camera to be used.
-        */
-        IMPORT_C void ChangeCameraL( TCurrentCamera aCurrentCamera );
-
-        /**
-        * Gets current zoom factor
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C TInt CurrentZoomL() const;
-        
-        /**
-        * Sets new zoom factor
-        * 
-        * @pre Session is established
-        * @pre MinZoomL <= aNewZoomFactor <= MaxZoomL
-        * @leave KErrNotReady if session is not established
-        */
-        IMPORT_C void SetZoomL( TInt aNewZoomFactor );
-        
-        /**
-        * Gets minimum zoom factor
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C TInt MinZoomL() const;
-
-        /**
-        * Gets maximum zoom factor
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C TInt MaxZoomL() const;
-        
-        /**
-        * Increases zoom factor by one.
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C void ZoomInL();
-
-        /**
-        * Decreases zoom factor by one.
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C void ZoomOutL();
-
-        /**
-        * Sets zoom factor to default.
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C void ZoomDefaultL();
-
-        /**
-        * Sets current brightness
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C void SetBrightnessL( TInt aBrightness ) const;
-
-
-        /**
-        * Gets current brightness
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C TInt CurrentBrightnessL() const;
-
-        /**
-        * Gets maximum brightness
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C TInt MaxBrightnessL() const;
-
-        /**
-        * Gets minimum brightness
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C TInt MinBrightnessL() const;
-
-        /**
-        * Increases brightness by one.
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C void IncreaseBrightnessL();
-
-        /**
-        * Decreases brightness by one.
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C void DecreaseBrightnessL();
-
-        /**
-        * Sets brightness factor to default.
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C void BrightnessDefaultL();
-
-        /**
-        * Sets brightness to automatic.
-        * 
-        * @pre Session is established
-        * @leave KErrNotReady if precondition not fullfilled
-        */
-        IMPORT_C void BrightnessAutoL();
-        
-        /**
-        * Resumes previously paused session. 
-        * Continues using viewfinder and enables streaming video.
-        *
-        */
-        IMPORT_C void PlayL();
-        
-        /**
-        * Pauses session.
-        * Holds display and disables streaming video to network.
-        *
-        */
-        IMPORT_C void PauseL();
-        
-        /**
-        * Tells whether session is paused or not
-        */
-        IMPORT_C TBool IsPlayingL();
-                       
-
-    public:
-        
-        TMusEngCameraHandler();
-        
-        void SetSession( CMceSession* aSession );
-        
-        void InitializeL( CMceCameraSource& aCamera );
-        
-        void InitializeZoomStepSize();
-        
-        void ReadCameraUsageKeyL();
-        
-        TInt ZoomStepSize( TInt64& aTime );
-        
-        void ChangeActiveCameraL( TCurrentCamera aNewCamera );
-
-    private:
-        
-        CMceSession* iSession; // Not owned
-        
-        TCameraInfo iCameraInfo;
-
-        TInt iDefaultZoomFactor;
-        
-        TInt iDefaultBrightness;
-        
-        TInt64 iZoomInTime;
-        
-        TInt64 iZoomOutTime;        
-                      
-        TInt iSmallZoomStep;
-        
-        TInt iBigZoomStep;
-        
-        TCurrentCamera iCurrentCamera;
-        
-        MusSettingsKeys::TUseCamera iCameraUsage;
-        
-    };
-
-#endif
-
--- a/tsrc/musenginestub/inc/musengclipsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengclipsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -22,37 +22,153 @@
 // USER
 #include "musengmceoutsession.h"
 
+
+class MMusEngClipSessionObserver;
+class CMusEngLiveSession;
+class CMceFileSource;
+
 class CMusEngClipSession : public CMusEngMceOutSession
     {
-    
+
     public:
 
         /**
         *
+        * @since S60 v3.2
         */
-        static CMusEngClipSession* NewL( 
-                                const TRect& aRect );
-                                                  
+        IMPORT_C static CMusEngClipSession* NewL(
+                                const TDesC& aFileName,
+                                const TRect& aRect,
+                                MMusEngClipSessionObserver* aSessionObserver,
+                                TUint aSipProfileId = 0 );
+
+        /**
+        *
+        * @since 3.2
+        */
+        ~CMusEngClipSession();
+
+
+    public: // new API
+
+        /**
+        * Sets file to be shared during session.
+        * @pre Session must be established
+        * @pre New file cannot be DRM protected
+        * @leave One of the system wide error codes
+        * @param aFileName Name of the file to be shared
+        * @since S60 v3.2
+        */
+        IMPORT_C void ChangeClipL( const TDesC& aFileName );
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void FastForwardL( TBool aUseFFWD );
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void FastRewindL( TBool aUseFRWD );
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C TTimeIntervalSeconds PositionL();
+
         /**
         *
+        * @since S60 v3.2
         */
-        ~CMusEngClipSession();
+        IMPORT_C TTimeIntervalSeconds DurationL();
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void SetPositionL (const TTimeIntervalSeconds &aPosition);
+
+
+    public:
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void SetSessionObserver(
+                                MMusEngClipSessionObserver* aSessionObserver );
+
+
+    public: // implementation of virtual API from CMusEngMceOutSession
+
+        /**
+        * Resumes previously paused session.
+        * Continues showing file on display, resumes clip's audio, continues
+        * playing file and enables streaming to network.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void PlayL();
+
+        /**
+        * Pauses session.
+        * Holds display, mutes clip's audio, pauses file and
+        * disables all streaming to network.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void PauseL();
+
+
+    protected: // implementation of virtual helper from CMusEngMceOutSession
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        void CompleteSessionStructureL();
 
 
     private:
 
         /**
         *
+        * @since S60 v3.2
         */
-        CMusEngClipSession( const TRect& aRect );
+        CMusEngClipSession( MMusEngClipSessionObserver* aSessionObserver,
+                            const TRect& aRect,
+                            TUint aSipProfileId = 0 );
 
         /**
         * @leave KErrPermissionDenied if file is DRM protected
+        * @since S60 v3.2
         */
-        void ConstructL();
+        void ConstructL( const TDesC& aFileName );
 
 
-        
+    private: // HELPERS
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        TBool IsProtectedFileL( const TDesC& aClipFile );
+
+        /**
+        * Constructs audio stream structure during session completion and adds
+        * it to session.
+        * @pre iSession != NULL
+        * @pre iFileSource != NULL
+        */
+        void ConstructAudioStructureL();
+
+    public: // Data
+
+        CMceFileSource* iFileSource;
+
     };
 
 #endif
--- a/tsrc/musenginestub/inc/musengclipsessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengclipsessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,58 +16,28 @@
 */
 
 
-#ifndef MUSENGCLIPSESSIONOBSERVER_H
-#define MUSENGCLIPSESSIONOBSERVER_H
+#ifndef MUSHENGCLIPSESSIONOBSERVER_H
+#define MUSHENGCLIPSESSIONOBSERVER_H
 
 // INCLUDES
-#include <e32def.h>
+#include <e32std.h>
+#include "musengoutsessionobserver.h"
 
 // CLASS DECLARATION
 
 /**
-*  An interface to be implemented by users of Multimedia Sharing Engine 
-*  if they wish to receive clip sharing specific events.
+*  An interface to be implemented by users of Multimedia Sharing Engine if they wish to receive
+*  events from session state changes.
 *
-*  This observer is set using CMusEngClipSession::SetSessionObserver function.
+*  This observer is set using CMSSession::SetSessionObserver function.
 *
+*  @lib ???.lib
 */
-class MMusEngClipSessionObserver
+class MMusEngClipSessionObserver : public MMusEngOutSessionObserver
     {
     public: 
     
-        /**
-	    * Indicates that shared clip has ended.
-	    */
         virtual void EndOfClip() = 0;        
-        
-        /**
-	    * Indicates that chosen clip must be transcoded before sharing.
-	    */
-        virtual void TranscodingNeeded() = 0;
-        
-        /**
-	    * Indicates that transcoding has progressed.
-	    * @param aPercentage Percentage of completion
-	    */
-        virtual void TranscodingProgressed( TInt aPercentage ) = 0;
-        
-        /**
-	    * Indicates that transcoding has successfully complited
-	    * but session establishment is not yet proceeding.
-	    */
-        virtual void TranscodingCompletedInit() = 0;
-        
-        /**
-	    * Indicates that transcoding has successfully complited
-	    * and session establishment continues.
-	    */
-        virtual void TranscodingCompletedFinalize() = 0;
-        
-        /**
-	    * Indicates that transcoding has failed.
-	    */
-        virtual void TranscodingFailed() = 0;
-        
     };
 
 #endif
\ No newline at end of file
--- a/tsrc/musenginestub/inc/musenglivesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musenglivesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -21,189 +21,182 @@
 
 // USER
 #include "musengmceoutsession.h"
-#include "musunittesting.h"
-#include "mussettings.h"
-#include "musengcamerahandler.h"
-#include "lcvideoplayer.h"
-#include "lccameracontrol.h"
-#include "lcbrightnesscontrol.h"
-#include "lczoomcontrol.h"
-#include "lcfilecontrol.h"
 
 // SYSTEM
 #include <ecam.h>
 
 // FORWARD DECLARATIONS
 class MMusEngLiveSessionObserver;
-class MLcValueControl;
 
 
-class CMusEngLiveSession : 
-    public CMusEngMceOutSession, 
-    public MLcVideoPlayer,
-    public MLcCameraControl,
-    public MLcBrightnessControl,
-    public MLcZoomControl,
-    public MLcFileControl
+class CMusEngLiveSession : public CMusEngMceOutSession
     {
-    
+
     public:
+
         /**
         * Creates new MultimediaSharing Live session.
         *
+        * @since S60 v3.2
         * @param aFileName Media filename
         * @param aRect UI drawing area. It is allowed handle from engine
-        * @param aSessionObserver Interface for session specific callbacks
-        * @param aOutSessionObserver Interface for outsession specific callbacks
-        * @param aLiveSessionObserver interface for live session specific
-        *        callbacks
+        * @param aSessionObserver Session specific callbacks
+        * @param aSipProfileId SIP profile to be used, 0 is default profile
         * @return CMusEngLiveSession* New instanse of specified class
         */
-        static CMusEngLiveSession* NewL( 
-							const TDesC& aFileName,
-                            const TRect& aRect );
-                            
+        IMPORT_C static CMusEngLiveSession* NewL(
+                                const TDesC& aFileName,
+                                const TRect& aRect,
+                                MMusEngLiveSessionObserver* aSessionObserver,
+                                TUint aSipProfileId = 0);
+
         /**
         * Creates new MultimediaSharing Live session.
         *
+        * @since S60 v3.2
         * @param aRect UI drawing area. It is allowed handle from engine
-        * @param aSessionObserver Interface for session specific callbacks
-        * @param aOutSessionObserver Interface for outsession specific callbacks
-        * @param aLiveSessionObserver interface for live session specific
-        *        callbacks
+        * @param aSessionObserver Session specific callbacks
+        * @param aSipProfileId SIP profile to be used, 0 is default profile
         * @return CMusEngLiveSession* New instanse of specified class
         */
-        static CMusEngLiveSession* NewL( 
-                            const TRect& aRect );
-
+        IMPORT_C static CMusEngLiveSession* NewL(
+                                const TRect& aRect,
+                                MMusEngLiveSessionObserver* aSessionObserver,
+                                TUint aSipProfileId = 0 );
 
     public:
 
         /**
         * Destructor
+        *
+        * @since S60 v3.2
         */
         ~CMusEngLiveSession();
 
 
-    public: // from MLcSession
-        
-        void EstablishLcSessionL();
-    
-        MLcVideoPlayer* LocalVideoPlayer();
-        
-        const TDesC& RemoteDisplayName();
-        
-        
-    public: // from MLcVideoPlayer
-        
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        TBool LcIsPlayingL();
-        
-        void LcPlayL();
-        
-        void LcPauseL();
-    
-        MLcWindow* LcWindow();
+
+    public: // NEW API FUNCTIONS live session specific
+
+        /**
+        * Sets callback interface pointer
+        *
+        * @since S60 v3.2
+        * @param aSessionObserver Pointer to class which implements interface
+        */
+        IMPORT_C void SetSessionObserver(
+                                MMusEngLiveSessionObserver* aSessionObserver );
 
-        MLcCameraControl* LcCameraControl();
-        
-        MLcFileControl* LcSourceFile();
-        
-        MLcFileControl* LcDestinationFile();
-        
-        MLcAudioControl* LcAudioControl();
-    
-        MLcZoomControl* LcZoomControl();
-    
-        MLcBrightnessControl* LcBrightnessControl();
+        /**
+        * Gets current zoom factor
+        *
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        * @since S60 v3.2
+        */
+        IMPORT_C TInt CurrentZoomL() const;
 
-        RPointerArray< MLcValueControl >& LcExtensionControls();    
+        /**
+        * Gets maximum zoom factor
+        *
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        * @since S60 v3.2
+        */
+        IMPORT_C TInt MaxZoomL() const;
 
-    public: // from MLcCameraControl
-        
-        TInt LcCameraCountL();
+        IMPORT_C TInt MinZoomL() const;
+
+        /**
+        * Increases zoom factor by one.
+        *
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        * @since S60 v3.2
+        */
+        IMPORT_C void ZoomInL();
 
-        void ToggleLcCameraL();       
-
-    public: // MLcBrightnessControl
-        
-        TInt MinLcBrightnessL();
-
-        TInt MaxLcBrightnessL();
-
-        TInt LcBrightnessL();
+        /**
+        * Decreases zoom factor by one.
+        *
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        * @since S60 v3.2
+        */
+        IMPORT_C void ZoomOutL();
 
-        void SetLcBrightnessL( TInt aValue );
-        
-        void IncreaseLcBrightnessL();
-        
-        void DecreaseLcBrightnessL();
-        
-    public: // from MLcZoomControl
-        
-        TInt MinLcZoomL();
+        /**
+        * Sets zoom factor to default.
+        *
+        * @pre Session is established
+        * @leave KErrNotReady if precondition not fullfilled
+        * @since S60 v3.2
+        */
+        IMPORT_C void ZoomDefaultL();
+
+    public: // implementation of virtual API from CMusEngMceOutSession
 
-        TInt MaxLcZoomL();
-
-        TInt LcZoomValueL();
+        /**
+        * Resumes previously paused session.
+        * Continues using viewfinder and enables streaming video.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void PlayL();
 
-        void SetLcZoomValueL( TInt aValue );
-        
-        void LcZoomInL();
-        
-        void LcZoomOutL();        
-        
-    public: // from MLcFileControl
-        
-        void EnableLcFileL( TBool aEnable );
-        
-        TBool IsLcFileEnabled();
+        /**
+        * Pauses session.
+        * Holds display and disables streaming video to network.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void PauseL();
+
 
-        void SetLcFileNameL( const TFileName& aFileName );
-        
-        TFileName& LcFileName();  
-        
-    protected:
+    protected: // inherited from CMusEngMceOutSession
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        void CompleteSessionStructureL();
+
+
+    private:
 
         /**
         * Constructor
+
+        * @since S60 v3.2
         */
-        CMusEngLiveSession( const TRect& aRect, 
-        					const TDesC& aRecordedFile = KNullDesC );
+        CMusEngLiveSession( MMusEngLiveSessionObserver* aSessionObserver,
+                            const TRect& aRect,
+                            TUint aSipProfileId = 0 );
 
         /**
         * Second-phase constructor
+        *
+        * @since S60 v3.2
         */
         void ConstructL();
 
-    
 
-    protected:
+    public:
 
         /**
-        * File name for recording. If KNullDesC no recording performed.
-        */
-        TFileName iRecordedFile;
-        
-        /** 
-        * Dummy member variable to implement MLcVideoPlayer::LcExtensionControls
+        *
+        * @since S60 v3.2
         */
-        RPointerArray< MLcValueControl > iValueControls;    
-        
-        TMusEngCameraHandler iCameraHandler;
-        
-        /*
-         * Remote Display Name
-         */
-        HBufC* iRemoteDisplayName;
-        
+        //TCameraInfo iCameraInfo;
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        TInt iDefaultZoomFactor;
+        TInt iPlaying;
         TInt iCurrentZoom;
-        TInt iDefaultZoomFactor;
-        TInt iCurrentBrighness;
-        TInt iPlaying;
-        TBool iFileEnabled;
-        
+
+
     };
 
 #endif
--- a/tsrc/musenginestub/inc/musenglivesessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musenglivesessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -19,24 +19,23 @@
 #ifndef MUSHENGLIVESESSIONOBSERVER_H
 #define MUSHENGLIVESESSIONOBSERVER_H
 
-
+// INCLUDES
+#include "musengoutsessionobserver.h"
 
 // CLASS DECLARATION
 
 /**
-*  An interface to be implemented by clients of Multimedia Sharing Engine if 
-*  they wish to receive events about live sharing specific event.
+*  An interface to be implemented by users of Multimedia Sharing Engine if 
+*  they wish to receive
+*  events from session state changes.
+*
+*  This observer is set using CMSSession:: function.
+*
+* @lib musengine.lib
+* @since S60 v3.2
 */
-class MMusEngLiveSessionObserver
+class MMusEngLiveSessionObserver : public MMusEngOutSessionObserver
     {
-    
-    public:
-    
-        /**    
-    	* Indicates that disk has run out of space during recording.
-    	*/
-    	virtual void DiskFull() = 0;
-		
     };
 
 #endif
\ No newline at end of file
--- a/tsrc/musenginestub/inc/musenglogger.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-#ifndef MUSENGLOGGER_H
-#define MUSENGLOGGER_H
-
-
-#include "muslogger.h"
-
-#if ( !_DEBUG || UNIT_TESTING ) // release or unit test build; no logs
-
-#define MUS_ENG_LOG_SESSION_STATE( aSession )
-#define MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )
-#define MUS_ENG_LOG_STREAM_STATE( aStream )
-#define MUS_ENG_LOG_SINK_STATES( aStream )
-#define MUS_ENG_LOG_SOURCE_STATE( aSource )
-#define MUS_ENG_LOG_SINK_STATE( aSink )
-#define MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )
-
-#else // debug build; logs
-
-#include <mcesession.h>
-#include <mceaudiostream.h>
-#include <mcecamerasource.h>
-#include <mcefilesource.h>
-#include <mcertpsource.h>
-#include <mcedisplaysink.h>
-#include <mcespeakersink.h>
-#include <mcefilesink.h>
-#include <mcertpsink.h>
-
-#define MUS_ENG_LOG_SESSION_STATE( aSession )\
-    {\
-    TBuf<15> state;\
-    switch ( (aSession).State() )\
-        {\
-        case CMceSession::EIdle:\
-            {\
-            state = _L("EIdle");\
-            break;\
-            }\
-        case CMceSession::EOffering :\
-            {\
-            state = _L("EOffering");\
-            break;\
-            }\
-        case CMceSession::EIncoming:\
-            {\
-            state = _L("EIncoming");\
-            break;\
-            }\
-        case CMceSession::EReserving :\
-            {\
-            state = _L("EReserving");\
-            break;\
-            }\
-        case CMceSession::EAnswering :\
-            {\
-            state = _L("EAnswering");\
-            break;\
-            }\
-        case CMceSession::EProceeding :\
-            {\
-            state = _L("EProceeding");\
-            break;\
-            }\
-        case CMceSession::EEstablished:\
-            {\
-            state = _L("EEstablished");\
-            break;\
-            }\
-        case CMceSession::ECancelling:\
-            {\
-            state = _L("ECancelling");\
-            break;\
-            }\
-        case CMceSession::ETerminating:\
-            {\
-            state = _L("ETerminating");\
-            break;\
-            }\
-        case CMceSession::ETerminated:\
-            {\
-            state = _L("ETerminated");\
-            break;\
-            }\
-        default:\
-            {\
-            state = _L("Unknown");\
-            break;\
-            }\
-        }\
-    MUS_LOG_TDESC( "mus: [ENGINE]     Session state is ", state )\
-    }
-
-
-#define MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )\
-    {\
-    MUS_ENG_LOG_SESSION_STATE( aSession )\
-    MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )\
-    }
-
-
-#define MUS_ENG_LOG_STREAM_STATE( aStream )\
-    {\
-    TBuf<20> streamState;\
-    switch ( (aStream).State() )\
-        {\
-        case CMceMediaStream::EUninitialized:\
-            {\
-            streamState = _L("EIdle");\
-            break;\
-            }\
-        case CMceMediaStream::EInitialized:\
-            {\
-            streamState = _L("EInitialized");\
-            break;\
-            }\
-        case CMceMediaStream::EBuffering:\
-            {\
-            streamState = _L("EBuffering");\
-            break;\
-            }\
-        case CMceMediaStream::EIdle:\
-            {\
-            streamState = _L("EIdle");\
-            break;\
-            }\
-        case CMceMediaStream::EStreaming:\
-            {\
-            streamState = _L("EStreaming");\
-            break;\
-            }\
-        case CMceMediaStream::EDisabled:\
-            {\
-            streamState = _L("EDisabled");\
-            break;\
-            }\
-        case CMceMediaStream::ENoResources:\
-            {\
-            streamState = _L("ENoResources");\
-            break;\
-            }\
-        case CMceMediaStream::ETranscodingRequired:\
-            {\
-            streamState = _L("ETranscodingRequired");\
-            break;\
-            }\
-        case CMceMediaStream::ETranscoding:\
-            {\
-            streamState = _L("ETranscoding");\
-            break;\
-            }\
-        default:\
-            {\
-            streamState = _L("Unknown");\
-            break;\
-            }\
-        }\
-        if ( (aStream).Type() == KMceAudio )\
-            {\
-            MUS_LOG_TDESC( "mus: [ENGINE]     AudioStream state is ", streamState )\
-            }\
-        else\
-            {\
-            MUS_LOG_TDESC( "mus: [ENGINE]     VideoStream state is ", streamState )\
-            }\
-        MUS_ENG_LOG_SOURCE_STATE( (aStream).Source() )\
-        MUS_ENG_LOG_SINK_STATES( (aStream) )\
-    }
-
-
-#define MUS_ENG_LOG_SINK_STATES( aStream )\
-    {\
-    for ( TInt sinkIndex = 0; sinkIndex < aStream.Sinks().Count(); ++sinkIndex )\
-        {\
-        MUS_ENG_LOG_SINK_STATE( aStream.Sinks()[ sinkIndex ] )\
-        }\
-    }
-    
-
-#define MUS_ENG_LOG_SOURCE_STATE( aSource )\
-    {\
-    if ( aSource )\
-        {\
-        TBuf<10> sourceState;\
-        if ( aSource->IsEnabled() )\
-            {\
-            sourceState = _L("enabled");\
-            }\
-        else\
-            {\
-            sourceState = _L("disabled");\
-            }\
-        switch ( aSource->Type() )\
-            {\
-            case KMceCameraSource:\
-                {\
-                MUS_LOG_TDESC( "                    CameraSource is ", sourceState )\
-                break;\
-                }\
-            case KMceFileSource:\
-                {\
-                MUS_LOG_TDESC( "                    FileSource is ", sourceState )\
-                break;\
-                }\
-            case KMceRTPSource:\
-                {\
-                MUS_LOG_TDESC( "                    RtpSource is ", sourceState )\
-                break;\
-                }\
-            default:\
-                {\
-                MUS_LOG_TDESC( "                    UnknownSource is ", sourceState )\
-                break;\
-                }\
-            }\
-        }\
-    else\
-        {\
-        MUS_LOG( "                    No source in stream" )\
-        }\
-    }
-
-#define MUS_ENG_LOG_SINK_STATE( aSink )\
-    {\
-    if ( aSink )\
-        {\
-        TBuf<10> sinkState;\
-        if ( aSink->IsEnabled() )\
-            {\
-            sinkState = _L("enabled");\
-            }\
-        else\
-            {\
-            sinkState = _L("disabled");\
-            }\
-        switch ( aSink->Type() )\
-            {\
-            case KMceDisplaySink:\
-                {\
-                MUS_LOG_TDESC( "                    DisplaySink is ", sinkState )\
-                break;\
-                }\
-            case KMceSpeakerSink:\
-                {\
-                MUS_LOG_TDESC( "                    SpeakerSink is ", sinkState )\
-                break;\
-                }\
-            case KMceRTPSink:\
-                {\
-                MUS_LOG_TDESC( "                    RtpSink is ", sinkState )\
-                break;\
-                }\
-            case KMceFileSink:\
-                {\
-                MUS_LOG_TDESC( "                    FileSink is ", sinkState )\
-                break;\
-                }\
-            default:\
-                {\
-                MUS_LOG_TDESC( "                    UnknownSink is ", sinkState )\
-                break;\
-                }\
-            }\
-        }\
-    }
-    
-
-#define MUS_ENG_LOG_STATUS( aStatusCode, aReasonPhrase )\
-    {\
-    MUS_LOG1( "                  StatusCode is %d", aStatusCode )\
-    HBufC16* reasonPhrase = HBufC16::NewLC( aReasonPhrase.Length() );\
-    reasonPhrase->Des().Copy( aReasonPhrase );\
-    MUS_LOG_TDESC( "                  ReasonPhrase is ",(*reasonPhrase) )\
-    CleanupStack::PopAndDestroy( reasonPhrase );\
-    }
-    
-    
-
-#endif // _DEBUG
-
-
-#endif // MUSENGLOGGER_H
-
-// End of File
--- a/tsrc/musenginestub/inc/musengmceoutsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengmceoutsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -23,6 +23,10 @@
 #include "musengmcesession.h"
 
 
+// FORWARD DECLARATIONS
+class CSIPProfile;
+class CMusSipProfileHandler;
+class MMusEngOutSessionObserver;
 
 // CLASS DECLARATION
 /**
@@ -30,29 +34,160 @@
 * CMusEngLiveSession and CMusEngClipSession.
 *
 * @lib musengine.lib
+* @since S60 v3.2
 */
 class CMusEngMceOutSession : public CMusEngMceSession
     {
-    
+
     public:
 
         /**
         * Destructor
+        *
+        * @since S60 v3.2
         */
         ~CMusEngMceOutSession();
 
 
+    public: // NEW API FUNCTIONS
+
+        /**
+        * Sends invite to specified address
+        * @leave KErrAlreadyExists if session establishment is already
+        *        in progress
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void InviteL( const TDesC& aRecipient );
+
+        /**
+        * Cancels Invite.
+        * @pre Invite is sent.
+        * @since S60 v3.2
+        */
+        IMPORT_C void CancelInviteL( );
+
+
+    public: // VIRTUAL API
+
+        /**
+        * Resumes previously paused session. Exact behavior depends on
+        * exact session type.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C virtual void PlayL() = 0;
+
+        /**
+        * Pauses session. Exact behavior depends on exact session type.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C virtual void PauseL() = 0;
+
+
+    protected: // Must be implemented in derived class
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        virtual void CompleteSessionStructureL() = 0;
+
+
+    protected: // helper function inherited from CMusEngMceSession
+
+        /**
+        * Function handling MCE session termination.
+        *
+        * @since S60 v3.2
+        */
+        //void HandleTermination( TMceTransactionDataContainer* aContainer );
+
+
     protected:
 
         /**
         * Constructor
+        *
+        * @since S60 v3.2
         */
-        CMusEngMceOutSession( const TRect& aRect );
+        CMusEngMceOutSession( const TRect& aRect, TUint aSipProfileId = 0 );
 
         /**
         * Second-phase constructor
+        *
+        * @since S60 v3.2
         */
         void ConstructL();
 
+
+    protected: // HELPERS
+
+        #if (defined (__WINS__) || defined(__WINSCW__))
+        /**
+        *
+        * @since S60 v3.2
+        */
+        void SipProfileChanged();
+        #endif
+
+
+    private:
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        void CreateMceSessionStructureL();
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        MMusEngOutSessionObserver* OutSessionObserver();
+
+        /**
+        * Parses, validates and creates new recipient address
+        * out of given address.
+        * @return Parsed recipient URI. Ownership is transferred.
+        * @since S60 v3.2
+        */
+        HBufC8* ParseRecipientUriL(  const TDesC& aRecipient  );
+
+
+    protected: // DATA
+
+        /**
+        * Repository id of SipProfile
+        *
+        * @since S60 v3.2
+        */
+        TUint iSipProfileId;
+
+        /**
+        * Owned by iSipProfileHandler
+        *
+        * @since S60 v3.2
+        */
+        //CSIPProfile* iSipProfile;
+
+        /**
+        * Callback pointer to interface
+        *
+        * @since S60 v3.2
+        */
+        //CMusSipProfileHandler* iSipProfileHandler;
+
+
+    public: // DATA
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        HBufC8* iRecipient;
+        TBool iInvited;
+
     };
 #endif //MUSHENGMCESESSION_H
--- a/tsrc/musenginestub/inc/musengmcesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengmcesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -21,10 +21,28 @@
 
 // USER
 #include "musengsession.h"
-#include "lcsession.h"
-#include "lcwindow.h"
-#include "lcaudiocontrol.h"
+#include "musengsessiondurationtimerobserver.h"
+
+// SYSTEM
+/*
+#include <mcesessionobserver.h>
+#include <mcestreamobserver.h>
+#include <mcertpobserver.h>
+#include <mcetransactiondatacontainer.h>
+*/
 
+/*
+class CMceManager;
+class CMceSession;
+*/
+class CMusEngSessionDurationTimer;
+
+
+// CONSTANTS
+
+_LIT8( KMusEngAcceptContactHeader,
+       "Accept-Contact: *;+g.3gpp.cs-voice; explicit" );
+_LIT8( KMusEngSessionSdpLineXApplication, "a=X-application:com.nokia.rtvs" );
 
 // CLASS DECLARATION
 
@@ -34,112 +52,252 @@
 *
 * CMusEngMceSession encapsulates CMCESession and simplifies use of
 * MCE Sessions to user interface. Also splits observers messy events
-* to simplified function calls.
+* simplified commands like a SessionDisconnected.
 *
 * @lib musengine.lib
+* @since S60 v3.2
 */
 class CMusEngMceSession : public CMusEngSession,
-                          public MLcSession,
-                          public MLcWindow,
-                          public MLcAudioControl
+                          public MMusEngSessionDurationTimerObserver
     {
-    
-    public: 
-    
+
+    public:
+
         /**
         * Destructor
+        *
+        * @since S60 v3.2
         */
         ~CMusEngMceSession();
 
 
-    public: // from MLcSession
-        
-        TLcSessionState LcSessionState() const;
-    
-        virtual void EstablishLcSessionL();
-        
-        void TerminateLcSessionL();
-        
-        virtual MLcVideoPlayer* RemoteVideoPlayer();
-    
-        virtual MLcVideoPlayer* LocalVideoPlayer();       
-       
-        virtual const TDesC& LocalDisplayName();
-    
-        virtual const TDesC& RemoteDisplayName();
+    public: // API FUNCTIONS
+
+        /**
+        * Terminates session.
+        * @pre Session is established
+        * @post Session is ready to be deleted
+        * @leave KErrNotReady if precondition is not fullfilled
+        * @since S60 v3.2
+        */
+        IMPORT_C void TerminateL();
+
+        /**
+        * Releases all this session internal observers. This function is needed
+        * before we could get session store out of this session.
+        * TODO: Is this function really needed? At least at the moment it is
+        * not called from UI.   -HR 21.8.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C void ReleaseInternalObservers();
 
-        TInt SetParameter( TInt aId, TInt aValue );
+        /**
+        * Get session time return estabilished session time
+        *
+        * @since S60 v3.2
+        * @return TTime returns time if connection established else < 0
+        */
+        IMPORT_C TTimeIntervalSeconds GetSessionTime() const;
 
-        TInt ParameterValue( TInt aId );
-        
-        void UpdateLcSessionL();
+        /**
+        * Returns current connection state
+        *
+        * @since S60 v3.2
+        * @return TBool returns current connection state
+        */
+        IMPORT_C TBool ConnectionActive() const;
+
+
+    public: // VIRTUAL API
+
+        // No virtual api
+
 
-        
-    public: // from MLcWindow
-        
-        void EnableLcWindowL( TBool aEnable );
-        
-        TBool IsLcWindowEnabled();
-        
-        void SetLcWindowRectL( TRect aRect );
-        
-        TRect LcWindowRect();
-        
-        void SetLcWindowOrientationL( 
-            TLcWindowOrientation aOrientation );
-        
-        TLcWindowOrientation LcWindowOrientationL();        
-        
-    public: // from MLcAudioControl
-        
-        TBool IsLcAudioMutedL();
+    public: //  from CMusEngSession
+
+        /**
+        * Increases volume level by one
+        *
+        * @pre Session is ongoing
+        * @since S60 v3.2
+        */
+        IMPORT_C void VolumeUpL();
+
+        /**
+        * Decreases volume level by one
+        *
+        * @pre Session is ongoing
+        * @since S60 v3.2
+        */
+        IMPORT_C void VolumeDownL();
 
-        void MuteLcAudioL( TBool aMute );       
-
-        TBool IsLcMicMutedL();    
-
-        void MuteLcMicL( TBool aMute );
-        
-        TBool IsLcLoudspeakerEnabled();
+        /**
+        * Permission to draw on screen device.
+        *
+        * @pre Session is ongoing
+        * @since S60 v3.2
+        */
+        IMPORT_C void EnableDisplayL( TBool aEnable );
 
-        void EnableLcLoudspeakerL( TBool aEnabled );
-        
-        TBool IsEnablingLcLoudspeakerAllowed();
-        
-        TInt LcVolumeL();
-     
-        void SetLcVolumeL( TInt aValue );    
-    
-        void IncreaseLcVolumeL();
-        
-        void DecreaseLcVolumeL();        
-        
+        /**
+        * Implements virtual from CMusEngSession
+        *
+        * @pre Session is ongoing
+        * @since S60 v3.2
+        */
+        IMPORT_C void MuteL();
+
+        /**
+        * Implements virtual from CMusEngSession
+        *
+        * @pre Session is ongoing
+        * @since S60 v3.2
+        */
+        IMPORT_C void UnmuteL();
+
+
     protected: // CONSTRUCTORS
 
         /**
         * Constructor
         *
+        * @since S60 v3.2
         */
         CMusEngMceSession( const TRect& aRect );
 
         /**
         * Second-phase constructor
         *
+        * @since S60 v3.2
         */
         void ConstructL();
-        
+
+
+    protected: // HELPER FUNCTIONS
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        void RectChangedL();
+
+        /**
+        * Sets session specific SDP line to a session
+        *
+        * @since S60 v3.2
+        */
+        //void SetSessionSdpLinesL( CMceSession& aSession );
+
+
+    protected: // internal API
+
+        /**
+        *
+        * @since S60 v3.2
+        */
+        virtual TBool IsRtpcInactivityTimoutSupported();
+
+
+    private: // HELPER FUNCTIONS
 
-    private:
+        /**
+        * Start counting session time
+        *
+        * @since S60 v3.2
+        */
+        void InitializeSessionTimer();
+
+        /**
+        * Callback
+        *
+        * @since S60 v3.2
+        */
+        void UpdateTimerEvent();
+
+        /**
+        *
+        *
+        * @since S60 v3.2
+        */
+        void DoMuteL( TBool aMute );
+
+        /**
+        * Increases or decreases current volume of all speakers in session
+        * structure by one.
+        * @pre Current volume of all the speakers is less than MaxVolumeL()
+        *      and at least 1.
+        */
+        void ChangeVolumeByOneL( TBool aIncreaseVolume );
+
+
+    private: // Helpers
 
-        MLcWindow::TLcWindowOrientation iOrientation;
-        TBool iMuted;
-        TBool iMicMuted;
-        TBool iLoudspeakerEnabled;
-        TBool iEnablingLoudspeakerAllowed;
-        TInt iVolume;
-        TRect iRect;
-        TBool iWindowEnabled;
+        /**
+        * Helper function to avoid three different traps.
+        * Should be replaced when MCE supports different kind of method
+        * detecting end of clip.
+        *
+        * @since S60 v3.2
+        */
+        void CheckClipEndL();
+
+
+    public: // MEMBERS
+
+        /**
+        * Class for connecting to MCE server.
+        * This class provides the connection to the MCE server and
+        * provides functions
+        * for setting observers for asynchronous events.
+        * The user should create only one instance of this class.
+        *
+        * @since S60 v3.2
+        */
+        //CMceManager* iManager;
+
+        /**
+        * Base class for MCE sessions, inherited by both CMCEInSession and
+        * CMCEOutSession. * CMCESession represents peer-to-peer connection
+        * made with remote terminal. This connection is also known as dialog
+        * and it is set up using SIP INVITE method. The characteristics of the
+        * session are defined by user of this class by attaching media streams
+        * into the session. After the session has been succesfully established,
+        * it can be later updated and must be finally terminated. If for any
+        * reason instance of this class is deleted while in established state,
+        * session is automatically terminated by MCE server.
+        *
+        * @since S60 v3.2
+        */
+        //CMceSession* iSession;
+
+
+    public:
+
+        /**
+        * It is assumed, that user has only one instance of this class.
+        * The same instance is passed between MCE and user, but the data
+        * inside of this container is just updated for each event.
+        *
+        * @since S60 v3.2
+        */
+        //TMceTransactionDataContainer iTransactionDataContainer;
+
+        /**
+        * Session time. Acts simultaneously as RTCP inactivity timer.
+        *
+        * @since S60 v3.2
+        */
+        TTime iStartTime;
+
+        CMusEngSessionDurationTimer*   iUpdateTimer;
+
+        /**
+        * Value indicating seconds gone since last received RTCP sender or
+        * receiver report. Value 20 indicates RTCP inactivity timeout.
+        */
+        TInt iSecondsFromLastRtcpReport;
+        TInt iDisplayEnabled;
 
     };
-    
 #endif //MUSHENGMCESESSION_H
--- a/tsrc/musenginestub/inc/musengmceutils.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utilities to locate and manipulate MCE sessions, streams,
-*                sources and sinks
-*
-*/
-
-
-
-#ifndef MUSENGMCEUTILS_H
-#define MUSENGMCEUTILS_H
-
-
-#include <mcemediastream.h>
-#include <mcemediasink.h>
-#include <mcemediasource.h>
-
-
-class CMceSession;
-class CMceDisplaySink;
-class CMceCameraSource;
-class CMceFileSource;
-class CMceVideoStream;
-class CMceSpeakerSink;
-
-const TUint KMusEngNoAssociatedSourceType = KMaxTUint;
-
-/**
-* Static class including utility methods to locate and manipulate MCE 
-* sessions, streams, sources and sinks
-* @lib musengine.lib
-*/
-class MusEngMceUtils
-    {
-
-    public:
-        
-        /**
-        * Tells if a stream is a video stream with rtp source.
-        *
-        * @param aStream Stream to be investigated
-        * @return ETrue if parameter is a video stream with a RTP source
-        */
-        static TBool IsVideoInStream( CMceMediaStream& aStream );
-
-        /**
-        * Tells if a stream is a video stream with rtp sink.
-        *
-        * @param aStream Stream to be investigated
-        * @return ETrue if parameter is a video stream with a RTP sink
-        */
-        static TBool IsVideoOutStream( CMceMediaStream& aStream );
-        
-        /**
-        * Tells if a stream is an audio stream with rtp source.
-        *
-        * @param aStream Stream to be investigated
-        * @return ETrue if parameter is an audio stream with a RTP source
-        */
-        static TBool IsAudioInStream( CMceMediaStream& aStream );
-
-        /**
-        * Gets handle to video stream with RTP sink. 
-        * Ownership is not transferred.
-        *
-        * @return Outgoing video stream
-        * @leave KErrNotFound if none exists
-        * @leave KErrOverflow if session contains more than one outgoing
-        *        video stream
-        */
-        static CMceVideoStream* GetVideoOutStreamL( CMceSession& aSession );
-
-        /**
-        * Gets handle to video stream with RTP source.
-        * Ownership is not transferred.
-        *
-        * @return Incoming video stream
-        * @leave KErrNotFound if none exists
-        * @leave KErrOverflow if session contains more than one incoming
-        *        video stream
-        */
-        static CMceVideoStream* GetVideoInStreamL( CMceSession& aSession );
-
-        /**
-        * Gets handle to video stream with file sink. 
-        * Ownership is not transferred.
-        *
-        * @return Recording video stream, NULL if none exists
-        */
-        static CMceVideoStream* GetRecordingStream( CMceSession& aSession );
-        
-        /**
-        * Gets handle to a media sink of spesified type contained by
-        * a mediastream. If there are several sink instances, first one is 
-        * returned. If associated source type is defined, sink in stream having
-        * the source is tried to be searched. If no such match, first matching 
-        * sink is returned. Ownership is not transferred.
-        *
-        * @return Media sink of the spesified type. NULL if none exists
-        */
-        static CMceMediaSink* GetMediaSink( 
-                CMceMediaStream& aStream, 
-                TMceSinkType aType,
-                TMceSourceType aAssociatedSourceType = KMusEngNoAssociatedSourceType );
-        
-        /**
-        * Gets handle to a media sink of spesified type contained by
-        * a mediastream. If there are several sink instances, first one is 
-        * returned. If associated source type is defined, sink in stream having
-        * the source is tried to be searched. If no such match, first matching 
-        * sink is returned. Ownership is not transferred.
-        *
-        * @return Media sink of the spesified type.
-        * @leave KErrNotFound if there is no sink of spesified type
-        */
-        static CMceMediaSink* GetMediaSinkL( 
-                CMceMediaStream& aStream, 
-                TMceSinkType aType,
-                TMceSourceType aAssociatedSourceType = KMusEngNoAssociatedSourceType );
-
-        /**
-        * Gets handle to a media sink of spesified type contained by
-        * a session. If there are several sink instances, first one is 
-        * returned. If associated source type is defined, sink in stream having
-        * the source is tried to be searched. If no such match, first matching 
-        * sink is returned. Ownership is not transferred.
-        *
-        * @return Media sink of the spesified type. NULL if none exists
-        */
-        static CMceMediaSink* GetMediaSink( 
-                CMceSession& aSession, 
-                TMceSinkType aType,
-                TMceSourceType aAssociatedSourceType = KMusEngNoAssociatedSourceType,
-                TBool aStrictMatch = EFalse );
-        
-        /**
-        * Gets handle to a media sink of spesified type contained by
-        * a session. If there are several sink instances, first one is 
-        * returned. If associated source type is defined, sink in stream having
-        * the source is tried to be searched. If no such match, first matching 
-        * sink is returned. Ownership is not transferred.
-        *
-        * @return Media sink of the spesified type.
-        * @leave KErrNotFound if there is no sink of spesified type
-        */
-        static CMceMediaSink* GetMediaSinkL( 
-                CMceSession& aSession, 
-                TMceSinkType aType,
-                TMceSourceType aAssociatedSourceType = KMusEngNoAssociatedSourceType,
-                TBool aStrictMatch = EFalse );
-        
-        /**
-        * Gets handle to a speaker sink contained by specified stream 
-        * or its' bound stream. Ownership is not transferred.
-        *
-        * @return Speaker sink, NULL if none exists
-        */
-        static CMceSpeakerSink* GetSpeaker( CMceMediaStream& aStream );        
-                                                                                  
-        /**
-        * Gets handle to a camera source. Ownership is not transferred.
-        *
-        * @return Camera source
-        * @leave KErrNotFound if none exists
-        */
-        static CMceCameraSource* GetCameraL( CMceSession& aSession );        
-
-        /**
-        * Gets handle to a file source. Ownership is not transferred.
-        *
-        * @return File source
-        * @leave KErrNotFound if none exists 
-        */
-        static CMceFileSource* GetFileSourceL( CMceSession& aSession );  
- 
-        /**
-        * Gets handle to a display sink. Ownership is not transferred.
-        *
-        * @return Display sink, NULL if none exists
-        */
-        static CMceDisplaySink* GetDisplay( CMceSession& aSession,
-                                            TBool aPreferViewFinder = ETrue );        
-
-        /**
-        * Gets handle to a display sink. If there are several display
-        * sink instances view finder is preferred with default arguments.
-        * Ownership is not transferred.
-        *
-        * @return Display sink
-        * @leave KErrNotFound if there is no display
-        */
-        static CMceDisplaySink* GetDisplayL( CMceSession& aSession, 
-                                             TBool aPreferViewFinder = ETrue );     
-
-        /**
-        * Gets handle to a display sink. Ownership is not transferred.
-        *
-        * @return Display sink, NULL if none exists
-        */
-        static CMceDisplaySink* GetReceivingDisplay( CMceSession& aSession );          
-        
-        /**
-        * Gets handle to a receiving display sink. Ownership is not transferred.
-        *
-        * @return Display sink
-        * @leave KErrNotFound if there is no display
-        */
-        static CMceDisplaySink* GetReceivingDisplayL( CMceSession& aSession );    
-        
-        /**
-        * Gets handle to a viewfinder display sink. Ownership is not transferred.
-        *
-        * @return Display sink
-        * @leave KErrNotFound if there is no display
-        */
-        static CMceDisplaySink* GetVfDisplay( CMceSession& aSession );
-        
-        /**
-        * Adds display sink to specified stream if one does not exist already.
-        * Display rect is set in both cases to a specified one.
-        * Display is disabled by default.
-        * 
-        * @param aStream is a stream where display is supposed to be added
-        * @param aManager reference to used MCE manager
-        * @param aDisplayRect is desired display area
-        * @leave KErrArgument if offered stream is not a video stream
-        */
-        static void AddDisplayL( CMceMediaStream& aStream, 
-                                 CMceManager& aManager, 
-                                 const TRect& aDisplayRect );
-
-        /**
-        * Adds speaker sink to specified stream if one does not exist already.
-        * Speaker is disabled by default.
-        * 
-        * @param aStream is a stream where speaker is supposed to be added
-        * @leave KErrArgument if offered stream is not a video stream
-        */
-        static void AddSpeakerL( CMceMediaStream& aStream );
-        
-        /**
-        * Disables a specified stream, its' source and all the sinks
-        * 
-        * @param aStream is a stream to be disabled
-        */
-        static void DisableStreamL( CMceMediaStream& aStream );
-        
-        /**
-        * Enables or disables display sink. If the state is already correct,
-        * nothing is done.
-        */
-        static void DoEnableDisplayL( CMceDisplaySink& aDisplay, TBool aEnable );
-        
-    };
-
-
-#endif // MUSENGMCEUTILS_H
--- a/tsrc/musenginestub/inc/musengoutsessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengoutsessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,14 +16,11 @@
 */
 
 
-#ifndef MUSENGOUTSESSIONOBSERVER_H
-#define MUSENGOUTSESSIONOBSERVER_H
+#ifndef MUSHENGOUTSESSIONOBSERVER_H
+#define MUSHENGOUTSESSIONOBSERVER_H
 
 // INCLUDES
-#include <badesca.h>
-
-// FORWARD DECLARATIONS
-class MMusEngAsyncRetryObserver;
+#include "musengsessionobserver.h"
 
 // CLASS DECLARATION
 
@@ -31,29 +28,26 @@
 * An interface to be implemented by users of Multimedia Sharing Engine if they 
 * wish to receive feedback from outsent INVITE. All the callback functions 
 * represent an answer from network to sent INVITE.
+*
+* This observer is set using CMusEngSession::SetSessionObserver function.
+*
+* @lib musengine.lib
+* @since S60 v3.2
 */
-class MMusEngOutSessionObserver
+class MMusEngOutSessionObserver : public MMusEngSessionObserver
     {
     public:
 
-        /**    
-        * Indicates that preconditions for sending invitation cannot be met.
-        */
-        virtual void UnableToSendInvitation() = 0;
-
-	    /**    
-        * Indicates that no response received to invitation
-        */
-        virtual void NoResponseReceivedToInvitation() = 0;
-        
 		/**    
-   		* Indicates that MT has rejected session. ( e.g. 603 DECLINE ).
+   		* Indicates that MT has rejected session. ( e.g. 603 DECLINE )
+        * @since S60 v3.2
 		*/
      	virtual void SessionRejected() = 0;
     	
     	/**
     	* The following functions represent a specific reason in answer
     	* to sent INVITE.
+    	* @since S60 v3.2
     	*/
     	
 		virtual void SessionBadRequest() = 0; // 400 
@@ -62,35 +56,10 @@
     	virtual void SessionRecipientNotFound() = 0; // 404 
 		virtual void SessionProxyAuthenticationRequired() = 0; // 407
 		virtual void SessionRequestTimeOut() = 0; // 408
-		virtual void SessionUnsupportedMediaType() = 0; // 415
-		virtual void SessionBusyHere() = 0; // 486
+		virtual void SessionUnsupportedMediaType() = 0; // 415 
 		virtual void SessionRequestCancelled() = 0; // 487    	
-  	    virtual void SessionTemporarilyNotAvailable() = 0; // 480
-  	          
-  	    /**
-  	    * Indicates possibility to retry session. Recipient proposal is given
-  	    * but implementation can query user for new recipient address.
-  	    * Retry address should be filled to aRetryAddress on return.
-  	    * @return ETrue if retry should be made
-  	    */
-  	    virtual TBool RetrySessionSync( const TDesC& aRecipientProposal,
-                                        TDes& aRetryAddress ) = 0;
-  	    
-  	    /**
-  	    * Indicates that retry with given address is proceeding.
-  	    */
-  	    virtual void RetryProceeding() = 0;
-  	    
-  	    /**
-  	    * Indicates that there's multiple suitable recipient addresses.
-  	    * Client can choose what to use.
-  	    * @param aAddressArray, list of suitable recipient addresses
-  	    * @param aRecipientAddress, on return should contain recipient
-  	    *    address to be used
-  	    * @return ETrue if recipient was selected, otherwise EFalse
-  	    */
-  	    virtual TBool SelectRecipientL( CDesCArray& aAddressArray, 
-                                        TDes& aRecipientAddress ) = 0;
+
+  	
     };
 
-#endif
+#endif
\ No newline at end of file
--- a/tsrc/musenginestub/inc/musengreceivesession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengreceivesession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -19,23 +19,17 @@
 #ifndef MUSHENGREVEIVESESSION_H
 #define MUSHENGREVEIVESESSION_H
 
-// INCLUDES
+
+
 #include "musengmcesession.h"
-#include "musenguriparser.h"
-#include "musunittesting.h"
-#include "lcvideoplayer.h"
-#include <mcemediasink.h>
-
-// FORWARD DECLARATIONS
-class MMusEngReceiveSessionObserver;
-class CMceInSession;
 
 
-class CMusEngReceiveSession : 
-    public CMusEngMceSession,
-    public MLcVideoPlayer
+class MMusEngReceiveSessionObserver;
+
+class CMusEngReceiveSession : public CMusEngMceSession
+
     {
-    
+
     public: // Contructors and destructor
 
        /**
@@ -46,71 +40,70 @@
         * @param aSessionObserver Session specific callbacks
         * @return CMusEngReceiveSession* New instanse of specified class
         */
-        static CMusEngReceiveSession* NewL( const TRect& aRect );
+        IMPORT_C static CMusEngReceiveSession* NewL(
+                            const TRect& aRect,
+                            MMusEngReceiveSessionObserver* aSessionObserver );
        /**
         * Destructor
         *
         * @since S60 v3.2
         */
         ~CMusEngReceiveSession();
-      
+
+
+    public: // API
+
+       /**
+        * Accept or deny processed invitation
+        *
+        * @param aAccept ETrue if session is to be accepted and EFalse if
+        *        to be rejected.
+        */
+        IMPORT_C void AcceptInvitationL(const TBool& aAccept);
+
 
-    public: // from MLcSession
-        
-        void EstablishLcSessionL();
-    
-        MLcVideoPlayer* RemoteVideoPlayer();    
-        
-        const TDesC& RemoteDisplayName();
-        
-        
-    public: // from MLcVideoPlayer
-        
-        TLcVideoPlayerState LcVideoPlayerState() const;
-        
-        TBool LcIsPlayingL();
-        
-        void LcPlayL();
-        
-        void LcPauseL();
-    
-        MLcWindow* LcWindow();
+    public:
+
+       /**
+        * Sets callback interface pointer
+        *
+        * @param aSessionObserver Pointer to class which implements interface
+        */
+        IMPORT_C void SetSessionObserver(
+                                MMusEngReceiveSessionObserver* aSessionObserver );
+
+
+
+    protected: // internal API
 
-        MLcCameraControl* LcCameraControl();
-        
-        MLcFileControl* LcSourceFile();
-        
-        MLcFileControl* LcDestinationFile();
-        
-        MLcAudioControl* LcAudioControl();
-    
-        MLcZoomControl* LcZoomControl();
-    
-        MLcBrightnessControl* LcBrightnessControl();
+        /**
+        *
+        * @since S60 v3.2
+        */
+        TBool IsRtpcInactivityTimoutSupported();
+
 
-        RPointerArray< MLcValueControl >& LcExtensionControls(); 
-        
+    private: // CONSTRUCTORS
+
+        CMusEngReceiveSession( MMusEngReceiveSessionObserver* aSessionObserver,
+                               const TRect& aRect );
+
+        void ConstructL();
 
-    protected: // CONSTRUCTORS
-    
-        CMusEngReceiveSession( const TRect& aRect );
+    public: // HELPERS
+
+        //CMceInSession* InSession();
+
+        MMusEngReceiveSessionObserver* ReceiveSessionObserver();
 
-		void ConstructL();
-		
-       
-    protected: // DATA
-    
-        // identity of originator parsed form P-Asserted-Identity field
-        TBuf8<KMaxUriLength> iIdentity;
-        
-        HBufC8* iOriginator;
-        
-        HBufC* iRemoteDisplayName;
-       
-        /** 
-        * Dummy member variable to implement MLcVideoPlayer::LcExtensionControls
-        */
-        RPointerArray< MLcValueControl > iValueControls; 
+        // void CompleteSessionStructureL( CMceInSession& aInSession );
+
+
+    public: // DATA
+
+       // CMceInSession* iTemporaryInSession; // Owned
+       TBool iAccepInvitation;
+
     };
 
 #endif
--- a/tsrc/musenginestub/inc/musengreceivesessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengreceivesessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -21,38 +21,34 @@
 
 // INCLUDES
 
-#include <e32cmn.h>
+#include "musengsessionobserver.h"
 
 // CLASS DECLARATION
 
 /**
-* Observer interface to be implemented by clients interested about notifications
-* of receiving (MT) side session specific events.
+*  
+*
+*  @lib ???.lib
 */
-class MMusEngReceiveSessionObserver
+class MMusEngReceiveSessionObserver : public MMusEngSessionObserver
     {
 
     public:
     
         /**
-        * There is new incoming session. 
-        * Session is not yet handled in any way and cannot yet be accepted
-        * or rejected. User should not be notified at this stage.
+        * 
+        *
+        * @since S60 v3.2
         */
-        virtual void IncomingSessionPreNotification() = 0;
-        
-        /**
-        * There is new incoming session ready to be accepted or rejected.
-        * User can be notified.
-        */
-        virtual void IncomingSession( const TDesC& aOriginator, 
-                                      const TDesC& aOriginatorIdentity ) = 0;
+        virtual void IncomingSession( const TDesC& aOriginator ) = 0;
+
 
         /**
         * Current receiving session is buffering received RTP.
+        *
+        * @since S60 v3.2
         */
         virtual void StreamBuffering() = 0;
-        
     };
 
 #endif
\ No newline at end of file
--- a/tsrc/musenginestub/inc/musengsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengsession.h	Wed Sep 01 12:31:01 2010 +0100
@@ -16,14 +16,17 @@
 */
 
 
-#ifndef MUSENGSESSION_H
-#define MUSENGSESSION_H
+#ifndef MUSHENGSESSION_H
+#define MUSHENGSESSION_H
 
+// USER INCLUDES
 
 //SYSTEM INCLUDES
 #include <e32base.h>
 
 
+// FORWARD DECLARATIONS
+class MMusEngSessionObserver;
 
 // CLASS DECLARATION
 
@@ -35,38 +38,162 @@
 * resources.
 *
 * @lib musengine.lib
+* @since S60 v3.2
 */
 class CMusEngSession : public CBase
     {
-   
+
     public:
 
         /**
         * Desctructor, finalize session
         *
+        * @since S60 v3.2
         */
         ~CMusEngSession();
 
 
+    public:  // API FUNCTIONS
+
+        /**
+        * Returns currently assigned drawing area
+        *
+        * @since S60 v3.2
+        * @return TRect This session drawing area recttangle
+        */
+        IMPORT_C TRect Rect() const;
+
+        /**
+        * Sets new drawing area
+        *
+        * @since S60 v3.2
+        * @param TRect This session new drawing area rectangle
+        */
+        IMPORT_C void SetRectL( const TRect& aRect );
+
+        /**
+        * Activates/deactivates loadspeaker
+        *
+        * @since S60 v3.2
+        * @param TBool Enable or disable loudspeaker
+        * @param TBool Show activation dialog
+        */
+        IMPORT_C void EnableLoudspeakerL( TBool aEnable, TBool aShowDialog );
+
+        /**
+        * Checks is loudspeaker enabled or disabled.
+        *
+        * @since S60 v3.2
+        * @return TBool true if enabled
+        */
+        IMPORT_C TBool IsLoudSpeakerEnabled() const;
+
+        /**
+        * Returns current volume level
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C TInt VolumeL() const;
+
+
+    public:  // VIRTUAL API FUNCTIONS
+
+        /**
+        * Increases volume level by one.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C virtual void VolumeUpL();
+
+        /**
+        * Decreases volume level by one
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C virtual void VolumeDownL();
+
+        /**
+        * Enables or disables display. Call to this function is considered
+        * as a permission or denial to draw to the display.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C virtual void EnableDisplayL( TBool aEnable ) = 0;
+
+        /**
+        * Mutes current audio stream meaning that any audio is not played or
+        * sent to network.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C virtual void MuteL() = 0;
+
+        /**
+        * Unmute current audio stream meaning that all the audio is played
+        * and if needed also sent to network.
+        *
+        * @since S60 v3.2
+        */
+        IMPORT_C virtual void UnmuteL() = 0;
+
+
+    protected: // INTERNAL
+
+        virtual void RectChangedL() = 0;
+
 
     protected:
 
         /**
         * Constructor, private cannot be instantiate
         *
-        * @param aRect reserved drawing area for this session
+        *
+        * @since S60 v3.2
+        * @param TRect reserved drawing area for this session
         */
-        CMusEngSession();
+        CMusEngSession( const TRect& aRect );
 
 
     protected:
 
         /**
-        * second-phase constructor, called by those session specific 
+        * second-phase constructor, called by those session specific
         * constructors
+        *
+        * @since S60 v3.2
         */
         void ConstructL();
 
+
+    protected: // MEMBERS
+
+        /**
+        * Callback pointer to interface, not own
+        *
+        * @since S60 v3.2
+        */
+        MMusEngSessionObserver* iSessionObserver;
+
+
+    public: // MEMBERS
+
+        /**
+        * Drawing area rect
+        *
+        * @since S60 v3.2
+        */
+        TRect iRect;
+
+        /**
+        * Telephone utilities
+        *
+        * @since S60 v3.2
+        */
+        //CMusEngTelephoneUtils* iTelephoneUtils;
+
+        TInt iErrorCode;
+
+
     };
 
-#endif //MUSENGSESSION_H
+#endif //MUSHENGSESSION_H
\ No newline at end of file
--- a/tsrc/musenginestub/inc/musengsessiondurationtimer.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengsessiondurationtimer.h	Wed Sep 01 12:31:01 2010 +0100
@@ -21,88 +21,71 @@
 
 
 // USER INCLUDES
-#include "musunittesting.h"
 
-// KERNEL INCLUDES 
+// KERNEL INCLUDES
 #include <e32base.h>
 
 // FORWARD DECLERATIONS
 class MMusEngSessionDurationTimerObserver;
 
-class CMusEngSessionDurationTimer : public CActive
+class CMusEngSessionDurationTimer
     {
-    MUS_UNITTEST( UT_CMusEngSessionDurationTimer )
 
     public:
 
-		/**
-   		*
+        /**
+        *
         * @since S60 v3.2
         */
-        static CMusEngSessionDurationTimer* NewL( 
-        					MMusEngSessionDurationTimerObserver& aObserver );
+        static CMusEngSessionDurationTimer* NewL(
+                            MMusEngSessionDurationTimerObserver& aObserver );
 
-		/**
-   		*
+        /**
+        *
         * @since S60 v3.2
         */
         ~CMusEngSessionDurationTimer();
 
 
-	public: // API
-	
-		/**
-   		*
+    public: // API
+
+        /**
+        *
         * @since S60 v3.2
         */
-        void Start( TInt aDelay );
 
 
-    private: 
+    private:
 
-		/**
-   		*
+        /**
+        *
         * @since S60 v3.2
         */
-        CMusEngSessionDurationTimer( 
-        					MMusEngSessionDurationTimerObserver& aObserver );
+        CMusEngSessionDurationTimer(
+                            MMusEngSessionDurationTimerObserver& aObserver );
 
-		/**
-   		*
+        /**
+        *
         * @since S60 v3.2
         */
         void ConstructL();
 
-    
-    private: // inherited from CActive
+
 
-		/**
-   		*
-        * @since S60 v3.2
-        */
-        void RunL();
-        
-		/**
-   		*
+    public: // DATA
+
+        /**
+        *
         * @since S60 v3.2
         */
-        void DoCancel();
-
-
-    private: // DATA
+        //RTimer iTimer;
 
-		/**
-   		*
-        * @since S60 v3.2
-        */
-        RTimer iTimer;
-
-		/**
-   		*
+        /**
+        *
         * @since S60 v3.2
         */
         MMusEngSessionDurationTimerObserver& iObserver;
-        
+
     };
 
 #endif // _MUSENGSESSIONDURATIONTIMER_H_
--- a/tsrc/musenginestub/inc/musengsessionmanager.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef CMUSENGSESSIONMANAGER_H
-#define CMUSENGSESSIONMANAGER_H
-
-// INCLUDES
-#include "lcengine.h"
-#include "musmanagercommon.h"
-
-// FORWARD DECLARATIONS
-class MLcSession;
-class CMusEngMceSession;
-class MLcUiProvider;
-
-
-class CMusEngSessionManager : 
-    public CLcEngine
-    {
-    public:
-    
-        static CMusEngSessionManager* NewL( TAny* aInitParams );
-        ~CMusEngSessionManager();
-    
-    public: // From CLcEngine
-    
-        MLcSession& Session();
-
-    private: // Constructors
-
-        CMusEngSessionManager( TLcEngineParams& aInitParams );
-        void ConstructL();
-       
-    private: // New functions
-        
-        CMusEngMceSession* CreateMusSessionL( 
-            MultimediaSharing::TMusUseCase aUseCase );
-        
-    private: // Data
-        
-        CMusEngMceSession* iSession;
-        
-    };  
-    
-#endif // CMUSENGSESSIONMANAGER_H
-
-// end of file
--- a/tsrc/musenginestub/inc/musengsessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengsessionobserver.h	Wed Sep 01 12:31:01 2010 +0100
@@ -25,7 +25,7 @@
 // CLASS DECLARATION
 
 /**
-* An interface to be implemented by users of Multimedia Sharing Engine if 
+* An interface to be implemented by users of Multimedia Sharing Engine if
 * they wish to receive events from session and streaming state changes.
 *
 * @lib museng.lib
@@ -58,7 +58,7 @@
         *
         * @since S60 v3.2
         */
-        virtual void SessionConnectionLost() = 0; 
+        virtual void SessionConnectionLost() = 0;
 
         /**
         * Undefined exception has occurred. Session is useless and must be
@@ -82,7 +82,7 @@
         *
         * @since S60 v3.2
         */
-        virtual void StreamStreaming() = 0;        
+        virtual void StreamStreaming() = 0;
 
         /**
         * Update time information of this session
@@ -90,7 +90,7 @@
         * @since S60 v3.2
         */
         virtual void SessionTimeChanged( const TTimeIntervalSeconds& aSeconds ) = 0;
-        
+
         /**
         * RTCP inactivity timeout has occurred.
         *
--- a/tsrc/musenginestub/inc/musengtelephoneutils.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/inc/musengtelephoneutils.h	Wed Sep 01 12:31:01 2010 +0100
@@ -20,183 +20,111 @@
 #define MUSENGTELEPHONEUTILS_H
 
 
-#include "musunittesting.h"
+//#include "musunittesting.h"
 
 // SYSTEM
 #include <e32base.h>
-#include <mtelephonyaudioroutingobserver.h>
-#include <telephonyaudiorouting.h>
-#include <rphcltserver.h>
+//#include <mtelephonyaudioroutingobserver.h>
+//#include <telephonyaudiorouting.h>
 
 // FORWARD DECLARATIONS
-class CRepository;
-class CTelephonyAudioRouting;
-class CPhCltCommandHandler;
-class MMusEngAudioRoutingObserver;
+//class CRepository;
+//class CTelephonyAudioRouting;
 
 /**
-* Utility class to handle all phone related requests:
-* Audio routing, volume control and microphone muting.
+*
+* @lib musengine.lib
+* @since S60 v3.2
 */
-class CMusEngTelephoneUtils : public CActive,
-                              public MTelephonyAudioRoutingObserver
+class CMusEngTelephoneUtils : public CBase
+                              //public MTelephonyAudioRoutingObserver
     {
-    MUS_UNITTEST( UT_CMusEngTelephoneUtils )
-    MUS_UNITTEST( UT_CMusEngSession )
-	
-	public: 
-		
-		/**
-   		*
+    public:
+
+        /**
+        *
+        * @since S60 v3.2
         */
-		static CMusEngTelephoneUtils* NewL();
+        static CMusEngTelephoneUtils* NewL();
 
-		/**
-   		*
+        /**
+        *
+        * @since S60 v3.2
         */
-		~CMusEngTelephoneUtils();
+        ~CMusEngTelephoneUtils();
 
 
-	public: // API
-	
-	    /**
-        * Checks if audio routing can be changed using LoudspeakerL
-        * 
-        * @return ETrue if audio routing can be changed using LoudspeakerL
-        */
-        TBool AudioRoutingCanBeChanged();
+    public: // API
 
-		/**
-   		* Changes the audio routing between loudspeaker and handset.
-   		*  
-   		* @param aShowDialog if ETrue, user is notified about new audio routing
+        /**
+        *
+        * @since S60 v3.2
         */
         void LoudspeakerL( TBool aEnable, TBool aShowDialog );
 
-		/**
-   		*
+        /**
+        *
+        * @since S60 v3.2
         */
-		TBool IsLoudSpeakerEnabled() const;
-		
-		/**
-   		*
-        */
-		TInt GetVolumeL() const;
+        TBool IsLoudSpeakerEnabled() const;
 
-		/**
-   		*
-        */
-		void SetVolumeL( TInt aVolume );
-		
-		/**
-        * Mutes CS call microphone.
-        */
-        void MuteMicL( TBool aMute );
-        
         /**
-        * Returns current CS call mic mute state.
+        *
+        * @since S60 v3.2
         */
-        TBool IsMicMutedL();
-    
-        /**
-        * Sets audio routing observer. Can be set to NULL in order to indicate
-        * ending of observing changes in audio routing.
-        */
-        void SetAudioRoutingObserver( MMusEngAudioRoutingObserver* aObserver );
-                                        
-    
-    private: // inherited from CActive
+        TInt GetVolumeL() const;
 
-		/**
-   		*
+        /**
+        *
+        * @since S60 v3.2
         */
-        void RunL();
-        
-		/**
-   		* Cancels outstanding request to phone client
-        */
-        void DoCancel();
-            
-		
-    private: // MTelephonyAudioRoutingObserver functions
+        void SetVolumeL( TInt aVolume );
+
+
+
+    private:
 
         /**
-         * Available outputs have changed
-         */
-        void AvailableOutputsChanged( 
-                        CTelephonyAudioRouting& aTelephonyAudioRouting );
-    
-        /**
-         * Some other application has changed audio output routing
-         */
-        void OutputChanged( 
-                        CTelephonyAudioRouting& aTelephonyAudioRouting );
-    
+        *
+        * @since S60 v3.2
+        */
+        CMusEngTelephoneUtils();
+
         /**
-         * Our request to change audio output routing has completed
-         */
-        void SetOutputComplete( 
-                        CTelephonyAudioRouting& aTelephonyAudioRouting,
-                        TInt aError );
-    
-        /**
-        * Set output if setting is currently allowed. Leaves with KErrAccessDenied
-        * if setting is not allowed.
+        *
+        * @since S60 v3.2
         */
-        void DoSetOutputL( CTelephonyAudioRouting::TAudioOutput aAudioOutput );
-        
-    private:
-
-		/**
-   		* Default C++ constructor
-        */
-		CMusEngTelephoneUtils();
-
-		/**
-   		* 2nd phase constructor
-        */
-		void ConstructL();
+        void ConstructL();
 
 
-	private: // HELPER
-	
-		/**
-   		* Checks that volume value is between 1 and 10.
-   		*
-   		* @return validated volume value
-        */
-		TInt ValidateVolume( const TInt aVolume ) const;
-		
-
-    private: // DATA
+    private: // HELPER
 
         /**
-        *  Stores the audio routing state at startup.
+        *
+        * @since S60 v3.2
         */
-        CTelephonyAudioRouting::TAudioOutput iAudioOutputAtStartup;
-        
+        TInt ValidateVolume( const TInt aVolume ) const;
+
+
+    public: // DATA
+
+        /**
+         *  Stores the audio routing state at startup.
+         */
+        //CTelephonyAudioRouting::TAudioOutput iAudioOutputAtStartup;
+
         /**
         * Telephony audio routing instance. Owned.
         */
-        CTelephonyAudioRouting* iTelephonyAudioRouting;
+        //CTelephonyAudioRouting* iTelephonyAudioRouting;
 
         /**
         * Central repository. Owned.
+        *
+        * @since S60 v3.2
         */
-        CRepository* iRepository;
+        //CRepository* iRepository;
 
-        /**
-        * Command handler for muting the microphone
-        */        
-        CPhCltCommandHandler* iPhoneCommandHandler;
-        
-        /**
-        * Not owned.
-        */
-        MMusEngAudioRoutingObserver* iAudioRoutingObserver;
-
-        TBool iShowDialog;
-        
     };
 
 
--- a/tsrc/musenginestub/inc/musengtwowayrecvsession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYRECVSESSION_H
-#define MUSHENGTWOWAYRECVSESSION_H
-
-// USER
-#include "musengreceivesession.h"
-#include "musunittesting.h"
-#include "mussettings.h"
-#include "musengcamerahandler.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class MMusEngLiveSessionObserver;
-class CMceDisplaySink;
-class CMceStreamBundle;
-
-class CMusEngTwoWayRecvSession : public CMusEngReceiveSession
-    {
-    MUS_UNITTEST( UT_CMusEngTwoWayRecvSession )
-
-    
-    public:
-        /**
-        * Creates new MultimediaSharing two-way receive session.
-        *
-        * @param aRemoteRect UI drawing area for received video.
-        * @param aLocalRect UI drawing area for camera viewfinder.
-        * @param aSessionObserver Interface for session specific callbacks
-        * @param aReceiveSessionObserver Interface for receivesession specific callbacks
-        * @return CMusEngTwoWayRecvSession* New instanse of specified class
-        */
-        IMPORT_C static CMusEngTwoWayRecvSession* NewL( 
-                            const TRect& aRemoteRect,
-                            const TRect& aLocalRect,
-                            MMusEngSessionObserver& aSessionObserver,
-                            MMusEngReceiveSessionObserver& aReceiveSessionObserver );
-
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngTwoWayRecvSession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-
-        CMusEngMceSession::TDisplayOrientation OrientationL();
-        
-        void SetOrientationL( TDisplayOrientation aOrientation );
-        
-    public:
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        IMPORT_C void SetRectsL( const TRect& aRemoteRect,
-                                 const TRect& aLocalRect );
-
-        /**
-        * Sets local rect (viewfinder).
-        * 
-        */
-        IMPORT_C void SetLocalRectL( const TRect& aLocalRect );
-        
-        /**
-        * Gets local rect (viewfinder).
-        * 
-        */
-        IMPORT_C TRect LocalRect() const;
-   
-        /**
-        * Gets camera handler (can be used for zooming etc.) 
-        */
-        IMPORT_C TMusEngCameraHandler& Camera();
-        
-    protected: // From CMusEngReceiveSession
-        
-        void CompleteSessionStructureL();
-        
-        void RectChangedL();
-
-   
-    private: // from MMceStreamObserver, 
-             // overrides the functions in ancestor classes
-
-
-        void StreamStateChanged( CMceMediaStream& aStream,
-                                 CMceMediaSink& aSink );   
-        
-        void StreamStateChanged( CMceMediaStream& aStream );
-                                 
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngTwoWayRecvSession( MMusEngSessionObserver& aSessionObserver,
-                            MMusEngReceiveSessionObserver& aReceiveSessionObserver,
-                            const TRect& aRemoteRect,
-                            const TRect& aLocalRect );
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-        
-    private:
-        
-        void CompleteSessionStructureAudioPartL( 
-                   const RPointerArray<CMceMediaStream>& aStreams, 
-                   CMceStreamBundle& aLocalBundle, 
-                   CMceMediaStream* aVideoInStream,
-                   CMceMediaStream* aVideoOutStream );
-          
-        void CompleteSessionStructureInStreamL( CMceMediaStream& aVideoInStream, 
-                                                CMceStreamBundle& aLocalBundle );
-          
-        void CompleteSessionStructureOutStreamL( CMceMediaStream& aVideoOutStream );
-
-    private:
-        
-        TRect iLocalRect;
-        
-        TMusEngCameraHandler iCameraHandler;
-    };
-
-#endif
-
--- a/tsrc/musenginestub/inc/musengtwowaysession.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYSESSION_H
-#define MUSHENGTWOWAYSESSION_H
-
-// USER
-#include "musenglivesession.h"
-#include "musunittesting.h"
-#include "mussettings.h"
-
-// SYSTEM
-#include <ecam.h>
-
-// FORWARD DECLARATIONS
-class MMusEngLiveSessionObserver;
-class CMceDisplaySink;
-class MMusEngTwoWaySessionObserver;
-
-class CMusEngTwoWaySession : public CMusEngLiveSession
-    {
-    MUS_UNITTEST( UT_CMusEngOutSession )
-    MUS_UNITTEST( UT_CMusEngTwoWaySession )
-
-    
-    public:
-        /**
-        * Creates new MultimediaSharing Live session.
-        *
-        * @param aRect UI drawing area. It is allowed handle from engine
-        * @param aSessionObserver Interface for session specific callbacks
-        * @param aOutSessionObserver Interface for outsession specific callbacks
-        * @param aLiveSessionObserver interface for live session specific
-        *        callbacks
-        * @return CMusEngTwoWaySession* New instanse of specified class
-        */
-        IMPORT_C static CMusEngTwoWaySession* NewL( 
-                            const TRect& aRemoteRect,
-                            const TRect& aLocalRect,
-                            MMusEngSessionObserver& aSessionObserver,
-                            MMusEngOutSessionObserver& aOutSessionObserver,
-                            MMusEngLiveSessionObserver& aLiveSessionObserver,
-                            MMusEngTwoWaySessionObserver& aTwoWayObserver );
-
-
-    public:
-
-        /**
-        * Destructor
-        */
-        ~CMusEngTwoWaySession();
-
-    public:
-        
-        void EnableDisplayL( TBool aEnable );
-
-        void SetOrientationL( TDisplayOrientation aOrientation );
-        
-    public:
-
-        /**
-        * Starts or pauses recording
-        */
-        void RecordL( TBool aRecord );
-
-        /**
-        * Tells whether recording is paused or not
-        */
-        TBool IsRecording();
-        
-        /**
-        * Sets both remote (receiving video) and local (viewfinder) rects.
-        * 
-        */
-        IMPORT_C void SetRectsL( const TRect& aRemoteRect,
-                                 const TRect& aLocalRect );
-
-        /**
-        * Sets local rect (viewfinder).
-        * 
-        */
-        IMPORT_C void SetLocalRectL( const TRect& aLocalRect );
-        
-        /**
-        * Gets local rect (viewfinder).
-        * 
-        */
-        IMPORT_C TRect LocalRect() const;
-        
-    protected: // inherited from CMusEngMceOutSession
-
-        void RectChangedL();
-        
-        /**
-        * @param aLocalBundle All local streams are supposed to be added to
-        *        this bundle
-        */
-		void CompleteSessionStructureL( CMceStreamBundle& aLocalBundle );
-		
-		void AddDisplayL( CMceMediaStream& aStream );
-
-
-    protected: // overrides ancestor class versions
-        
-        /**
-        * The state of the session has changed
-        * @param aSession, the session that has changed.
-        */
-        virtual void HandleSessionStateChanged( CMceSession& aSession,
-                                                TInt aStatusCode,
-                                                const TDesC8& aReasonPhrase );
-   
-    private: // from MMceStreamObserver, 
-             // overrides the function in CMusEngMceSession
-        
-        void StreamStateChanged( CMceMediaStream& aStream );
-
-        void  InactivityTimeout( CMceMediaStream& aStream,
-                                 CMceRtpSource& aSource );
-    
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusEngTwoWaySession( MMusEngSessionObserver& aSessionObserver,
-                            MMusEngOutSessionObserver& aOutSessionObserver,
-                            MMusEngLiveSessionObserver& aLiveSessionObserver,
-                            MMusEngTwoWaySessionObserver& aTwoWayObserver,
-                            const TRect& aRemoteRect,
-                            const TRect& aLocalRect );
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-
-    private:
-        
-        void ReceivingStarted();
-        
-        void ReceivingStopped();
-        
-    private:
-        
-        MMusEngTwoWaySessionObserver& iTwoWayObserver;
-        
-        TRect iLocalRect;
-        
-        TBool iReceiving;
-        
-        TBool iBuffered;
-        
-    };
-
-#endif
-
--- a/tsrc/musenginestub/inc/musengtwowaysessionobserver.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef MUSHENGTWOWAYSESSIONOBSERVER_H
-#define MUSHENGTWOWAYSESSIONOBSERVER_H
-
-
-
-// CLASS DECLARATION
-
-/**
-*  An interface to be implemented by clients of Multimedia Sharing Engine if 
-*  they wish to receive two-way sharing specific events.
-*/
-class MMusEngTwoWaySessionObserver
-    {
-    
-    public:
-    
-      /**    
-    	* Indicates that video receiving state has changed
-    	* @param aReceivingVideo, ETrue if receiving, EFalse if not receiving
-    	*/
-    	virtual void ReceivingStateChanged( TBool aReceivingVideo ) = 0;
-		
-    };
-
-#endif
\ No newline at end of file
--- a/tsrc/musenginestub/inc/musenguriparser.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2005 - 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Parser for recipient's address
-*
-*/
-
-
-#ifndef MUSENGURIPARSER_H
-#define MUSENGURIPARSER_H
-
-//  INCLUDES
-
-#include "musunittesting.h"
-#include <e32cmn.h>
-
-const TInt KMaxUriLength = 512;
-_LIT8( KMusEngAtSign, "@" );
-_LIT8( KMusEngPlusSign, "+" );
-_LIT8( KMusEngSipPrefix, "sip:" );
-_LIT8( KMusEngTelPrefix, "tel:" );
-
-// CLASS DECLARATION
-
-/**
-* 
-*/
-class TMusEngUriParser
-    {
-    MUS_UNITTEST( UT_TMusEngUriParser ) 
-    
-    public:
-    
-        enum TMusEngUriType
-            {
-            ENotParsed = 0,
-            ESip,
-            ETel
-            };
-    
-    public:
-     
-		/**
-		* Default constructor
-		*/
-     	IMPORT_C TMusEngUriParser( const TDesC16& aUri );
-     	
-     	/**
-		* @returns Uri type
-		*/
-     	IMPORT_C TMusEngUriType UriType();
-
-		/**
-		* @returns Parsed and validated 8-bit version of contained URI
-		*          Ownership is transferred
-		* @pre UriType() != ENotParsed
-		* @leave KErrNotReady if precondition is not fulfilled
-		*/
-     	IMPORT_C HBufC8* GetUri8L();
-     	
-     	/**
-     	* @param aPrefix if ETrue, also sip: or tel:prefix is returned
-		* @returns Parsed and validated 16-bit version of contained URI
-		*          Ownership is transferred
-		* @pre UriType() != ENotParsed
-		* @leave KErrNotReady if precondition is not fulfilled
-		*/
-     	IMPORT_C HBufC16* GetUri16L( TBool aPrefix );
-     
-     	/**
-        * Parses and validates contained URI
-        * @leave KErrCorrupt if URI is not valid SIP or TEL URI
-        * @post UriType() != ENotParsed
-        */
-        IMPORT_C void ParseUriL();
-        
-     	
-    private:
-
-        void HandleSipUriL();
-        void HandleTelUriL();
-        void HandleLocalTelUriL();
-        
-    
-		TBuf8<KMaxUriLength> iUri;
-
-        TMusEngUriType iUriType;
-        
-    };
-
-#endif
--- a/tsrc/musenginestub/inc/mussipprofilehandler.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*  Version     : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-*
-*/
-
-
-
-#ifndef MUSSIPPROFILEHANDLER_H
-#define MUSSIPPROFILEHANDLER_H
-
-
-// INTERNAL INCLUDE
-#include "musunittesting.h"
-
-// SYSTEM INCLUDE
-#include <e32base.h>
-#include <sipobserver.h>
-#include <sipconnectionobserver.h>
-#include <sipprofileregistryobserver.h>
-#include <sipprofilealrobserver.h>
-
-
-class CSIPProfile;
-class CSIPProfileRegistry;
-class CSipProfileAlrController;
-class CUri8;
-class MMusSipProfileUser;
-
-/**
-*
-* @lib musengine.lib
-*/
-class CMusSipProfileHandler : public CBase,
-                              public MSIPProfileRegistryObserver,
-                              public MSIPObserver,
-                              public MSIPConnectionObserver,
-                              public MSipProfileAlrObserver                             
-    {
-    MUS_UNITTEST( UT_CMusEngSipProfileHandler )
-    
-    public:
-
-        /**
-        * Creates new instance of CMusSipProfileHandler
-        * @param aSipProfileId profile id of requested profile
-        */
-        static CMusSipProfileHandler* NewL( MMusSipProfileUser& aUser );
-
-        /**
-        * Destructor
-        *
-        */
-        ~CMusSipProfileHandler();
-
-
-    public: // API
-        
-        /**
-        * Creates the SIP profile used.
-        * @param aSipProfileId profile ID of requested SIP profile
-        */
-        void CreateProfileL( TUint32 aSipProfileId );
-        
-        /**
-        * Returns the used SIP profile.
-        * @pre SipProfileL has been called
-        * @return SIP profile or NULL if the SIP profile cannot be found,
-        *         The ownership is not transferred.
-        */ 
-        CSIPProfile* Profile();
-        
-        /**
-        * Returns the registered public user identity of the used SIP profile
-        * @pre SipProfileL has been called
-        * @return a pointer to the URI, the ownership is transferred 
-        */       
-        CUri8* UserFromProfileLC();
-
-        /**
-        * Refreshes the availabilities of the access points 
-        * for the used SIP profile.
-        * Should be called when a MuS session terminates.
-        */
-        void RefreshIapAvailabilities();
-        
-        /**
-         * @return ETrue if SIP profile returned by Profile() is registered
-         */
-        TBool IsRegistered();
-
-        
-    private:
-
-        /**
-        * Constructor
-        */
-        CMusSipProfileHandler( MMusSipProfileUser& aUser );
-
-        /**
-        * Second-phase constructor
-        */
-        void ConstructL();
-
-    private: // From MSIPProfileRegistryObserver
-
-        /**
-        * An event related to SIP Profile has accorred
-        *
-        * @param aProfileId a profile Id
-        * @param aEvent an occurred event
-        **/
-        void ProfileRegistryEventOccurred( 
-            TUint32 aProfileId,
-            MSIPProfileRegistryObserver::TEvent aEvent );
-
-        /**
-        * An asynchronous error has occurred related to SIP profile
-        * Event is send to those observers, who have the
-        * corresponding profile instantiated.
-        *
-        * @param aProfileId the id of failed profile
-        * @param aError an occurred error
-        */
-        void ProfileRegistryErrorOccurred( 
-            TUint32 aProfileId,
-            TInt aError );
-
-    private: // From MSIPObserver    
-
-        void IncomingRequest( TUint32 aIapId,
-                              CSIPServerTransaction* aTransaction );
-
-        void TimedOut( CSIPServerTransaction& aTransaction );
-
-    private: // MSIPConnectionObserver must be implemented to enable SIP profile
-        
-        void IncomingRequest (CSIPServerTransaction* aTransaction );
-
-        void IncomingRequest (CSIPServerTransaction* aTransaction,
-                              CSIPDialog& aDialog );
-
-        void IncomingResponse (CSIPClientTransaction& aTransaction );
-
-        void IncomingResponse ( CSIPClientTransaction& aTransaction,
-                                CSIPDialogAssocBase& aDialogAssoc );
-
-        void IncomingResponse ( CSIPClientTransaction& aTransaction,
-                                CSIPInviteDialogAssoc* aDialogAssoc );
-
-        void IncomingResponse( CSIPClientTransaction& aTransaction,
-                               CSIPRegistrationBinding& aRegistration );
-
-        void ErrorOccured( TInt aError, CSIPTransactionBase& aTransaction );
-
-        void ErrorOccured( TInt aError,
-                           CSIPClientTransaction& aTransaction,
-                           CSIPRegistrationBinding& aRegistration );
-
-        void ErrorOccured( TInt aError,
-                           CSIPTransactionBase& aTransaction,
-                           CSIPDialogAssocBase& aDialogAssoc );
-        
-        void ErrorOccured( TInt aError, CSIPRefresh& aSIPRefresh );
-
-        void ErrorOccured( TInt aError, 
-                           CSIPRegistrationBinding& aRegistration );
-
-        void ErrorOccured( TInt aError, CSIPDialogAssocBase& aDialogAssoc );
-
-        void InviteCompleted( CSIPClientTransaction& aTransaction );
-
-        void InviteCanceled( CSIPServerTransaction& aTransaction );
-        
-        void ConnectionStateChanged( CSIPConnection::TState aState );     
-        
-    private: // From MSipProfileAlrObserver    
-        
-        void AlrEvent( MSipProfileAlrObserver::TEvent aEvent,
-                       TUint32 aProfileId,
-                       TUint32 aSnapId,
-                       TUint32 aIapId );
-
-        void AlrError( TInt aError,
-                       TUint32 aProfileId,
-                       TUint32 aSnapId,
-                       TUint32 aIapId );         
-  
-    private: // New functions
-        
-        TUint32 ProfileId() const;
-        
-    private: // DATA
-        
-        MMusSipProfileUser& iUser;
-        CSIP* iSip;
-        CSIPProfileRegistry* iProfileRegistry;
-        CSipProfileAlrController* iProfileAlrController;
-        CSIPProfile* iSipProfile;
-    };
-
-
-#endif // MUSSIPPROFILEHANDLER_H
--- a/tsrc/musenginestub/inc/mussipprofileuser.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef MUSSIPPROFILEUSER_H
-#define MUSSIPPROFILEUSER_H
-
-// SYSTEM INCLUDE
-#include <e32def.h>
-
-/**
-* Callbacks for asking permission to roam between access points
-* and notifying client about registering event
-* @lib musengine.lib
-*/
-class MMusSipProfileUser                            
-    {    
-    public:
-
-        /**
-        * Checks whether roaming between access points is allowed.
-        * @return ETrue is roaming is allowed, otherwise EFalse.
-        */
-        virtual TBool IsRoamingBetweenAPsAllowed() = 0;
-        
-        /**
-        * Indicates that SIP profile has been registered.
-        */
-        virtual void ProfileRegistered() = 0;
-        
-    };
-
-
-#endif // MUSSIPPROFILEUSER_H
--- a/tsrc/musenginestub/src/musengcamerahandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,703 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengcamerahandler.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-
-// SYSTEM
-#include <mcemanager.h>
-#include <mcecamerasource.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcefilesink.h>
-#include <mcesession.h>
-
-const TInt KMaxBrightness = 100;
-const TInt KMinBrightness = -100;
-const TInt KBrightnessStepSize = 10;
-
-
-//Number of big and small zoom steps on Zoom scale
-const TInt KZoomBigStepCount = 15;
-const TInt KZoomSmallStepCount = KZoomBigStepCount*2;
-const TInt KZoomStepMinSize = 1;
-
-const TInt64 KZoomFasterTime = 333333; // 1/3 second
-const TInt KOneCameraOnly = 1;
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TMusEngCameraHandler::TMusEngCameraHandler() :
-    iSession( NULL ),
-    iDefaultZoomFactor( -1 ),
-    iDefaultBrightness( 0 ),
-    iZoomInTime(0),
-    iZoomOutTime(0),
-    iSmallZoomStep( KZoomStepMinSize ),
-    iBigZoomStep( KZoomStepMinSize ),
-    iCameraUsage( MusSettingsKeys::EUseCameraSwapping )
-    {
-    
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::SetSession( CMceSession* aSession )
-    {
-    iSession = aSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::InitializeL( CMceCameraSource& aCamera )
-    {
-    aCamera.GetCameraInfo( iCameraInfo );
-    iDefaultZoomFactor = aCamera.ZoomFactorL();
-    
-    InitializeZoomStepSize();
-    
-    iCurrentCamera = EBackCamera;
-    if ( iCameraUsage == MusSettingsKeys::EUseOnlySecondaryCamera )
-       {
-       iCurrentCamera = EFrontCamera;
-       }
-    aCamera.SetCameraIndexL( (TInt)iCurrentCamera );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::PlayL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::PlayL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    if ( !camera->IsEnabled() )
-        {
-        camera->EnableL();
-        }
-    else
-        {
-        MUS_LOG( "mus: [ENGINE]    Camera already enabled, ignore request" )
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::PlayL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Disable camera if not already disabled
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::PauseL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::PauseL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    if ( camera->IsEnabled() )
-        {
-        camera->DisableL();
-        }
-    else
-        {
-        MUS_LOG( "mus: [ENGINE]    Camera already disabled, ignore request" )
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::PauseL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool TMusEngCameraHandler::IsPlayingL()
-    {
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    return ( MusEngMceUtils::GetCameraL( *iSession )->IsEnabled() );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TMusEngCameraHandler::CamerasAvailableL( 
-    TCurrentCamera& aCurrentCamera )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::CamerasAvailableL()" )
-    __ASSERT_ALWAYS( iSession != NULL, User::Leave( KErrNotReady ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    __ASSERT_ALWAYS( camera != NULL, User::Leave( KErrNotReady ) );
-    aCurrentCamera = iCurrentCamera;
-    TInt camerasAvailable = camera->CamerasAvailable();
-    
-    if ( camerasAvailable > KOneCameraOnly && 
-         iCameraUsage != MusSettingsKeys::EUseCameraSwapping )
-        {
-        camerasAvailable = KOneCameraOnly;
-        }
-         
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::CamerasAvailable()" )
-    return camerasAvailable;  
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::ChangeCameraL( TCurrentCamera aCurrentCamera ) 
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::ChangeCameraL()" )
-    __ASSERT_ALWAYS( iSession != NULL, User::Leave( KErrNotReady ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    CMceDisplaySink* display = MusEngMceUtils::GetDisplayL( *iSession );
-    
-    if ( camera->CamerasAvailable() )
-        {
-        if ( TMusEngCameraHandler::EFrontCamera == aCurrentCamera &&
-             TMusEngCameraHandler::EFrontCamera != iCurrentCamera )
-            {
-            MUS_LOG( "mus: [ENGINE]  Set Front camera" )
-            iCurrentCamera = TMusEngCameraHandler::EFrontCamera;
-            ChangeActiveCameraL( iCurrentCamera );
-            }
-        else if ( TMusEngCameraHandler::EBackCamera == aCurrentCamera && 
-                  TMusEngCameraHandler::EBackCamera != iCurrentCamera )
-            {
-            MUS_LOG( "mus: [ENGINE]  Set Back camera " )
-            iCurrentCamera = TMusEngCameraHandler::EBackCamera;
-            ChangeActiveCameraL( iCurrentCamera );;
-            }
-        else if ( TMusEngCameraHandler::ENextCamera == aCurrentCamera )
-            {
-            if ( iCurrentCamera  == TMusEngCameraHandler::EBackCamera )
-                {
-                iCurrentCamera  = TMusEngCameraHandler::EFrontCamera;
-                }
-            else
-                {
-                iCurrentCamera  = TMusEngCameraHandler::EBackCamera;
-                }
-            ChangeActiveCameraL( iCurrentCamera );
-            }
-        }
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::ChangeCameraL()" )
-    }
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TMusEngCameraHandler::CurrentZoomL() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::CurrentZoomL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    TInt currentZoom = camera->ZoomFactorL() + camera->DigitalZoomFactorL();
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::CurrentZoomL( %d )",
-              currentZoom )
-
-    return currentZoom;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::SetZoomL( TInt aNewZoomFactor )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> TMusEngCameraHandler::SetZoomL( %d )", 
-              aNewZoomFactor )
-              
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    __ASSERT_ALWAYS( aNewZoomFactor <= MaxZoomL() &&
-                     aNewZoomFactor >= MinZoomL(), 
-                     User::Leave( KErrArgument ) );
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    if ( aNewZoomFactor <= iCameraInfo.iMaxZoom )
-        {
-        MUS_LOG( "mus: [ENGINE]     Optical zoom factor increased" )
-        camera->SetZoomFactorL( aNewZoomFactor ); 
-        }
-    
-    if ( aNewZoomFactor - iCameraInfo.iMaxZoom > 0 )
-        {
-        camera->SetDigitalZoomFactorL( aNewZoomFactor - iCameraInfo.iMaxZoom );
-        MUS_LOG1( "mus: [ENGINE]     Digital zoom factor increased to %d",
-                  aNewZoomFactor - iCameraInfo.iMaxZoom )
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::SetZoomL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TMusEngCameraHandler::MinZoomL() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MinZoomL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    // Although we do not need camera for return value, we have to have it in
-    // order to have proper iCameraInfo
-    MusEngMceUtils::GetCameraL( *iSession );
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MinZoomL( %d )",
-              iCameraInfo.iMinZoom )
-
-    return iCameraInfo.iMinZoom;
-    }
-    
-        
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TMusEngCameraHandler::MaxZoomL() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MaxZoomL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    // Although we do not need camera for return value, we have to have it in
-    // order to have proper iCameraInfo
-    MusEngMceUtils::GetCameraL( *iSession );
-
-    TInt maxZoom = iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom;
-
-    MUS_LOG1( "mus: [ENGINE]     Max optical zoom( %d )",
-              iCameraInfo.iMaxZoom )
-    MUS_LOG1( "mus: [ENGINE]     Max digital zoom( %d )",
-              iCameraInfo.iMaxDigitalZoom )
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MaxZoomL( %d )",
-              maxZoom )
-
-    return maxZoom;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::ZoomInL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::ZoomInL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    // First try to increase optical zoom factor. If in maximum value, try to
-    // increase digital zoom factor.
-    TInt stepSize = ZoomStepSize( iZoomInTime );
-    TInt zoomFactor = camera->ZoomFactorL();
-    TInt zoomDigitalFactor = camera->DigitalZoomFactorL();
- 
-    //increate optical zoom factor
-    if ( zoomFactor + stepSize <= iCameraInfo.iMaxZoom )
-        {
-        //optical zoom factor is enough
-        camera->SetZoomFactorL( zoomFactor + stepSize );
-        stepSize = 0;
-        }
-    else if (zoomFactor <  iCameraInfo.iMaxZoom)
-       {
-            stepSize -=  iCameraInfo.iMaxZoom - zoomFactor;
-            camera->SetZoomFactorL( iCameraInfo.iMaxZoom );
-       }
-
-    //increate digital zoom factor
-    if (stepSize > 0)
-        {
-        if ( zoomDigitalFactor + stepSize <= iCameraInfo.iMaxDigitalZoom )
-            {
-            camera->SetDigitalZoomFactorL( zoomDigitalFactor + stepSize );
-            }
-        else 
-            {
-            camera->SetDigitalZoomFactorL( iCameraInfo.iMaxDigitalZoom );
-            MUS_LOG( "mus: [ENGINE]     TMusEngCameraHandler::ZoomInL(): Optical \
-                             and digital zoom factors are in maximum value" )
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::ZoomInL()" )
-
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::ZoomOutL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::ZoomOutL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    // First try to decrease digital zoom factor. If already zero, try to
-    // decrease optical zoom factor.
-    TInt stepSize = ZoomStepSize( iZoomOutTime );
-    TInt zoomFactor = camera->ZoomFactorL();
-    TInt zoomDigitalFactor = camera->DigitalZoomFactorL();
-    
-    //decreate digital zoom factor firstly
-    if ( zoomDigitalFactor - stepSize >= 0  )
-        {
-        //digital zoom factor is enough
-        camera->SetDigitalZoomFactorL( zoomDigitalFactor - stepSize );
-        stepSize = 0;
-        }
-    else if ( zoomDigitalFactor > 0 )
-        {
-        stepSize -= zoomDigitalFactor;
-        camera->SetDigitalZoomFactorL( 0 );
-        MUS_LOG("mus: [ENGINE] Digigal Factor to zero")
-        }
-   
-    //decreate optical zoom factor firstly
-    if ( stepSize > 0 )
-        {
-        if ( zoomFactor - stepSize > iCameraInfo.iMinZoom )
-            {
-            camera->SetZoomFactorL( zoomFactor - stepSize );
-            }
-        else 
-            {
-            MUS_LOG( "mus: [ENGINE]    TMusEngCameraHandler::ZoomOutL(): Optical and \
-                        digital zoom factors are in minimum value" )
-            camera->SetZoomFactorL( iCameraInfo.iMinZoom );
-            }
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::ZoomOutL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::ZoomDefaultL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::ZoomDefaultL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    camera->SetZoomFactorL( iDefaultZoomFactor );
-    camera->SetDigitalZoomFactorL( 0 );
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::ZoomDefaultL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::SetBrightnessL( TInt aBrightness ) const
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> TMusEngCameraHandler::SetBrightnessL( %d )",
-              aBrightness )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    camera->SetBrightnessL( aBrightness );
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::SetBrightnessL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TMusEngCameraHandler::CurrentBrightnessL() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::CurrentBrightnessL()" )
-    
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    TInt currentBrightness = camera->BrightnessL();
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::CurrentBrightnessL(): %d",
-              currentBrightness )
-
-    return currentBrightness;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TMusEngCameraHandler::MaxBrightnessL() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MaxBrightnessL()" )
-    
-    // maximum brightness is not in camera info, but a constant 100
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MaxBrightnessL(): %d",
-              KMaxBrightness )
-
-    return KMaxBrightness;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TMusEngCameraHandler::MinBrightnessL() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::MinBrightnessL()" )
- 
-    // maximum brightness is not in camera info, but a constant -100
-
-    MUS_LOG1( "mus: [ENGINE]  <- TMusEngCameraHandler::MinBrightnessL(): %d",
-              KMinBrightness )
-
-    return KMinBrightness;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::IncreaseBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::IncreaseBrightnessL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    TInt newBrightness = camera->BrightnessL() + KBrightnessStepSize;
-    
-    if ( newBrightness < KMaxBrightness )
-        {
-        camera->SetBrightnessL( newBrightness );
-        }
-    else
-        {
-        camera->SetBrightnessL( KMaxBrightness );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::IncreaseBrightnessL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::DecreaseBrightnessL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::DecreaseBrightnessL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    TInt newBrightness = camera->BrightnessL() - KBrightnessStepSize;
-
-    if ( newBrightness > KMinBrightness )
-        {
-        camera->SetBrightnessL( newBrightness );
-        }
-    else
-        {
-        camera->SetBrightnessL( KMinBrightness );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::DecreaseBrightnessL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::BrightnessDefaultL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::BrightnessDefaultL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    camera->SetBrightnessL( iDefaultBrightness );
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::BrightnessDefaultL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngCameraHandler::BrightnessAutoL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::BrightnessAutoL()" )
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-
-    camera->SetBrightnessL( CCamera::EBrightnessAuto );
-
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::BrightnessAutoL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::InitializeZoomStepSize()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngCameraHandler::InitializeZoomStepSize()" )
-    MUS_LOG2( "iMaxZoom = %d, iMinZoom = %d", iCameraInfo.iMaxZoom, iCameraInfo.iMinZoom);
-    MUS_LOG2( "iMaxDigitalZoom = %d, iMaxDigitalZoomFactor = %d", 
-            iCameraInfo.iMaxDigitalZoom, iCameraInfo.iMaxDigitalZoomFactor);
-
-    iBigZoomStep = ( iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom - 
-            iCameraInfo.iMinZoom ) / KZoomBigStepCount;
-            
-    if ( iBigZoomStep < KZoomStepMinSize )
-        iBigZoomStep = KZoomStepMinSize;
-
-    iSmallZoomStep = ( iCameraInfo.iMaxZoom + iCameraInfo.iMaxDigitalZoom - 
-            iCameraInfo.iMinZoom ) / KZoomSmallStepCount;
-    
-    if ( iSmallZoomStep < KZoomStepMinSize )
-        iSmallZoomStep = KZoomStepMinSize;
-
-    MUS_LOG2( "mus: [ENGINE]  iSmallZoomStep = %d, iBigZoomStep = %d", 
-            iSmallZoomStep, iBigZoomStep )
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngCameraHandler::InitializeZoomStepSize()" )   
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngCameraHandler::ReadCameraUsageKeyL()
-    {
-    MUS_LOG( "mus: [ENGINE] -> TMusEngCameraHandler::ReadCameraUsageKeyL()" )
-
-    // We try to read camera usage. If we do not succeed, we use default
-    iCameraUsage = MusSettingsKeys::EUseCameraSwapping;
-    TRAPD( error, 
-            iCameraUsage = MultimediaSharingSettings::CameraUsageL() )
-    __ASSERT_ALWAYS( error == KErrNone || error == KErrNotFound, 
-                     User::Leave( error ) );
-    
-    MUS_LOG( "mus: [ENGINE] <- TMusEngCameraHandler::ReadCameraUsageKeyL()" )
-    
-    }
-
-// -----------------------------------------------------------------------------
-//  Calculate the zoom step based time escaped
-// -----------------------------------------------------------------------------
-TInt TMusEngCameraHandler::ZoomStepSize( TInt64& aTime )
-    {
-    TTime now;
-    now.HomeTime();
-    TInt64 timeNow = now.Int64();   
-    TInt stepSize = ( ( timeNow - aTime ) <= KZoomFasterTime ) ? iBigZoomStep : iSmallZoomStep;
-    
-    aTime = now.Int64();
-    
-    MUS_LOG1( "mus: [ENGINE]  stepSize = %d", stepSize );    
-
-    return stepSize;
-    }
-
-// -----------------------------------------------------------------------------
-//  Disable camera before it changes it. It enables camera after change. 
-// -----------------------------------------------------------------------------
-void TMusEngCameraHandler::ChangeActiveCameraL( TCurrentCamera aNewCamera )
-    {
-    MUS_LOG( "mus: [ENGINE] ->  ChangeActiveCamera()" )
-    
-    CMceCameraSource* camera = MusEngMceUtils::GetCameraL( *iSession );
-    CMceDisplaySink* display = MusEngMceUtils::GetDisplayL( *iSession );
-    MUS_LOG( "mus: [ENGINE]  Camera enabled ?" )
-    if ( camera->IsEnabled() )
-        {
-        MUS_LOG( "mus: [ENGINE]  Is view finder enabled? " )
-            if ( display->IsEnabled() )
-                {
-                MUS_LOG( "mus: [ENGINE]  Disable view finder" )
-                display->DisableL();
-                }
-        MUS_LOG( "mus: [ENGINE]  Disable camera" )
-        camera->DisableL();
-        camera->SetCameraIndexL( aNewCamera );
-        camera->EnableL();
-        display->EnableL();
-        }
-    else
-        {
-        if ( display->IsEnabled() )
-            {
-            MUS_LOG( "mus: [ENGINE]  Disable view finder" )
-            display->DisableL();
-            }
-        MUS_LOG( "mus: [ENGINE]  set camera index" )
-        camera->SetCameraIndexL( aNewCamera );
-        MUS_LOG( "mus: [ENGINE]  Enable camera" ) 
-        display->EnableL();
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  -> fetching new iCameraInfo..." )
-    camera->GetCameraInfo( iCameraInfo );
-    iDefaultZoomFactor = camera->ZoomFactorL();        
-    InitializeZoomStepSize();
-    }
-
--- a/tsrc/musenginestub/src/musengclipsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musengclipsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,18 +18,45 @@
 
 // USER
 #include "musengclipsession.h"
+#include "musengclipsessionobserver.h"
+#include "musengsessionobserver.h"
+#include "musengmceoutsession.h"
+#include "musenglivesession.h"
+
+
+// SYSTEM
+/*#include <mcesession.h>
+#include <mcefilesource.h>
+#include <mcemediastream.h>
+#include <mcevideostream.h>
+#include <mceaudiostream.h>
+#include <mcertpsink.h>
+#include <mcedisplaysink.h>
+#include <mcespeakersink.h>
+#include <drmcommon.h>
+*/
+
+// CONSTANTS
+
+const TInt KMicroSecondsInOneSecond = 1000000;
 
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngClipSession* CMusEngClipSession::NewL(
-                        const TRect& aRect )
+EXPORT_C CMusEngClipSession* CMusEngClipSession::NewL(
+                        const TDesC& aFileName,
+                        const TRect& aRect,
+                        MMusEngClipSessionObserver* aSessionObserver,
+                        TUint aSipProfileId )
     {
-    CMusEngClipSession* self = new( ELeave ) CMusEngClipSession( aRect );
+    CMusEngClipSession* self = new( ELeave ) CMusEngClipSession(
+                                                    aSessionObserver,
+                                                    aRect,
+                                                    aSipProfileId );
     CleanupStack::PushL( self );
-    self->ConstructL();
+    self->ConstructL( aFileName );
     CleanupStack::Pop( self );
     return self;
     }
@@ -43,12 +70,60 @@
     {
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngClipSession::CMusEngClipSession( const TRect& aRect )
-    : CMusEngMceOutSession( aRect )
+EXPORT_C void CMusEngClipSession::ChangeClipL( const TDesC& aFileName )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// TODO: At the moment behavior of MCE is not known and all the FFWD commands
+// are only forwarded to MCE.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::FastForwardL( TBool aUseFFWD )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// TODO: At the moment behavior of MCE is not known and all the FRWD commands
+// are only forwarded to MCE.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::FastRewindL( TBool aUseFRWD )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TTimeIntervalSeconds CMusEngClipSession::PositionL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TTimeIntervalSeconds CMusEngClipSession::DurationL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::SetPositionL (
+                        const TTimeIntervalSeconds& aPosition )
     {
     }
 
@@ -57,11 +132,78 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngClipSession::ConstructL()
+EXPORT_C void CMusEngClipSession::SetSessionObserver(
+                        MMusEngClipSessionObserver* aSessionObserver)
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::PlayL()
     {
-    CMusEngMceOutSession::ConstructL();
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngClipSession::PauseL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngClipSession::CompleteSessionStructureL()
+    {
     }
 
-    
-// End of file
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngClipSession::CMusEngClipSession(
+                        MMusEngClipSessionObserver* aSessionObserver,
+                        const TRect& aRect,
+                        TUint aSipProfileId )
+    : CMusEngMceOutSession( aRect, aSipProfileId )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngClipSession::ConstructL( const TDesC& aFileName )
+    {
+    }
 
+
+// -----------------------------------------------------------------------------
+// Check is file DRM protected.
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusEngClipSession::IsProtectedFileL( const TDesC& aClipFile )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// If member file contains audio, add appropriate amount of audio streams to
+// session structure
+// -----------------------------------------------------------------------------
+//
+void CMusEngClipSession::ConstructAudioStructureL()
+    {
+    }
+
+
--- a/tsrc/musenginestub/src/musenginepluginentry.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "musengsessionmanager.h"
-#include <ECom.h>
-#include <ImplementationProxy.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TImplementationProxy KMusEnginePluginImplementationTable[] =
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x20021341, CMusEngSessionManager::NewL )
-    };
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
-    {
-    aTableCount = sizeof( KMusEnginePluginImplementationTable ) /
-                  sizeof( TImplementationProxy );
-
-    return KMusEnginePluginImplementationTable;
-    }
--- a/tsrc/musenginestub/src/musenglivesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musenglivesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,49 +18,36 @@
 
 // USER
 #include "musenglivesession.h"
-#include "musengsessionobserver.h"
 #include "musenglivesessionobserver.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "mussessionproperties.h"
+//#include "musunittesting.h"
+//#include "musengmceutils.h"
 
 // SYSTEM
-#include <mcemanager.h>
+/*
 #include <mcecamerasource.h>
 #include <mcevideostream.h>
 #include <mcertpsink.h>
 #include <mcedisplaysink.h>
-#include <mcefilesink.h>
 #include <mcesession.h>
 #include <mcevideocodec.h>
-#include <mceh263codec.h>
-#include <mceavccodec.h>
+*/
 
 
-// Names of AVC levels in string for config keys stored in CenRep 
-_LIT8( KMusAvcBitrateLevel1, "AvcBrL1=" );
-_LIT8( KMusAvcBitrateLevel1b, "AvcBrL1b=" );
-_LIT8( KMusAvcBitrateLevel1_1, "AvcBrL1_1=" );
-_LIT8( KMusAvcBitrateLevel1_2, "AvcBrL1_2=" );
-_LIT8( KMusAvcBitrateLevel1_3, "AvcBrL1_3=" );
-_LIT8( KMusAvcBitrateLevel2, "AvcBrL2=" );
-
-_LIT8( KMusEncoderInfoTokenizer, ";" );
-
-
-const TInt KMaxDispName = 512;
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngLiveSession* CMusEngLiveSession::NewL(
-                        const TDesC& aFileName,
-                        const TRect& aRect )
+EXPORT_C CMusEngLiveSession* CMusEngLiveSession::NewL(
+                    const TDesC& /*aFileName*/,
+                    const TRect& aRect,
+                    MMusEngLiveSessionObserver* aSessionObserver,
+                    TUint aSipProfileId )
     {
-    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession( aRect,
-                                                                 aFileName );
+    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession(
+                                                    aSessionObserver,
+                                                    aRect,
+                                                    aSipProfileId );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -72,10 +59,15 @@
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngLiveSession* CMusEngLiveSession::NewL(
-                        const TRect& aRect )
+EXPORT_C CMusEngLiveSession* CMusEngLiveSession::NewL(
+                        const TRect& aRect,
+                        MMusEngLiveSessionObserver* aSessionObserver,
+                        TUint aSipProfileId )
     {
-    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession( aRect );
+    CMusEngLiveSession* self = new( ELeave ) CMusEngLiveSession(
+                                                    aSessionObserver,
+                                                    aRect,
+                                                    aSipProfileId);
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -89,322 +81,15 @@
 //
 CMusEngLiveSession::~CMusEngLiveSession()
     {
-    delete iRemoteDisplayName;
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::EstablishLcSessionL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngLiveSession::LocalVideoPlayer()
-    {
-    return this;
-    }
-    
- 
-    
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
- 
-const TDesC& CMusEngLiveSession::RemoteDisplayName()
- 	{
-    return *iRemoteDisplayName;
- 	}
-
-
-
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer::TLcVideoPlayerState CMusEngLiveSession::LcVideoPlayerState() const
-    {
-    TLcVideoPlayerState vidPlayerState = MLcVideoPlayer::EUnavailable;
-    return vidPlayerState;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveSession::LcIsPlayingL()
-    {
-    return iPlaying;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::LcPlayL()
-    {
-    iPlaying = ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::LcPauseL()
-    {
-    iPlaying = EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcWindow* CMusEngLiveSession::LcWindow()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngLiveSession::LcCameraControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcFileControl* CMusEngLiveSession::LcSourceFile()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcFileControl* CMusEngLiveSession::LcDestinationFile()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcAudioControl* CMusEngLiveSession::LcAudioControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngLiveSession::LcZoomControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngLiveSession::LcBrightnessControl()
-    {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-RPointerArray< MLcValueControl >& CMusEngLiveSession::LcExtensionControls()
-    {
-    return iValueControls;
     }
 
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::LcCameraCountL()
-    {
-    return 1;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcCameraControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::ToggleLcCameraL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::MinLcBrightnessL()
-    {
-    return iCurrentBrighness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::MaxLcBrightnessL()
-    {
-    return iCurrentBrighness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::LcBrightnessL()
-    {
-    return iCurrentBrighness;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::SetLcBrightnessL( TInt aValue )
-    {
-    iCurrentBrighness = aValue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::IncreaseLcBrightnessL()
-    {
-    iCurrentBrighness++;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcBrightnessControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::DecreaseLcBrightnessL()
-    {
-    iCurrentBrighness--;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::MinLcZoomL()
-    {
-    return iCurrentZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::MaxLcZoomL()
-    {
-    return iCurrentZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngLiveSession::LcZoomValueL()
-    {
-    return iCurrentZoom;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::SetLcZoomValueL( TInt aValue )
-    {
-    iCurrentZoom = aValue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::LcZoomInL()
-    {
-    iCurrentZoom++;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcZoomControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::LcZoomOutL()
-    {
-    iCurrentZoom--;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::EnableLcFileL( TBool aEnable )
-    {
-    iFileEnabled = aEnable;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngLiveSession::IsLcFileEnabled()
-    {
-    return iFileEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngLiveSession::SetLcFileNameL( const TFileName& aFileName )
-    {
-    iRecordedFile = aFileName;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcFileControl
-// -----------------------------------------------------------------------------
-//
-TFileName& CMusEngLiveSession::LcFileName()
-    {
-    return iRecordedFile;
-    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngLiveSession::CMusEngLiveSession(
-                        const TRect& aRect, 
-                        const TDesC& aRecordedFile )
-    : CMusEngMceOutSession( aRect ),
-      iRecordedFile( aRecordedFile )
+EXPORT_C void CMusEngLiveSession::SetSessionObserver(
+                        MMusEngLiveSessionObserver* aSessionObserver )
     {
     }
 
@@ -413,13 +98,114 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngLiveSession::ConstructL()
+EXPORT_C TInt CMusEngLiveSession::CurrentZoomL() const
+    {
+    return iCurrentZoom;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::MaxZoomL() const
+    {
+    return iCurrentZoom;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMusEngLiveSession::MinZoomL() const
+    {
+    return iCurrentZoom;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomInL()
+    {
+    iCurrentZoom++;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomOutL()
+    {
+    iCurrentZoom--;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::ZoomDefaultL()
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngLiveSession::ConstructL()" )
-    
-    CMusEngMceOutSession::ConstructL();
-        
-    iRemoteDisplayName = HBufC::NewL( KMaxDispName );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Enable camera
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::PlayL()
+    {
+    iPlaying = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Disable camera
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngLiveSession::PauseL()
+    {
+    iPlaying = EFalse;
+    }
+
 
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngLiveSession::ConstructL()" )
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::CompleteSessionStructureL()
+    {
     }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngLiveSession::CMusEngLiveSession(
+                        MMusEngLiveSessionObserver* aSessionObserver,
+                        const TRect& aRect,
+                        TUint aSipProfileId )
+    :CMusEngMceOutSession( aRect, aSipProfileId ),
+     iDefaultZoomFactor( -1 )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngLiveSession::ConstructL( /*const TDesC& aFileName*/ )
+    {
+    }
+
+
+
+
+
+
--- a/tsrc/musenginestub/src/musengmceoutsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musengmceoutsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,6 +18,32 @@
 
 // USER
 #include "musengmceoutsession.h"
+#include "musenglivesessionobserver.h"
+//#include "mussipprofilehandler.h"
+
+// SYSTEM
+/*
+#include <mcemediastream.h>
+#include <mceoutsession.h>
+#include <mcevideostream.h>
+#include <mcemediasource.h>
+#include <mcefilesource.h>
+#include <mcemediasink.h>
+#include <mcertpsink.h>
+#include <mcespeakersink.h>
+#include <mcedisplaysink.h>
+
+#include <sipprofile.h>
+#include <uri8.h>
+#include <charconv.h>
+#include <f32file.h>
+#include <utf.h>
+*/
+const TInt KMaxUriLength = 512;
+_LIT8( KMusEngAtSign, "@" );
+_LIT8( KMusEngPlusSign, "+" );
+_LIT8( KMusEngSipPrefix, "sip:" );
+_LIT8( KMusEngTelPrefix, "tel:" );
 
 // -----------------------------------------------------------------------------
 //
@@ -27,13 +53,44 @@
     {
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceOutSession::InviteL( const TDesC& aRecipient )
+    {
+    iInvited = ETrue;
+    User::LeaveIfError( iErrorCode );
+    
+    }
+
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngMceOutSession::CMusEngMceOutSession( 
-                                const TRect& aRect)
-    : CMusEngMceSession( aRect )    
+EXPORT_C void CMusEngMceOutSession::CancelInviteL()
+    {
+    iInvited = EFalse;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Handle MCE session termination. Called by MCE observer function of the
+// base class.
+// -----------------------------------------------------------------------------
+//
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngMceOutSession::CMusEngMceOutSession( const TRect& aRect,
+                                            TUint aSipProfileId )
+    : CMusEngMceSession( aRect ),
+      iSipProfileId( aSipProfileId )
     {
     }
 
@@ -46,4 +103,34 @@
     {
     }
 
-// End of file
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngMceOutSession::CreateMceSessionStructureL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+MMusEngOutSessionObserver* CMusEngMceOutSession::OutSessionObserver()
+    {
+    return static_cast<MMusEngOutSessionObserver*>(iSessionObserver);
+    }
+
+
+// -----------------------------------------------------------------------------
+// TODO: Using UTF8 is to wide. It should handle the escape characters
+// correctly. UTF7 is not working, since it converts + as +-
+// -----------------------------------------------------------------------------
+//
+HBufC8* CMusEngMceOutSession::ParseRecipientUriL( const TDesC& aRecipient )
+    {
+    }
+
+
+
--- a/tsrc/musenginestub/src/musengmcesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musengmcesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,6 +18,118 @@
 
 // USER
 #include "musengmcesession.h"
+#include "musengsessiondurationtimer.h"
+#include "musengoutsessionobserver.h"
+//#include "musengmceutils.h"
+//#include "musuid.hrh"
+#include "musengclipsessionobserver.h"
+
+// SYSTEM
+/*
+#include <mcemanager.h>
+#include <mcesession.h>
+#include <mcevideostream.h>
+#include <mceaudiostream.h>
+#include <mcertpsink.h>
+#include <mcedisplaysink.h>
+#include <mcespeakersink.h>
+#include <mcefilesource.h>
+*/
+
+const TInt KMusEngTimerInterval = 1000000; // 1 second
+const TInt KMusEngRtcpInactivityThreshold = 20; // seconds
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngMceSession::~CMusEngMceSession()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::TerminateL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::ReleaseInternalObservers()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// Returns estabilished session time. If not established return
+// value is < 0
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TTimeIntervalSeconds CMusEngMceSession::GetSessionTime() const
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngMceSession::ConnectionActive() const
+    {
+    return EFalse;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::VolumeUpL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::VolumeDownL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::EnableDisplayL( TBool aEnable )
+    {
+    iDisplayEnabled = aEnable;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Mutes playback of sended audio streams. Audio data is still streamed.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::MuteL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// Unmutes playback of sended audio streams.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngMceSession::UnmuteL()
+    {
+    }
 
 
 // -----------------------------------------------------------------------------
@@ -25,7 +137,8 @@
 // -----------------------------------------------------------------------------
 //
 CMusEngMceSession::CMusEngMceSession( const TRect& aRect )
-    : iRect ( aRect )
+    : CMusEngSession( aRect ),
+      iSecondsFromLastRtcpReport ( 0 )
     {
     }
 
@@ -36,267 +149,71 @@
 //
 void CMusEngMceSession::ConstructL()
     {
-    CMusEngSession::ConstructL(); // Base class ConstructL -first
     }
 
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngMceSession::RectChangedL()
+    {
+    }
+
+
+
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngMceSession::~CMusEngMceSession()
-    {
-    }
+TBool CMusEngMceSession::IsRtpcInactivityTimoutSupported()
+{
+    return EFalse;
+}
 
 // -----------------------------------------------------------------------------
-// From MLcSession 
+// Initializes session timer to current time
 // -----------------------------------------------------------------------------
 //
-
-MLcSession::TLcSessionState CMusEngMceSession::LcSessionState() const
-    {
-    TLcSessionState lcSessionState = MLcSession::EUninitialized;
-    return lcSessionState;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::EstablishLcSessionL()
-    {
-    User::Leave( KErrNotSupported );
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::TerminateLcSessionL()
+void CMusEngMceSession::InitializeSessionTimer()
     {
     }
 
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngMceSession::RemoteVideoPlayer()
-    {
-    return NULL;
-    }
 
 // -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngMceSession::LocalVideoPlayer()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::LocalDisplayName()
-    {
-    return KNullDesC;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusEngMceSession::RemoteDisplayName()
-    {
-    return KNullDesC;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
 //
-TInt CMusEngMceSession::SetParameter( TInt /*aId*/, TInt /*aValue*/ )
-    {
-    return KErrNotSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::ParameterValue( TInt /*aId*/ )
-    {
-    return KErrNotSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
 // -----------------------------------------------------------------------------
 //
-void CMusEngMceSession::EnableLcWindowL( TBool aEnable )
-    {
-    iWindowEnabled = aEnable;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcWindowEnabled()
+void CMusEngMceSession::UpdateTimerEvent()
     {
-    return iWindowEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcWindowRectL( TRect aRect )
-    {
-    iRect = aRect;
     }
 
 
 // -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-TRect CMusEngMceSession::LcWindowRect()
-    {
-    return iRect;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcWindowOrientationL( 
-    TLcWindowOrientation aOrientation )
-    {
-    iOrientation = aOrientation;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcWindow
-// -----------------------------------------------------------------------------
-//
-MLcWindow::TLcWindowOrientation CMusEngMceSession::LcWindowOrientationL()
-    {
-    MLcWindow::TLcWindowOrientation orientation;
-    if ( iOrientation == ELandscape )
-        {
-        orientation = MLcWindow::ELandscape;
-        }
-    else
-        {
-        orientation = MLcWindow::EPortrait;
-        }
-    return orientation;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcAudioMutedL()
-    {
-    return iMuted;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::MuteLcAudioL( TBool aMute )
-    {
-    iMuted = aMute;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsEnablingLcLoudspeakerAllowed()
-    {
-    return iEnablingLoudspeakerAllowed;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
+// Enables or disables all the speaker and rtp sinks of all the audio streams
 // -----------------------------------------------------------------------------
 //
-TBool CMusEngMceSession::IsLcMicMutedL()
-    {
-    return iMicMuted;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::MuteLcMicL( TBool aMute )
-    {
-    iMicMuted = aMute;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngMceSession::IsLcLoudspeakerEnabled()
-    {
-    return iLoudspeakerEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::EnableLcLoudspeakerL( TBool aEnabled )
-    {
-    iLoudspeakerEnabled = aEnabled;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-TInt CMusEngMceSession::LcVolumeL()
-    {
-    return iVolume;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::SetLcVolumeL( TInt aValue )
-    {
-    iVolume = aValue;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::IncreaseLcVolumeL()
-    {
-    iVolume++;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
-void CMusEngMceSession::DecreaseLcVolumeL()
-    {
-    iVolume--;
-    }
-
-void CMusEngMceSession::UpdateLcSessionL()
+void CMusEngMceSession::DoMuteL( TBool aMute )
     {
     }
 
 
+// -----------------------------------------------------------------------------
+// Changes volume of all speaker sinks in the session structure
+// -----------------------------------------------------------------------------
+//
+void CMusEngMceSession::ChangeVolumeByOneL( TBool aIncreaseVolume )
+    {
+    }
 
-// End of file
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngMceSession::CheckClipEndL()
+    {
+    }
+
+
--- a/tsrc/musenginestub/src/musengmceutils.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,571 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utilities to get and set profile used with SWIS.
-*
-*/
-
-
-
-// USER
-
-#include "musengmceutils.h"
-#include "muslogger.h"
-
-// SYSTEM
-
-#include <mcesession.h>
-#include <mcevideostream.h>
-#include <mceaudiostream.h>
-#include <mcertpsink.h>
-#include <mcemediasource.h>
-#include <mcertpsource.h>
-#include <mcecamerasource.h>
-#include <mcedisplaysink.h>
-#include <mcefilesource.h>
-#include <mcefilesink.h>
-#include <mcespeakersink.h>
-
-
-
-
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is a video stream with RTP source
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsVideoInStream( CMceMediaStream& aStream )
-    {
-    return ( aStream.Type() == KMceVideo &&
-             aStream.Source() && 
-             aStream.Source()->Type() == KMceRTPSource );
-    }
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is a video stream with RTP sink
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsVideoOutStream( CMceMediaStream& aStream )
-    {
-    TBool isOutStream( EFalse );
-    if ( aStream.Type() == KMceVideo )
-        {
-        CMceMediaSink* rtpSink = MusEngMceUtils::GetMediaSink(
-                                                   aStream,
-                                                   KMceRTPSink );
-        
-        isOutStream = ( rtpSink != NULL );
-        }
-    return isOutStream;
-    }
-
-// -----------------------------------------------------------------------------
-// Tells if parameter stream is an audio stream with RTP source
-// -----------------------------------------------------------------------------
-//
-TBool MusEngMceUtils::IsAudioInStream( CMceMediaStream& aStream )
-    {
-    return ( aStream.Type() == KMceAudio &&
-             aStream.Source() && 
-             aStream.Source()->Type() == KMceRTPSource );
-    }
-    
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with RTP sink.
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetVideoOutStreamL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVideoOutStreamL()" )
-
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* videoOut = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoOutStream( *streams[i] ) )      
-            {
-            __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
-            
-            videoOut = static_cast<CMceVideoStream*>( streams[i] );
-            }
-            
-            // Check if bound stream is a video stream with RTP sink.
-        if ( streams[i]->BoundStream() &&
-             MusEngMceUtils::IsVideoOutStream( streams[i]->BoundStreamL() ) )
-            {
-            __ASSERT_ALWAYS( !videoOut, User::Leave( KErrOverflow ) );
-            
-            videoOut = static_cast<CMceVideoStream*>( 
-                                   &streams[i]->BoundStreamL() );
-            }   
-        }
-
-    __ASSERT_ALWAYS( videoOut, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVideoOutStreamL()" )
-
-    return videoOut;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with RTP source.
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetVideoInStreamL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVideoInStreamL()" )
-
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* videoIn = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoInStream( *streams[i] ) )
-            
-            {
-            __ASSERT_ALWAYS( !videoIn, User::Leave( KErrOverflow ) );
-
-            videoIn = static_cast<CMceVideoStream*>( streams[i] );
-            }
-            
-        // Check if bound stream is a video stream with RTP souce.
-        if ( streams[i]->BoundStream() &&
-             MusEngMceUtils::IsVideoInStream( streams[i]->BoundStreamL() ) )
-            {
-            __ASSERT_ALWAYS( !videoIn, User::Leave( KErrOverflow ) );
-
-            videoIn = static_cast<CMceVideoStream*>( 
-                                    &streams[i]->BoundStreamL() );
-            }       
-        }
-
-    __ASSERT_ALWAYS( videoIn, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVideoInStreamL()" )
-
-    return videoIn;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to video stream with file sink
-// -----------------------------------------------------------------------------
-//
-CMceVideoStream* MusEngMceUtils::GetRecordingStream( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetRecordingStreamL()" )
-    
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    CMceVideoStream* recordingStream = NULL;
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( streams[i]->Type() == KMceVideo )
-            {
-            if ( MusEngMceUtils::GetMediaSink( *streams[i], KMceFileSink ) )
-                {
-                recordingStream = static_cast<CMceVideoStream*>( streams[i] );
-                }
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetRecordingStreamL()" )
-    
-    return recordingStream;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a mediastream.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSink( CMceMediaStream& aStream,
-                                             TMceSinkType aType,
-                                             TMceSourceType aAssociatedSourceType )
-    {
-    const RPointerArray<CMceMediaSink>& sinks = aStream.Sinks();
-    for ( TInt i = 0; i < sinks.Count(); ++i )
-        {
-        if ( sinks[i]->Type() == aType && 
-           ( aAssociatedSourceType == KMusEngNoAssociatedSourceType || 
-             aStream.Source()->Type() == aAssociatedSourceType ) )
-            {
-            return sinks[i];
-            }
-        }
-        
-    return NULL;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a mediastream.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSinkL( CMceMediaStream& aStream,
-                                              TMceSinkType aType,
-                                              TMceSourceType aAssociatedSourceType )
-    {
-
-    CMceMediaSink* sink = MusEngMceUtils::GetMediaSink( aStream, aType, aAssociatedSourceType );
-
-    __ASSERT_ALWAYS( sink, User::Leave( KErrNotFound ) );
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a session.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSink( CMceSession& aSession,
-                                             TMceSinkType aType,
-                                             TMceSourceType aAssociatedSourceType,
-                                             TBool aStrictMatch )
-    {
-    CMceMediaSink* sink = NULL;
-
-    TRAP_IGNORE( sink = MusEngMceUtils::GetMediaSinkL( 
-            aSession, aType, aAssociatedSourceType, aStrictMatch ) )
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a media sink of spesified type contained by a session.
-// -----------------------------------------------------------------------------
-//
-CMceMediaSink* MusEngMceUtils::GetMediaSinkL( CMceSession& aSession,
-                                              TMceSinkType aType,
-                                              TMceSourceType aAssociatedSourceType,
-                                              TBool aStrictMatch )
-    {
-    CMceMediaSink* sink = NULL;
-    
-    const RPointerArray<CMceMediaStream>& streams = aSession.Streams();
-
-    for ( TInt i = 0; i < streams.Count(); ++i )
-        {
-        sink = MusEngMceUtils::GetMediaSink( *streams[i], aType, aAssociatedSourceType );
-        if ( sink )
-            {
-            return sink;
-            }
-        
-        if ( streams[i]->BoundStream() )
-            {
-            sink = MusEngMceUtils::GetMediaSink( streams[i]->BoundStreamL(), 
-                                                 aType,
-                                                 aAssociatedSourceType );
-            if ( sink )
-                {
-                return sink;
-                }
-            }
-        }
-    
-    if ( !sink && aAssociatedSourceType != KMusEngNoAssociatedSourceType && !aStrictMatch )
-        {
-        // No preferred match, try without source preference
-        sink = GetMediaSinkL( aSession, aType );
-        }
-
-    __ASSERT_ALWAYS( sink, User::Leave( KErrNotFound ) );
-
-    return sink;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a speaker sink contained by specified stream or bound stream.
-// -----------------------------------------------------------------------------
-//
-CMceSpeakerSink* MusEngMceUtils::GetSpeaker( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetSpeaker()" )
-
-    CMceSpeakerSink* speaker = NULL;
-    
-    if ( aStream.Type() == KMceAudio )
-        {
-        speaker = static_cast<CMceSpeakerSink*>(
-                    MusEngMceUtils::GetMediaSink( aStream, KMceSpeakerSink ) );
-    
-        if ( !speaker && aStream.BoundStream() )
-            {
-            CMceMediaStream* boundStream = NULL;
-            TRAPD( error, boundStream = &aStream.BoundStreamL() )
-            
-            if ( error == KErrNone )
-                {
-                speaker = static_cast<CMceSpeakerSink*>(
-                            MusEngMceUtils::GetMediaSink( *boundStream, 
-                                                          KMceSpeakerSink ) );
-                }
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetSpeaker()" )
-
-    return speaker;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// Gets handle to a camera source.
-// -----------------------------------------------------------------------------
-//
-CMceCameraSource* MusEngMceUtils::GetCameraL( CMceSession& aSession )
-    {
-    // Camera can be only in out stream
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetCameraL()" )
-
-    CMceVideoStream* videoOut = MusEngMceUtils::GetVideoOutStreamL( aSession );
-
-    if ( !( videoOut->Source() &&
-            videoOut->Source()->Type() == KMceCameraSource ) )
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetCameraL()" )
-    return static_cast<CMceCameraSource*>( videoOut->Source() );
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a file source.
-// -----------------------------------------------------------------------------
-//
-CMceFileSource* MusEngMceUtils::GetFileSourceL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetFileSourceL()" )
-
-    CMceVideoStream* videoOut = MusEngMceUtils::GetVideoOutStreamL( aSession );
-
-    if ( !( videoOut->Source() &&
-            videoOut->Source()->Type() == KMceFileSource ) )
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetFileSourceL()" )
-    return static_cast<CMceFileSource*>( videoOut->Source() );
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetDisplay( 
-    CMceSession& aSession, TBool aPreferViewFinder  )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetDisplay()" )
-    TMceSourceType preferredSource = 
-        aPreferViewFinder ? KMceCameraSource : KMusEngNoAssociatedSourceType;
-    return static_cast<CMceDisplaySink*>(
-            MusEngMceUtils::GetMediaSink( aSession, KMceDisplaySink, preferredSource ) );
-
-    }
-
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetDisplayL( 
-    CMceSession& aSession, TBool aPreferViewFinder )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetDisplayL()" )
-
-    CMceDisplaySink* display = MusEngMceUtils::GetDisplay( aSession, aPreferViewFinder );
-
-    __ASSERT_ALWAYS( display, User::Leave( KErrNotFound ) );
-
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetDisplayL()" )
-    return display;
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying received video.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetReceivingDisplay( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetReceivingDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetReceivingDisplay()" )
-    
-    // Search display which is connected with rtp source
-    TMceSourceType preferredSource = KMceRTPSource;
-    return static_cast<CMceDisplaySink*>( MusEngMceUtils::GetMediaSink( 
-                aSession, KMceDisplaySink, preferredSource, ETrue ) );
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying received video.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetReceivingDisplayL( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetReceivingDisplayL()" )
-
-    CMceDisplaySink* display = GetReceivingDisplay( aSession );
-    __ASSERT_ALWAYS( display != NULL, User::Leave( KErrNotFound ) );
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetReceivingDisplay()" )
-    
-    return display;
-    }
-
-// -----------------------------------------------------------------------------
-// Gets handle to a display sink displaying viewfinder content.
-// -----------------------------------------------------------------------------
-//
-CMceDisplaySink* MusEngMceUtils::GetVfDisplay( CMceSession& aSession )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::GetVfDisplay()" )
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::GetVfDisplay()" )
-    
-    // Search display which is connected with camera
-    TMceSourceType preferredSource = KMceCameraSource;
-    return static_cast<CMceDisplaySink*>( MusEngMceUtils::GetMediaSink( 
-                aSession, KMceDisplaySink, preferredSource, ETrue ) );
-    }
-
-// -----------------------------------------------------------------------------
-// Adds display sink to specified stream if one does not exist already.
-// Display rect is set in both cases.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::AddDisplayL( CMceMediaStream& aStream, 
-                                  CMceManager& aManager,
-                                  const TRect& aDisplayRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::AddDisplayL()" )
-    
-    __ASSERT_ALWAYS( aStream.Type() == KMceVideo, User::Leave( KErrArgument ) );
-
-    CMceDisplaySink* display = static_cast<CMceDisplaySink*>(
-                                    MusEngMceUtils::GetMediaSink( 
-                                                            aStream,
-                                                            KMceDisplaySink ) );
-
-    if ( !display )
-        {
-        display = CMceDisplaySink::NewLC( aManager );
-        aStream.AddSinkL( display );
-        CleanupStack::Pop( display );
-        }
-
-    display->SetDisplayRectL( aDisplayRect );
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::AddDisplayL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Adds display sink to specified stream if one does not exist already.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::AddSpeakerL( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::AddSpeakerL()" )
-    
-    __ASSERT_ALWAYS( aStream.Type() == KMceAudio, User::Leave( KErrArgument ) );
-
-    CMceSpeakerSink* speaker = static_cast<CMceSpeakerSink*>(
-                                    MusEngMceUtils::GetMediaSink( 
-                                                            aStream,
-                                                            KMceSpeakerSink ) );
-
-    if ( !speaker )
-        {
-        speaker = CMceSpeakerSink::NewLC();
-        aStream.AddSinkL( speaker );
-        CleanupStack::Pop( speaker );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::AddSpeakerL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// Disables parameter stream, its' source and all the sinks.
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::DisableStreamL( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::DisableStreamL()" )
-    
-    aStream.DisableL();
-    
-    if ( aStream.Source() )
-        {
-        aStream.Source()->DisableL();
-        }
-        
-    for ( TInt sinkIndex = 0; sinkIndex < aStream.Sinks().Count(); ++sinkIndex )
-        {
-        aStream.Sinks()[ sinkIndex ]->DisableL();
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  -> MusEngMceUtils::DisableStreamL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void MusEngMceUtils::DoEnableDisplayL( CMceDisplaySink& aDisplay, TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> MusEngMceUtils::DoEnableDisplayL() %d", 
-              aEnable )
-    
-    if ( aEnable )
-        {
-        if ( !aDisplay.IsEnabled() )
-            {
-            aDisplay.EnableL();
-            MUS_LOG( "                  Display enabled" )
-            }
-        else
-            {
-            MUS_LOG( "                  Display already enabled, ignore" )
-            }
-        }
-    else
-        {
-        if ( aDisplay.IsEnabled() )
-            {
-            aDisplay.DisableL();
-            MUS_LOG( "                  Display disabled" )
-            }
-        else
-            {
-            MUS_LOG( "                  Display already disabled, ignore" )
-            }
-        }  
-        
-    MUS_LOG( "mus: [ENGINE]  <- MusEngMceUtils::DoEnableDisplayL()")
-    }
-
--- a/tsrc/musenginestub/src/musengreceivesession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musengreceivesession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -20,52 +20,24 @@
 // USER INCLUDES
 
 #include "musengreceivesession.h"
-#include "musengsessionobserver.h"
 #include "musengreceivesessionobserver.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "mussipprofilehandler.h"
-#include "mussessionproperties.h"
+//#include "musengmceutils.h"
+//#include "muslogger.h"
 
 // SYSTEM INCLUDES
 #include <mcemanager.h>
 #include <mceinsession.h>
-#include <mcestreambundle.h>
 #include <mceaudiostream.h>
 #include <mcevideostream.h>
 #include <mcemediasource.h>
 #include <mcertpsource.h>
 #include <mcedisplaysink.h>
 #include <mcespeakersink.h>
-#include <mceaudiocodec.h>
-#include <mceavccodec.h>
-#include <e32property.h>
 
 #include <utf.h>
 
 
-const TUint8 KMusEngRtpKeepAliveTimer = 5; // this should be 30 sec, this a temporary fix
-const TUint8 KMusEngKeepAlivePayloadTypeVideoH263 = 96;
-const TUint8 KMusEngKeepAlivePayloadTypeAudio = 97;
-const TUint8 KMusEngKeepAlivePayloadTypeVideoAvc = 98;
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-const TInt KMusEngTresholdToSecondsFactor = 20;
-const TInt KMusEngOneSecondInMilliSeconds = 1000; 
-// Use inactivity timer value that is a little bigger than treshold in seconds
-const TUint KMusEngInactivityTimer = KMusEngTresholdToSecondsFactor * 
-                                     KMusEngJitterBufferTreshold + 
-                                     KMusEngOneSecondInMilliSeconds;
-
-_LIT8( KMusEngSwisIdentifier, "Require: precondition" );
-_LIT8( KMusEngAssertedIdentity, "P-Asserted-Identity" );
-_LIT8( KMusEngBiggerSign, ">" );
-
-const TInt KMusEngSipReasonCodeBusyHere = 486;
-_LIT8( KMusEngSipReasonPhraseBusy, "Busy" );
+const TInt KMaxUriLength = 512;
 
 // -----------------------------------------------------------------------------
 //
@@ -73,7 +45,23 @@
 //
 CMusEngReceiveSession::~CMusEngReceiveSession()
     {
-    delete iRemoteDisplayName;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMusEngReceiveSession* CMusEngReceiveSession::NewL(
+                        const TRect& aRect,
+                        MMusEngReceiveSessionObserver* aSessionObserver)
+    {
+    CMusEngReceiveSession* self =
+                new( ELeave ) CMusEngReceiveSession( aSessionObserver, aRect );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
     }
 
 
@@ -81,155 +69,62 @@
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngReceiveSession* CMusEngReceiveSession::NewL( const TRect& aRect )
+EXPORT_C void CMusEngReceiveSession::AcceptInvitationL(
+                        const TBool& aAccept )
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngReceiveSession::NewL(...)" )
-
-    CMusEngReceiveSession* self = new( ELeave ) CMusEngReceiveSession( aRect );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngReceiveSession::NewL(...)" )
-    return self;
+    iAccepInvitation = aAccept;
     }
 
 
 // -----------------------------------------------------------------------------
-// From MLcSession
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngReceiveSession::SetSessionObserver(
+                        MMusEngReceiveSessionObserver* aSessionObserver)
+    {
+    iSessionObserver = aSessionObserver;
+    }
+
+
+
+// -----------------------------------------------------------------------------
+//
 // -----------------------------------------------------------------------------
 //
-void CMusEngReceiveSession::EstablishLcSessionL()
+TBool CMusEngReceiveSession::IsRtpcInactivityTimoutSupported()
+{
+    return ETrue;
+}
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngReceiveSession::CMusEngReceiveSession(
+                        MMusEngReceiveSessionObserver* aSessionObserver,
+                        const TRect& aRect )
+    : CMusEngMceSession( aRect )
     {
     }
 
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
-MLcVideoPlayer* CMusEngReceiveSession::RemoteVideoPlayer()
-    {
-    return this;
-    }
-    
-// -----------------------------------------------------------------------------
-// From MLcSession
-// -----------------------------------------------------------------------------
-//
- 
-const TDesC& CMusEngReceiveSession::RemoteDisplayName()
- 	{
-    return *iRemoteDisplayName;
- 	}
- 	
 
 // -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
 //
-MLcVideoPlayer::TLcVideoPlayerState CMusEngReceiveSession::LcVideoPlayerState() const
-    {
-    TLcVideoPlayerState vidPlayerState = MLcVideoPlayer::EUnavailable;
-
-    return vidPlayerState;
-    }
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngReceiveSession::LcIsPlayingL()
-    {
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngReceiveSession::LcPlayL()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-void CMusEngReceiveSession::LcPauseL()
-    {
-    // NOP
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
 // -----------------------------------------------------------------------------
 //
-MLcWindow* CMusEngReceiveSession::LcWindow()
+void CMusEngReceiveSession::ConstructL()
     {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcCameraControl* CMusEngReceiveSession::LcCameraControl()
-    {
-    return NULL;
     }
 
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcFileControl* CMusEngReceiveSession::LcSourceFile()
-    {
-    return NULL;
-    }
 
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcFileControl* CMusEngReceiveSession::LcDestinationFile()
-    {
-    return NULL;
-    }
 
 // -----------------------------------------------------------------------------
-// From MLcVideoPlayer
+//
 // -----------------------------------------------------------------------------
 //
-MLcAudioControl* CMusEngReceiveSession::LcAudioControl()
+MMusEngReceiveSessionObserver* CMusEngReceiveSession::ReceiveSessionObserver()
     {
-    return this;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcZoomControl* CMusEngReceiveSession::LcZoomControl()
-    {
-    return NULL;
     }
 
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-MLcBrightnessControl* CMusEngReceiveSession::LcBrightnessControl()
-    {
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// From MLcVideoPlayer
-// -----------------------------------------------------------------------------
-//
-RPointerArray< MLcValueControl >& CMusEngReceiveSession::LcExtensionControls()
-    {
-    return iValueControls;
-    }
-
-// End of File
--- a/tsrc/musenginestub/src/musengsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musengsession.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,9 +18,12 @@
 
 // USER INCLUDES
 #include "musengsession.h"
+#include "musengsessionobserver.h"
 #include "musengtelephoneutils.h"
-#include "muslogger.h"
 
+// SYSTEM INCLUDES
+
+//#include <e32cmn.h>
 
 // -----------------------------------------------------------------------------
 //
@@ -35,7 +38,38 @@
 //
 // -----------------------------------------------------------------------------
 //
-CMusEngSession::CMusEngSession()
+EXPORT_C TRect CMusEngSession::Rect() const
+    {
+    return iRect;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::SetRectL( const TRect& aRect )
+    {
+    iRect = aRect;
+    User::LeaveIfError( iErrorCode );
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::EnableLoudspeakerL( TBool aEnable,
+                                                  TBool aShowDialog )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngSession::IsLoudSpeakerEnabled() const
     {
     }
 
@@ -44,8 +78,48 @@
 //
 // -----------------------------------------------------------------------------
 //
+EXPORT_C TInt CMusEngSession::VolumeL() const
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// Increases CS call volume level by one.
+// Leaves if error occurs when accessing central repository.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::VolumeUpL( )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// Decreases CS call volume level by one.
+// Leaves if error occurs when accessing central repository.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMusEngSession::VolumeDownL( )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMusEngSession::CMusEngSession( const TRect& aRect )
+    {
+    iRect = aRect;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 void CMusEngSession::ConstructL() // second-phase constructor
     {
+    iErrorCode = KErrNone;
     }
 
 
--- a/tsrc/musenginestub/src/musengsessiondurationtimer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musengsessiondurationtimer.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -16,21 +16,21 @@
 */
 
 
-// USER INCLUDES 
+// USER INCLUDES
 #include "musengsessiondurationtimer.h"
 #include "musengsessiondurationtimerobserver.h"
 
 
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 //
-CMusEngSessionDurationTimer* CMusEngSessionDurationTimer::NewL(  
-						MMusEngSessionDurationTimerObserver& aObserver )
+CMusEngSessionDurationTimer* CMusEngSessionDurationTimer::NewL(
+                        MMusEngSessionDurationTimerObserver& aObserver )
     {
-    CMusEngSessionDurationTimer* self = 
-    		new (ELeave) CMusEngSessionDurationTimer( aObserver );
+    CMusEngSessionDurationTimer* self =
+            new (ELeave) CMusEngSessionDurationTimer( aObserver );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self) ;
@@ -39,74 +39,31 @@
 
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 //
 CMusEngSessionDurationTimer::~CMusEngSessionDurationTimer()
     {
-    Cancel();
-    iTimer.Close();
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionDurationTimer::Start(TInt aDelay )
-    {    
-    if ( !IsActive() )
-        {
-        iTimer.After( iStatus, aDelay );
-        SetActive();    	  	   	    
-        }
-    
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionDurationTimer::CMusEngSessionDurationTimer( 
-						MMusEngSessionDurationTimerObserver& aObserver ) 
-	: CActive( CActive::EPriorityStandard ), 
-	  iObserver( aObserver)
-    {
     }
 
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 //
-void CMusEngSessionDurationTimer::ConstructL()
+CMusEngSessionDurationTimer::CMusEngSessionDurationTimer(
+                        MMusEngSessionDurationTimerObserver& aObserver )
+    : iObserver( aObserver)
     {
-    CActiveScheduler::Add( this );
-    User::LeaveIfError( iTimer.CreateLocal() );
     }
 
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 //
-void CMusEngSessionDurationTimer::RunL()
+void CMusEngSessionDurationTimer::ConstructL()
     {
-    if ( iStatus.Int() == KErrNone )
-        {
-		iObserver.UpdateTimerEvent();
-        }
     }
 
 
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionDurationTimer::DoCancel()
-    {
-    iTimer.Cancel();
-    }
-
-
--- a/tsrc/musenginestub/src/musengsessionmanager.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "musengsessionmanager.h"
-#include <e32property.h>
-#include "musenglivesession.h"
-#include "musengreceivesession.h"
-#include "lcsession.h"
-#include "mussessionproperties.h"
-#include "lcsessionobserver.h"
-#include "lcuiprovider.h"
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionManager* CMusEngSessionManager::NewL( TAny* aInitParams )
-    {
-    __ASSERT_ALWAYS( aInitParams != NULL, User::Leave( KErrArgument ) );
-    
-    CMusEngSessionManager* self = 
-        new( ELeave )CMusEngSessionManager( 
-                *reinterpret_cast< TLcEngineParams* >( aInitParams ) );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-        
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//  
-CMusEngSessionManager::~CMusEngSessionManager()
-    {
-    delete iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngSessionManager::CMusEngSessionManager( 
-    TLcEngineParams& aInitParams )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngSessionManager::ConstructL()
-    {
-    TInt useCase;
-    User::LeaveIfError( RProperty::Get( NMusSessionApi::KCategoryUid, 
-                                        NMusSessionApi::KUseCase, 
-                                        useCase ) );    
-    iSession = CreateMusSessionL( 
-        static_cast< MultimediaSharing::TMusUseCase >( useCase ) );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-MLcSession& CMusEngSessionManager::Session()
-    {
-    return *iSession;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession* CMusEngSessionManager::CreateMusSessionL( 
-    MultimediaSharing::TMusUseCase aUseCase )
-    {
-    CMusEngMceSession* session = NULL;
-    switch ( aUseCase ) 
-        {
-        case MultimediaSharing::EMusLiveVideo:
-            {
-            session = CMusEngLiveSession::NewL( TRect() );
-            break;
-            }
-        case MultimediaSharing::EMusReceive:
-            {
-            session = CMusEngReceiveSession::NewL( TRect() );
-            break;
-            }
-        default:
-            User::Leave( KErrNotSupported );
-            break;
-        }
-    return session;
-    }
-
-// End of File
--- a/tsrc/musenginestub/src/musengtelephoneutils.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musenginestub/src/musengtelephoneutils.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -18,21 +18,12 @@
 
 // USER
 #include "musengtelephoneutils.h"
-#include "musengaudioroutingobserver.h"
-#include "muslogger.h"
 
 // SYSTEM
+/*
 #include <centralrepository.h>
-#include <telincallvolcntrlcrkeys.h>
-#include <e32property.h>
-#include <telephonydomainpskeys.h>
-#include <cphcltcommandhandler.h> // for CPhCltCommandHandler
-
-// Constants
-const TInt KMusEngMaxVolume = 10;
-const TInt KMusEngMinVolume = 0;
-
-
+#include <telephonyinternalcrkeys.h>
+*/
 
 
 // -----------------------------------------------------------------------------
@@ -55,51 +46,6 @@
 //
 CMusEngTelephoneUtils::~CMusEngTelephoneUtils()
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::~CMusEngTelephoneUtils()" )
-    
-    Cancel();
-
-    delete iPhoneCommandHandler;
-    
-    if( iTelephonyAudioRouting ) // If 2nd phase construction has succeeded 
-        {
-        CTelephonyAudioRouting::TAudioOutput currentMode =
-                                            iTelephonyAudioRouting->Output();
-        if( currentMode != iAudioOutputAtStartup )
-            {
-            // As going down, let audiorouting api to show notification
-            iTelephonyAudioRouting->SetShowNote( ETrue );
-            TRAPD( err, DoSetOutputL( iAudioOutputAtStartup ) );
-            MUS_LOG1( "mus: [ENGINE]    final route change completed: %d", err )
-            err++;
-        	}
-        }
-
-    delete iRepository;
-    delete iTelephonyAudioRouting;
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::~CMusEngTelephoneUtils()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngTelephoneUtils::AudioRoutingCanBeChanged()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::AudioRoutingCanBeChanged" )
-    
-    TBool retValue = ( iTelephonyAudioRouting->Output() !=
-                       CTelephonyAudioRouting::EWiredAudioAccessory &&
-                       iTelephonyAudioRouting->Output() !=
-                       CTelephonyAudioRouting::EBTAudioAccessory &&
-                       iTelephonyAudioRouting->Output() !=
-                       CTelephonyAudioRouting::ETTY );
-    
-    MUS_LOG1( "mus: [ENGINE]  <- CMusEngTelephoneUtils::AudioRoutingCanBeChanged: %d",
-              retValue )
-              
-    return retValue;
     }
 
 
@@ -109,46 +55,6 @@
 //
 void CMusEngTelephoneUtils::LoudspeakerL( TBool aEnable, TBool aShowDialog )
     {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTelephoneUtils::LoudspeakerL(%d)",
-              aEnable )
-    
-    if ( aEnable )
-        {
-        if ( iTelephonyAudioRouting->Output() == 
-             CTelephonyAudioRouting::EHandset )
-            {
-            // Disable note shown by audiorouting api as it causes
-            // application going to background for a while. Instead, display
-            // note by ourselves once setting output completes. This mechanism
-            // is needed only for loudspeaker enabling as going to background
-            // causes problems only at beginning of sharing session.
-            if ( aShowDialog )
-                {   
-                iTelephonyAudioRouting->SetShowNote( EFalse );
-                
-                iShowDialog = aShowDialog;
-                }
-    
-            DoSetOutputL( CTelephonyAudioRouting::ELoudspeaker );
-            }
-        }
-    else
-        {
-        iTelephonyAudioRouting->SetShowNote( aShowDialog );
-        
-        if ( iAudioOutputAtStartup == CTelephonyAudioRouting::ELoudspeaker )
-            {
-            DoSetOutputL( CTelephonyAudioRouting::EHandset );
-            }
-        else
-            {
-            DoSetOutputL( iAudioOutputAtStartup );
-            }
-        }
-
-    
-                                
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::LoudspeakerL(...)" )
     }
 
 
@@ -158,8 +64,6 @@
 //
 TBool CMusEngTelephoneUtils::IsLoudSpeakerEnabled() const
     {
-    return ( iTelephonyAudioRouting->Output() ==
-             CTelephonyAudioRouting::ELoudspeaker );
     }
 
 
@@ -170,19 +74,6 @@
 //
 TInt CMusEngTelephoneUtils::GetVolumeL() const
     {
-    TInt currentVolume = 0;
-    if ( IsLoudSpeakerEnabled() )
-        {
-        User::LeaveIfError( iRepository->Get( KTelIncallLoudspeakerVolume,
-                                              currentVolume ) );
-        }
-    else
-        {
-        User::LeaveIfError( iRepository->Get( KTelIncallEarVolume,
-                                              currentVolume ) );
-        }
-
-    return ValidateVolume( currentVolume );
     }
 
 
@@ -193,62 +84,6 @@
 //
 void CMusEngTelephoneUtils::SetVolumeL( TInt aVolume )
     {
-    TInt newVolume = ValidateVolume( aVolume );
-
-    if ( GetVolumeL() != newVolume )
-        {
-        if ( IsLoudSpeakerEnabled() )
-            {
-            User::LeaveIfError( iRepository->Set( KTelIncallLoudspeakerVolume,
-                                                  newVolume ) );
-            }
-        else
-            {
-            User::LeaveIfError( iRepository->Set( KTelIncallEarVolume, 
-                                                  newVolume ) );
-            }
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTelephoneUtils::MuteMicL( TBool aMute )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTelephoneUtils::MuteMicL(%d)", aMute )
-    
-    if ( IsActive() )
-        {
-        MUS_LOG( "mus: [ENGINE]     Cancel pending request" )
-        Cancel();
-        }
-    
-    iPhoneCommandHandler->MuteMicrophone( iStatus, aMute );
-    SetActive();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::MuteMicL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngTelephoneUtils::IsMicMutedL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::IsMicMutedL()" )
-    
-    TInt psVal;
-    User::LeaveIfError( RProperty::Get( KPSUidTelMicrophoneMuteStatus,
-                                        KTelMicrophoneMuteState,
-                                        psVal ) );
-                                        
-    MUS_LOG1( "mus: [ENGINE]     Mute status in PS is (%d)", psVal )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::IsMicMutedL()" )
-
-    return ( psVal == EPSTelMicMuteOn );
     }
 
 
@@ -256,122 +91,8 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CMusEngTelephoneUtils::SetAudioRoutingObserver( 
-                                    MMusEngAudioRoutingObserver* aObserver )
-    {
-    iAudioRoutingObserver = aObserver;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTelephoneUtils::RunL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::RunL()" )
-
-    // NOP, since we really cannot do anything but log the result
-    MUS_LOG1( "mus: [ENGINE]    Asynchronous call completed with code %d",
-             iStatus.Int() )
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::RunL()" )
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTelephoneUtils::DoCancel()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::DoCancel()" )
-    
-    if ( iPhoneCommandHandler )
-        {
-        iPhoneCommandHandler->CancelAsyncRequest( EPhCltCommandMuteMic );
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::DoCancel()" )
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTelephoneUtils::AvailableOutputsChanged( 
-                        CTelephonyAudioRouting& /*aTelephonyAudioRouting*/ )
-    {
-    // NOP
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTelephoneUtils::OutputChanged( 
-                CTelephonyAudioRouting& aTelephonyAudioRouting )
+CMusEngTelephoneUtils::CMusEngTelephoneUtils()
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::OutputChanged()" )
-
-    // Some other application has changed audio output routing. We consider
-    // this as a last will of a user and return to this state after sharing
-    
-    iAudioOutputAtStartup = aTelephonyAudioRouting.Output();
-    
-    MUS_LOG1( "mus: [ENGINE]     New audio routing is %d", iAudioOutputAtStartup )
-    
-    if ( iAudioRoutingObserver )
-        {
-        iAudioRoutingObserver->AudioRoutingChanged( EFalse );
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::OutputChanged()" )
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTelephoneUtils::SetOutputComplete( 
-                    CTelephonyAudioRouting& /*aTelephonyAudioRouting*/,
-                    TInt aError )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::SetOutputComplete()" )
-
-    if ( aError == KErrNone && iAudioRoutingObserver )
-        {
-        // If audio routing api didn't shown note and show dialog mode is on,
-        // we know that this completion is for such setoutput call for which
-        // we need to show the note. Show note mode is turned off only in that
-        // case.
-        TBool dialogShownByUs( EFalse );
-        TBool dialogShownByAudioRouting( EFalse );     
-        aError = iTelephonyAudioRouting->GetShowNote( dialogShownByAudioRouting );
-        if ( aError == KErrNone && !dialogShownByAudioRouting && iShowDialog )
-            {
-            dialogShownByUs = iShowDialog;
-            iShowDialog = EFalse;
-            }
-
-        iAudioRoutingObserver->AudioRoutingChanged( dialogShownByUs );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::SetOutputComplete()" )
-    }
-                            
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTelephoneUtils::CMusEngTelephoneUtils() 
-	: CActive( CActive::EPriorityStandard )
-    {
-    iAudioOutputAtStartup = CTelephonyAudioRouting::ENotActive;
     }
 
 
@@ -381,23 +102,6 @@
 //
 void CMusEngTelephoneUtils::ConstructL()
     {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::ConstructL()" )
-
-    // Volume control
-    iRepository = CRepository::NewL( KCRUidInCallVolume );
-
-    // Audio routing control
-    iTelephonyAudioRouting = CTelephonyAudioRouting::NewL( *this );
-
-    iAudioOutputAtStartup = iTelephonyAudioRouting->Output();
-    
-    // Phone
-    MUS_LOG( "mus: [ENGINE]     Use static DLL" )
-    iPhoneCommandHandler = CPhCltCommandHandler::NewL();
-        
-    CActiveScheduler::Add( this );
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::ConstructL()" )
     }
 
 
@@ -408,38 +112,8 @@
 //
 TInt CMusEngTelephoneUtils::ValidateVolume( const TInt aVolume ) const
     {
-    if ( aVolume < KMusEngMinVolume )
-        {
-        return KMusEngMinVolume;
-        }
-    else if ( aVolume > KMusEngMaxVolume )
-        {
-        return KMusEngMaxVolume;
-        }
-    else
-        {
-        // NOP, to keep PC-Lint happy
-        }
-        
-    return aVolume;
     }
 
 
-// -----------------------------------------------------------------------------
-// Set output if setting is currently allowed.
-// -----------------------------------------------------------------------------
-//
-void CMusEngTelephoneUtils::DoSetOutputL( 
-    CTelephonyAudioRouting::TAudioOutput aAudioOutput )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::DoSetOutputL()" )
-    if ( iAudioRoutingObserver && !iAudioRoutingObserver->AudioRouteChangeAllowed() )
-        {
-        MUS_LOG( "mus: [ENGINE]     change not allowed!" )
-        User::Leave( KErrAccessDenied );
-        }
-    iTelephonyAudioRouting->SetOutputL( aAudioOutput );
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::DoSetOutputL()" )
-    }
 
 
--- a/tsrc/musenginestub/src/musengtwowayrecvsession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,540 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengtwowayrecvsession.h"
-#include "musengsessionobserver.h"
-#include "musengreceivesessionobserver.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "mussipprofilehandler.h"
-
-// SYSTEM
-#include <mcemanager.h>
-#include <mcecamerasource.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcesession.h>
-#include <mcertpsource.h>
-#include <mcestreambundle.h>
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMusEngTwoWayRecvSession* CMusEngTwoWayRecvSession::NewL(
-                        const TRect& aRemoteRect,
-                        const TRect& aLocalRect,
-                        MMusEngSessionObserver& aSessionObserver,
-                        MMusEngReceiveSessionObserver& aReceiveSessionObserver )
-    {
-    CMusEngTwoWayRecvSession* self = new( ELeave ) CMusEngTwoWayRecvSession( 
-                                                    aSessionObserver,
-                                                    aReceiveSessionObserver,
-                                                    aRemoteRect,
-                                                    aLocalRect );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::~CMusEngTwoWayRecvSession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWayRecvSession::EnableDisplayL() %d", 
-              aEnable )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-    MusEngMceUtils::DoEnableDisplayL( *display, aEnable );
-                
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-    if ( vfDisplay )
-        {
-        MusEngMceUtils::DoEnableDisplayL( *vfDisplay, aEnable );  
-        }
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngMceSession::TDisplayOrientation CMusEngTwoWayRecvSession::OrientationL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::RotationL()" )
-    
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-    
-    TDisplayOrientation displayOrientation;
-    CMceDisplaySink::TRotation rotation( display->RotationL() );
-    
-    MUS_LOG1( "mus: [ENGINE]     MCE rotation is %d", rotation )
-    
-    if ( rotation == CMceDisplaySink::ENone )
-        {
-        displayOrientation = CMusEngMceSession::EPortrait;
-        }
-    else
-        {
-        displayOrientation = CMusEngMceSession::ELandscape;
-        }
-    
-    MUS_LOG1( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::RotationL() %d", 
-              displayOrientation )
-    
-    return displayOrientation;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngTwoWayRecvSession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetOrientationL() %d", 
-              aOrientation )
-              
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-            
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-
-    CMceDisplaySink::TRotation rotation = ( aOrientation == EPortrait ) ? 
-        CMceDisplaySink::ENone : CMceDisplaySink::EClockwise90Degree;
-    
-    display->SetRotationL( rotation );
-    if ( vfDisplay )
-        {
-        vfDisplay->SetRotationL( rotation );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetOrientationL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMusEngTwoWayRecvSession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetRectsL()" )  
-     
-    iLocalRect = aLocalRect;
-    iRect = aRemoteRect;
-    RectChangedL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetRectsL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMusEngTwoWayRecvSession::SetLocalRectL( const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::SetLocalRectL()" )
-    
-    iLocalRect = aLocalRect;
-    RectChangedL();
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::SetLocalRectL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TRect CMusEngTwoWayRecvSession::LocalRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::LocalRect()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::LocalRect()" )
-    return iLocalRect;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMusEngCameraHandler& CMusEngTwoWayRecvSession::Camera()
-    {
-    return iCameraHandler;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-
-void CMusEngTwoWayRecvSession::RectChangedL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::RectChangedL()" )
-
-
-    // If session is not yet created, do nothing
-    if ( iSession && iSession->State() != CMceSession::ETerminated )
-        {
-        TRect remoteRect( Rect() );
-        MUS_LOG2( "mus: [ENGINE]  remote tl.ix=%d tl.iy=%d", 
-                  remoteRect.iTl.iX, remoteRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  remote brc%d br.iy=%d", 
-                  remoteRect.iBr.iX, remoteRect.iBr.iY )    
-        MUS_LOG2( "mus: [ENGINE]  local tl.ix=%d tl.iy=%d", 
-                  iLocalRect.iTl.iX, iLocalRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  local br.ix=%d br.iy=%d", 
-                  iLocalRect.iBr.iX, iLocalRect.iBr.iY )
-            
-        CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplayL( *iSession );
-        display->SetDisplayRectL( remoteRect );
-        
-        CMceDisplaySink* vfDisplay = MusEngMceUtils::GetVfDisplay( *iSession );
-        if ( vfDisplay )
-            {
-            vfDisplay->SetDisplayRectL( iLocalRect );
-            }
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::RectChangedL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    iCameraHandler.SetSession( iSession );
-    
-    // Force bandwidth line usage in sdp as it is mandatory
-    // at MT side based on GSMA VS specification IR.74. Bandwidth is set to
-    // session or to media level based on sender's way of usage. If other end
-    // is not using bandwidth attribute at all, media level is preferred.
-    SetSessionSdpLinesL( *iSession, ETrue );
-
-    CMceStreamBundle* localBundle =
-                              CMceStreamBundle::NewLC( CMceStreamBundle::ELS );
-
-    const RPointerArray<CMceMediaStream>& streams = iSession->Streams();
-    
-    CMceMediaStream* videoInStream = NULL;
-    CMceMediaStream* videoOutStream = NULL;
-    
-    // Search interesting video streams, sendrecv is preferred
-    TBool sendRecvVideoFound( EFalse );
-    for( TInt i = 0; i < streams.Count(); ++i )
-        {
-        if ( MusEngMceUtils::IsVideoInStream( *streams[i] ) &&
-             !sendRecvVideoFound )
-            {
-            videoInStream = streams[i];
-            
-            if ( streams[i]->BoundStream() )
-                {
-                videoOutStream = &streams[i]->BoundStreamL();
-                }
-            }
-        else if ( streams[i]->BoundStream() &&
-                  MusEngMceUtils::IsVideoInStream( streams[i]->BoundStreamL() ) &&
-                  !sendRecvVideoFound )
-            {
-            videoInStream = &streams[i]->BoundStreamL();
-                
-            videoOutStream = streams[i];
-            }
-        else
-            {
-            // NOP
-            }
-        
-        sendRecvVideoFound = ( videoInStream && videoOutStream );
-        }
-    
-    CompleteSessionStructureAudioPartL( streams, *localBundle, videoInStream, videoOutStream );
-    
-    if ( videoInStream )
-        {
-        CompleteSessionStructureInStreamL( *videoInStream, *localBundle );
-        }
-    else
-        {
-        // At least receiving video stream is required
-        User::Leave( KErrCorrupt );
-        }
-    
-    if ( videoOutStream )
-        {
-        CompleteSessionStructureOutStreamL( *videoOutStream );
-        }
-    
-    // Destroy bundle if it is not needed or transfer ownership
-    if ( localBundle->Streams().Count() > 1 )
-        {
-        iSession->AddBundleL( localBundle );
-        CleanupStack::Pop( localBundle );
-        }
-    else
-        {
-        CleanupStack::PopAndDestroy( localBundle );
-        }
-    
-    AdjustStreamsAndCodecsL();
-    
-    iSession->UpdateL();
-    
-    // Now session state is right to adjust volume
-    SetSpeakerVolumeL( VolumeL() );
-    
-    iSipProfileHandler->CreateProfileL( iSession->Profile() );
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::StreamStateChanged( CMceMediaStream& aStream,
-                                             CMceMediaSink& aSink )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWayRecvSession::StreamStateChanged( sink )" )
-    if ( !iSession )
-        {
-        return;
-        }
-    
-    MUS_ENG_LOG_STREAM_STATE( aStream )
-    
-    // TODO: if display sink buffers, inform ui with some callback
-    // so that it can modify display rects accordingly
-    
-    CMusEngMceSession::StreamStateChanged( aStream, aSink );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWayRecvSession::StreamStateChanged( sink )" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::StreamStateChanged( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWayRecvSession::StreamStateChanged()" )
-    if ( !iSession )
-        {
-        return;
-        }
-    
-    MUS_ENG_LOG_STREAM_STATE( aStream )
-    
-    // TODO: if receiving video stream buffers, inform ui with some callback
-    // so that it can modify display rects accordingly
-    
-    CMusEngReceiveSession::StreamStateChanged( aStream );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWayRecvSession::StreamStateChanged()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWayRecvSession::CMusEngTwoWayRecvSession(
-                        MMusEngSessionObserver& aSessionObserver,
-                        MMusEngReceiveSessionObserver& aReceiveSessionObserver,
-                        const TRect& aRemoteRect,
-                        const TRect& aLocalRect ) : 
-    CMusEngReceiveSession( aSessionObserver,
-                           aReceiveSessionObserver,
-                           aRemoteRect ),
-    iLocalRect( aLocalRect )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::ConstructL()" )
-    
-    iCameraHandler.ReadCameraUsageKeyL();
-    CMusEngReceiveSession::ConstructL();
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-// When checking audio streams also not interesting streams are removed from
-// session. Stream if removed if one of following apply:
-// 1. Is not and does not contain incoming video or audio
-// 2. We already have one incoming video stream
-// 3. Stream is audio and we run operator variant where audio is 
-//    not allowed.
-// 4. Two-way video exists and this one is audio
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL( 
-    const RPointerArray<CMceMediaStream>& aStreams, 
-    CMceStreamBundle& aLocalBundle, 
-    CMceMediaStream* aVideoInStream,
-    CMceMediaStream* aVideoOutStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL()" )
-    
-    // Audio streams not allowed in two-way session or in operator variant
-    TBool audioAllowed(  !( aVideoInStream && aVideoOutStream ) && !iOperatorVariant );
-    
-    for( TInt i = 0; i < aStreams.Count(); ++i )
-        {
-        // Audio supported currently only in recvonly case
-        if ( audioAllowed &&
-             MusEngMceUtils::IsAudioInStream( *aStreams[i] ) )
-            {
-            MusEngMceUtils::AddSpeakerL( *aStreams[i] );
-            
-            aLocalBundle.AddStreamL( *aStreams[i] );
-            
-            // Disable possible opposite stream to indicate that sendrecv audio is
-            // not allowed.
-            if ( aStreams[i]->BoundStream() )
-                {
-                MusEngMceUtils::DisableStreamL( aStreams[i]->BoundStreamL() );
-                }
-            }
-        else if ( audioAllowed &&
-                  aStreams[i]->BoundStream() &&
-                  MusEngMceUtils::IsAudioInStream( aStreams[i]->BoundStreamL() ) )
-            {
-            MusEngMceUtils::AddSpeakerL( aStreams[i]->BoundStreamL() );
-    
-            aLocalBundle.AddStreamL( aStreams[i]->BoundStreamL() );
-            
-            // Disable opposite stream to indicate that sendrecv audio is not allowed.
-            MusEngMceUtils::DisableStreamL( *aStreams[i] );
-            }
-        else if ( aStreams[ i ] != aVideoInStream && aStreams[ i ] != aVideoOutStream )
-            {
-           iSession->RemoveStreamL( *aStreams[i] );
-        
-            // Since succesfull removal of a stream has decreased the amount
-            // of streams in array by one, we have to modify the index
-            --i;
-            }
-        else
-            {
-            // NOP
-            }
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureAudioPartL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL( 
-    CMceMediaStream& aVideoInStream, CMceStreamBundle& aLocalBundle )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL()" )
-    
-    SetMediaSdpLinesL( aVideoInStream, ETrue );
-
-    MusEngMceUtils::AddDisplayL( aVideoInStream, *iManager, Rect() );
-    
-    static_cast<CMceRtpSource*>(aVideoInStream.Source())->UpdateL( 
-                                           KMusEngJitterBufferLength,
-                                           KMusEngJitterBufferTreshold );
-                                            
-    aLocalBundle.AddStreamL( aVideoInStream );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureInStreamL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL( 
-    CMceMediaStream& aVideoOutStream )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL()" )
-    
-    SetMediaSdpLinesL( aVideoOutStream, ETrue );
-        
-    CMceCameraSource* camera = NULL;
-    TRAP_IGNORE( camera = MusEngMceUtils::GetCameraL( *iSession ) )
-    if ( !camera )
-        {
-        camera = CMceCameraSource::NewLC( *iManager );
-        aVideoOutStream.SetSourceL( camera );
-        CleanupStack::Pop( camera );
-        }
-       
-    camera->DisableL(); // Start session in pause mode.
-    
-    iCameraHandler.InitializeL( *camera );
-    
-    CMceVideoStream* vfStream = CMceVideoStream::NewLC();
-
-    vfStream->SetSourceL( aVideoOutStream.Source() );
-         
-    // Complete stream
-    MusEngMceUtils::AddDisplayL( *vfStream, *iManager, LocalRect() );
-    
-    iSession->AddStreamL( vfStream );
-    CleanupStack::Pop( vfStream );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWayRecvSession::CompleteSessionStructureOutStreamL()" )
-    }
-
-// End of file
--- a/tsrc/musenginestub/src/musengtwowaysession.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,476 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// USER
-#include "musengtwowaysession.h"
-#include "musengsessionobserver.h"
-#include "musenglivesessionobserver.h"
-#include "musunittesting.h"
-#include "musengmceutils.h"
-#include "musenglogger.h"
-#include "musengtwowaysessionobserver.h"
-
-// SYSTEM
-#include <mcemanager.h>
-#include <mcecamerasource.h>
-#include <mcevideostream.h>
-#include <mcertpsink.h>
-#include <mcedisplaysink.h>
-#include <mcesession.h>
-#include <mcertpsource.h>
-
-const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold
-// Using following value increases treshold buffer to 1 second from 
-// default 100 ms
-const TInt KMusEngJitterBufferTreshold = 50;
-
-const TUint32 KMusEngTwoWayReceivingActivityTimeout = 3000; // 3 seconds
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMusEngTwoWaySession* CMusEngTwoWaySession::NewL(
-                        const TRect& aRemoteRect,
-                        const TRect& aLocalRect,
-                        MMusEngSessionObserver& aSessionObserver,
-                        MMusEngOutSessionObserver& aOutSessionObserver,
-                        MMusEngLiveSessionObserver& aLiveSessionObserver,
-                        MMusEngTwoWaySessionObserver& aTwoWayObserver )
-    {
-    CMusEngTwoWaySession* self = new( ELeave ) CMusEngTwoWaySession( 
-                                                    aSessionObserver,
-                                                    aOutSessionObserver,
-                                                    aLiveSessionObserver, 
-                                                    aTwoWayObserver,
-                                                    aRemoteRect,
-                                                    aLocalRect );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession::~CMusEngTwoWaySession()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::~CMusEngTwoWaySession()" )
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::EnableDisplayL( TBool aEnable )
-    {
-    MUS_LOG1( "mus: [ENGINE]     -> CMusEngTwoWaySession::EnableDisplayL() %d", 
-              aEnable )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iSession );
-    if ( display )
-        {
-        MusEngMceUtils::DoEnableDisplayL( *display, aEnable );
-        }     
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetDisplayL( *iSession, ETrue );
-    MusEngMceUtils::DoEnableDisplayL( *vfDisplay, aEnable );     
-        
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::EnableDisplayL()")
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//        
-void CMusEngTwoWaySession::SetOrientationL( TDisplayOrientation aOrientation )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetOrientationL() %d", 
-              aOrientation )
-              
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-    
-    CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iSession );            
-    CMceDisplaySink* vfDisplay = MusEngMceUtils::GetDisplayL( *iSession, ETrue );
-
-    CMceDisplaySink::TRotation rotation = ( aOrientation == EPortrait ) ? 
-         CMceDisplaySink::ENone : CMceDisplaySink::EClockwise90Degree;
-     
-    vfDisplay->SetRotationL( rotation );
-    if ( display )
-        {
-        display->SetRotationL( rotation );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetOrientationL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::RecordL( TBool aRecord )
-    {
-    MUS_LOG1( "mus: [ENGINE]  -> CMusEngTwoWaySession::RecordL( %d )", aRecord )
-
-    User::Leave( KErrNotSupported );
-
-    MUS_LOG1( "mus: [ENGINE]  <- CMusEngTwoWaySession::RecordL( %d )", aRecord ) 
-    }    
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMusEngTwoWaySession::IsRecording()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::IsRecording()" )    
-    
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMusEngTwoWaySession::SetRectsL( 
-    const TRect& aRemoteRect,
-    const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetRectsL()" )  
-     
-    iLocalRect = aLocalRect;
-    iRect = aRemoteRect;
-    RectChangedL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetRectsL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMusEngTwoWaySession::SetLocalRectL( const TRect& aLocalRect )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::SetLocalRectL()" )
-    
-    iLocalRect = aLocalRect;
-    RectChangedL();
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::SetLocalRectL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TRect CMusEngTwoWaySession::LocalRect() const
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::LocalRect()" )
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::LocalRect()" )
-    return iLocalRect;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::RectChangedL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::RectChangedL()" )
-
-    // If session is not yet created, do nothing
-    if ( iSession && iSession->State() != CMceSession::ETerminated )
-        {
-        TRect remoteRect( Rect() );
-        MUS_LOG2( "mus: [ENGINE]  remote tl.ix=%d tl.iy=%d", 
-                  remoteRect.iTl.iX, remoteRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  remote br.ix=%d br.iy=%d", 
-                  remoteRect.iBr.iX, remoteRect.iBr.iY )    
-        MUS_LOG2( "mus: [ENGINE]  local tl.ix=%d tl.iy=%d", 
-                  iLocalRect.iTl.iX, iLocalRect.iTl.iY )
-        MUS_LOG2( "mus: [ENGINE]  local br.ix=%d br.iy=%d", 
-                  iLocalRect.iBr.iX, iLocalRect.iBr.iY )
-            
-        CMceDisplaySink* display = MusEngMceUtils::GetReceivingDisplay( *iSession );
-        if ( display )
-            {
-            display->SetDisplayRectL( remoteRect );
-            }
-        CMceDisplaySink* vfDisplay = MusEngMceUtils::GetDisplayL( *iSession, ETrue );
-        vfDisplay->SetDisplayRectL( iLocalRect );
-        }
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::RectChangedL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::CompleteSessionStructureL( 
-                                            CMceStreamBundle& /*aLocalBundle*/ )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::CompleteSessionStructureL()" )
-
-    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
-
-    iCameraHandler.SetSession( iSession );
-    
-    // Create outgoing video stream
-    CMceVideoStream* videoStream = CMceVideoStream::NewLC();
-    
-    CMceRtpSink* rtpsink = CMceRtpSink::NewLC();
-    videoStream->AddSinkL( rtpsink );
-    CleanupStack::Pop( rtpsink );
-
-    CMceCameraSource* camera = CMceCameraSource::NewLC( *iManager );
-    camera->DisableL(); // Start session in pause mode.
-    
-    iCameraHandler.InitializeL( *camera );
-
-    videoStream->SetSourceL( camera );
-    CleanupStack::Pop( camera );
-    
-    // Create incoming video stream
-    CMceVideoStream* videoInStream = CMceVideoStream::NewL();
-    CleanupStack::PushL( videoInStream );
-       
-    MusEngMceUtils::AddDisplayL( *videoInStream, *iManager, Rect() );
-
-    CMceRtpSource* rtpSource = CMceRtpSource::NewLC( KMusEngJitterBufferLength,
-                                                     KMusEngJitterBufferTreshold );
-    videoInStream->SetSourceL( rtpSource );
-    CleanupStack::Pop( rtpSource ); 
-
-    videoStream->BindL( videoInStream ); 
-    CleanupStack::Pop( videoInStream );
-
-    iSession->AddStreamL( videoStream );
-    CleanupStack::Pop( videoStream );    
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::CompleteSessionStructureL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::AddDisplayL( CMceMediaStream& aStream )
-    {
-    MusEngMceUtils::AddDisplayL( aStream, 
-                                 *iManager,
-                                 iLocalRect );
-    }
- 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::StreamStateChanged( CMceMediaStream& aStream )
-    {
-    MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWaySession::StreamStateChanged()" )
-    if ( !iSession )
-        {
-        return;
-        }
-    
-    MUS_ENG_LOG_STREAM_STATE( aStream )
-    
-    if ( aStream.Type() == KMceVideo &&
-         aStream.Source() &&
-         aStream.Source()->Type() == KMceRTPSource )
-        {
-        if ( aStream.State() == CMceMediaStream::EStreaming )
-            {
-            ReceivingStarted();
-            }
-        else if ( aStream.State() == CMceMediaStream::EBuffering )
-            {
-            iBuffered = ETrue;
-            }
-        }
-    
-    CMusEngMceSession::StreamStateChanged( aStream );
-
-    MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::StreamStateChanged()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::InactivityTimeout( CMceMediaStream& aStream,
-                                              CMceRtpSource& /*aSource*/ )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::InactivityTimeout()" )
-    
-    if ( aStream.Type() == KMceVideo )
-        {
-        ReceivingStopped();
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::InactivityTimeout()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::HandleSessionStateChanged( 
-                                                CMceSession& aSession,
-                                                TInt aStatusCode,
-                                                const TDesC8& aReasonPhrase )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::HandleSessionStateChanged" )
-    
-    MUS_ENG_LOG_SESSION_STATE_AND_STATUS( aSession, aStatusCode, aReasonPhrase )
-    
-    TBool consumed( EFalse );
-    if ( iSession && 
-         iSession == &aSession && 
-         aSession.State() == CMceSession::EEstablished )
-        {   
-        // TODO: if receiving stream is disabled, inform ui with some callback
-        // that it can modify display rects accordingly and continue with 
-        // session.
-        CMceVideoStream* stream = NULL;
-        CMceVideoStream* streamout = NULL;
-        TRAPD( err, stream = MusEngMceUtils::GetVideoInStreamL( *iSession ) );
-        TRAPD( errout, streamout = MusEngMceUtils::GetVideoOutStreamL( *iSession ) );
-        if ( err == KErrNone && stream && stream->IsEnabled() )
-            {
-            if ( errout != KErrNone || !streamout || !streamout->IsEnabled() )
-                {
-                MUS_LOG( "mus: [ENGINE] sendrecv downgraded to recvonly, terminate!" )
-                consumed = ETrue;
-                iSessionObserver.SessionFailed();
-                }
-            }
-        else
-            {
-            if ( errout == KErrNone && streamout && streamout->IsEnabled() )
-                {
-                MUS_LOG( "mus: [ENGINE] sendrecv downgraded to sendonly, continue!" )
-                }
-            }
-        }
-    
-    if ( !consumed )
-        {
-        CMusEngLiveSession::HandleSessionStateChanged( aSession,
-                                                       aStatusCode, 
-                                                       aReasonPhrase );
-        }
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::HandleSessionStateChanged" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusEngTwoWaySession::CMusEngTwoWaySession(
-                        MMusEngSessionObserver& aSessionObserver,
-                        MMusEngOutSessionObserver& aOutSessionObserver,
-                        MMusEngLiveSessionObserver& aLiveSessionObserver,
-                        MMusEngTwoWaySessionObserver& aTwoWayObserver,
-                        const TRect& aRemoteRect,
-                        const TRect& aLocalRect ) : 
-    CMusEngLiveSession( aSessionObserver,
-                        aOutSessionObserver,
-                        aLiveSessionObserver,
-                        aRemoteRect,
-                        KNullDesC ),
-    iTwoWayObserver( aTwoWayObserver ),                   
-    iLocalRect( aLocalRect )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::ConstructL()" )
-    
-    CMusEngLiveSession::ConstructL();
-
-    MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::ReceivingStarted()
-    {
-    if ( iSession && !iReceiving && iBuffered )
-        {
-        MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::ReceivingStarted()" )
-        
-        TInt err( KErrNone );
-        CMceMediaSource* source = NULL;
-        TRAP( err, source = 
-            MusEngMceUtils::GetVideoInStreamL( *iSession )->Source() );
-        if ( source && source->Type() == KMceRTPSource )
-            {
-            CMceRtpSource* rtpSource = static_cast<CMceRtpSource*>( source );
-            TRAP( err, rtpSource->EnableInactivityTimerL( 
-                            KMusEngTwoWayReceivingActivityTimeout ) ) 
-            }
-        
-        if ( err != KErrNone )
-            {
-            MUS_LOG1("mus: [ENGINE] ReceivingStarted failed %d", err)
-            iSessionObserver.SessionFailed();   
-            }
-        else
-            {
-            iReceiving = ETrue;
-            iTwoWayObserver.ReceivingStateChanged( ETrue );
-            }
-        
-        MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::ReceivingStarted()" )
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusEngTwoWaySession::ReceivingStopped()
-    {
-    if ( iReceiving )
-        {
-        MUS_LOG( "mus: [ENGINE]  -> CMusEngTwoWaySession::ReceivingStopped()" )
-        
-        iReceiving = EFalse;
-        iTwoWayObserver.ReceivingStateChanged( EFalse );
-        
-        MUS_LOG( "mus: [ENGINE]  <- CMusEngTwoWaySession::ReceivingStopped()" )
-        }
-    }
-
-// End of file
--- a/tsrc/musenginestub/src/musenguriparser.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Parser for recipient's address
-*
-*/
-
-
-#include "musenguriparser.h"
-#include "mussettings.h"
-#include "muslogger.h"
-
-#include <uri8.h>
-#include <charconv.h>
-//#include <f32file.h>
-#include <utf.h>
-#include <collate.h>
-
-     
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// UTF7 is not working, since it converts + as +-
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMusEngUriParser::TMusEngUriParser( const TDesC16& aUri )
-    :iUriType( ENotParsed )
-    {
-    TBuf8<KMaxUriLength> buf;
-
-    if ( CnvUtfConverter::ConvertFromUnicodeToUtf8( buf, aUri ) == 0 )
-        {
-        iUri = buf;
-        }
-    else
-        {
-        iUri = KNullDesC8();
-        }
-    }
-
-
-// ----------------------------------------------------------------------------- 
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TMusEngUriParser::TMusEngUriType TMusEngUriParser::UriType()
-    {
-    return iUriType;
-    }
-    
-
-// ----------------------------------------------------------------------------- 
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* TMusEngUriParser::GetUri8L()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::GetUri8L()" )
-    
-    __ASSERT_ALWAYS( UriType() != TMusEngUriParser::ENotParsed, 
-                     User::Leave( KErrNotReady ) ); 
-    
-    HBufC8* uri8 = iUri.AllocL();
-    
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngUriParser::GetUri8L()" )
-
-    return uri8;
-
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC16* TMusEngUriParser::GetUri16L( TBool aPrefix )
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::GetUri16L()" )
-    
-    __ASSERT_ALWAYS( UriType() != TMusEngUriParser::ENotParsed, 
-                     User::Leave( KErrNotReady ) ); 
-
-    HBufC16* uri16 = NULL;
-    
-    if ( aPrefix )
-        {
-        uri16 = CnvUtfConverter::ConvertToUnicodeFromUtf8L( iUri );
-        }
-    else
-        {
-        uri16 = CnvUtfConverter::ConvertToUnicodeFromUtf8L( 
-                                    iUri.Mid( KMusEngTelPrefix().Length() ) );
-        }
-    
-    MUS_LOG( "mus: [ENGINE]  <- TMusEngUriParser::GetUri16L()" )
-    
-    return uri16;
-   
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TMusEngUriParser::ParseUriL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::ParseUriL()" )
-    
-    if ( iUri.Find( KMusEngAtSign ) >= 0 ) // Sip uri
-        {
-        HandleSipUriL();
-        }
-    else if ( iUri.Find( KMusEngPlusSign ) >= 0 ) // Tel uri
-        {
-        HandleTelUriL();
-        }
-    else
-        {
-        // check for variant
-        if ( MultimediaSharingSettings::OperatorVariantSettingL()
-                != MusSettingsKeys::EOperatorSpecific )
-            {// basic behaviour
-            MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::ParseUriL() \
-                    normal behaviour" )
-            User::Leave( KErrCorrupt );
-            }
-        else
-            { // variant behaviour(local tel uri)
-            HandleLocalTelUriL();
-            }
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// 
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngUriParser::HandleSipUriL()
-    {
-    if ( iUri.FindF( KMusEngTelPrefix() ) == 0 )
-        {
-        // SIP uri with prefix "tel:"
-        User::Leave( KErrCorrupt );
-        }
-    else if ( iUri.FindF( KMusEngSipPrefix() ) != 0 )
-        {
-        // SIP uri without prefix
-        if ( iUri.Length() + KMusEngSipPrefix().Length() <=
-             KMaxUriLength )
-            {
-            iUri.Insert( 0, KMusEngSipPrefix() );
-            }
-        else
-            {
-            User::Leave( KErrCorrupt );
-            }
-        }
-    else
-        {
-        // SIP uri with prefix
-        iUri.Replace( 0, KMusEngSipPrefix().Length(), KMusEngSipPrefix() );
-        }
-
-    TUriParser8 parser;
-
-    User::LeaveIfError( parser.Parse( iUri ) );
-
-    User::LeaveIfError( parser.Validate() );
-    
-    iUriType = TMusEngUriParser::ESip;
-    }
-    
-   
-   
-   
-// -----------------------------------------------------------------------------
-// 
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngUriParser::HandleTelUriL()
-    {
-    if ( iUri.FindF( KMusEngTelPrefix() ) != 0 )
-        {
-        // Tel uri without prefix
-        if ( iUri.Length() + KMusEngTelPrefix().Length() <=
-             KMaxUriLength )
-            {
-            iUri.Insert( 0, KMusEngTelPrefix() );
-            }
-        else
-            {
-            User::Leave( KErrCorrupt );
-            }
-        }
-    else
-        {
-        //Tel uri with prefix
-        iUri.Replace( 0, KMusEngTelPrefix().Length(), KMusEngTelPrefix() );
-        }
-
-    TInt index = KMusEngTelPrefix().Length() + KMusEngPlusSign().Length();
-
-    while ( index < iUri.Length() )
-        {
-        TChar character = iUri[ index ];
-        if ( !character.IsDigit() )
-            {
-            User::Leave( KErrCorrupt );
-            }
-        ++index;
-        }
-
-    iUriType = TMusEngUriParser::ETel;
-    }
-    
-    
-// -----------------------------------------------------------------------------
-// 
-//
-// -----------------------------------------------------------------------------
-//
-void TMusEngUriParser::HandleLocalTelUriL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> TMusEngUriParser::ParseUriL() \
-            variant behaviour" )
-    if ( iUri.FindF( KMusEngTelPrefix() ) != 0 )
-        {
-        // local tel uri without prefix
-        if ( iUri.Length() + KMusEngTelPrefix().Length() <=
-             KMaxUriLength )
-            {
-            iUri.Insert( 0, KMusEngTelPrefix() );
-            }
-        else
-            {
-            User::Leave( KErrCorrupt );
-            }
-        }
-    else
-        {
-        //Tel uri with prefix
-        iUri.Replace(
-                0,
-                KMusEngTelPrefix().Length(),
-                KMusEngTelPrefix() );
-        }
-
-    TInt index = KMusEngTelPrefix().Length();
-
-    // check if all chars are digits
-    while ( index < iUri.Length() )
-        {
-        TChar character = iUri[ index ];
-        if ( !character.IsDigit() )
-            {
-            User::Leave( KErrCorrupt );
-            }
-        ++index;
-        }
-        
-    iUriType = TMusEngUriParser::ETel;
-    }
-    
-    
-// End of file
--- a/tsrc/musenginestub/src/mussipprofilehandler.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,448 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utilities to get and set profile used with SWIS.
-*  Part of     : Mus For S60 v3.2
-*  Description : Utilities to get and set profile used with SWIS.
-*  Version     : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-*
-*/
-
-
-// USER
-#include "mussipprofilehandler.h"
-#include "musuid.hrh"
-#include "muslogger.h"
-#include "mussipprofileuser.h"
-
-// SYSTEM
-#include <sip.h>
-#include <sipservertransaction.h>
-#include <sipinvitedialogassoc.h>
-#include <sipprofile.h>
-#include <sipprofileregistry.h>
-#include <sipprofilealrcontroller.h>
-#include <uri8.h>
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusSipProfileHandler* CMusSipProfileHandler::NewL( MMusSipProfileUser& aUser )
-    {
-    CMusSipProfileHandler* self = 
-        new (ELeave) CMusSipProfileHandler( aUser );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self);
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusSipProfileHandler::CMusSipProfileHandler( MMusSipProfileUser& aUser )
-    : iUser( aUser )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ConstructL()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusSipProfileHandler::ConstructL()" )
-    
-    // Use NULL Uid since we do not want to receive any requests.
-    // All requests should be handled by MCE.
-    iSip = CSIP::NewL( TUid::Null(), *this );
-    iProfileRegistry = CSIPProfileRegistry::NewL( *iSip, *this );   
-    iProfileAlrController = 
-        CSipProfileAlrController::NewL( *iProfileRegistry , *this );
-    
-    MUS_LOG( "mus: [ENGINE]  <- CMusSipProfileHandler::ConstructL()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CMusSipProfileHandler::~CMusSipProfileHandler()
-    {
-    delete iProfileAlrController;
-    delete iSipProfile;
-    delete iProfileRegistry;
-    delete iSip;
-    MUS_LOG( "mus: [ENGINE]     CMusSipProfileHandler::~CMusSipProfileHandler()" )
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::CreateProfileL( TUint32 aSipProfileId )
-    {
-    CSIPProfile* profile( NULL );
-    if ( aSipProfileId != 0 )
-        {
-        profile = iProfileRegistry->ProfileL( aSipProfileId );
-        }
-    else
-        {
-        profile = iProfileRegistry->DefaultProfileL();
-        }
-       
-    delete iSipProfile;
-    iSipProfile = profile;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CSIPProfile* CMusSipProfileHandler::Profile()
-    {
-    return iSipProfile;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CUri8* CMusSipProfileHandler::UserFromProfileLC()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusSipProfileHandler::UserFromProfileLC()" );
-    
-    __ASSERT_ALWAYS( iSipProfile != NULL, User::Leave( KErrNotReady ) );
-
-    const MDesC8Array* aors = NULL;
-    User::LeaveIfError( iSipProfile->GetParameter( KSIPRegisteredAors, aors ) );
-    __ASSERT_ALWAYS( aors && aors->MdcaCount() > 0, 
-                     User::Leave( KErrArgument ) );
-    
-    TUriParser8 parser;
-    User::LeaveIfError( parser.Parse( aors->MdcaPoint( 0 ) ) );
-    MUS_LOG( "mus: [ENGINE]  <- CMusSipProfileHandler::UserFromProfileLC()" )
-    
-    return CUri8::NewLC( parser );
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::RefreshIapAvailabilities()
-    {
-    TRAP_IGNORE( iProfileAlrController->RefreshIapAvailabilityL( ProfileId() ) )
-    }
-
-
-// -----------------------------------------------------------------------------
-// This function should never be called before creating a profile, but such
-// a situation will be considered as pending registration.
-// -----------------------------------------------------------------------------
-//
-TBool CMusSipProfileHandler::IsRegistered()
-    {
-    MUS_LOG( "mus: [ENGINE]  -> CMusSipProfileHandler::IsRegistered()" )
-    
-    TBool profileRegistered = EFalse;   
-    if ( iSipProfile ) 
-        {
-        iSipProfile->GetParameter( KSIPProfileRegistered, profileRegistered  );  
-        }
-    
-    MUS_LOG1( "mus: [ENGINE]  <- CMusSipProfileHandler::IsRegistered( %d )",
-              profileRegistered )
-    
-    return profileRegistered;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ProfileRegistryEventOccurred(
-    TUint32 aProfileId,
-    MSIPProfileRegistryObserver::TEvent aEvent )
-    {
-    if ( iSipProfile && aProfileId == ProfileId() )
-        {
-        switch ( aEvent )
-            {
-            case MSIPProfileRegistryObserver::EProfileRegistered:
-                {
-                iUser.ProfileRegistered();
-                break;
-                }
-            default:
-                {
-                break;
-                }
-            }
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ProfileRegistryErrorOccurred(
-    TUint32 /*aProfileId*/,
-    TInt /*aError*/)
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::IncomingRequest( 
-    TUint32 /*aIapId*/,
-    CSIPServerTransaction* aTransaction )
-    {
-    // Ownership transferred, should not ever be called by SIP though
-    delete aTransaction; 
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::TimedOut( 
-    CSIPServerTransaction& /*aTransaction*/ )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::IncomingRequest(
-    CSIPServerTransaction* aTransaction )
-    {
-    // Ownership transferred, should not ever be called by SIP though
-    delete aTransaction; 
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::IncomingRequest(
-    CSIPServerTransaction* aTransaction,
-    CSIPDialog& /*aDialog*/)
-    {
-    // Ownership transferred, should not ever be called by SIP though
-    delete aTransaction; 
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::IncomingResponse(
-    CSIPClientTransaction& /*aTransaction*/)
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::IncomingResponse( 
-    CSIPClientTransaction& /*aTransaction*/,
-    CSIPDialogAssocBase& /*aDialogAssoc*/)
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::IncomingResponse( 
-    CSIPClientTransaction& /*aTransaction*/,
-    CSIPInviteDialogAssoc* aDialogAssoc)
-    {
-    // Ownership transferred, should not ever be called by SIP though
-    delete aDialogAssoc;     
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::IncomingResponse( 
-    CSIPClientTransaction& /*aTransaction*/,
-    CSIPRegistrationBinding& /*aRegistration*/ )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ErrorOccured( 
-    TInt /*aError*/,
-    CSIPTransactionBase& /*aTransaction*/ )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ErrorOccured( 
-    TInt /*aError*/,
-    CSIPClientTransaction& /*aTransaction*/,
-    CSIPRegistrationBinding& /*aRegistration*/ )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ErrorOccured( 
-    TInt /*aError*/,
-    CSIPTransactionBase& /*aTransaction*/,
-    CSIPDialogAssocBase& /*aDialogAssoc*/ )                                     
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ErrorOccured( 
-    TInt /*aError*/, 
-    CSIPRefresh& /*aSIPRefresh*/ )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ErrorOccured( 
-    TInt /*aError*/,
-    CSIPRegistrationBinding& /*aRegistration*/ )                                
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ErrorOccured( 
-    TInt /*aError*/,
-    CSIPDialogAssocBase& /*aDialogAssoc*/ )                
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::InviteCompleted( 
-    CSIPClientTransaction& /*aTransaction*/ )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::InviteCanceled( 
-    CSIPServerTransaction& /*aTransaction*/ )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::ConnectionStateChanged( 
-    CSIPConnection::TState /*aState*/ )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CMusSipProfileHandler::AlrEvent
-// From MSipProfileAlrObserver
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::AlrEvent(
-    MSipProfileAlrObserver::TEvent aEvent,
-    TUint32 aProfileId,
-    TUint32 /*aSnapId*/,
-    TUint32 aIapId )
-    {
-    if ( aEvent == MSipProfileAlrObserver::EIapAvailable )
-        {
-        if ( iSipProfile &&
-             aProfileId == ProfileId() &&
-             !iUser.IsRoamingBetweenAPsAllowed() )
-           {
-           // Disallow roaming only if the profile is used by MuS and
-           // the MuS has an ongoing  session 
-           TRAP_IGNORE( 
-               iProfileAlrController->DisallowMigrationL( aProfileId, aIapId ) )
-           }
-       else
-           {
-           // In all other cases allow roaming
-           TRAP_IGNORE( 
-               iProfileAlrController->AllowMigrationL( aProfileId, aIapId ) )
-           }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMusSipProfileHandler::AlrError
-// From MSipProfileAlrObserver
-// -----------------------------------------------------------------------------
-//
-void CMusSipProfileHandler::AlrError(
-    TInt /*aError*/,
-    TUint32 /*aProfileId*/,
-    TUint32 /*aSnapId*/,
-    TUint32 /*aIapId*/ )
-    {
-    // Ignore ALR related errors as they should not happen 
-    // as migration is not allowed when 
-    // the instance of CMusSipProfileHandler exists
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TUint32 CMusSipProfileHandler::ProfileId() const
-    {
-    TUint32 sipProfileId( 0 );
-    if ( iSipProfile )
-        {
-        iSipProfile->GetParameter( KSIPProfileId, sipProfileId );
-        }
-    return sipProfileId;
-    }
--- a/tsrc/musmanagerstub/inc/musmanagerstub.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/musmanagerstub/inc/musmanagerstub.h	Wed Sep 01 12:31:01 2010 +0100
@@ -46,7 +46,6 @@
         {
         ESipOptions = 0x1028238D,
         ESipInviteDesired = 0x10282391,
-        ESipInviteDesired2WayVideo = 0x10282392,
         ESipInviteNotDesired = 0x1028238D
         };
     
--- a/tsrc/mustestapp/data/mustestapp.rss	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file contains all the resources for the AiwTestApp.
-*                Initial content was generated by Series 60 AppWizard.
-*
-*/
-
-// RESOURCE IDENTIFIER
-NAME    AIWT // 4 letter ID
-
-// INCLUDES
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <avkon.loc>
-#include <aiwcommon.rh>
-#include <aiwcommon.hrh>
-#include <appinfo.rh>
-#include <data_caging_paths_strings.hrh>
-
-#include "aiwtestapp.hrh"
-#include "aiwtestapp.loc"
-
-// RESOURCE DEFINITIONS 
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF { buf = "MusTestApp"; }
-
-//----------------------------------------------------
-//   
-//    eik_app_info
-//
-//----------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
-    {
-    hotkeys = r_aiwtest_hotkeys;
-    menubar = r_aiwtest_menubar;
-    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;     
-    }
-
-//----------------------------------------------------
-//   
-//    r_aiwtest_hotkeys
-//
-//----------------------------------------------------
-//
-RESOURCE HOTKEYS r_aiwtest_hotkeys
-    {
-    control =
-        {
-        HOTKEY { command = EAknCmdExit; key='e'; }
-        };
-    }
-
-//----------------------------------------------------
-//   
-//    r_aiwtest_menubar
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_aiwtest_menubar
-    {
-    titles =
-        {
-        MENU_TITLE { menu_pane = r_aiwtest_menu; txt = "File"; }
-        //MENU_TITLE { menu_pane = r_umasettings_main_menu; txt = "File"; }
-        };
-    }
-
-//----------------------------------------------------
-//   
-//    r_aiwtest_menu
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_aiwtest_menu
-    {
-    items =
-        {
-        MENU_ITEM { command = 1000; txt = "Manager: Availability inv."; },
-        MENU_ITEM { command = 1001; txt = "Manager: Start live"; },
-        MENU_ITEM { command = 1002; txt = "Direct: Availability inv."; },
-        MENU_ITEM { command = 100000; txt = "Video Sharing"; cascade = AIW_INTELLIGENT_CASCADE_ID; },      
-        //MENU_ITEM { command = 100001; txt = "Video Sharing"; cascade = AIW_INTELLIGENT_CASCADE_ID| AIW_LOCK_SUBMENU_TITLE; },            
-        MENU_ITEM { command = EAknCmdExit; txt = qtn_options_exit; }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-//   
-// r_core_info_message_query
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_core_info_message_query
-    {
-    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-    items=
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupHeadingPane;
-            id = EAknMessageQueryHeaderId;
-            control = AVKON_HEADING
-                {
-                label = "Core info";
-                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtMessageQuery;
-            id = EAknMessageQueryContentId;
-            control = AVKON_MESSAGE_QUERY
-                {
-                message = "a";
-                };
-            }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-//   
-// r_aiwtest_localisable_app_info
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE LOCALISABLE_APP_INFO r_aiwtest_localisable_app_info
-    {
-    short_caption = "MusTestApp";
-    caption_and_icon = 
-    CAPTION_AND_ICON_INFO
-        {
-        caption = "MusTestApp";
-#ifdef __SCALABLE_ICONS
-        number_of_icons = 1;
-#else
-        number_of_icons = 2;
-#endif
-        };
-    }
-    
-// -----------------------------------------------------------------------------
-//   
-// r_aiwtestapp_submenu
-//
-// -----------------------------------------------------------------------------
-//    
-RESOURCE MENU_PANE r_aiwtestapp_submenu
-    {
-    items =
-        {
-        MENU_ITEM { command = 100000; txt = ""; }
-        };
-    } 
-
-// -----------------------------------------------------------------------------
-//   
-// r_aiwtestapp_interest
-//
-// -----------------------------------------------------------------------------
-// 
-RESOURCE AIW_INTEREST r_aiwtestapp_interest
-    {
-    items =
-        {
-        // This application is interested in printing jpeg images
-        // from menu.   
-        AIW_CRITERIA_ITEM      
-            {
-            id              = 100000;
-            serviceCmd      = KAiwCmdShare;
-            serviceClass    = KAiwClassMenu;
-            contentType     = "*";
-            defaultProvider = 0x10282389;
-            maxProviders    = 1;
-            }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-//   
-// r_aiwtestapp_baseinterest
-//
-// -----------------------------------------------------------------------------
-// 
-RESOURCE AIW_INTEREST r_aiwtestapp_baseinterest
-    {
-    items =
-        {
-        // This application is interested in printing jpeg images
-        // from menu.   
-        AIW_CRITERIA_ITEM      
-            {
-            id              = 100000;
-            serviceCmd      = KAiwCmdShare;
-            serviceClass    = KAiwClassMenu;
-            contentType     = "*";
-            defaultProvider = 0x10282389;
-            maxProviders    = 1;
-            }
-        };
-    }
-
-// End of File
--- a/tsrc/mustestapp/data/mustestapp_reg.rss	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <appinfo.rh>
-#include <mustestapp.rsg>
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x1028239B // Define your application UID here
-
-RESOURCE APP_REGISTRATION_INFO
-    {
-    app_file = "mustestapp";
-    localisable_resource_file = APP_RESOURCE_DIR"\\MusTestApp";
-    localisable_resource_id = R_AIWTEST_LOCALISABLE_APP_INFO;
-    }
-
-// End of File
--- a/tsrc/mustestapp/group/AiwTestApp.mmp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-// To get the APP_LAYER_SYSTEMINCLUDE-definition
-#include <platform_paths.hrh>
-
-#include <bldvariant.hrh>
-#include <data_caging_paths.hrh>
-
-TARGET          musTestApp.exe
-TARGETTYPE      exe
-
-UID             0x100039CE  0x1028239B
-VENDORID        VID_DEFAULT
-CAPABILITY      CAP_APPLICATION
-
-EPOCSTACKSIZE   0xF000
-
-
-
-SOURCEPATH              ../../../common/src
-SOURCE                  muscallmonitor.cpp
-SOURCE                  muscalleventmonitor.cpp
-SOURCE                  musconferencecallmonitor.cpp
-
-SOURCEPATH      ../src
-SOURCE          AiwTestAppApp.cpp 
-SOURCE          AiwTestAppAppUi.cpp
-SOURCE          AiwTestAppContainer.cpp
-SOURCE          AiwTestAppDocument.cpp
-
-
-START RESOURCE  ../data/musTestApp.rss
-HEADER
-TARGETPATH      APP_RESOURCE_DIR
-END
-
-START RESOURCE  ../data/musTestApp_reg.rss
-DEPENDS mustestapp.rsg
-TARGETPATH      /private/10003a3f/apps
-END
-
-
-
-LANG            SC
-
-USERINCLUDE     ../inc
-USERINCLUDE     ../../../common/inc
-
-// Default system include paths for application layer modules.
-APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE
-SYSTEMINCLUDE   /epoc32/include/ecom
-
-//SOURCEPATH    ../data
-//DOCUMENT      AIWTestApp.rss
-//DOCUMENT      AIWTestApp_caption.rss
-
-LIBRARY         apparc.lib
-LIBRARY         avkon.lib
-LIBRARY         bafl.lib
-LIBRARY         cone.lib
-LIBRARY         ecom.lib
-LIBRARY         eikcoctl.lib
-LIBRARY         eikcore.lib 
-LIBRARY         euser.lib
-LIBRARY         fbscli.lib
-LIBRARY         efsrv.lib    
-LIBRARY         aknskins.lib            // for skin background
-LIBRARY         CdlEngine.lib           // for scalable ui
-LIBRARY         ServiceHandler.lib
-LIBRARY         flogger.lib
-LIBRARY         centralrepository.lib 
-LIBRARY                 etel.lib                
-LIBRARY                 etelmm.lib     
-
-LIBRARY         musmanagerclient.lib
-
-// End of File
--- a/tsrc/mustestapp/group/bld.inf	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-PRJ_PLATFORMS
-// Specify the platforms your component needs to be built for here
-DEFAULT
-
-PRJ_EXPORTS
-// Specify the source file followed by its destination here
-// copy will be used to copy the source file to its destination
-// If there's no destination then the source file will be copied
-// to the same name in /epoc32/include
-
-PRJ_MMPFILES
-// Specify the .mmp files required for building the important component
-// releasables.
-//
-// Specify "tidy" if the component you need to build doesn't need to be
-// released. Specify "ignore" if the MMP file exists but should be
-// ignored.
-AiwTestApp.mmp
-
-PRJ_TESTMMPFILES
-// specify the .mmp files required for building any test programs here
-
-PRJ_TESTEXPORTS
-// specify the files to be copied from the source directories to the releasables'
-// directories for use with test programs.
-
-// End of File
--- a/tsrc/mustestapp/group/mce.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-; A package file for creating an installation file for MCE
-
-
-; Supported languages
-&en
-
-#{"MMcomms"},(0x1020286C),2,0,0,TYPE=SA
-
-
-%{"Vendor-EN"}
-:"Nokia"
-
-(0x101F6F88), 0, 0, 0, {"Series60ProductID"}
-
-
-
-; -----------------------------------------------------------------------------------
-
-;MCE DLLs
-; for S60 3.x
-"\epoc32\release\armv5\udeb\mceserver.exe"-"!:\sys\bin\mceserver.exe"
-"\epoc32\release\armv5\udeb\mceclient.dll"-"!:\sys\bin\mceclient.dll"
-"\epoc32\release\armv5\udeb\fcpluginengine.dll"-"!:\sys\bin\fcpluginengine.dll"
-"\epoc32\release\armv5\udeb\MMCCInterface.dll"-"!:\sys\bin\MMCCInterface.dll"
-"\epoc32\release\armv5\udeb\MMCCJitterBuffer.dll"-"!:\sys\bin\MMCCJitterBuffer.dll"
-"\epoc32\release\armv5\udeb\MMCCSubthreads.dll"-"!:\sys\bin\MMCCSubthreads.dll"
-"\epoc32\release\armv5\udeb\FCTBCP.dll"-"!:\sys\bin\FCTBCP.dll"
-"\EPOC32\DATA\Z\Resource\Plugins\FCTBCP.RSC"-"!:\resource\plugins\FCTBCP.RSC"
-
-"\epoc32\release\armv5\udeb\MMCCController.dll"-"!:\sys\bin\MMCCController.dll"
-"\EPOC32\DATA\Z\Resource\Plugins\MMCCController.RSC"-"!:\resource\plugins\MMCCController.RSC"
-"\epoc32\release\armv5\udeb\MMCCRtpSourceSink.dll"-"!:\sys\bin\MMCCRtpSourceSink.dll"
-"\EPOC32\DATA\Z\Resource\Plugins\MMCCRtpSourceSink.RSC"-"!:\resource\plugins\MMCCRtpSourceSink.RSC"
-"\epoc32\release\armv5\udeb\MMCCAmrPlFormat.dll"-"!:\sys\bin\MMCCAmrPlFormat.dll"
-"\EPOC32\DATA\Z\Resource\Plugins\MMCCAmrPlFormat.RSC"-"!:\resource\plugins\MMCCAmrPlFormat.RSC"
-"\epoc32\release\armv5\udeb\MMCCRedPlFormat.dll"-"!:\sys\bin\MMCCRedPlFormat.dll"
-"\EPOC32\DATA\Z\Resource\Plugins\MMCCRedPlFormat.RSC"-"!:\resource\plugins\MMCCRedPlFormat.RSC"
-"\epoc32\release\armv5\udeb\MMCCDtmfPlFormat.dll"-"!:\sys\bin\MMCCDtmfPlFormat.dll"
-"\EPOC32\DATA\Z\Resource\Plugins\MMCCDtmfPlFormat.RSC"-"!:\resource\plugins\MMCCDtmfPlFormat.RSC"
-"\epoc32\release\armv5\udeb\MMCCG711PlFormat.dll"-"!:\sys\bin\MMCCG711PlFormat.dll"
-"\EPOC32\DATA\Z\Resource\Plugins\MMCCG711PlFormat.RSC"-"!:\resource\plugins\MMCCG711PlFormat.RSC"
--- a/tsrc/mustestapp/inc/AiwTestApp.hrh	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file contains declarations for constants of AiwTestApp.
-*                The file can be included in C++ or resource file.
-*                Initial content was generated by Series 60 AppWizard.
-*
-*/
-
-#ifndef AIWTESTAPP_HRH
-#define AIWTESTAPP_HRH
-
-enum TAiwTestAppCommandIds
-    {
-    EAiwTestAppCmdBATTest = 1,
-    EAiwTestAppCmdSetLanguage,
-    EAiwTestAppCmdSetInputMode,
-    EAiwTestAppCmdCoreInfo,
-    EAiwTestAppCmdChangeCore,
-    EAiwTestAppCmdEngineInfo
-    };
-
-#endif // AIWTESTAPP_HRH
--- a/tsrc/mustestapp/inc/AiwTestApp.loc	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is a localisation file for AiwTestApp.
-*                A loc file is the one and only place where the logical strings
-*                to be localised are defined. 
-*                Initial content was generated by Series 60 AppWizard.
-*
-*/
-
-
-// LOCALISATION STRINGS
-
-// d:Command in options menu.
-// d:Example application spesific command.
-// l:list_single_popup_submenu_pane_1
-//
-#define qtn_appl_test "Test"
-
-// d:Example caption string for app.
-//
-#define qtn_app_caption_string ""
-
-// d:Example short caption string for app.
-//
-#define qtn_app_short_caption_string ""
-
-// End of File
--- a/tsrc/mustestapp/inc/AiwTestAppApp.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares main application class.
-*
-*/
-
-#ifndef AIWTESTAPP_H
-#define AIWTESTAPP_H
-
-// INCLUDES
-#include <aknapp.h>
-
-// CONSTANTS
-// UID of the application
-const TUid KUidAiwTestApp = { 0x1028239B };
-
-// CLASS DECLARATION
-
-/**
-* CAiwTestApp application class.
-* Provides factory to create concrete document object.
-* 
-*/
-class CAiwTestApp : public CAknApplication
-    {
-    public: // Functions from base classes
-
-    private:
-        /**
-        * From CApaApplication, creates CAiwTestAppDocument document object.
-        * @return A pointer to the created document object.
-        */
-        CApaDocument* CreateDocumentL();
-        
-        /**
-        * From CApaApplication, returns application's UID (KUidAiwTestApp).
-        * @return The value of KUidAiwTestApp.
-        */
-        TUid AppDllUid() const;
-    };
-
-#endif
-
-// End of File
-
--- a/tsrc/mustestapp/inc/AiwTestAppAppUi.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares UI class for application.
-*
-*/
-
-#ifndef AIWTESTAPPUI_H
-#define AIWTESTAPPUI_H
-
-// INCLUDES
-#include "musavaobserver.h"
-#include "muscallmonitorobserver.h"
-
-#include <eikapp.h>
-#include <eikdoc.h>
-#include <e32std.h>
-#include <coeccntx.h>
-#include <aknappui.h>
-
-
-// FORWARD DECLARATIONS
-class CAiwTestContainer;
-class CAiwServiceHandler;
-class CMusManager;
-class CMusAvaInterface;
-class CMusCallMonitor;
-
-// CLASS DECLARATION
-
-/**
-* Application UI class.
-* Provides support for the following features:
-* - EIKON control architecture
-*/
-class CAiwTestAppUi : public CAknAppUi, public MMusAvaObserver,
-                      public MMusCallMonitorObserver
-    {
-    public: // Constructors and destructor
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */    
-        void ConstructL();
-
-        /**
-        * Destructor.
-        */      
-        virtual ~CAiwTestAppUi();
-        
-    public: // New functions
-    public: // Functions from base classes
-
-     void AvailabilityState( TAvailabilityState aState, 
-                                              TAvailabilityStatus aStatus,
-                                              TAvailabilityName aName );
-    
-
-    void StopComplete();
-
-
-    void CallConnectedL( const TDesC& /*aTelNumber*/, TBool /*aIsSipUri*/ ) 
-        {
-        }
-    
-    void CallHold( const TDesC& /*aTelNumber*/, TBool /*aIsSipUri*/ )
-        {
-        }
-    
-    void ConferenceCallL()
-        {
-        }
-    
-    void NoActiveCallL()
-        {
-        }
-    
-
-    private: 
-        /**
-        * From MEikMenuObserver, dynamically initialises a menu pane.
-        * @param aResourceId The menu's ID.
-        * @param aMenuPane The in-memory representation of the menu pane.
-        */
-        void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
-
-    private:
-        /**
-        * From CEikAppUi, takes care of command handling.
-        * @param aCommand command to be handled
-        */
-        void HandleCommandL(TInt aCommand);
-
-        /**
-        * From CEikAppUi, handles key events.
-        * @param aKeyEvent Event to handled.
-        * @param aType Type of the key event. 
-        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
-        */
-        virtual TKeyResponse HandleKeyEventL(
-            const TKeyEvent& aKeyEvent,TEventCode aType);
-    
-    private:        
-        CAiwTestContainer* iAppContainer;  
-        CAiwServiceHandler* iServiceHandler;        
-        
-        CMusManager* iManager;    
-        CMusAvaInterface* iPlugin;
-        TAvailabilityStatus iMinimumStatus;
-        TAvailabilityStatus iMandatoryStatus;
-        TAvailabilityStatus iExtensionStatus;
-        
-        CMusCallMonitor* iCallMonitor;
-    };
-
-#endif
-
-// End of File
--- a/tsrc/mustestapp/inc/AiwTestAppContainer.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares container control for application.
-*
-*/
-
-#ifndef AIWTESTCONTAINER_H
-#define AIWTESTCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-   
-// FORWARD DECLARATIONS
-class CEikLabel; // for example labels
-
-// CLASS DECLARATION
-
-/**
-*  CAiwTestContainer  container control class.
-*/
-class CAiwTestContainer : public CCoeControl, MCoeControlObserver
-    {
-    public: // Constructors and destructor
-        /**
-        * EPOC default constructor.
-        * @param aRect Frame rectangle for container.
-        */
-        void ConstructL(const TRect& aRect);
-
-        /**
-        * Destructor.
-        */
-        virtual ~CAiwTestContainer();
-
-        void SetLabelL(TDesC& aText);
-        
-    public: // New functions
-
-    public: // Functions from base classes
-
-    private: // Functions from base classes
-
-       /**
-        * From CoeControl,SizeChanged.
-        */
-        void SizeChanged();
-
-       /**
-        * From CoeControl,CountComponentControls.
-        */
-        TInt CountComponentControls() const;
-
-       /**
-        * From CCoeControl,ComponentControl.
-        */
-        CCoeControl* ComponentControl(TInt aIndex) const;
-
-       /**
-        * From CCoeControl,Draw.
-        */
-        void Draw(const TRect& aRect) const;
-        
-        /**
-        * From MCoeControlObserver
-        * Acts upon changes in the hosted control's state. 
-        *
-        * @param    aControl    The control changing its state
-        * @param    aEventType  The type of control event 
-        */
-        void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
-                
-    private: //data
-        
-        CEikLabel* iLabel;          // example label
-        CEikLabel* iToDoLabel;      // example label        
-    };
-
-#endif
-
-// End of File
--- a/tsrc/mustestapp/inc/AiwTestAppDocument.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares document for application.
-*
-*/
-
-#ifndef AIWTESTDOCUMENT_H
-#define AIWTESTDOCUMENT_H
-
-// INCLUDES
-#include <akndoc.h>
-   
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CEikAppUi;
-
-// CLASS DECLARATION
-
-/**
-*  CAiwTestDocument application class.
-*/
-class CAiwTestDocument : public CAknDocument
-    {
-    public: // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        */
-        static CAiwTestDocument* NewL(CEikApplication& aApp);
-
-        /**
-        * Destructor.
-        */
-        virtual ~CAiwTestDocument();
-
-    public: // New functions
-    public: // Functions from base classes
-    protected:  // New functions
-    protected:  // Functions from base classes
-
-    private:
-        /**
-        * C++ default constructor.
-        */
-        CAiwTestDocument(CEikApplication& aApp);
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */        
-        void ConstructL();
-
-    private:
-        /**
-        * From CEikDocument, create CAiwTestAppUi "App UI" object.
-        */
-        CEikAppUi* CreateAppUiL();
-    };
-
-#endif
-
-// End of File
-
--- a/tsrc/mustestapp/install/AIWTestApp_3x.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-;
-; Installation file for AIWTestApp application
-;
-;Languages
-&EN
-;
-; UID is the app's UID
-;
-#{"AIWTestApp"},(0x102072D1),1,0,0
-;
-; List of localised vendor names
-%{"Vendor-EN"}
-
-; The non-localised, globally unique vendor name (mandatory)
-:"Nokia OY"
-;Supports Series 60 v 3.x
-;This line indicates that this installation is for the Series 60 platform v3.x
-;This line must appear _exactly_ as shown below in the sis file
-;If this line is missing or incorrect, the sis file will not be able
-;to be installed on Series 60 v3.x platforms
-(0x101F7961), 0, 0, 0, {"Series60ProductID"}
-;
-; Three files to install
-;
-"\epoc32\release\armv5\urel\AIWTestApp.exe"                   -"!:\sys\bin\AIWTestApp.exe"
-"\epoc32\data\z\Resource\apps\AIWTestApp.rsc"                 -"!:\resource\apps\AIWTestApp.rsc"
-"\epoc32\data\Z\private\10003a3f\apps\AiwTestApp_reg.rsc"     -"!:\private\10003a3f\import\apps\AiwTestApp_reg.rsc"
-
-
--- a/tsrc/mustestapp/install/mustestapp.pkg	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-;
-; Installation file for AIWTestApp application
-;
-;Languages
-&EN
-;
-; UID is the app's UID
-;
-#{"AIWTestApp"},(0x102072D1),1,0,0
-;
-; List of localised vendor names
-%{"Vendor-EN"}
-
-; The non-localised, globally unique vendor name (mandatory)
-:"Nokia OY"
-;Supports Series 60 v 3.x
-;This line indicates that this installation is for the Series 60 platform v3.x
-;This line must appear _exactly_ as shown below in the sis file
-;If this line is missing or incorrect, the sis file will not be able
-;to be installed on Series 60 v3.x platforms
-(0x101F7961), 0, 0, 0, {"Series60ProductID"}
-;
-; Three files to install
-;
-"\epoc32\release\armv5\udeb\aiwTestApp.exe"                   -"!:\sys\bin\AIWTestApp.exe"
-"\epoc32\data\z\Resource\apps\aiwTestApp.rsc"                 -"!:\resource\apps\AIWTestApp.rsc"
-"\epoc32\data\Z\private\10003a3f\apps\AiwTestApp_reg.rsc"     -"!:\private\10003a3f\import\apps\AiwTestApp_reg.rsc"
-
-
-"\epoc32\release\armv5\urel\musui.app"-"!:\system\apps\About\About.app"
-"\epoc32\release\armv5\urel\musui.rsc"-"!:\system\apps\About\About.rsc"
-"\epoc32\release\armv5\urel\musui_caption.rsc"-"!:\system\apps\About\About_caption.rsc"
-"\epoc32\release\armv5\urel\musui.aif"-"!:\system\apps\About\About.aif"
-"\epoc32\release\armv5\urel\musui.mbm"-"!:\system\apps\About\About.mbm"
-
-"\epoc32\release\armv5\udeb\
-
--- a/tsrc/mustestapp/src/AiwTestAppApp.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-// INCLUDE FILES
-#include <eikstart.h>
-#include "aiwtestappapp.h"
-#include "aiwtestappdocument.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CAiwTestApp::AppDllUid()
-// Returns application UID
-// ---------------------------------------------------------
-//
-TUid CAiwTestApp::AppDllUid() const
-    {
-    return KUidAiwTestApp;
-    }
-   
-// ---------------------------------------------------------
-// CAiwTestApp::CreateDocumentL()
-// Creates CAiwTestDocument object
-// ---------------------------------------------------------
-//
-CApaDocument* CAiwTestApp::CreateDocumentL()
-    {
-    return CAiwTestDocument::NewL( *this );
-    }
-
-LOCAL_C CApaApplication* NewApplication()
-    {
-    return new CAiwTestApp;
-    }
-
-// ---------------------------------------------------------
-// E32Main()
-// Main startup entry point
-// Returns: KErrNone
-// ---------------------------------------------------------
-//
-GLDEF_C TInt E32Main()
-    {
-    return EikStart::RunApplication(NewApplication);
-    }
-
-// End of File  
-
--- a/tsrc/mustestapp/src/AiwTestAppAppUi.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-// INCLUDE FILES
-#include "aiwtestappappui.h"
-#include "aiwtestappcontainer.h" 
-#include "musmanager.h"
-#include <mustestapp.rsg>
-#include "aiwtestapp.hrh"
-#include "musresourceproperties.h"
-#include "musavainterface.h"
-#include "muscallmonitor.h"
-
-#include <e32property.h>
-#include <flogger.h>
-#include <e32math.h>
-
-#include <avkon.hrh>
-#include <aknutils.h>
-
-#include <aknmessagequerydialog.h>
-#include <aknquerydialog.h>
-
-#include <aiwservicehandler.h>
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ----------------------------------------------------------
-// CAiwTestAppUi::ConstructL()
-// 
-// ----------------------------------------------------------
-//
-void CAiwTestAppUi::ConstructL()
-    {
-    BaseConstructL();
-
-    iPlugin = NULL;
-
-    // Creates a container object and adds it to the application's control stack.
-    iAppContainer = new (ELeave) CAiwTestContainer;
-    iAppContainer->SetMopParent( this );
-    iAppContainer->ConstructL( ClientRect() );
-    AddToStackL( iAppContainer );
-
-    // Create service handler instance.    
-    iServiceHandler = CAiwServiceHandler::NewL();
- 
-    // Attach menu service interests to AIW framework.
-    iServiceHandler->AttachMenuL(R_AIWTEST_MENU, R_AIWTESTAPP_INTEREST);
-    //iServiceHandler->AttachMenuL(R_UMASETTINGS_MAIN_MENU, R_UMASETTINGSUI_INTEREST);    
-    
-    // Attach base service interests to AIW framework.
-    iServiceHandler->AttachL(R_AIWTESTAPP_BASEINTEREST);
-
-    iManager = CMusManager::NewL();
-
-          RProperty::Define( NMusResourceApi::KCategoryUid, 
-                                         NMusResourceApi::KCameraAvailability, 
-                                         RProperty::EInt); 
-
-            // 2. keypad property
-           RProperty::Define( NMusResourceApi::KCategoryUid, 
-                               NMusResourceApi::KKeypadAvailability, 
-                               RProperty::EInt );
-
-            // 3. video player property
-           RProperty::Define( NMusResourceApi::KCategoryUid, 
-                               NMusResourceApi::KVideoPlayerAvailability, 
-                               RProperty::EInt 
-                               );
-
-            RProperty::Set( NMusResourceApi::KCategoryUid, 
-                               NMusResourceApi::KCameraAvailability, 
-                               ( TInt ) NMusResourceApi::EAvailable );
-
-            // 2. keypad property
-           RProperty::Set( NMusResourceApi::KCategoryUid, 
-                               NMusResourceApi::KKeypadAvailability, 
-                               ( TInt ) NMusResourceApi::EAvailable );
-
-            // 3. video player property
-           RProperty::Set( NMusResourceApi::KCategoryUid, 
-                               NMusResourceApi::KVideoPlayerAvailability, 
-                               ( TInt ) NMusResourceApi::EAvailable );
-
-    // Next line is an example of how to use base service commands.
-    //iServiceHandler->ExecuteServiceCmdL(4, iServiceHandler->InParamListL(),
-    //    iServiceHandler->OutParamListL());
-    }
-
-// ----------------------------------------------------
-// CAiwTestAppUi::~CAiwTestAppUi()
-// Destructor
-// Frees reserved resources
-// ----------------------------------------------------
-//
-CAiwTestAppUi::~CAiwTestAppUi()
-    {
-    delete iServiceHandler; 
-    
-    if (iAppContainer)
-        {
-        RemoveFromStack( iAppContainer );
-        delete iAppContainer;
-        }
-    
-    if ( iPlugin )
-        {
-        iPlugin->StopL();
-        delete iPlugin;
-        }
-    
-   iManager->StopApplicationL();
-    
-    delete iManager;
-    }
-
-// ------------------------------------------------------------------------------
-// CAiwTestAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
-// This function is called by the EIKON framework just before it displays
-// a menu pane. Its default implementation is empty, and by overriding it,
-// the application can set the state of menu items dynamically according
-// to the state of application data.
-// ------------------------------------------------------------------------------
-//
-void CAiwTestAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
-    {
-    if (iServiceHandler->HandleSubmenuL(*aMenuPane))
-        {
-        return;
-        }
-          
-    if (iServiceHandler->IsAiwMenu(aResourceId))
-        {
-        TFileName filename(_L("image.jpg")); // This is just an axample of how to fill param list.
-        TAiwVariant variant(filename);
-        TAiwGenericParam param(EGenericParamFile, variant);
-        CAiwGenericParamList& inList = iServiceHandler->InParamListL();
-        inList.AppendL(param);  
-
-        iServiceHandler->InitializeMenuPaneL(*aMenuPane, aResourceId, 5000, 
-            iServiceHandler->InParamListL());        
-        }    
-    }
-
-// ----------------------------------------------------
-// CAiwTestAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, 
-//     TEventCode aType)
-// Takes care of key event handling.
-// ----------------------------------------------------
-//
-TKeyResponse CAiwTestAppUi::HandleKeyEventL(const TKeyEvent& /*aKeyEvent*/,
-    TEventCode /*aType*/)
-    {
-    return EKeyWasNotConsumed;
-    }
-
-// ----------------------------------------------------
-// CAiwTestAppUi::HandleCommandL(TInt aCommand)
-// Takes care of command handling.
-// ----------------------------------------------------
-//
-void CAiwTestAppUi::HandleCommandL(TInt aCommand)
-    {
-    switch ( aCommand )
-        {
-        case EAknSoftkeyBack:  // fallthrough
-        case EEikCmdExit:
-            {
-            RDebug::Print(_L("This is a debug message - Exit"));
-            Exit();
-            break;
-            }
-        case EAiwTestAppCmdBATTest:
-            {
-            break;
-            }
-        case EAiwTestAppCmdCoreInfo:
-            {
-            break;
-            }
-        case EAiwTestAppCmdEngineInfo:
-            {
-            break;
-            }
-        case 1000:     // 'Testi' menu item.
-            {
-
-            iManager->ExamineAvailabilityL();
-            }
-            break;
-           
-            
-           
-        case 1001:
-                {
-       
-                iManager->StartApplicationL( MultimediaSharing::EMusLiveVideo );
-              
-                }
-            break;
-        case 1002:
-                {
-                iPlugin = CMusAvaInterface::NewL();
-                iPlugin->SetObserver( *this );
-                
-                iPlugin->StartL();
-                //iCallMonitor = CMusCallMonitor::NewL( *this );
-                //iCallMonitor->StartMonitoringL();
-                
-                
-                
-                }
-            break;
-        default:
-            {
-
-            
-            CAiwGenericParamList& in = iServiceHandler->InParamListL();
-            // in.AppendL(param);
-
-            // Executes menu service command.
-            iServiceHandler->ExecuteMenuCmdL(aCommand, in, iServiceHandler->OutParamListL());
-
-            //CleanupStack::PopAndDestroy(2);
-            }
-            break;      
-        }
-    }
-
-     void CAiwTestAppUi::AvailabilityState( TAvailabilityState aState, 
-                                              TAvailabilityStatus aStatus,
-                                              TAvailabilityName aName )
-        {
-        if( aState == EMusAvaMinimum )
-            iMinimumStatus = aStatus;
-        else if( aState == EMusAvaMandatory )
-            iMandatoryStatus = aStatus;
-        else if( aState == EMusAvaExtension )
-            iExtensionStatus = aStatus;
-        }
-    
-
-    void CAiwTestAppUi::StopComplete()
-        {
-        
-        }
-
-
-// End of File  
--- a/tsrc/mustestapp/src/AiwTestAppContainer.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-// INCLUDE FILES
-#include "aiwtestappcontainer.h"
-#include <eikenv.h>
-#include <eiklabel.h>  // for example label control
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CAiwTestContainer::ConstructL(const TRect& aRect)
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------
-//
-void CAiwTestContainer::ConstructL(const TRect& aRect)
-    {
-    CreateWindowL();
-
-    iLabel = new (ELeave) CEikLabel;
-    iLabel->SetContainerWindowL( *this );
-    iLabel->SetTextL( _L("Label") );
-
-    iToDoLabel = new (ELeave) CEikLabel;
-    iToDoLabel->SetContainerWindowL( *this );
-    iToDoLabel->SetTextL( _L("TodoLabel") );
-
-    SetRect(aRect);
-    ActivateL();
-    }
-
-// ---------------------------------------------------------
-// CAiwTestContainer::~CAiwTestContainer()
-// Destructor
-// ---------------------------------------------------------
-//
-CAiwTestContainer::~CAiwTestContainer()
-    {
-    delete iLabel;
-    delete iToDoLabel;
-    }
-
-// ---------------------------------------------------------
-// CAiwTestContainer::SetLabelL(TDesC& aText)
-// ---------------------------------------------------------
-//
-void CAiwTestContainer::SetLabelL(TDesC& /*aText*/)
-    {
-    }
-
-// ---------------------------------------------------------
-// CAiwTestContainer::SizeChanged()
-// Called by framework when the view size is changed
-// ---------------------------------------------------------
-//
-void CAiwTestContainer::SizeChanged()
-    {
-    }
-
-// ---------------------------------------------------------
-// CAiwTestContainer::CountComponentControls() const
-// ---------------------------------------------------------
-//
-TInt CAiwTestContainer::CountComponentControls() const
-    {
-    return 2; // return nbr of controls inside this container
-    }
-
-// ---------------------------------------------------------
-// CAiwTestContainer::ComponentControl(TInt aIndex) const
-// ---------------------------------------------------------
-//
-CCoeControl* CAiwTestContainer::ComponentControl(TInt aIndex) const
-    {
-    switch ( aIndex )
-        {
-        case 0:
-            return iLabel;
-        case 1:
-            return iToDoLabel;
-        default: 
-            return NULL;
-        }
-    }
-
-// ---------------------------------------------------------
-// CAiwTestContainer::Draw(const TRect& aRect) const
-// ---------------------------------------------------------
-//
-void CAiwTestContainer::Draw(const TRect& aRect) const
-    {
-    CWindowGc& gc = SystemGc();
-    
-    gc.SetPenStyle( CGraphicsContext::ENullPen ); 
-    gc.SetBrushColor( KRgbGray );
-    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-    
-    gc.DrawRect( aRect );      
-    }
-
-// ---------------------------------------------------------
-// CAiwTestContainer::HandleControlEventL(CCoeControl* aControl, 
-//    TCoeEvent aEventType)
-// ---------------------------------------------------------
-//
-void CAiwTestContainer::HandleControlEventL(CCoeControl* /*aControl*/, 
-    TCoeEvent /*aEventType*/)
-    {
-    // TODO: Add your control event handler code here
-    }
-    
-// End of File  
--- a/tsrc/mustestapp/src/AiwTestAppDocument.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-// INCLUDE FILES
-#include "aiwtestappdocument.h"
-#include "aiwtestappappui.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// -----------------------------------------------------------------------------
-// CAiwTestDocument::CAiwTestDocument(CEikApplication& aApp)
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CAiwTestDocument::CAiwTestDocument(CEikApplication& aApp)
-: CAknDocument(aApp)    
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CAiwTestDocument::~CAiwTestDocument()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CAiwTestDocument::~CAiwTestDocument()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CAiwTestDocument::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CAiwTestDocument::ConstructL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CAiwTestDocument::NewL(CEikApplication& aApp)
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CAiwTestDocument* CAiwTestDocument::NewL(CEikApplication& aApp)     // CAiwTestApp reference
-    {
-    CAiwTestDocument* self = new (ELeave) CAiwTestDocument( aApp );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-    
-// ----------------------------------------------------
-// CAiwTestDocument::CreateAppUiL()
-// Constructs CAiwTestAppUi.
-// ----------------------------------------------------
-//
-CEikAppUi* CAiwTestDocument::CreateAppUiL()
-    {
-    return new (ELeave) CAiwTestAppUi;
-    }
-
-// End of File  
--- a/tsrc/propertystub/src/e32property.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/propertystub/src/e32property.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -16,18 +16,12 @@
 */
 
 #include "e32property.h"
-#include "mussessionproperties.h"
-#include "mussesseioninformationapi.h"
 #include <e32cmn.h>
 
 static RArray<TUint> iIntProperty;
 static TInt iErrorCode = KErrNone;
 static RProperty::TPropertyCalledFunctions iCalledFunction = RProperty::ENone;
-// Large enough to store maximum length descriptor for RProperty
-static TBuf<RProperty::KMaxPropertySize> iString = KNullDesC();
-static TBuf<RProperty::KMaxPropertySize> iVideoCodecList = KNullDesC();
-static TBuf<RProperty::KMaxPropertySize> iSessionRecipient = KNullDesC();
-static TBuf<RProperty::KMaxPropertySize> iEngineName = KNullDesC();
+static TName iString = KNullDesC();
 static TInt iValue = KErrNotFound;
 
 
@@ -84,7 +78,6 @@
     return error;
     }
 
-
 TInt RProperty::Get( TUid /*aCategory*/, TUint /*aKey*/, TDes8& aValue)
     {
     // This is not widely used in Mush , so who cares in stub.
@@ -92,26 +85,10 @@
     return iErrorCode;
     }
 
-
-TInt RProperty::Get( TUid /*aCategory*/, TUint aKey, TDes16& aValue )
+TInt RProperty::Get( TUid /*aCategory*/, TUint /*aKey*/, TDes16& aValue )
     {
-    if ( aKey == NMusSessionInformationApi::KMUSCallProvider )
-         {
-         aValue = iEngineName;
-         }
-    else if ( aKey == NMusSessionApi::KVideoCodecs )
-        {
-        aValue = iVideoCodecList;
-        }
-    else if ( aKey == NMusSessionApi::KRemoteSipAddress )
-        {
-        aValue = iSessionRecipient;
-        }
-    else
-        {
-        aValue = iString;
-        }
-    
+    // This is not widely used in Mush , so who cares in stub.
+    aValue = iString;
     return iErrorCode;
     }
 
@@ -141,27 +118,10 @@
     return iErrorCode;
     }
 
-
-TInt RProperty::Set( TUid /*aCategory*/, TUint aKey, const TDesC& aValue )
+TInt RProperty::Set( TUid /*aCategory*/, TUint /*aKey*/, const TDesC& aValue )
     {
-
-    if ( aKey == NMusSessionInformationApi::KMUSCallProvider )
-        {
-        iEngineName = aValue;
-        }
-    
-    else if ( aKey == NMusSessionApi::KVideoCodecs )
-        {
-        iVideoCodecList = aValue;
-        }
-    else if ( aKey == NMusSessionApi::KRemoteSipAddress )
-        {
-        iSessionRecipient = aValue;
-        }
-    else
-        {
-        iString = aValue;
-        }
+    // This is not widely used in Mush , so who cares in stub.
+    iString = aValue;
     return iErrorCode;
     }
 
@@ -233,7 +193,7 @@
     iErrorCode = KErrNone;
     iCalledFunction = RProperty::ENone;
     iString = KNullDesC();
-    iEngineName = KNullDesC();
     iValue = KErrNotFound;
     }
 
+
--- a/tsrc/qtestutils/inc/testresultxmlparser.h	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef TESTRESULTXMLPARSER_H
-#define TESTRESULTXMLPARSER_H
-
-#include <QXmlDefaultHandler>
-
-
-class TestResultXmlParser : public QXmlDefaultHandler
-{
-public: // Constructors and destructor
-    TestResultXmlParser();
-    ~TestResultXmlParser();    
-    
-public: // From QXmlContentHandler 
-    bool startElement(
-        const QString& namespaceURI,
-        const QString& localName,
-        const QString& qName,
-        const QXmlAttributes& atts);
-    
-    bool endElement(
-        const QString& namespaceURI,
-        const QString& localName,
-        const QString& qName);
-    
-    bool characters(const QString& ch);
-       
-public: // New functions
-    
-    int parse(const QString& fileName);
-    
-    int parseAndPrintResults(
-        const QString& fileName,
-        bool printDetails=false);
-    
-    int testCount();
-    
-    QStringList errors();
-    
-private: // Data
-    int mTestCount;
-    QStringList* mErrors;
-    bool mParsingIncidentElement;
-    bool mParsingDescriptionElement;
-    bool mCurrentTestFailed;
-    QString mCurrentTestName;
-    QString mCurrentTestFile;
-    int mCurrentTestFailureLine;
-};
-
-
-#endif // TESTRESULTXMLPARSER_H
--- a/tsrc/qtestutils/src/testresultxmlparser.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "testresultxmlparser.h" 
-#include <stdio.h>
-
-const char testFunctionElement[] = "TestFunction";
-const char incidentElement[] = "Incident";
-const char descriptionElement[] = "Description";
-const char nameAttr[] = "name";
-const char typeAttr[] = "type";
-const char fileAttr[] = "file";
-const char lineAttr[] = "line";
-const char attrValueFail[] = "fail";
-
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::TestResultXmlParser
-// -----------------------------------------------------------------------------
-//
-TestResultXmlParser::TestResultXmlParser() 
-: mTestCount(0), 
-  mParsingIncidentElement(false),
-  mParsingDescriptionElement(false),
-  mCurrentTestFailed(false),
-  mCurrentTestFailureLine(0)
-{
-    mErrors = new QStringList;
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::TestResultXmlParser
-// -----------------------------------------------------------------------------
-//
-TestResultXmlParser::~TestResultXmlParser()
-{
-    delete mErrors;   
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::startElement
-// -----------------------------------------------------------------------------
-//
-bool TestResultXmlParser::startElement(
-    const QString& /*namespaceURI*/, 
-    const QString& /*localName*/, 
-    const QString& qName, 
-    const QXmlAttributes& atts)
-{
-    if (qName == testFunctionElement) {
-        mTestCount++;
-        mCurrentTestName = atts.value(nameAttr);
-        return true;
-    }
-    if (qName == incidentElement) {
-        mParsingIncidentElement = true;
-        if (atts.value(typeAttr) == attrValueFail) {
-            mCurrentTestFailed = true;
-            mCurrentTestFile = atts.value(fileAttr);
-            mCurrentTestFailureLine = atts.value(lineAttr).toInt();
-        }
-        return true;
-    }
-    mParsingDescriptionElement = (qName == descriptionElement);
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::endElement
-// -----------------------------------------------------------------------------
-//
-bool TestResultXmlParser::endElement(
-    const QString& /*namespaceURI*/,
-    const QString& /*localName*/,
-    const QString& qName)
-{
-    if (qName == incidentElement) {
-        mParsingIncidentElement = false;
-        mCurrentTestFailed = false;
-        return true;
-    }
-    if (qName == descriptionElement) {
-        mParsingDescriptionElement = false;
-    }    
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::characters
-// -----------------------------------------------------------------------------
-//
-bool TestResultXmlParser::characters(const QString& ch)
-{
-    if (mParsingIncidentElement && 
-        mParsingDescriptionElement &&
-        mCurrentTestFailed) {
-        QString testResult = mCurrentTestName + " failed:\n";
-        testResult += "File: ";
-        testResult += mCurrentTestFile;
-        testResult += "\n";
-        testResult += "Line: ";
-        testResult += QString::number(mCurrentTestFailureLine);
-        testResult += "\n";
-        testResult += "Reason: ";
-        testResult += ch;
-        testResult += "\n";
-        mErrors->append(testResult);
-    }
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::parse
-// -----------------------------------------------------------------------------
-//
-int TestResultXmlParser::parse(const QString& fileName)
-{
-    QFile file(fileName);
-    QXmlInputSource inputSource(&file);
-    QXmlSimpleReader reader;
-    reader.setContentHandler(this);
-    return reader.parse(inputSource);
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::parseAndPrintResults
-// -----------------------------------------------------------------------------
-//
-int TestResultXmlParser::parseAndPrintResults(
-    const QString& fileName,
-    bool printDetails)
-{
-    printf("Parsing: %s\n", fileName.toUtf8().data());
-    int error = parse(fileName);
-    printf("%d tests executed. Failed total: %d\n", mTestCount, mErrors->count());
-    if (printDetails) {
-        printf("\n");
-        foreach(QString error, *mErrors) {
-            printf(error.toUtf8().data());
-            printf("\n");
-        }
-    }
-    return error;
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::testCount
-// -----------------------------------------------------------------------------
-//
-int TestResultXmlParser::testCount()
-{
-    return mTestCount;
-}
-
-// -----------------------------------------------------------------------------
-// TestResultXmlParser::errors
-// -----------------------------------------------------------------------------
-//
-QStringList TestResultXmlParser::errors()
-{
-    return *mErrors;
-}
-
-// End of File.
--- a/tsrc/telephonyaudioroutingstub/inc/telephonyaudiorouting.h	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/telephonyaudioroutingstub/inc/telephonyaudiorouting.h	Wed Sep 01 12:31:01 2010 +0100
@@ -56,7 +56,7 @@
         static CTelephonyAudioRouting* NewL(
                             MTelephonyAudioRoutingObserver& aObserver );
                             
-        ~CTelephonyAudioRouting();
+        virtual ~CTelephonyAudioRouting();
 
         /**
         * Returns array of currently available outputs.
@@ -74,7 +74,7 @@
         * @param none.
         * @return TArray<TAudioOutput>& Array of available outputs.
         */     
-        const TArray<TAudioOutput>& AvailableOutputs();
+        virtual const TArray<TAudioOutput>& AvailableOutputs();
 
         /**
         * Returns the current output configured by the client application to play
@@ -94,7 +94,7 @@
         * @param none.
         * @return TAudioOutput Current output.
         */       
-        TAudioOutput Output();
+        virtual TAudioOutput Output();
 
         /**
         * Sends an asynchronous request to Adaptation to set the output
@@ -118,7 +118,7 @@
         *           of the outputs from AvailableOutputs() list or ENotActive.
         * @return none.
         */
-        void SetOutputL( TAudioOutput aOutput = ENotActive );
+        virtual void SetOutputL( TAudioOutput aOutput = ENotActive );
         
         /**
         * Returns the second last output that was successfully configured to
@@ -137,7 +137,7 @@
         *           audio. ENone will never be returned since telephony apps cannot call
         *           SetOutputL(ENone).
         */
-        TAudioOutput PreviousOutput();
+        virtual TAudioOutput PreviousOutput();
 
         /*
         * Sends the Show Note mode to server along with the next SetOutputL()
@@ -155,7 +155,7 @@
         * @param TBool aMode Show Note mode. ETrue or EFalse.
         * @return KErrNone if succesfull, otherwise system-wide error code.
         */
-        TInt SetShowNote( TBool aMode );
+        virtual TInt SetShowNote( TBool aMode );
         
         /*
         * Returns the the Show Note mode for the last succesfully completed
@@ -182,7 +182,7 @@
         *        Show Note mode. EFalse or ETrue.
         * @return KErrNone if succesfull, otherwise system-wide error code.
         */
-        TInt GetShowNote( TBool& aMode );    
+        virtual TInt GetShowNote( TBool& aMode );    
     
     private:
     
@@ -194,8 +194,8 @@
         MTelephonyAudioRoutingObserver& iObserver;
     
         RArray<TAudioOutput> iAvailableOutputs;
-        TAudioOutput iCurrentOutput;
-        TAudioOutput iPreviousOutput;
+        static TAudioOutput iCurrentOutput;
+        static TAudioOutput iPreviousOutput;
     
         TBool iShowNoteMode;
 
--- a/tsrc/telephonyaudioroutingstub/src/telephonyaudioroutingstub.cpp	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/telephonyaudioroutingstub/src/telephonyaudioroutingstub.cpp	Wed Sep 01 12:31:01 2010 +0100
@@ -20,6 +20,11 @@
 
 
 
+CTelephonyAudioRouting::TAudioOutput CTelephonyAudioRouting::iCurrentOutput =
+        CTelephonyAudioRouting::ENone;
+CTelephonyAudioRouting::TAudioOutput CTelephonyAudioRouting::iPreviousOutput = 
+        CTelephonyAudioRouting::ENone;
+
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -86,6 +91,7 @@
         User::Leave( leaveValue );
         }
         
+    iPreviousOutput = iCurrentOutput;
     iCurrentOutput = aOutput;
     }
 
--- a/tsrc/unittestrunner/eunitdlls_ctc.txt	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/unittestrunner/eunitdlls_ctc.txt	Wed Sep 01 12:31:01 2010 +0100
@@ -1,39 +1,35 @@
 mmsharinguis/mmsharing/mmshengine/tsrc/ut_engine/group
 ut_musengine.dll
-0
+1
 
 mmsharinguis/mmsharing/mmshavailability/tsrc/ut_availability/group
 ut_availability.dll
-0
+1
 
 mmsharinguis/mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/group
 ut_aoplugin.dll
-0
+1
 
 mmsharinguis/mmshplugins/mmshsipcrplugin/tsrc/ut_sipcrplugin/group
 ut_sipcrplugin.dll
-0
+1
 
 mmsharinguis/mmshplugins/mmshaiwplugin/tsrc/ut_aiwplugin/group
 ut_musaiwprovider.dll
-0
+1
 
 mmsharinguis/mmshplugins/mmshwpadapterplugin/tsrc/ut_wpadapterplugin/group
 ut_muswpadapter.dll
-0
+1
 
 mmsharinguis/mmsharing/mmshmanagercli/tsrc/ut_managercli/group
 ut_musmanagerclient.dll
-0
+1
 
 mmsharinguis/mmsharing/mmshmanagersrv/tsrc/ut_managersrv/group
 ut_musmanagerserver.dll
-0
+1
 
 mmsharinguis/mmsharing/mmshindicator/tsrc/ut_indicator/group
 ut_musindicator.dll
-0
-
-mmsharinguis/mmshplugins/mmcctranscoder/tsrc/ut_transcoder/group
-ut_transcoder.dll
-0
+1
--- a/tsrc/unittestrunner/eunittest_ctc.pl	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/unittestrunner/eunittest_ctc.pl	Wed Sep 01 12:31:01 2010 +0100
@@ -42,10 +42,9 @@
 $ignoredmodeSourceRelative = "1";
 
 $coverageSymbols = "MON.sym";
-#$ctcCommandPart1 = "ctcwrap -i d -2comp -no-conf-check -n";
-$ctcCommandPart1 = "ctcwrap -i d -2comp -n";
-$ctcCommandPart2 = "sbs.bat -c winscw_udeb";
-$ctcCommandPart2Test = "sbs -c winscw_udeb.test";
+$ctcCommandPart1 = "ctcwrap -i d -n";
+$ctcCommandPart2 = "abld build winscw udeb";
+$ctcCommandPart2Test = "abld test build winscw udeb";
 $ctcIgnoredPart1 = " -C \"EXCLUDE+";
 $ctcIgnoredPart2 = "\" ";
 
@@ -240,12 +239,11 @@
 		    	unlink("$eunitDstDllLocation$currentDllNameLine");
 		    	if ($currentBuildModeLine =~ /$eunitTestBuildMode/)
 					{
-						doSystemCall("sbs -c winscw_udeb.test reallyclean ");
+						doSystemCall("abld test reallyclean winscw udeb ");
 		    	}
 		    	else
 		    	{
-		    		#doSystemCall("sbs -c winscw_udeb reallyclean ");
-		    		doSystemCall("sbs REALLYCLEAN ");
+		    		doSystemCall("abld reallyclean winscw udeb ");
 		    	}
 	    	}
 	    	else
@@ -269,15 +267,16 @@
 				else
 				{
 					print("previous dll was not from same path - build all!\n");
+					doSystemCall("bldmake bldfiles");
 					
 					if ($currentBuildModeLine =~ /$eunitTestBuildMode/)
-				    {
-                        doSystemCall("sbs -c winscw_udeb.test reallyclean ");
-                        doSystemCall("$ctcCommandPart1 $coverageResultsDir$coverageSymbols $excludedCmd $ctcCommandPart2Test");
-		    	    }
+					{
+						doSystemCall("abld test reallyclean winscw udeb ");
+		    		doSystemCall("$ctcCommandPart1 $coverageResultsDir$coverageSymbols $excludedCmd $ctcCommandPart2Test");
+		    	}
 		    	else
 		    	{
-		    		doSystemCall("sbs REALLYCLEAN ");
+		    		doSystemCall("abld reallyclean winscw udeb ");
 		    		doSystemCall("$ctcCommandPart1 $coverageResultsDir$coverageSymbols $excludedCmd $ctcCommandPart2");
 		    	}
 				}
--- a/tsrc/unittestrunner/qt_runall.cmd	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-@echo off
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:
-rem
-@echo on
-
-echo --qt_runtest.cmd ut_lcuieng--
-call qt_runtest.cmd ut_lcuieng
-echo --qt_runtest.cmd ut_lcui--
-call qt_runtest.cmd ut_lcui
--- a/tsrc/unittestrunner/qt_runtest.cmd	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-@echo off
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:
-rem
-@echo on
-
-call del %1.xml
-
-:FINAL
-echo --because xml names are defined in main.cpp this -o is unnecessary at the moment
-echo --\epoc32\release\winscw\udeb\%1.exe -xml -o c:\%1.xml
-call \epoc32\release\winscw\udeb\%1.exe -xml -o c:\%1.xml
-call copy \epoc32\winscw\c\%1.xml .
-call type %1.xml
\ No newline at end of file
--- a/tsrc/unittestrunner/qt_runtests.cmd	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-@echo off
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:
-rem
-@echo on
-
-call del MON.sym
-call del MON.dat
-
-call qmake -platform symbian-abld
-call sbs -c winscw_udeb reallyclean
-
-echo -- Build sbs -c winscw_udeb--
-call sbs -c winscw_udeb
-
-echo -- Build and instrument for Code coverage --
-echo -- ctcwrap -i f : This instruments the code for function coverage measurement 
-call ctcwrap -i d -C "EXCLUDE+*/tsrc/*" -C "EXCLUDE+*/*/tsrc/*" -C "EXCLUDE+*/*/*/tsrc/*" -C "EXCLUDE+moc_*" sbs -c winscw_udeb
-
-echo --qt_runall.cmd
-call qt_runall.cmd
-
-echo --ctcpost MON.sym MON.dat -p profile.txt
-call ctcpost MON.sym MON.dat -p profile.txt
-
-echo --you can give the output directory for the result
-echo --e.q qt_runtests.cmd R:\qtresult
-echo --ctc2html -i profile.txt -o %1
-
-IF ["%1"] EQU [""] GOTO :USEDEFDIR
-
-call ctc2html -i profile.txt -o %1
-GOTO :ENDDIR
-
-:USEDEFDIR
-echo --default output directory used
-call ctc2html -i profile.txt
-
-:ENDDIR
-echo -- Coverage calculated --
-
-:END
-echo -- Build Complete --
-
-
--- a/tsrc/unittestrunner/tsrc.pro	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#                                                                    
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).   
-# All rights reserved.                                                
-# This component and the accompanying materials are made available    
-# under the terms of "Eclipse Public License v1.0"    
-# which accompanies this distribution, and is available               
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".   
-#                                                                     
-# Initial Contributors:                                               
-# Nokia Corporation - initial contribution.                           
-#                                                                     
-# Contributors:                                                       
-#                                                                     
-# Description:                                                        
-#                                                                     
-#
-
-TEMPLATE = subdirs
-
-SUBDIRS= \
-			..\..\mmsharing\livecommsui\lcui\tsrc\ut_lcui\
-			..\..\mmsharing\livecommsui\lcuiengine\tsrc\ut_lcuieng\
-			..\..\mmsharing\mmshapp\tsrc\ut_mmshapp\
-
-include(rom/rom.pri)			
--- a/tsrc/unittestrunner/unittest_ctc.pl	Tue Aug 31 15:12:07 2010 +0300
+++ b/tsrc/unittestrunner/unittest_ctc.pl	Wed Sep 01 12:31:01 2010 +0100
@@ -299,12 +299,12 @@
 	print("\n*************************************************************\n\n");
 	print("Script runs by default all multimediasharing eunit tests\n");
 	print("and creates build, test and coverage results to:\n\n");
-	print("    $coverageResultsDirDefault\n\n");
+	print("    mmsharing/src/internal/unittestrunner/results/\n\n");
 	print("Own configuration file (list of components to be processed)\n");
 	print("can be used as well:\n\n");
 	print("    >unittest_ctc.pl -eunitdlls=myowneunitcomponents.txt\n\n");
 	print("The text file should follow the syntax of default configuration file\n");
-	print("$scriptLocation/eunitdlls_ctc.txt\n\n");
+	print("mmsharing/src/internal/unittestrunner/eunitdlls_ctc.txt\n\n");
 	print("Alloc failure simulation can be turned on with following command:\n\n");
 	print("    >unittest_ctc.pl -allocfailure=2\n\n");
 	print("Any number will turn eunit alloc on.\n");
--- a/tsrc/unittestrunner/unittest_qt.pl	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,442 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#!/usr/bin/perl
-
-use File::Copy;
-use Cwd;
-use Getopt::Long;
-use XML::Parser::Expat;
-use Data::Dumper;
-
-#---------------------------------------Initialization------------------------------------------------------#
-
-$projectrootname = "/"; #is set to correct at run-time 
-$projectdrive = "z:"; #is set to correct at run-time 
-
-$unitTestRunner = "unittest_qt.pl";
-$scriptLocation = "mmsharinguis/tsrc/unittestrunner";
-$coverageResultsDirDefault = "mmsharinguis/tsrc/unittestrunner/qtresults/";
-$testConfigDefault = "unittest_qt_config.txt";
-$qtProFileDefault = "tsrc.pro";
-$buildResults = "BuildResults.txt";
-$coverageDat = "MON.dat";
-$coverageSymbols = "MON.sym";
-$coverageProfile = "profile.txt";
-
-$coverageResultsFile = "CTCHTML/index.html";
-$finalResultsFile = "AllResults.html";
-$cssFile = "CTCHTML/ctc.css";
-$cssLink = "<link rel=\"stylesheet\"";
-
-$xmlDllLine = "TestCase";
-$xmlResultLine = "Incident";
-$xmlCaseFailed = "failed";
-$xmlCasePassed = "pass";
-$outputString = "";
-$outputFileBodyStart = "<body";
-
-$totalCount = 0;
-$passedCount = 0;
-$failedCount = 0;
-
-$qtestOutputString = "";
-
-my @testNamesAndLogFiles = ( [""],[""] ); # two dimensional array e.g. [name, log1, log2], [name2, log3, log5, log6]
-
-# from command line
-my ($param_noclean,
-		$testConfig,
-		$qtProFile,
-		$coverageResultsDir);
-
-#---------------------------------------Main Start----------------------------------------------------------#
-
-# read command line parameters
-my $result = GetOptions("noclean" 			  => \$param_noclean,
-												"config:s"	    => \$testConfig,
-												"pro:s"         => \$qtProFile,
-												"results:s"       => \$coverageResultsDir,
-												"help"						=> \$help);
-												
-$startdir = cwd;
-
-if (defined $help){
-	print_help();
-	exit;
-}
-
-findProjectDriveAndRoot();
-
-createResultsDir();
-
-# set target for intrumentation result
-$ENV{'CTC_DATA_PATH'}= "$coverageResultsDir";	
-
-doClean();
-
-parseConfigFile();
-
-buildTests();
-
-runTests();
-
-chdir($startdir);
-	
-# create textual output
-chdir("$coverageResultsDir");
-doSystemCall("ctcpost $coverageSymbols $coverageDat -p $coverageProfile -T 70");
-doSystemCall("ctc2html -i $coverageProfile -t 70");
-
-# clear target for intrumentation result
-$ENV{'CTC_DATA_PATH'}= "";	
-
-combineResults();
-
-chdir($startdir);
-
-#---------------------------------------Main Ends-------------------------------------------------------------#
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub findProjectDriveAndRoot()
-{
-		$tempStartDir = $startdir;
-		if ($tempStartDir =~ m/$scriptLocation/){
-			# extract project root
-			for ($tempStartDir) {
-				 s/$scriptLocation+$//;
-    	}
-    	# divide it to drive and root
-    	if ($tempStartDir =~ /^(.:)(.*)/){
-    		$projectdrive = $1;
-    		$projectrootname = $2;
-			}
-			print "project drive: $projectdrive \n";
-			print "project root: $projectrootname \n";
-		}
-		else{
-			print "cannot determine project drive and root, use defaults!\n";
-		}
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub createResultsDir()
-{
-    # create directory for results
-    if ( defined $coverageResultsDir ){
-        if ($coverageResultsDir =~ /^(.:)/){
-            print("Drive name given in results dir arg\n");
-        }
-        else{  
-            $coverageResultsDir = "$projectdrive" . "/" . "$coverageResultsDir";
-        }
-    }
-    else{
-        $coverageResultsDir = "$projectdrive$projectrootname$coverageResultsDirDefault";
-    }
-    print ("Writing results to $coverageResultsDir \n\n");
-    if (mkdir("$coverageResultsDir", 0755)){
-        print("The results directory was created successfully! \n");
-    } 
-    else {
-        print("The results directory already exists. \n");
-    } 
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub doClean()
-{
-    if (!defined $param_noclean)
-    {
-    	# clear previous results
-    	print("Cleaning previous results. \n");
-    	unlink("$coverageResultsDir$buildResults");
-    	unlink("$coverageResultsDir$coverageDat");
-    	unlink("$coverageResultsDir$coverageSymbols");
-    	unlink("$coverageResultsDir$coverageProfile");
-    	unlink("$coverageResultsDir$finalResultsFile");
-    }
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub parseConfigFile()
-{
-    if ( !defined $testConfig ){
-        print("Config file not defined, using default. \n");
-        $testConfig = $testConfigDefault;
-    }
-    
-    open(CONFIG, $testConfig) or die("file $testConfig not found!\n");    
-
-    @config_file_content = <CONFIG>;
-    
-  
-    for ($j = 0; $j <= $#config_file_content; $j++)
-	  {
-	     # remove \n from each line
-	    $currline = @config_file_content[$j];
-	    for ($currline) {
-	        s/\n+$//;
-	    }
-	    @{ $testNamesAndLogFiles [$j] } = split( ",", $currline );
-	  }
-	  
-	  print Dumper( @testNamesAndLogFiles );
-	  
-    close(CONFIG);
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub buildTests()
-{
-    if ( !defined $qtProFile ){
-        print("Pro file not defined, using default. \n");
-        $qtProFile = $qtProFileDefault;
-    }
-    doSystemCall( "qmake $qtProFile" );
-    doSystemCall( "sbs reallyclean" );
-    doSystemCall( "qmake $qtProFile" );
-    
-    $exclude = "-C \"EXCLUDE+*\tsrc\*\" -C \"EXCLUDE+*/*/tsrc/*\" -C \"EXCLUDE+*/*/*/tsrc/*\" -C \"EXCLUDE+moc_*\"";
-    
-    doSystemCall( "call ctcwrap -i d -n $coverageResultsDir$coverageSymbols $exclude -2comp sbs.bat -c winscw_udeb" );
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub runTests()
-{
-  for $i ( 0 .. $#testNamesAndLogFiles ) {
-    $testName = $testNamesAndLogFiles[$i][0];
-    print("Running tests for: $testName\n");
-    
-    $testCall = "\\epoc32\\release\\winscw\\udeb\\" . $testName . " -xml"; 
-    doSystemCall( $testCall );
-    
-    for $j ( 1 .. $#{ $testNamesAndLogFiles [$i] } ) {
-        $logFile = $projectdrive . "\\epoc32\\winscw\\c\\" . $testNamesAndLogFiles[$i][$j];
-        print("Copying log file: $logFile\n");
-        copy( $logFile, "$coverageResultsDir" );
-    }
-  }
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub combineResults()
-{
-    open(COVERAGE, "$coverageResultsDir$coverageResultsFile") or die("file $coverageResultsFile not found!\n");
-    @coverageFileContent = <COVERAGE>;
-    
-    # append coverage information after eunit results
-    
-    for ($j = 0; $j <= $#coverageFileContent; $j++){
-    		$currentLine = @coverageFileContent[$j];
-    		
-    		if ($currentLine =~ /$cssLink/){
-    			if ( open(CSSFILE,  "$coverageResultsDir$cssFile") ){
-    				# append css styles to results html
-    				$outputString .= "<style type=\"text/css\"> body {";
-    				@cssFileContent = <CSSFILE>;
-    				my($line);
-    				foreach $line (@cssFileContent){ 
-    					$outputString .= $line;
-    				}
-    				$outputString .= "}</style>\n";
-    				close(CSSFILE);
-    			}
-    		}
-    		else{
-    			$outputString .= $currentLine;
-    
-    			if ($currentLine =~ /$outputFileBodyStart/){
-    				$outputString .= parseXmlResults();
-    				$outputString .= "<br><br>"
-    			}
-    		}	
-    	}
-    	
-    open(NEWRESULTSFILE, "> $coverageResultsDir$finalResultsFile") or die "Cannot open final results file\n";
-    print NEWRESULTSFILE "$outputString";
-    close(NEWRESULTSFILE);
-    close(OUTPUT);
-    close(COVERAGE);
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub parseXmlResults()
-{
-    $qtestOutputString = "<span class=\"head1\">QTestLib Results</span><br><br>\n";
-    
-    
-    for $i ( 0 .. $#testNamesAndLogFiles ) {
-        $testName = $testNamesAndLogFiles[$i][0];
-        
-        for $j ( 1 .. $#{ $testNamesAndLogFiles [$i] } ) {
-            $logFile = $testNamesAndLogFiles[$i][$j];
-            if ( -e "$coverageResultsDir$logFile" ){
-                print("Parsing: $logFile\n");
-                open(TESTRESULTS,  "$coverageResultsDir$logFile");
-                $parser = new XML::Parser::Expat;
-                $parser->setHandlers('Start' => \&sh,
-                        'End'   => \&eh,
-                        'Char'  => \&ch);
-            
-                $totalCount = 0;
-    	          $passedCount = 0;
-    	          $failedCount = 0;
-    	          eval{
-                    ### try block
-                    $parser->parse(*TESTRESULTS);
-                };
-                if ($@){
-                    ### catch block
-                    print("$logFile, parsing failed\n");
-    	             $qtestOutputString .= "<span class=\"red\">$logFile parsing failed, testcase execution might have failed </span><br>\n";
-                };
-    	          close(TESTRESULTS);
-                
-            }
-            else{
-
-                print("$logFile, not found\n");
-                $qtestOutputString .= "<span class=\"head3\">";
-                $qtestOutputString .= "$testName => </span>";
-                $qtestOutputString .= "<span class=\"red\">$logFile not found, testcase building might have failed </span><br>\n";
-            }
-        }
-      }
-    
-    return $qtestOutputString;
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub sh
-{
-  my ($p, $el, %atts) = @_;
-	if ( $el eq $xmlDllLine )
-	{
-		$qtestOutputString .= "<span class=\"head3\">";
-		$dllName = %atts->{name};
-		@dllNameParts = split m!(\\)!, $dllName;
-		$dllName = $dllNameParts[$#dllNameParts];
-		$qtestOutputString .= "$dllName => </span>";
-	}
-	
-	if ( $el eq $xmlResultLine )
-	{
-		$status = %atts->{type};
-		if ( $status eq $xmlCasePassed )
-		{
-			$passedCount++;
-		}
-		else
-		{
-			$failedCount++;
-		}
-	}
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub eh
-{
-	my ($p, $el) = @_;
-	if ( $el eq $xmlDllLine )
-	{
-		$totalCount = $passedCount + $failedCount;
-		if ( $failedCount > 0 || $totalCount == 0 )
-		{
-			$qtestOutputString .= "<span class=\"red\">Testcases passed/run: $passedCount/$totalCount </span><br>\n";
-		}
-		else
-		{
-			$qtestOutputString .= "<span class=\"blue\">Testcases passed/run: $passedCount/$totalCount </span><br>\n";
-		}
-		$passedCount = 0;	
-		$failedCount = 0;
-	}
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub ch
-{
-	my ($p, $el) = @_;
-	#print ("$el\n");
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub doSystemCall
-{
-	#print("\nDoing system call: $_[0]\n");
-	#system($_[0]);
-	system("echo Doing system call: $_[0] >> $coverageResultsDir$buildResults");
-	system("$_[0] >> $coverageResultsDir$buildResults 2>&1");
-}
-
-# -----------------------------------------------------------------------------
-#
-# -----------------------------------------------------------------------------
-#
-sub print_help
-{
-	print("\n*************************************************************\n\n");
-	print("Script runs by default all multimediasharing qt tests\n");
-	print("and creates build, test and coverage results to:\n\n");
-	print("    mmsharing/src/internal/unittestrunner/qtresults/\n\n");
-	print("Own configuration file (list of components to be processed)\n");
-	print("can be used as well:\n\n");
-	print("    >unittest_ctc.pl -config=myowntestcomponents.txt\n\n");
-	print("The text file should follow the syntax of default configuration file\n");
-	print("mmsharing/src/internal/unittestrunner/unittest_qt_config.txt\n\n");
-	print("When running just some set of components you might want to \"merge\" the results");
-	print("with existing coverage results.\n");
-	print("That is possible with command:\n\n");
-	print("    >unittest_ctc.pl -eunitdlls=myowneunitcomponents.txt -noclean\n");
-	print("\n*************************************************************\n");
-}
--- a/tsrc/unittestrunner/unittest_qt_config.txt	Tue Aug 31 15:12:07 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-ut_lcuieng -noprompt,ut_lcui_lcUiEngine.xml,ut_lcui_lcactivitymanager.xml
-ut_lcui -noprompt,ut_lcui_LcViewManager.xml,ut_lcui_LcUiComponentRepository.xml,ut_lcui_LcView.xml,ut_lcui_LcEffectHandler.xml,ut_lcui_LcVideoWidget.xml
-ut_mmshapp -noprompt,ut_lcapplication.xml
\ No newline at end of file